@syncfusion/ej2-gantt 20.3.49 → 20.3.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * filename: ej2-gantt.min.js
3
- * version : 20.3.49
3
+ * version : 20.3.50
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPdfExport"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionTreegrid"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionNavigations"),require("SyncfusionCalendars"),require("SyncfusionDropdowns"),require("SyncfusionButtons"),require("SyncfusionLayouts"),require("SyncfusionRichtexteditor")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPdfExport","SyncfusionData","SyncfusionGrids","SyncfusionTreegrid","SyncfusionPopups","SyncfusionInputs","SyncfusionNavigations","SyncfusionCalendars","SyncfusionDropdowns","SyncfusionButtons","SyncfusionLayouts","SyncfusionRichtexteditor"],t):"object"==typeof exports?exports.SyncfusionGantt=t(require("SyncfusionBase"),require("SyncfusionPdfExport"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionTreegrid"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionNavigations"),require("SyncfusionCalendars"),require("SyncfusionDropdowns"),require("SyncfusionButtons"),require("SyncfusionLayouts"),require("SyncfusionRichtexteditor")):e.SyncfusionGantt=t(e.SyncfusionBase,e.SyncfusionPdfExport,e.SyncfusionData,e.SyncfusionGrids,e.SyncfusionTreegrid,e.SyncfusionPopups,e.SyncfusionInputs,e.SyncfusionNavigations,e.SyncfusionCalendars,e.SyncfusionDropdowns,e.SyncfusionButtons,e.SyncfusionLayouts,e.SyncfusionRichtexteditor)}(this,function(e,t,i,r,n,a,s,o,l,d,p,h,u){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=84)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){"use strict";function r(e,t,i){for(var r=e;r&&(i?r.id!==t:!r.classList.contains(t));)r=r.parentElement;return r}function n(e){return i.i(f.isNullOrUndefined)(e.startDate)&&i.i(f.isNullOrUndefined)(e.endDate)&&i.i(f.isNullOrUndefined)(e.duration)?null:!(i.i(f.isNullOrUndefined)(e.startDate)||i.i(f.isNullOrUndefined)(e.endDate)||i.i(f.isNullOrUndefined)(e.duration))}function a(e){return!(!e.dataSource||e.dataSource instanceof m.DataManager||!("result"in e.dataSource))}function s(e){for(var t={},i=0,r=Object.keys(e);i<r.length;i++){var n=r[i];t[e[n]]=n}return t}function o(e){if(e instanceof m.DataManager){var t=e.adaptor;return t instanceof m.ODataAdaptor||t instanceof m.ODataV4Adaptor||t instanceof m.WebApiAdaptor||t instanceof m.WebMethodAdaptor||t instanceof m.CacheAdaptor||t instanceof m.RemoteSaveAdaptor||t instanceof m.UrlAdaptor}return!1}function l(e,t,r,n){if(r){for(var a=void 0,s=0;s<e.length;s++){var o=void 0;o=t?e[s].taskData:i.i(f.extend)({},e[s].taskData,{},!0),a=o}return a}for(var a=[],s=0;s<e.length;s++){var o=void 0;!i.i(f.isNullOrUndefined)(n)&&n.timezone&&d(e[s],n),o=t?e[s].taskData:i.i(f.extend)({},e[s].taskData,{},!0),a.push(o)}return a}function d(e,t){return e.taskData[t.taskFields.startDate]=t.dateValidationModule.remove(e.ganttProperties.startDate,t.timezone),null!=t.taskFields.endDate&&(e.taskData[t.taskFields.endDate]=t.dateValidationModule.remove(e.ganttProperties.endDate,t.timezone)),(t.taskFields.baselineEndDate||t.taskFields.baselineStartDate)&&(e.taskData[t.taskFields.baselineStartDate]=t.dateValidationModule.remove(e.ganttProperties.baselineStartDate,t.timezone),e.taskData[t.taskFields.baselineEndDate]=t.dateValidationModule.remove(e.ganttProperties.baselineEndDate,t.timezone)),null}function p(e,t){for(var i,r=0;r<t.length;r++)i=new RegExp("\\{"+r+"\\}","gm"),e=e.replace(i,t[r].toString());return e}function h(e,t,r,n){for(var a=-1,s=0;s<r.length;s++)if(i.i(f.getValue)(t,r[s])===i.i(f.getValue)(t,e)&&i.i(f.isNullOrUndefined)(n)||!i.i(f.isNullOrUndefined)(n)&&i.i(f.getValue)(t,r[s])===i.i(f.getValue)(t,e)&&i.i(f.getValue)(n,r[s])===i.i(f.getValue)(n,e)){a=s;break}return a}function u(e){return 76*e/92}function c(e){return 92*e/76}function g(){return y++}t.j=r,t.c=n,t.i=a,t.d=s,t.f=o,t.e=l,t.g=d,t.l=p,t.h=h,t.a=u,t.b=c,t.k=g;var f=i(0),m=(i.n(f),i(4)),y=(i.n(m),0)},function(e,t,i){"use strict";i.d(t,"_25",function(){return r}),i.d(t,"_33",function(){return n}),i.d(t,"_32",function(){return a}),i.d(t,"_31",function(){return s}),i.d(t,"_79",function(){return o}),i.d(t,"_82",function(){return l}),i.d(t,"E",function(){return d}),i.d(t,"_83",function(){return p}),i.d(t,"_85",function(){return h}),i.d(t,"_84",function(){return u}),i.d(t,"_26",function(){return c}),i.d(t,"a",function(){return g}),i.d(t,"_35",function(){return f}),i.d(t,"_36",function(){return m}),i.d(t,"_81",function(){return y}),i.d(t,"_73",function(){return v}),i.d(t,"_74",function(){return D}),i.d(t,"_76",function(){return w}),i.d(t,"_78",function(){return k}),i.d(t,"_77",function(){return S}),i.d(t,"_75",function(){return T}),i.d(t,"_27",function(){return b}),i.d(t,"_4",function(){return P}),i.d(t,"_68",function(){return C}),i.d(t,"_60",function(){return M}),i.d(t,"_5",function(){return R}),i.d(t,"_69",function(){return x}),i.d(t,"_61",function(){return O}),i.d(t,"F",function(){return I}),i.d(t,"_63",function(){return E}),i.d(t,"_64",function(){return F}),i.d(t,"_42",function(){return U}),i.d(t,"T",function(){return V}),i.d(t,"_40",function(){return N}),i.d(t,"n",function(){return L}),i.d(t,"p",function(){return B}),i.d(t,"_51",function(){return A}),i.d(t,"_53",function(){return H}),i.d(t,"q",function(){return _}),i.d(t,"r",function(){return W}),i.d(t,"_55",function(){return j}),i.d(t,"_56",function(){return q}),i.d(t,"_57",function(){return G}),i.d(t,"_58",function(){return z}),i.d(t,"_59",function(){return X}),i.d(t,"_30",function(){return Y}),i.d(t,"_3",function(){return Z}),i.d(t,"_71",function(){return Q}),i.d(t,"_72",function(){return K}),i.d(t,"U",function(){return J}),i.d(t,"W",function(){return $}),i.d(t,"Y",function(){return ee}),i.d(t,"_47",function(){return te}),i.d(t,"_48",function(){return ie}),i.d(t,"_49",function(){return re}),i.d(t,"_46",function(){return ne}),i.d(t,"_50",function(){return ae}),i.d(t,"_65",function(){return se}),i.d(t,"_66",function(){return oe}),i.d(t,"_67",function(){return le}),i.d(t,"_7",function(){return de}),i.d(t,"_6",function(){return pe}),i.d(t,"O",function(){return he}),i.d(t,"P",function(){return ue}),i.d(t,"S",function(){return ce}),i.d(t,"Q",function(){return ge}),i.d(t,"R",function(){return fe}),i.d(t,"_39",function(){return me}),i.d(t,"_41",function(){return ye}),i.d(t,"N",function(){return ve}),i.d(t,"_11",function(){return De}),i.d(t,"_62",function(){return we}),i.d(t,"_8",function(){return ke}),i.d(t,"_9",function(){return Se}),i.d(t,"_29",function(){return Te}),i.d(t,"o",function(){return be}),i.d(t,"_38",function(){return Pe}),i.d(t,"V",function(){return Ce}),i.d(t,"X",function(){return Me}),i.d(t,"Z",function(){return Re}),i.d(t,"_37",function(){return xe}),i.d(t,"v",function(){return Oe}),i.d(t,"w",function(){return Ie}),i.d(t,"x",function(){return Ee}),i.d(t,"y",function(){return Fe}),i.d(t,"z",function(){return Ue}),i.d(t,"A",function(){return Ve}),i.d(t,"B",function(){return Ne}),i.d(t,"C",function(){return Le}),i.d(t,"D",function(){return Be}),i.d(t,"_43",function(){return Ae}),i.d(t,"_44",function(){return He}),i.d(t,"_45",function(){return _e}),i.d(t,"_52",function(){return We}),i.d(t,"_54",function(){return je}),i.d(t,"_34",function(){return qe}),i.d(t,"_1",function(){return Ge}),i.d(t,"_15",function(){return ze}),i.d(t,"s",function(){return Xe}),i.d(t,"t",function(){return Ye}),i.d(t,"u",function(){return Ze}),i.d(t,"_16",function(){return Qe}),i.d(t,"_17",function(){return Ke}),i.d(t,"_2",function(){return Je}),i.d(t,"_22",function(){return $e}),i.d(t,"_19",function(){return et}),i.d(t,"_18",function(){return tt}),i.d(t,"_23",function(){return it}),i.d(t,"_24",function(){return rt}),i.d(t,"_20",function(){return nt}),i.d(t,"_21",function(){return at}),i.d(t,"G",function(){return st}),i.d(t,"H",function(){return ot}),i.d(t,"I",function(){return lt}),i.d(t,"J",function(){return dt}),i.d(t,"_12",function(){return pt}),i.d(t,"_10",function(){return ht}),i.d(t,"_70",function(){return ut}),i.d(t,"_13",function(){return ct}),i.d(t,"_14",function(){return gt}),i.d(t,"d",function(){return ft}),i.d(t,"c",function(){return mt}),i.d(t,"b",function(){return yt}),i.d(t,"m",function(){return vt}),i.d(t,"h",function(){return Dt}),i.d(t,"i",function(){return wt}),i.d(t,"e",function(){return kt}),i.d(t,"f",function(){return St}),i.d(t,"g",function(){return Tt}),i.d(t,"j",function(){return bt}),i.d(t,"k",function(){return Pt}),i.d(t,"l",function(){return Ct}),i.d(t,"_0",function(){return Mt}),i.d(t,"K",function(){return Rt}),i.d(t,"M",function(){return xt}),i.d(t,"L",function(){return Ot}),i.d(t,"_28",function(){return It}),i.d(t,"_80",function(){return Et});var r="e-gantt",n="e-gantt-chart-pane",a="e-gantt-tree-grid-pane",s="e-gantt-splitter",o="e-gantt-chart",l="e-chart-root-container",d="e-gantt-toolbar",p="e-chart-scroll-container",h="e-chart-rows-container",u="e-content",c="e-device",g="e-grid",f="e-task-table",m="e-zero-spacing",y="e-timeline-header-container",v="e-timeline-header-table-container",D="e-timeline-header-table-body",w="e-timeline-top-header-cell",k="e-header-cell-label",S="e-weekend-header-cell",T="e-timeline-single-header-cell",b="e-timeline-single-header-outer-div",P="e-left-label-container",C="e-left-label-container e-left-label-temp-container",M="e-left-label-inner-div",R="e-right-label-container",x="e-right-label-container e-right-label-temp-container",O="e-right-label-inner-div",I="e-taskbar-main-container",E="e-gantt-parent-taskbar-inner-div",F="e-gantt-parent-progressbar-inner-div",U="e-task-label",V="e-gantt-child-taskbar-inner-div",N="e-gantt-child-progressbar-inner-div",L="e-gantt-child-critical-taskbar-inner-div",B="e-gantt-child-critical-progressbar-inner-div",A="e-milestone-top",H="e-milestone-bottom",_="e-critical-milestone-top",W="e-critical-milestone-bottom",j="e-baseline-bar",q="e-baseline-gantt-milestone-container",G="e-baseline-gantt-milestone",z="e-baseline-milestone-top",X="e-baseline-milestone-bottom",Y="e-chart-row-cell",Z="e-chart-row",Q="e-row-expand",K="e-row-collapse",J="e-taskbar-left-resizer",$="e-taskbar-right-resizer",ee="e-child-progress-resizer",te="e-progressbar-handler",ie="e-progressbar-handler-element",re="e-progressbar-handler-after",ne="e-icon",ae="e-gantt-milestone",se="e-gantt-parent-milestone",oe="e-parent-milestone-top",le="e-parent-milestone-bottom",de="e-gantt-child-taskbar",pe="e-gantt-child-progressbar",he="e-manualparent-main-container",ue="e-gantt-manualparenttaskbar",ce="e-gantt-manualparent-milestone",ge="e-manualparent-milestone-top",fe="e-manualparent-milestone-bottom",me="e-gantt-child-manualtaskbar",ye="e-gantt-child-manualprogressbar",ve="e-gantt-manualparenttaskbar-right",De="e-gantt-manualparenttaskbar-left",we="e-gantt-unscheduled-manualtask",ke="e-gantt-parent-taskbar",Se="e-gantt-parent-progressbar",Te="e-gantt-unscheduled-task",be="e-gantt-critical-unscheduled-taskbar",Pe="e-indicator-span",Ce="e-left-resize-gripper",Me="e-right-resize-gripper",Re="e-progress-resize-gripper",xe="e-label",Oe="e-event-markers-container",Ie="e-event-markers",Ee="e-span-label",Fe="e-nonworking-day-container",Ue="e-holiday-container",Ve="e-holiday",Ne="e-span",Le="e-weekend-container",Be="e-weekend",Ae="e-gantt-unscheduled-taskbar-left",He="e-gantt-unscheduled-taskbar-right",_e="e-gantt-unscheduled-taskbar",We="e-unscheduled-milestone-top",je="e-unscheduled-milestone-bottom",qe="e-gantt-dependency-view-container",Ge="e-connector-line-container",ze="e-line",Xe="e-criticalconnector-line",Ye="e-criticalconnector-line-right-arrow",Ze="e-criticalconnector-line-left-arrow",Qe="e-connector-line-right-arrow",Ke="e-connector-line-left-arrow",Je="e-connector-line-z-index",$e="e-connector-line-hover",et="e-critical-connector-line-hover",tt="e-connector-line-hover-z-index",it="e-connector-line-right-arrow-hover",rt="e-connector-line-left-arrow-hover",nt="e-critical-connector-line-right-arrow-hover",at="e-critical-connector-line-left-arrow-hover",st="e-connectorpoint-left",ot="e-connectorpoint-right",lt="e-connectorpoint-left-hover",dt="e-connectorpoint-right-hover",pt="e-gantt-false-line",ht="e-right-connectorpoint-outer-div",ut="e-left-connectorpoint-outer-div",ct="e-connectorpoint-allow-block",gt="e-gantt-tooltip",ft=".e-gridheader",mt=".e-content",yt=".e-gridform",vt="e-delete",Dt="e-save",wt="e-cancel",kt="e-edit",St="e-indent",Tt="e-outdent",bt="e-add",Pt="e-add-above",Ct="e-add-below",Mt="e-active-parent-task",Rt="e-active-child-task",xt="e-active-connected-task",Ot="e-predecessor-touch-mode",It="e-rangecontainer",Et="e-rg-rangdiv"},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t,i){"use strict";var r=i(51);i.d(t,"h",function(){return r.a});var n=i(52);i.d(t,"f",function(){return n.a}),i.d(t,"i",function(){return n.b});var a=i(54);i.d(t,"e",function(){return a.a});var s=(i(17),i(55));i.d(t,"a",function(){return s.a}),i.d(t,"g",function(){return s.b});var o=i(53);i.d(t,"b",function(){return o.a}),i.d(t,"c",function(){return o.b}),i.d(t,"d",function(){return o.c})},function(e,t){e.exports=a},function(e,t,i){"use strict";var r=i(19);i.d(t,"a",function(){return r.a});var n=i(61);i.d(t,"b",function(){return n.a});var a=i(60);i.d(t,"c",function(){return a.a});var s=i(62);i.d(t,"d",function(){return s.a});var o=i(63);i.d(t,"e",function(){return o.a});var l=i(64);i.d(t,"f",function(){return l.a});var d=i(65);i.d(t,"g",function(){return d.a});var p=i(69);i.d(t,"h",function(){return p.a});var h=i(66);i.d(t,"i",function(){return h.a});var u=i(67);i.d(t,"j",function(){return u.a});var c=i(70);i.d(t,"k",function(){return c.a});var g=i(72);i.d(t,"l",function(){return g.a});var f=i(73);i.d(t,"m",function(){return f.a});var m=i(74);i.d(t,"n",function(){return m.a}),i.d(t,"o",function(){return m.b});var y=i(75);i.d(t,"p",function(){return y.a});var v=i(71);i.d(t,"q",function(){return v.a}),i.d(t,"r",function(){return v.b});var D=i(68);i.d(t,"s",function(){return D.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.parent=e}return e.prototype.isValidateNonWorkDays=function(e){return!i.i(r.isNullOrUndefined)(e)&&e.isAutoSchedule&&(!this.parent.includeWeekend||this.parent.totalHolidayDates.length>0)||i.i(r.isNullOrUndefined)(e)&&(!this.parent.includeWeekend||this.parent.totalHolidayDates.length>0)},e.prototype.checkStartDate=function(e,t,n,a){if(i.i(r.isNullOrUndefined)(e))return null;var s=new Date(e.getTime()),o=this.getSecondsInDecimal(s);if(n=i.i(r.isNullOrUndefined)(n)?!i.i(r.isNullOrUndefined)(t)&&t.isMilestone:n,o<this.parent.defaultStartTime&&(!n||a))this.setTime(this.parent.defaultStartTime,s);else if(o<this.parent.defaultStartTime&&n)this.setTime(this.parent.defaultStartTime,s);else if(o===this.parent.defaultEndTime&&(!t||!n)||o>this.parent.defaultEndTime)s.setDate(s.getDate()+1),this.setTime(this.parent.defaultStartTime,s);else if(o>this.parent.defaultStartTime&&o<this.parent.defaultEndTime)for(var l=0;l<this.parent.workingTimeRanges.length;l++){var d=this.parent.workingTimeRanges[l];if(o>=d.to&&this.parent.workingTimeRanges[l+1]&&o<this.parent.workingTimeRanges[l+1].from){(o!==d.to||t&&n)&&o===d.to||this.setTime(this.parent.workingTimeRanges[l+1].from,s);break}}var p;do{p=new Date(s.getTime());var h=this.parent.totalHolidayDates.length;if(this.isValidateNonWorkDays(t)){var u=!n||a?this.parent.defaultStartTime:this.parent.defaultEndTime;if(!this.parent.includeWeekend){var c=new Date(s.getTime());s=this.getNextWorkingDay(s),c.getTime()!==s.getTime()&&this.setTime(u,s)}for(var g=0;g<h;g++){var f=this.getDateFromFormat(new Date(this.parent.totalHolidayDates[g])),m=new Date(f.getTime());f.setHours(0,0,0,0),m.setHours(23,59,59,59),s.getTime()>=f.getTime()&&s.getTime()<m.getTime()&&(s.setDate(s.getDate()+1),this.setTime(u,s))}}}while(p.getTime()!==s.getTime());return new Date(s.getTime())},e.prototype.checkEndDate=function(e,t,n){if(i.i(r.isNullOrUndefined)(e))return null;var a=new Date(e.getTime()),s=this.getSecondsInDecimal(a);if(s>this.parent.defaultEndTime)this.setTime(this.parent.defaultEndTime,a);else if(s<=this.parent.defaultStartTime&&!n)a.setDate(a.getDate()-1),this.setTime(this.parent.defaultEndTime,a);else if(s>this.parent.defaultStartTime&&s<this.parent.defaultEndTime)for(var o=0;o<this.parent.workingTimeRanges.length;o++){var l=this.parent.workingTimeRanges[o];if(s>l.to&&this.parent.workingTimeRanges[o+1]&&s<=this.parent.workingTimeRanges[o+1].from){this.setTime(this.parent.workingTimeRanges[o].to,a);break}}var d;do{d=new Date(a.getTime());var p=this.parent.totalHolidayDates.length;if(this.isValidateNonWorkDays(t)){if(!this.parent.includeWeekend){var h=new Date(a.getTime());a=this.getPreviousWorkingDay(a),h.getTime()!==a.getTime()&&this.setTime(this.parent.defaultEndTime,a)}for(var u=0;u<p;u++){var c=this.getDateFromFormat(new Date(this.parent.totalHolidayDates[u])),g=new Date(c.getTime()),f=new Date(a.getTime());f.setMinutes(a.getMilliseconds()-2),c.setHours(0,0,0,0),g.setHours(23,59,59,59),(a.getTime()>=c.getTime()&&a.getTime()<g.getTime()||f.getTime()>=c.getTime()&&f.getTime()<g.getTime())&&(a.setDate(a.getDate()-1),a.getTime()===c.getTime()&&86400===this.parent.defaultEndTime&&0===this.getSecondsInDecimal(a)||this.setTime(this.parent.defaultEndTime,a))}}}while(d.getTime()!==a.getTime());return new Date(a.getTime())},e.prototype.checkBaselineStartDate=function(e){if(i.i(r.isNullOrUndefined)(e))return null;var t=new Date(e.getTime()),n=this.getSecondsInDecimal(t);if(n<this.parent.defaultStartTime)this.setTime(this.parent.defaultStartTime,t);else if(n>this.parent.defaultEndTime)t.setDate(t.getDate()+1),this.setTime(this.parent.defaultStartTime,t);else if(n>this.parent.defaultStartTime&&n<this.parent.defaultEndTime)for(var a=0;a<this.parent.workingTimeRanges.length;a++){var s=this.parent.workingTimeRanges[a];if(n>=s.to&&this.parent.workingTimeRanges[a+1]&&n<this.parent.workingTimeRanges[a+1].from){this.setTime(this.parent.workingTimeRanges[a+1].from,t);break}}return t},e.prototype.checkBaselineEndDate=function(e,t){if(i.i(r.isNullOrUndefined)(e))return null;var n=new Date(e.getTime()),a=this.getSecondsInDecimal(n);if(a>this.parent.defaultEndTime)this.setTime(this.parent.defaultEndTime,n);else if(a<=this.parent.defaultStartTime&&!i.i(r.isNullOrUndefined)(t)&&!t.isMilestone)n.setDate(n.getDate()-1),this.setTime(this.parent.defaultEndTime,n);else if(a>this.parent.defaultStartTime&&a<this.parent.defaultEndTime)for(var s=0;s<this.parent.workingTimeRanges.length;s++){var o=this.parent.workingTimeRanges[s];if(a>o.to&&this.parent.workingTimeRanges[s+1]&&a<=this.parent.workingTimeRanges[s+1].from){this.setTime(this.parent.workingTimeRanges[s].to,n);break}}return n},e.prototype.calculateStartDate=function(e){var t=e.ganttProperties,n=null;i.i(r.isNullOrUndefined)(t.endDate)||i.i(r.isNullOrUndefined)(t.duration)||(n=this.getStartDate(t.endDate,t.duration,t.durationUnit,t)),this.parent.setRecordValue("startDate",n,t,!0),this.parent.taskFields.startDate&&this.parent.dataOperation.updateMappingData(e,"startDate")},e.prototype.calculateEndDate=function(e){var t=e.ganttProperties,n=null;if(!i.i(r.isNullOrUndefined)(t.startDate)){if(!i.i(r.isNullOrUndefined)(t.endDate)&&i.i(r.isNullOrUndefined)(t.duration)&&(1===this.compareDates(t.startDate,t.endDate)&&(this.parent.setRecordValue("startDate",new Date(t.endDate.getTime()),t,!0),this.setTime(this.parent.defaultStartTime,t.startDate)),this.calculateDuration(e)),!i.i(r.isNullOrUndefined)(t.duration)){var a=!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0?this.totalDuration(t.segments):t.duration;n=this.getEndDate(t.startDate,a,t.durationUnit,t,!1)}this.parent.setRecordValue("endDate",n,t,!0)}this.parent.taskFields.endDate&&this.parent.dataOperation.updateMappingData(e,"endDate")},e.prototype.totalDuration=function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i].duration+e[i].offsetDuration;return t},e.prototype.calculateDuration=function(e){var t,n=e.ganttProperties;t=!i.i(r.isNullOrUndefined)(n.segments)&&n.segments.length>0&&!i.i(r.isNullOrUndefined)(this.parent.editModule.taskbarEditModule)?this.parent.editModule.taskbarEditModule.sumOfDuration(n.segments):i.i(r.isNullOrUndefined)(n.startDate)||i.i(r.isNullOrUndefined)(n.endDate)||n.startDate.getTime()!==n.endDate.getTime()||i.i(r.isNullOrUndefined)(e.taskData[this.parent.taskFields.milestone])?this.getDuration(n.startDate,n.endDate,n.durationUnit,n.isAutoSchedule,n.isMilestone):1,this.parent.setRecordValue("duration",t,n,!0);var a=this.parent.columnByField[this.parent.columnMapping.duration];if(!(i.i(r.isNullOrUndefined)(this.parent.editModule)||i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)||this.parent.editModule.cellEditModule.isCellEdit||i.i(r.isNullOrUndefined)(a))){if(!i.i(r.isNullOrUndefined)(a.edit)&&!i.i(r.isNullOrUndefined)(a.edit.read)){var s=this.parent.editModule.dialogModule.dialog;if(!i.i(r.isNullOrUndefined)(s)){var o=s.querySelector("#"+this.parent.element.id+"Duration").ej2_instances[0];i.i(r.isNullOrUndefined)(o)||o.value===t.toString()||(o.value=t.toString(),o.dataBind())}}this.parent.taskFields.duration&&(this.parent.dataOperation.updateMappingData(e,"duration"),this.parent.taskFields.durationUnit&&this.parent.dataOperation.updateMappingData(e,"durationUnit"))}},e.prototype.getNonworkingTime=function(e,t,n,a){a=!!i.i(r.isNullOrUndefined)(a)||a;var s=!this.parent.includeWeekend&&n?this.getWeekendCount(e,t):0,o=this.getNumberOfSeconds(e,t,a),l=n?this.getHolidaysCount(e,t):0,d=(o-86400*s-86400*l)/86400,p=this.getNonWorkingSecondsOnDate(e,t,n);return d*(86400-this.parent.secondsPerDay)+86400*s+86400*l+p},e.prototype.getDuration=function(e,t,n,a,s,o){if(i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(t))return null;o=!!i.i(r.isNullOrUndefined)(o)||o;var l=0,d=this.getTimeDifference(e,t,o)/1e3,p=this.getNonworkingTime(e,t,a,o),h=d-p;return l=s&&this.parent.getFormatedDate(e)===this.parent.getFormatedDate(t)?0:n&&"day"!==n?"minute"===n?h/60:h/3600:h/this.parent.secondsPerDay,parseFloat(l.toString())},e.prototype.getDurationAsSeconds=function(e,t){return t&&"day"!==t?"hour"===t?3600*e:60*e:this.parent.secondsPerDay*e},e.prototype.getEndDate=function(e,t,i,r,n){for(var a=new Date(e.getTime()),s=new Date(e.getTime()),o=this.getDurationAsSeconds(t,i),l=0,d=0;o>0;)s.setSeconds(s.getSeconds()+o),l=this.getNonworkingTime(a,s,r.isAutoSchedule,!0),d=o-l,o-=d,o>0&&(s=this.checkStartDate(s,r,n)),a=new Date(s.getTime());return s},e.prototype.getStartDate=function(e,t,i,r){for(var n=new Date(e.getTime()),a=new Date(e.getTime()),s=this.getDurationAsSeconds(t,i),o=0,l=0;s>0;)a.setSeconds(a.getSeconds()-s),o=this.getNonworkingTime(a,n,r.isAutoSchedule,!0),l=s-o,s-=l,s>0&&(n=this.checkEndDate(a,r)),n=new Date(a.getTime());return a},e.prototype.getProjectStartDate=function(e,t){if(!i.i(r.isNullOrUndefined)(this.parent.cloneProjectStartDate)){"string"==typeof this.parent.cloneProjectStartDate&&(this.parent.cloneProjectStartDate=this.getDateFromFormat(this.parent.cloneProjectStartDate));var n=this.checkStartDate(this.parent.cloneProjectStartDate);return this.parent.cloneProjectStartDate=n,new Date(n.getTime())}if(i.i(r.isNullOrUndefined)(this.parent.projectStartDate)){if(i.i(r.isNullOrUndefined)(t))return null;var a=this.parent.flatData,s=void 0;a.length>0?s=a[0].ganttProperties.startDate:(s=new Date,s.setHours(0,0,0,0));for(var o=1;o<a.length;o++){var l=a[o].ganttProperties.startDate;i.i(r.isNullOrUndefined)(l)||-1!==this.compareDates(l,s)||(s=l)}this.parent.cloneProjectStartDate=this.checkStartDate(s,e)}else{var n=this.getDateFromFormat(this.parent.projectStartDate);this.parent.cloneProjectStartDate=this.checkStartDate(n)}return new Date(this.parent.cloneProjectStartDate.getTime())},e.prototype.getValidStartDate=function(e,t){var n=null,a=t?e.autoStartDate:e.startDate,s=t?e.autoEndDate:e.endDate,o=!e.isAutoSchedule&&e.autoDuration?e.autoDuration:e.duration;return i.i(r.isNullOrUndefined)(a)?i.i(r.isNullOrUndefined)(s)?i.i(r.isNullOrUndefined)(o)||(n=this.getProjectStartDate(e)):(n=new Date(s.getTime()),this.setTime(this.parent.defaultStartTime,n)):n=new Date(a.getTime()),n},e.prototype.getValidEndDate=function(e,t){var n=null,a=t?e.autoStartDate:e.startDate,s=t?e.autoEndDate:e.endDate,o=t?e.autoDuration:e.duration;if(i.i(r.isNullOrUndefined)(s))if(i.i(r.isNullOrUndefined)(a)){if(!i.i(r.isNullOrUndefined)(o)){var l=this.getValidStartDate(e);l&&(n=this.getEndDate(l,o,e.durationUnit,e,!1))}}else e.isMilestone?n=this.checkStartDate(a):(n=new Date(a.getTime()),this.setTime(this.parent.defaultEndTime,n));else n=new Date(s.getTime());return n},e.prototype.getSecondsPerDay=function(){var e=this.parent.dayWorkingTime,t=e.length,n=0,a=new Date("10/11/2018");this.parent.nonWorkingHours=[];var s=this.parent.nonWorkingHours;this.parent.workingTimeRanges=[];var o=this.parent.workingTimeRanges;this.parent.nonWorkingTimeRanges=[];for(var l=this.parent.nonWorkingTimeRanges,d=0;d<t;d++){var p=e[d];if(!i.i(r.isNullOrUndefined)(p.from)&&!i.i(r.isNullOrUndefined)(p.to)){a.setHours(0,0,0,0);var h=new Date(a.getTime());a.setTime(a.getTime()+36e5*p.from);var u=new Date(a.getTime());h.setTime(h.getTime()+36e5*p.to);var c=new Date(h.getTime()),g=c.getTime()-u.getTime(),f=this.getSecondsInDecimal(u),m=this.getSecondsInDecimal(c);0===m&&(m=86400),n+=g/1e3,0===d&&(this.parent.defaultStartTime=f),d===t-1&&(this.parent.defaultEndTime=m),d>0?(s.push(s[s.length-1]+f-o[d-1].to),o[d-1].to<f&&l.push({from:o[d-1].to,to:f,isWorking:!1,interval:f-o[d-1].to})):(s.push(0),l.push({from:0,to:f,isWorking:!1,interval:f})),o.push({from:f,to:m}),l.push({from:f,to:m,isWorking:!0,interval:m-f})}}return this.parent.defaultEndTime/3600!=24&&l.push({from:this.parent.defaultEndTime,to:86400,isWorking:!1,interval:86400-this.parent.defaultEndTime}),n},e.prototype.getDurationValue=function(e,t){var n=null,a=null;if("string"==typeof e){var s=e.match(/(\d*\.*\d+|.+$)/g);if(s&&s.length<=2){a=parseFloat(s[0].toString().trim());var o=s[1]?s[1].toString().trim().toLowerCase():null;-1!==i.i(r.getValue)("minute",this.parent.durationUnitEditText).indexOf(o)?n="minute":-1!==i.i(r.getValue)("hour",this.parent.durationUnitEditText).indexOf(o)?n="hour":-1!==i.i(r.getValue)("day",this.parent.durationUnitEditText).indexOf(o)&&(n="day")}}else a=e,n=null;return{duration:a,durationUnit:n}},e.prototype.getNextWorkingDay=function(e){var t=e.getDay();return-1!==this.parent.nonWorkingDayIndex.indexOf(t)?(e.setDate(e.getDate()+1),e=this.getNextWorkingDay(e)):e},e.prototype.getWeekendCount=function(e,t){var i=0,r=new Date(e.getTime()),n=new Date(t.getTime());for(r.setHours(0,0,0,0),r.setDate(r.getDate()+1),n.setHours(0,0,0,0);r.getTime()<n.getTime();)-1!==this.parent.nonWorkingDayIndex.indexOf(r.getDay())&&(i+=1),r.setDate(r.getDate()+1);return i},e.prototype.getNumberOfSeconds=function(e,t,i){var r=new Date(e.getTime()),n=new Date(t.getTime()),a=0;return r.setDate(r.getDate()+1),r.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()<n.getTime()&&(a=this.getTimeDifference(r,n,i)/1e3),a%86400!=0&&(a=a-a%86400+86400),a},e.prototype.getHolidaysCount=function(e,t){var i=0,r=this.parent.totalHolidayDates,n=new Date(e.getTime()),a=new Date(t.getTime());if(n.setDate(n.getDate()+1),n.setHours(0,0,0,0),a.setHours(0,0,0,0),n.getTime()<a.getTime())for(var s=0;s<r.length;s++){var o=this.getDateFromFormat(new Date(r[s]));n.getTime()<=o.getTime()&&a.getTime()>o.getTime()&&(!this.parent.includeWeekend&&-1===this.parent.nonWorkingDayIndex.indexOf(o.getDay())||this.parent.includeWeekend)&&(i+=1)}return i},e.prototype.getHolidayDates=function(){for(var e=this.parent.holidays,t=[],n=0;n<e.length;n++){var a=this.getDateFromFormat(e[n].from),s=this.getDateFromFormat(e[n].to);if(!i.i(r.isNullOrUndefined)(a)||!i.i(r.isNullOrUndefined)(s))if(i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(s)){var o=a||s;o.setHours(0,0,0,0),-1===t.indexOf(o.getTime())&&t.push(o.getTime())}else for(;a<=s;)a.setHours(0,0,0,0),-1===t.indexOf(a.getTime())&&t.push(a.getTime()),a.setDate(a.getDate()+1)}return t},e.prototype.isOnHolidayOrWeekEnd=function(e,t){if(!(t=i.i(r.isNullOrUndefined)(t)?this.parent.includeWeekend:t)&&-1!==this.parent.nonWorkingDayIndex.indexOf(e.getDay()))return!0;for(var n=this.parent.totalHolidayDates,a=0;a<n.length;a++){var s=this.getDateFromFormat(new Date(n[a])),o=new Date(s.getTime());if(s.setHours(0,0,0,0),o.setHours(23,59,59,59),e.getTime()>=s.getTime()&&e.getTime()<o.getTime())return!0}return!1},e.prototype.getNonWorkingSecondsOnDate=function(e,t,i){for(var r=this.getSecondsInDecimal(e),n=this.getSecondsInDecimal(t),a=-1,s=-1,o=0,l=!!i&&this.isOnHolidayOrWeekEnd(e,null),d=!!i&&this.isOnHolidayOrWeekEnd(t,null),p=0;p<this.parent.nonWorkingTimeRanges.length;p++){var h=this.parent.nonWorkingTimeRanges[p];r>=h.from&&r<=h.to&&(a=p),n>=h.from&&n<=h.to&&(s=p)}if(e.getDate()!==t.getDate()||e.getMonth()!==t.getMonth()||e.getFullYear()!==t.getFullYear()){if(l)o+=86400-r;else for(var p=a;p<this.parent.nonWorkingTimeRanges.length;p++)this.parent.nonWorkingTimeRanges[p].isWorking||(o+=p===a?this.parent.nonWorkingTimeRanges[p].to-r:this.parent.nonWorkingTimeRanges[p].interval);if(d)o+=n;else for(var p=0;p<=s;p++)this.parent.nonWorkingTimeRanges[p].isWorking||(o+=p===s?n-this.parent.nonWorkingTimeRanges[p].from:this.parent.nonWorkingTimeRanges[p].interval)}else if(a!==s)if(d)o+=n-r;else for(var p=a;p<=s;p++)this.parent.nonWorkingTimeRanges[p].isWorking||(o+=p===a?this.parent.nonWorkingTimeRanges[p].to-r:p===s?n-this.parent.nonWorkingTimeRanges[p].from:this.parent.nonWorkingTimeRanges[p].interval);else if(d)o+=n-r;else{var u=this.parent.nonWorkingTimeRanges[a];u.isWorking||(o=n-r)}return o},e.prototype.getPreviousWorkingDay=function(e){var t=e.getDay(),i=0===t?6:t-1;return-1!==this.parent.nonWorkingDayIndex.indexOf(t)||-1!==this.parent.nonWorkingDayIndex.indexOf(i)&&86400===this.parent.defaultEndTime&&0===this.getSecondsInDecimal(e)?(e.setDate(e.getDate()-1),-1!==this.parent.nonWorkingDayIndex.indexOf(e.getDay())&&(e=this.getPreviousWorkingDay(e)),e):e},e.prototype.getNonWorkingDayIndex=function(){var e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],t=e.length;0===this.parent.workWeek.length&&(this.parent.workWeek=["Monday","Tuesday","Wednesday","Thursday","Friday"]);for(var i=this.parent.workWeek.slice(),r=i.length,n=0;n<r;n++)i[n]=i[n].toLowerCase();this.parent.nonWorkingDayIndex=[];for(var n=0;n<t;n++)-1===i.indexOf(e[n])&&this.parent.nonWorkingDayIndex.push(n)},e.prototype.setTime=function(e,t){var i=e/3600;i=parseInt(i,10);var r=(e-3600*i)/60;r=parseInt(r,10);var n=e-3600*i-60*r;t.setHours(i,r,n)},e.prototype.getTimeDifference=function(e,t,i){var r=new Date(e.getTime()),n=new Date(t.getTime());return i&&this.updateDateWithTimeZone(r,n),n.getTime()-r.getTime()},e.prototype.updateDateWithTimeZone=function(e,t){var i,r,n=e.getTimezoneOffset(),a=t.getTimezoneOffset();if(n!==a){var s=new Date((new Date).getFullYear(),0,1).getTimezoneOffset();if(s!==n?(r=e,i=n):s!==a&&(r=t,i=a),s<0){var o=s-i;r.setTime(r.getTime()+60*o*1e3)}else if(s>=0){var o=i-s;r.setTime(r.getTime()-60*o*1e3)}}},e.prototype.getSecondsInDecimal=function(e){return 60*e.getHours()*60+60*e.getMinutes()+e.getSeconds()+e.getMilliseconds()/1e3},e.prototype.offset=function(e,t){var i=e.getTimezoneOffset();try{var r=new Date(e.toLocaleString("en-US",{timeZone:t}));return isNaN(r.getTime())?0:(e.getTime()-r.getTime())/6e4+i}catch(e){return 0}},e.prototype.remove=function(e,t){return i.i(r.isNullOrUndefined)(e)||(e=this.reverse(e,t,e.getTimezoneOffset())),e},e.prototype.reverse=function(e,t,i){"string"==typeof t&&(t=this.offset(e,t)),"string"==typeof i&&(i=this.offset(e,i));var r=e.getTimezoneOffset();e=new Date(e.getTime()+6e4*(t-i));var n=e.getTimezoneOffset();return new Date(e.getTime()+6e4*(n-r))},e.prototype.convert=function(e,t){var i=e.getTimezoneOffset(),r=this.offset(e,t);e=new Date(e.getTime()+6e4*(i-r));var n=e.getTimezoneOffset();return new Date(e.getTime()+6e4*(n-i))},e.prototype.getDateFromFormat=function(e,t){var n;if(i.i(r.isNullOrUndefined)(e))return null;if(e instanceof Date)n=new Date(e.getTime());else{var a=this.parent.globalize.parseDate(e,{format:this.parent.getDateFormat(),type:"dateTime"});n=i.i(r.isNullOrUndefined)(a)&&!isNaN(new Date(e).getTime())?new Date(e):a}if(!i.i(r.isNullOrUndefined)(this.parent.timezone)&&t){return this.convert(n,this.parent.timezone)}return n},e.prototype.compareDates=function(e,t){return i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(t)?!i.i(r.isNullOrUndefined)(e)&&i.i(r.isNullOrUndefined)(t)?1:i.i(r.isNullOrUndefined)(e)&&!i.i(r.isNullOrUndefined)(t)?-1:null:e.getTime()>t.getTime()?1:e.getTime()<t.getTime()?-1:0},e.prototype.getDurationString=function(e,t){var n="";if(!i.i(r.isNullOrUndefined)(e)&&(n+=parseFloat(e.toFixed(2))+" ",!i.i(r.isNullOrUndefined)(t))){var a=1!==e;"day"===t?n+=a?this.parent.localeObj.getConstant("days"):this.parent.localeObj.getConstant("day"):"hour"===t?n+=a?this.parent.localeObj.getConstant("hours"):this.parent.localeObj.getConstant("hour"):"minute"===t&&(n+=a?this.parent.localeObj.getConstant("minutes"):this.parent.localeObj.getConstant("minute"))}return n},e.prototype.getWorkString=function(e,t){var n="";if(!i.i(r.isNullOrUndefined)(e)&&(n+=parseFloat(e).toFixed(2)+" ",!i.i(r.isNullOrUndefined)(t))){var a=1!==e;"day"===t?n+=a?this.parent.localeObj.getConstant("days"):this.parent.localeObj.getConstant("day"):"hour"===t?n+=a?this.parent.localeObj.getConstant("hours"):this.parent.localeObj.getConstant("hour"):"minute"===t&&(n+=a?this.parent.localeObj.getConstant("minutes"):this.parent.localeObj.getConstant("minute"))}return n},e.prototype.calculateProjectDatesForValidatedTasks=function(e){var t=this,n="string"==typeof this.parent.projectStartDate?new Date(this.parent.projectStartDate):this.parent.projectStartDate,a="string"==typeof this.parent.projectEndDate?new Date(this.parent.projectEndDate):this.parent.projectEndDate,s=null,o=null,l=i.i(r.getValue)("dataOperation.dataArray",this.parent);if(n&&a||!l||0!==l.length){if(l.length>0){var d=l.slice().sort(function(e,i){return new Date(e[t.parent.taskFields.startDate]).getTime()-new Date(i[t.parent.taskFields.startDate]).getTime()}),p=l.slice().sort(function(e,i){return new Date(i[t.parent.taskFields.endDate]).getTime()-new Date(e[t.parent.taskFields.endDate]).getTime()});s=d[0][this.parent.taskFields.startDate],o=p[p.length-1][this.parent.taskFields.endDate]}}else s=this.getDateFromFormat(new Date),o=this.getDateFromFormat(new Date(s.getTime()));this.parent.cloneProjectStartDate=n?new Date(n.getTime()):"string"==typeof s?new Date(s):s,this.parent.cloneProjectEndDate=a?new Date(a.getTime()):"string"==typeof o?new Date(o):o},e.prototype.calculateProjectDates=function(e){var t=this;if(this.parent.isLoad&&this.parent.enablePersistence&&this.parent.cloneProjectStartDate&&this.parent.cloneProjectEndDate)return this.parent.cloneProjectStartDate=this.getDateFromFormat(this.parent.cloneProjectStartDate),void(this.parent.cloneProjectEndDate=this.getDateFromFormat(this.parent.cloneProjectEndDate));var n="string"==typeof this.parent.projectStartDate?new Date(this.parent.projectStartDate):this.parent.projectStartDate,a="string"==typeof this.parent.projectEndDate?new Date(this.parent.projectEndDate):this.parent.projectEndDate,s=this.parent.timelineModule.isZooming&&this.parent.cloneProjectStartDate?this.getDateFromFormat(this.parent.cloneProjectStartDate):this.getDateFromFormat(n),o=this.parent.timelineModule.isZooming&&this.parent.cloneProjectEndDate?this.getDateFromFormat(this.parent.cloneProjectEndDate):this.getDateFromFormat(a),l=null,d=null,p=this.parent.flatData,h=this.parent.currentViewData,u=[],c=function(e){i.i(r.isNullOrUndefined)(e)||u.push(e)},g=function(e){e.length>0&&(e.sort(function(e,t){return e.getTime()-t.getTime()}),l=new Date(e[0].getTime()),d=e.length>1?new Date(e[e.length-1].getTime()):null)};if((!s||!o)&&p.length>0||e||this.parent.timelineModule.isZoomToFit){var f=void 0;if(f=h.length>0&&this.parent.timelineModule.isZoomToFit&&this.parent.treeGrid.filterModule&&this.parent.treeGrid.filterModule.filteredResult.length>0?h:p,f.forEach(function(e){u=[];var i=e.ganttProperties,r=t.getValidStartDate(i),n=t.getValidEndDate(i);c(l),c(d),c(r),c(n),t.parent.renderBaseline&&!t.parent.timelineModule.isZoomToFit&&(c(i.baselineStartDate),c(i.baselineEndDate)),i.indicators&&i.indicators.length>0&&!t.parent.timelineModule.isZoomToFit&&i.indicators.forEach(function(e){c(t.getDateFromFormat(e.date))}),g(u)}),u=[],c(l),c(d),this.parent.eventMarkers.length>0&&!this.parent.timelineModule.isZoomToFit){this.parent.eventMarkers.forEach(function(e,i){c(t.getDateFromFormat(e.day))})}if(this.parent.totalHolidayDates.length>0&&!this.parent.timelineModule.isZoomToFit){this.parent.totalHolidayDates.forEach(function(e,t){c(new Date(e))})}g(u),l&&d||(l?l=i.i(r.isNullOrUndefined)(l)?this.getDateFromFormat(new Date):l:(l=i.i(r.isNullOrUndefined)(l)?this.getDateFromFormat(new Date):l,l.setHours(0,0,0,0)),d=this.getDateFromFormat(new Date(l.getTime())),d.setDate(d.getDate()+20))}else s&&o||0!==p.length||(l=this.getDateFromFormat(new Date),d=this.getDateFromFormat(new Date(l.getTime())));e?(i.i(r.setValue)("minStartDate",l,e),i.i(r.setValue)("maxEndDate",d,e)):(this.prevProjectStartDate=this.parent.cloneProjectStartDate,this.parent.cloneProjectStartDate=l||new Date(s.getTime()),this.parent.cloneProjectEndDate=d||new Date(o.getTime()))},e.prototype.splitTasksDuration=function(e){for(var t=0,i=0;i<e.length;i++){var r=e[i],n=r.startDate,a=r.endDate;t+=Math.ceil(this.getTimeDifference(n,a)/864e5)}return t},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var r;!function(e){e[e.NextPage=0]="NextPage",e[e.LastPage=1]="LastPage"}(r||(r={}))},function(e,t){e.exports=s},function(e,t){e.exports=o},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(2),n=i(0),a=(i.n(n),function(){function e(e){this.parentRecord=[],this.parentIds=[],this.parentPredecessors=[],this.parent=e,this.dateValidateModule=this.parent.dateValidationModule}return e.prototype.ensurePredecessorCollection=function(){for(var e=this.parent.predecessorsCollection,t=e.length-1,i=t;i>=0;i--){var r=e[i],n=r.ganttProperties;this.ensurePredecessorCollectionHelper(r,n)}},e.prototype.ensurePredecessorCollectionHelper=function(e,t){var r=t.predecessorsName;if(!r||"string"!=typeof r&&"number"!=typeof r){if(r&&"object"==typeof r&&r.length){for(var a=[],s=0;s<r.length;s++){var o=r[s],l={};l.from=i.i(n.getValue)("from",o),l.to=i.i(n.getValue)("to",o)?i.i(n.getValue)("to",o):t.rowUniqueID,l.type=i.i(n.getValue)("type",o)?i.i(n.getValue)("type",o):"FS";var d=i.i(n.getValue)("offset",o);if(i.i(n.isNullOrUndefined)(d))l.offset=0,l.offsetUnit=this.parent.durationUnit.toLocaleLowerCase();else if("string"==typeof d){var p=this.getOffsetDurationUnit(i.i(n.getValue)("offset",o));l.offset=p.duration,l.offsetUnit=p.durationUnit}else l.offset=parseFloat(d.toString()),l.offsetUnit=this.parent.durationUnit.toLocaleLowerCase();var h=this.checkIsParent(l.from.toString());h||a.push(l)}this.parent.setRecordValue("predecessor",a,t,!0)}}else this.parent.setRecordValue("predecessor",this.calculatePredecessor(r,e),t,!0);this.parent.setRecordValue("predecessorsName",this.getPredecessorStringValue(e),t,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,t.predecessorsName,e),this.parent.setRecordValue(this.parent.taskFields.dependency,t.predecessorsName,e)},e.prototype.updateUnscheduledDependency=function(e){for(var t=this.parent.taskFields,r=i.i(n.isNullOrUndefined)(e[t.dependency])?[]:e[t.dependency].toString().split(","),a=0;a<r.length;a++){var s=parseInt(r[a],10);if(!isNaN(s)){var o=this.parent.getRecordByID(s.toString()),l=i.i(n.isNullOrUndefined)(o)?null:i.i(n.extend)({},{},o.taskData,!0);!i.i(n.isNullOrUndefined)(l)&&i.i(n.isNullOrUndefined)(l[t.startDate])&&i.i(n.isNullOrUndefined)(l[t.duration])&&i.i(n.isNullOrUndefined)(l[t.endDate])&&(l[t.duration]=1,l[t.startDate]=this.parent.projectStartDate,this.parent.updateRecordByID(l))}}},e.prototype.checkIsParent=function(e){var t=!1;return this.parent.connectorLineModule.getRecordByID(e).hasChildRecords&&(t=!0),t},e.prototype.calculatePredecessor=function(e,t){var i,r,n,a,s=this,o=e.toString(),l=[];return o.split(",").forEach(function(e){r=e.split("+"),n="+",e.indexOf("-")>=0&&(r=e.split("-"),n="-"),i=[];var o="ResourceView"===s.parent.viewType?s.parent.getTaskIds():s.parent.ids;-1!==("ResourceView"===s.parent.viewType?o.indexOf("T"+r[0]):o.indexOf(r[0]))?i[0]=r[0]:-1===o.indexOf(r[0])?(i=r[0].split(" "),1===i.length&&(-1!=i[0].indexOf(" ")?i=r[0].match(/(\d+|[A-z]+)/g):(i[0]=r[0].slice(0,-2),i[1]=r[0].slice(-2)))):i[0]=r[0];var d="ResourceView"===s.parent.viewType?o.indexOf("T"+i[0]):o.indexOf(i[0]);if(i[0]&&-1!==d){if(i.length>1){var p=i[1].toUpperCase();a="FS"===p||"FF"===p||"SF"===p||"SS"===p?p:"FS"}else a="FS";var h=r.length>1?n+""+r[1]:"0",u=s.getOffsetDurationUnit(h),c={from:i[0],type:a,isDrawn:!1,to:"ResourceView"===s.parent.viewType?t.ganttProperties.taskId.toString():t.ganttProperties.rowUniqueID.toString(),offsetUnit:u.durationUnit,offset:u.duration},g=s.parent.connectorLineModule.getRecordByID(c.to),f=s.parent.connectorLineModule.getRecordByID(c.from);s.parent.connectorLineEditModule&&f&&g?s.parent.connectorLineEditModule.validateParentPredecessor(f,g)&&l.push(c):l.push(c),i.splice(0)}}),l},e.prototype.getPredecessorStringValue=function(e){var t,r,a=e.ganttProperties.predecessor,s=this.parent.durationUnitTexts,o="";if(r=[],a)for(var l=a.length,d=0;d<l;d++){var p=a[d],h="",u="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(p.from!==u.toString()){if(h=p.from+p.type,"string"==typeof e.ganttProperties.taskId?(r[0]=h.slice(0,-2),r[1]=h.slice(-2),t=r[0]+" "+r[1]):t=h,h=t,0!==p.offset){h+=p.offset>0?"+"+p.offset+" ":p.offset+" ";var c=1!==p.offset;"day"===p.offsetUnit?h+=c?i.i(n.getValue)("days",s):i.i(n.getValue)("day",s):"hour"===p.offsetUnit?h+=c?i.i(n.getValue)("hours",s):i.i(n.getValue)("hour",s):h+=c?i.i(n.getValue)("minutes",s):i.i(n.getValue)("minute",s)}o=o.length>0?o+","+h:h}}return o},e.prototype.getOffsetDurationUnit=function(e){var t=0,r=this.parent.durationUnit.toLocaleLowerCase(),a=this.parent.durationUnitEditText;if("string"==typeof e){for(var s=e.match(/[^0-9]+|[0-9]+/g),o=0;o<s.length;o++)s[o]=s[o].trim();"-"===s[0]&&s[1]?(s[1]=s[0]+s[1],s.shift()):"+"===s[0]&&s.shift(),"."!==s[1]||isNaN(parseInt(s[2],10))||(s[0]+=s[1]+s[2],s.splice(1,2)),s&&s.length<=2&&(t=parseFloat(s[0]),r=s[1]?s[1].toLowerCase().trim():"",r=-1!==i.i(n.getValue)("minute",a).indexOf(r)?"minute":-1!==i.i(n.getValue)("hour",a).indexOf(r)?"hour":-1!==i.i(n.getValue)("day",a).indexOf(r)?"day":this.parent.durationUnit.toLocaleLowerCase())}else t=e,r=this.parent.durationUnit.toLocaleLowerCase();return isNaN(t)&&(t=0,r=this.parent.durationUnit.toLocaleLowerCase()),{duration:t,durationUnit:r}},e.prototype.updatePredecessors=function(){for(var e,t=this.parent.predecessorsCollection,i=t.length,r=0;r<i;r++)e=t[r],this.updatePredecessorHelper(e,t)},e.prototype.updatePredecessorHelper=function(e,t){var r,a=e.ganttProperties.predecessor,s=a.length;t=i.i(n.isNullOrUndefined)(t)?[]:t;for(var o=0;o<s;o++){var l=a[o];r=this.parent.connectorLineModule.getRecordByID(l.from);var d="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(l.from!==d.toString()&&r){var p=void 0;r.ganttProperties.predecessor?(p=i.i(n.extend)([],r.ganttProperties.predecessor,[],!0),p.push(l),this.parent.setRecordValue("predecessor",p,r.ganttProperties,!0)):(p=[],p.push(l),this.parent.setRecordValue("predecessor",p,r.ganttProperties,!0),t.push(r))}}},e.prototype.updatedRecordsDateByPredecessor=function(){for(var e=this.parent.flatData,t=this.parent.flatData.length,i=0;i<t;i++)e[i].ganttProperties.predecessor&&(this.validatePredecessorDates(e[i]),e[i].hasChildRecords&&this.parent.editModule&&this.parent.editModule.updateChildItems(e[i]))},e.prototype.updateParentPredecessor=function(){if(this.parent.enablePredecessorValidation)for(var e=this.parentPredecessors.length,t=e-1;t>=0;t--){var i=this.parentPredecessors[t];this.validatePredecessorDates(i)}},e.prototype.validatePredecessorDates=function(e){if(e.ganttProperties.predecessor){var t=e.ganttProperties.predecessor,i=void 0,r=void 0,n=null,a="ResourceView"===this.parent.viewType?e.ganttProperties.taskId.toString():e.ganttProperties.rowUniqueID.toString(),s=t.filter(function(e){return e.to===a?e:null});for(i=0;i<s.length;i++){var o=s[i];r=this.parent.connectorLineModule.getRecordByID(o.from),n=this.parent.connectorLineModule.getRecordByID(o.to),this.parent.isLoad&&-1==this.parentPredecessors.indexOf(e)&&(e.hasChildRecords||n.hasChildRecords)&&this.parentPredecessors.push(e),(n.ganttProperties.isAutoSchedule||this.parent.validateManualTasksOnLinking)&&this.validateChildGanttRecord(r,n)}}},e.prototype.validateChildGanttRecord=function(e,t){if(this.parent.editedTaskBarItem!==t&&!i.i(n.isNullOrUndefined)(i.i(r.c)(e.ganttProperties))&&!i.i(n.isNullOrUndefined)(i.i(r.c)(t.ganttProperties))&&this.parent.isInPredecessorValidation&&(t.ganttProperties.isAutoSchedule||this.parent.validateManualTasksOnLinking)){var a=t.ganttProperties,s="ResourceView"===this.parent.viewType?a.taskId.toString():a.rowUniqueID.toString(),o=a.predecessor,l=o.filter(function(e){return e.to===s?e:null}),d=this.getPredecessorDate(t,l);this.parent.setRecordValue("startDate",d,a,!0),this.parent.dataOperation.updateMappingData(t,"startDate");var p=t.ganttProperties.segments;i.i(n.isNullOrUndefined)(p)&&this.dateValidateModule.calculateEndDate(t),this.parent.dataOperation.updateWidthLeft(t),!this.parent.isLoad&&t.parentItem&&this.parent.isInPredecessorValidation&&this.parent.getParentTask(t.parentItem).ganttProperties.isAutoSchedule&&-1===this.parentIds.indexOf(t.parentItem.uniqueID)&&(this.parentIds.push(t.parentItem.uniqueID),this.parentRecord.push(t.parentItem))}},e.prototype.getPredecessorDate=function(e,t){var i,r,n,a,s=this,o=t.filter(function(t){var i="ResourceView"===s.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;return t.to===i.toString()?t:null});if(o)for(var l=o.length,d=0;d<l;d++){var p=o[d];n=this.parent.connectorLineModule.getRecordByID(p.from),a=this.parent.connectorLineModule.getRecordByID(p.to),r=this.getValidatedStartDate(a.ganttProperties,n.ganttProperties,p),null!=i&&1!==this.dateValidateModule.compareDates(r,i)||(i=r)}return i},e.prototype.getValidatedStartDate=function(e,t,i){var r,n,a=i.type,s=i.offset;switch(a){case"FS":r=this.dateValidateModule.getValidEndDate(t),e.isMilestone&&0===s||(r=this.dateValidateModule.checkStartDate(r,e)),0!==s&&(r=this.updateDateByOffset(r,i,e)),n=e.isMilestone?r:this.dateValidateModule.checkStartDate(r,e);break;case"FF":case"SF":r="FF"===a?this.dateValidateModule.getValidEndDate(t):this.dateValidateModule.getValidStartDate(t),0!==s&&(r=this.updateDateByOffset(r,i,e)),e.isMilestone||(r=this.dateValidateModule.checkEndDate(r,e)),n=this.dateValidateModule.getStartDate(r,e.duration,e.durationUnit,e);break;case"SS":r=this.dateValidateModule.getValidStartDate(t),0!==s&&(r=this.updateDateByOffset(r,i,e)),n=e.isMilestone?r:this.dateValidateModule.checkStartDate(r,e)}return n},e.prototype.updateDateByOffset=function(e,t,i){var r,n=t.offset,a=t.offsetUnit;return n<0?r=this.dateValidateModule.getStartDate(this.dateValidateModule.checkEndDate(e,i),-1*n,a,i):(r=this.dateValidateModule.getEndDate(e,n,a,i,!1),i.isMilestone||(r=this.dateValidateModule.checkStartDate(r,i))),r},e.prototype.createConnectorLinesCollection=function(e){var t,i,r,n=e||this.parent.currentViewData,a=n.length;for(this.parent.connectorLineModule.expandedRecords=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.updatedRecords:this.parent.getExpandedRecords(this.parent.updatedRecords),t=0;t<a;t++)i=n[t],(r=i.ganttProperties.predecessor)&&this.addPredecessorsCollection(r)},e.prototype.addPredecessorsCollection=function(e){var t,i,r,n,a;if(e)for(t=e.length,i=0;i<t;i++){r=e[i];n=this.parent.connectorLineModule.getRecordByID(r.from),a=this.parent.connectorLineModule.getRecordByID(r.to),this.parent.connectorLineModule.expandedRecords&&-1!==this.parent.connectorLineModule.expandedRecords.indexOf(n)&&-1!==this.parent.connectorLineModule.expandedRecords.indexOf(a)&&this.updateConnectorLineObject(n,a,r)}},e.prototype.updateConnectorLineObject=function(e,t,i){var r=this.parent.connectorLineModule.createConnectorLineObject(e,t,i);if(r){if(t.isCritical&&e.isCritical&&(r.isCritical=!0),this.parent.connectorLineIds.length>0&&-1===this.parent.connectorLineIds.indexOf(r.connectorLineId)||0===this.parent.connectorLineIds.length)this.parent.updatedConnectorLineCollection.push(r),this.parent.connectorLineIds.push(r.connectorLineId);else if(-1!==this.parent.connectorLineIds.indexOf(r.connectorLineId)){var n=this.parent.connectorLineIds.indexOf(r.connectorLineId);this.parent.updatedConnectorLineCollection[n]=r}i.isDrawn=!0}return r},e.prototype.validatePredecessor=function(e,t,i){if(this.parent.isInPredecessorValidation&&e.ganttProperties.predecessor){for(var r=e.ganttProperties.predecessor,n=void 0,a=null,s=void 0,o=void 0,l="ResourceView"===this.parent.viewType?e.ganttProperties.taskId.toString():e.ganttProperties.rowUniqueID.toString(),d=r.filter(function(e){return e.to===l?e:null}),p=r.filter(function(e){return e.from===l?e:null}),h=0;h<d.length;h++){s=d[h],n=this.parent.connectorLineModule.getRecordByID(s.from),a=this.parent.connectorLineModule.getRecordByID(s.to),this.parent.isInPredecessorValidation&&a.ganttProperties.isAutoSchedule?this.parent.isValidationEnabled=!0:this.parent.isValidationEnabled=!1;var u="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;u.toString()!==s.to&&u.toString()!==s.from||i&&"predecessor"!==i||this.validateChildGanttRecord(n,a)}for(var h=0;h<p.length;h++)o=p[h],n=this.parent.connectorLineModule.getRecordByID(o.from),a=this.parent.connectorLineModule.getRecordByID(o.to),this.parent.isInPredecessorValidation&&a.ganttProperties.isAutoSchedule?this.parent.isValidationEnabled=!0:this.parent.isValidationEnabled=!1,"predecessor"!==i&&this.parent.isValidationEnabled&&this.validateChildGanttRecord(n,a),!1!==n.expanded&&a.expanded,a&&this.validatePredecessor(a,void 0,"successor")}},e.prototype.getValidPredecessor=function(e){var t=this,r=[];if(!i.i(n.isNullOrUndefined)(e)){var a=e.ganttProperties.predecessor;a&&a.length>0&&(r=a.filter(function(i){var r="ResourceView"===t.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;return i.from!==r.toString()}))}return r},e}())},function(e,t,i){"use strict";var r=i(46);i.d(t,"a",function(){return r.a});var n=i(11);i.d(t,"b",function(){return n.a});var a=i(2);i.d(t,"c",function(){return a.j}),i.d(t,"d",function(){return a.c}),i.d(t,"e",function(){return a.i}),i.d(t,"f",function(){return a.d}),i.d(t,"g",function(){return a.f}),i.d(t,"h",function(){return a.e}),i.d(t,"i",function(){return a.g}),i.d(t,"j",function(){return a.l}),i.d(t,"k",function(){return a.h}),i.d(t,"l",function(){return a.a}),i.d(t,"m",function(){return a.b}),i.d(t,"n",function(){return a.k});var s=i(16);i.d(t,"o",function(){return s.b}),i.d(t,"p",function(){return s.c}),i.d(t,"q",function(){return s.d}),i.d(t,"r",function(){return s.a}),i.d(t,"s",function(){return s.e})},function(e,t,i){"use strict";i.d(t,"b",function(){return r}),i.d(t,"c",function(){return n}),i.d(t,"d",function(){return a}),i.d(t,"a",function(){return s}),i.d(t,"e",function(){return o});var r="load",n="rowDataBound",a="queryCellInfo",s="toolbarClick",o="key-pressed"},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(1),n=(i.n(r),function(){function e(e){this.theme=e,this.ganttStyle={},this.setTheme(this.ganttStyle,this.theme)}return Object.defineProperty(e.prototype,"style",{get:function(){return this.ganttStyle?this.ganttStyle:(this.setTheme(this.ganttStyle,"Material"),this.ganttStyle)},enumerable:!0,configurable:!0}),e.prototype.setTheme=function(e,t){switch(this.initStyles(e),e.columnHeader.fontSize=9.5,e.columnHeader.fontColor=new r.PdfColor(0,0,0),e.columnHeader.fontColor.gray=.2,e.columnHeader.backgroundColor=new r.PdfColor(255,255,255),e.columnHeader.borderColor=new r.PdfColor(234,234,234),e.columnHeader.format.lineAlignment=1,e.columnHeader.format.alignment=0,e.fontFamily=r.PdfFontFamily.Helvetica,e.cell.fontSize=9.5,e.cell.backgroundColor=new r.PdfColor(255,255,255),e.cell.borderColor=new r.PdfColor(234,234,234),e.cell.fontColor=new r.PdfColor(0,0,0),e.cell.fontColor.gray=.2,e.cell.format.lineAlignment=1,e.cell.format.alignment=0,e.footer.fontSize=9.5,e.footer.fontStyle=0,e.footer.format.alignment=1,e.footer.format.lineAlignment=1,e.timeline.fontSize=9.5,e.timeline.fontStyle=0,e.timeline.backgroundColor=new r.PdfColor(252,252,252),e.timeline.fontColor=new r.PdfColor(40,40,39),e.chartGridLineColor=new r.PdfColor(206,206,206),e.timeline.borderColor=new r.PdfColor(206,206,206),t){case"Bootstrap":e.taskbar.taskColor=new r.PdfColor(49,122,185),e.taskbar.progressColor=new r.PdfColor(33,82,125),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(119,119,119),e.taskbar.parentProgressColor=new r.PdfColor(85,85,85),e.taskbar.taskBorderColor=new r.PdfColor(33,82,125),e.taskbar.parentTaskBorderColor=new r.PdfColor(85,85,85),e.taskbar.milestoneColor=new r.PdfColor(85,85,85),e.footer.fontColor=new r.PdfColor(0,0,0),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(33,82,125),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(0,0,0);break;case"Bootstrap 4":e.taskbar.taskColor=new r.PdfColor(0,123,255),e.taskbar.progressColor=new r.PdfColor(0,86,179),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(108,117,125),e.taskbar.parentProgressColor=new r.PdfColor(73,80,87),e.taskbar.taskBorderColor=new r.PdfColor(0,86,179),e.taskbar.parentTaskBorderColor=new r.PdfColor(73,80,87),e.taskbar.milestoneColor=new r.PdfColor(73,80,87),e.footer.fontColor=new r.PdfColor(0,0,0),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(0,86,179),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(33,37,41);break;case"Fabric":e.columnHeader.fontColor=new r.PdfColor(102,102,102),e.cell.fontColor=new r.PdfColor(51,51,51),e.taskbar.taskColor=new r.PdfColor(0,120,214),e.taskbar.progressColor=new r.PdfColor(0,91,163),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(118,118,118),e.taskbar.parentProgressColor=new r.PdfColor(80,80,80),e.taskbar.taskBorderColor=new r.PdfColor(0,91,163),e.taskbar.parentTaskBorderColor=new r.PdfColor(80,80,80),e.taskbar.milestoneColor=new r.PdfColor(80,80,80),e.footer.fontColor=new r.PdfColor(51,51,51),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(0,69,122),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(51,51,51);break;default:e.taskbar.taskColor=new r.PdfColor(88,105,197),e.taskbar.progressColor=new r.PdfColor(63,81,181),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(132,132,132),e.taskbar.parentProgressColor=new r.PdfColor(97,97,97),e.taskbar.taskBorderColor=new r.PdfColor(63,81,181),e.taskbar.parentTaskBorderColor=new r.PdfColor(51,51,51),e.taskbar.milestoneColor=new r.PdfColor(97,97,97),e.footer.fontColor=new r.PdfColor(0,0,0),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(63,81,181),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(51,51,51)}},e.prototype.initStyles=function(e){e.columnHeader={},e.columnHeader.format=new r.PdfStringFormat,e.cell={},e.cell.format=new r.PdfStringFormat,e.timeline={},e.footer={},e.footer.format=new r.PdfStringFormat,e.label={},e.taskbar={}},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(7),n=i(1),a=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),s=function(e){function t(){var t=e.call(this)||this;return t.treeGridSize=new n.SizeF(0,0),t.treeColumnIndex=0,t.allowRowBreakAcrossPages=!0,t.enableHeader=!0,t.isFitToWidth=!1,t.columns=new r.b(t),t.rows=new r.c(t),t.headers=new r.d(t),t.style=new r.e,t.rowHeight=0,t}return a(t,e),Object.defineProperty(t.prototype,"raiseBeginCellDraw",{get:function(){return void 0!==this.beginCellDraw&&null!==typeof this.beginCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"raiseEndCellDraw",{get:function(){return void 0!==this.endCellDraw&&null!==typeof this.endCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return 0===this.treeGridSize.width&&0===this.treeGridSize.height&&(this.treeGridSize=this.calculateTreeGridSize()),this.treeGridSize},set:function(e){this.treeGridSize=e},enumerable:!0,configurable:!0}),t.prototype.draw=function(e,t,i,r){if(t instanceof n.PointF&&void 0===t.width&&void 0===i)return this.drawHelper(e,t.x,t.y);if("number"==typeof t&&"number"==typeof i&&void 0===r)return this.drawHelper(e,t,i,null);if(t instanceof n.RectangleF&&void 0!==t.width&&void 0===i)return this.drawHelper(e,t,null);if(t instanceof n.PointF&&void 0===t.width&&i instanceof n.PdfLayoutFormat)return this.drawHelper(e,t.x,t.y,i);if("number"==typeof t&&"number"==typeof i&&(r instanceof n.PdfLayoutFormat||null==r)){var a=e.graphics.clientSize.width-t,s=new n.RectangleF(t,i,a,0);return this.drawHelper(e,s,r)}return t instanceof n.RectangleF&&void 0!==t.width&&"boolean"==typeof i?this.drawHelper(e,t,null):this.drawHelper(e,t,i)},t.prototype.measureColumnsWidth=function(e){if(void 0!==e)for(var t=this.columns.getDefaultWidths(e.width-e.x),i=0;i<this.columns.count;i++)this.columns.getColumn(i).width<0&&(this.columns.getColumn(i).width=t[i]);else{for(var t=[],r=0,n=0,a=0,s=this.columns.count,i=0;i<s;i++){for(var o=this.rows.count,l=0;l<o;l++){var d=this.rows.getRow(l).cells.getCell(i).width,p=this.initialWidth>0?Math.min(this.initialWidth,d):d;r=Math.max(r,p),r=Math.max(this.columns.getColumn(i).width,r),this.columns.getColumn(i).isTreeColumn&&(a=Math.max(a,this.rows.getRow(l).level))}this.columns.getColumn(i).isTreeColumn?t.push(r+10*a):t.push(r),n+=r,r=0}for(var i=0;i<this.columns.count;i++)this.columns.getColumn(i).width<0&&(this.columns.getColumn(i).width=t[i])}},t.prototype.calculateTreeGridSize=function(){for(var e=0,t=this.columns.width,i=0;i<this.headers.count;i++){var r=this.headers.getHeader(i);e+=r.height}for(var i=0;i<this.rows.count;i++){var r=this.rows.getRow(i);e+=r.height}return new n.SizeF(t,e)},t.prototype.drawGrid=function(e,t,i,r){this.initialWidth=e.graphics.clientSize.width;var a=new n.RectangleF(0,0,e.getClientSize().height,0);return this.draw(e,a,r)},t.prototype.layout=function(e){if(0!==this.rows.count){var t=this.rows.getRow(0).cells.getCell(0).style;if(1!==t.borders.left.width){var i=t.borders.left.width/2,a=t.borders.top.width/2;if(e.bounds.x===r.f.default.right.width/2&&e.bounds.y===r.f.default.right.width/2){var s=new n.RectangleF(new n.PointF(i,a),new n.SizeF(this.size.width,this.size.height));e.bounds=s}}}return this.setSpan(),this.layouter=new r.g(this),this.layouter.layoutInternal(e)},t.prototype.onBeginCellDraw=function(e){this.raiseBeginCellDraw&&this.beginCellDraw(this,e)},t.prototype.onEndCellDraw=function(e){this.raiseEndCellDraw&&this.endCellDraw(this,e)},t.prototype.setSpan=function(){for(var e=1,t=1,i=0,r=0,n=0,a=this.headers.count,s=0;s<a;s++){var o=this.headers.getHeader(s);n=0;for(var l=o.cells.count,d=0;d<l;d++){var p=o.cells.getCell(d);if(n=Math.max(n,p.rowSpan),!p.isCellMergeContinue&&!p.isRowMergeContinue&&(p.columnSpan>1||p.rowSpan>1)){if(p.columnSpan+d>o.cells.count)throw new Error("Invalid span specified at row "+d.toString()+" column "+s.toString());if(p.rowSpan+s>this.headers.count)throw new Error("Invalid span specified at Header "+d.toString()+" column "+s.toString());if(p.columnSpan>1&&p.rowSpan>1){for(e=p.columnSpan,t=p.rowSpan,i=d,r=s,p.isCellMergeStart=!0,p.isRowMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,o.cells.getCell(i).isRowMergeContinue=!0,o.cells.getCell(i).rowSpan=t,e--;for(i=d,e=p.columnSpan;t>1;){for(r++,this.headers.getHeader(r).cells.getCell(d).isRowMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,t--;e>1;)i++,this.headers.getHeader(r).cells.getCell(i).isCellMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,e--;e=p.columnSpan,i=d}}else if(p.columnSpan>1&&1===p.rowSpan)for(e=p.columnSpan,i=d,p.isCellMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,e--;else if(1===p.columnSpan&&p.rowSpan>1)for(t=p.rowSpan,r=s;t>1;)r++,this.headers.getHeader(r).cells.getCell(d).isRowMergeContinue=!0,t--}}o.maximumRowSpan=n}e=t=1,i=r=0,a=this.rows.count;for(var s=0;s<a;s++)for(var o=this.rows.getRow(s),h=o.cells.count,d=0;d<h;d++){var p=o.cells.getCell(d);if(!p.isCellMergeContinue&&!p.isRowMergeContinue&&(p.columnSpan>1||p.rowSpan>1)){if(p.columnSpan+d>o.cells.count)throw new Error("Invalid span specified at row {0} column {1} "+d.toString());if(p.rowSpan+s>this.rows.count)throw new Error("Invalid span specified at row {0} column {1} "+d.toString());if(p.columnSpan>1&&p.rowSpan>1){for(e=p.columnSpan,t=p.rowSpan,i=d,r=s,p.isCellMergeStart=!0,p.isRowMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,e--;for(i=d,e=p.columnSpan;t>1;){for(r++,this.rows.getRow(r).cells.getCell(d).isRowMergeContinue=!0,t--;e>1;)i++,this.rows.getRow(r).cells.getCell(i).isCellMergeContinue=!0,e--;e=p.columnSpan,i=d}}else if(p.columnSpan>1&&1===p.rowSpan)for(e=p.columnSpan,i=d,p.isCellMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,e--;else if(1===p.columnSpan&&p.rowSpan>1)for(t=p.rowSpan,r=s;t>1;)r++,this.rows.getRow(r).cells.getCell(d).isRowMergeContinue=!0,t--}}},t}(n.PdfLayoutElement)},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.allowEditing=!0,this.allowReordering=!0,this.allowResizing=!0,this.allowSorting=!0,this.allowFiltering=!0,this.edit={},i.i(r.merge)(this,e)}return e}())},function(e,t){e.exports=l},function(e,t){e.exports=d},function(e,t,i){"use strict";var r=i(15);i.d(t,"a",function(){return r.a}),i.d(t,"b",function(){return r.b}),i.d(t,"c",function(){return r.c}),i.d(t,"d",function(){return r.d}),i.d(t,"e",function(){return r.e}),i.d(t,"f",function(){return r.f}),i.d(t,"g",function(){return r.g}),i.d(t,"h",function(){return r.h}),i.d(t,"i",function(){return r.i}),i.d(t,"j",function(){return r.j}),i.d(t,"k",function(){return r.k}),i.d(t,"l",function(){return r.l}),i.d(t,"m",function(){return r.m}),i.d(t,"n",function(){return r.n}),i.d(t,"o",function(){return r.o}),i.d(t,"p",function(){return r.p}),i.d(t,"q",function(){return r.q}),i.d(t,"r",function(){return r.r}),i.d(t,"s",function(){return r.s});var n=i(23);i.d(t,"t",function(){return n.a}),i.d(t,"u",function(){return n.b}),i.d(t,"v",function(){return n.c}),i.d(t,"w",function(){return n.d}),i.d(t,"x",function(){return n.e}),i.d(t,"y",function(){return n.f}),i.d(t,"z",function(){return n.g}),i.d(t,"A",function(){return n.h}),i.d(t,"B",function(){return n.i}),i.d(t,"C",function(){return n.j}),i.d(t,"D",function(){return n.k}),i.d(t,"E",function(){return n.l}),i.d(t,"F",function(){return n.m}),i.d(t,"G",function(){return n.n}),i.d(t,"H",function(){return n.o}),i.d(t,"I",function(){return n.p});var a=i(9);i.d(t,"J",function(){return a.a}),i.d(t,"K",function(){return a.b}),i.d(t,"L",function(){return a.c}),i.d(t,"M",function(){return a.d}),i.d(t,"N",function(){return a.e}),i.d(t,"O",function(){return a.f}),i.d(t,"P",function(){return a.g}),i.d(t,"Q",function(){return a.h}),i.d(t,"R",function(){return a.i}),i.d(t,"S",function(){return a.j}),i.d(t,"T",function(){return a.k}),i.d(t,"U",function(){return a.l}),i.d(t,"V",function(){return a.m}),i.d(t,"W",function(){return a.n}),i.d(t,"X",function(){return a.o}),i.d(t,"Y",function(){return a.p}),i.d(t,"Z",function(){return a.q}),i.d(t,"_0",function(){return a.r}),i.d(t,"_1",function(){return a.s})},function(e,t,i){"use strict";var r=i(34);i.d(t,"a",function(){return r.a});var n=i(27);i.d(t,"b",function(){return n.a});var a=i(28);i.d(t,"c",function(){return a.a});var s=i(36);i.d(t,"d",function(){return s.a});var o=i(41);i.d(t,"e",function(){return o.a});var l=i(14);i.d(t,"f",function(){return l.a});var d=i(40);i.d(t,"g",function(){return d.a});var p=i(43);i.d(t,"h",function(){return p.a});var h=i(32);i.d(t,"i",function(){return h.a});var u=i(31);i.d(t,"j",function(){return u.a});var c=i(30);i.d(t,"k",function(){return c.a});var g=i(35);i.d(t,"l",function(){return g.a});var f=i(26);i.d(t,"m",function(){return f.a});var m=i(39);i.d(t,"n",function(){return m.a});var y=i(38);i.d(t,"o",function(){return y.a});var v=i(44);i.d(t,"p",function(){return v.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(6)),a=(i.n(n),i(4)),s=(i.n(a),function(){function e(e){this.isCellEdit=!1,this.isResourceCellEdited=!1,this.parent=e,this.bindTreeGridProperties()}return e.prototype.bindTreeGridProperties=function(){this.parent.treeGrid.editSettings.allowEditing=this.parent.editSettings.allowEditing,this.parent.treeGrid.editSettings.allowNextRowEdit=this.parent.editSettings.allowNextRowEdit,this.parent.treeGrid.editSettings.mode="Cell",this.parent.treeGrid.cellEdit=this.ensureEditCell.bind(this),this.parent.editSettings.allowEditing&&n.TreeGrid.Inject(n.Edit)},e.prototype.ensureEditCell=function(e){var t=this,n=e.rowData,s=e.columnName;this.editedColumn=this.parent.getColumnByField(s,this.parent.ganttColumns);var o=this.parent.taskFields;if(this.parent.readOnly)return void(e.cancel=!0);if("Dialog"===this.parent.editSettings.mode)return void(e.cancel=!0);if(!n.hasChildRecords||(s!==o.endDate||(i.i(r.isNullOrUndefined)(n.isManual)||!1!==n.isManual)&&"Auto"!==this.parent.taskMode)&&s!==o.duration&&s!==o.progress&&s!==o.work&&"taskType"!==s){var l=new a.Deferred;return this.parent.trigger("cellEdit",e,function(e){0===n.level&&"ResourceView"===t.parent.viewType&&(e.cancel=!0),l.resolve(e),e.cancel||(e.columnName===t.parent.taskFields.notes?t.openNotesEditor(e):(t.isCellEdit=!0,i.i(r.isNullOrUndefined)(t.parent.toolbarModule)||t.parent.toolbarModule.refreshToolbarItems()))}),l}e.cancel=!0},e.prototype.openNotesEditor=function(e){var t=this.parent.taskFields,i=e.rowData,r=e.columnName;if(r===t.notes&&!this.parent.showInlineNotes){e.cancel=!0;var n=this.parent.editModule.dialogModule.updatedEditFields.map(function(e){return e.type}),a=n.indexOf("Notes");if(-1!==a){this.parent.editModule.dialogModule.openEditDialog(i.ganttProperties.rowUniqueID);document.getElementById(this.parent.element.id+"_Tab").ej2_instances[0].selectedItem=a}}r===t.notes&&!0===this.parent.showInlineNotes&&(this.isCellEdit=!0)},e.prototype.isValueChange=function(e,t){var n=i.i(r.getValue)("data",e),a=n[t],s=i.i(r.getValue)("previousData",e);if(i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(s)||!i.i(r.isNullOrUndefined)(a)&&i.i(r.isNullOrUndefined)(s))return!0;if(!i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(s)){if(a instanceof Date)return a.getTime()!==n.taskData[t].getTime();if(t===this.parent.taskFields.resourceInfo)return a!==s;if(a!==n.taskData[t])return!0}return!1},e.prototype.initiateCellEdit=function(e,t){var n=i.i(r.getValue)("column",e),a=i.i(r.getValue)("data",e),s={};s.action="CellEditing",s.data=this.parent.getTaskByUniqueID(a.uniqueID);var o=i.i(r.getValue)("previousData",e),l=this.parent.allowUnscheduledTasks?a[n.field]:!i.i(r.isNullOrUndefined)(a[n.field])&&""!==a[n.field]||this.parent.taskFields.duration!==n.field&&this.parent.taskFields.startDate!==n.field&&this.parent.taskFields.endDate!==n.field?a[n.field]:o;i.i(r.isNullOrUndefined)(a)?this.parent.editModule.endEditAction(e):(a[n.field]=o,s.data[n.field]=o,this.parent.initiateEditAction(!0),this.parent.setRecordValue(n.field,l,s.data),n.field===this.parent.taskFields.name?this.taskNameEdited(s):n.field===this.parent.taskFields.startDate?this.startDateEdited(s):n.field===this.parent.taskFields.endDate?this.endDateEdited(s):n.field===this.parent.taskFields.duration?this.durationEdited(s):n.field===this.parent.taskFields.resourceInfo?this.resourceEdited(s,t,a):n.field===this.parent.taskFields.progress?this.progressEdited(s):n.field===this.parent.taskFields.baselineStartDate||n.field===this.parent.taskFields.baselineEndDate?this.baselineEdited(s):n.field===this.parent.taskFields.dependency?this.dependencyEdited(s,o):n.field===this.parent.taskFields.notes?this.notedEdited(s):n.field===this.parent.taskFields.work?this.workEdited(s):"taskType"!==n.field||i.i(r.isNullOrUndefined)(this.parent.taskFields.work)?n.field===this.parent.taskFields.manual?this.taskmodeEdited(s):(this.parent.setRecordValue("taskData."+n.field,s.data[n.field],s.data),this.parent.editModule.initiateSaveAction(s)):this.typeEdited(s,t)),this.isCellEdit=!1,i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule.editedColumn)||(this.parent.editModule.cellEditModule.editedColumn=null),i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.taskNameEdited=function(e){this.parent.setRecordValue("taskData."+this.parent.taskFields.name,e.data[this.parent.taskFields.name],e.data),this.parent.setRecordValue("taskName",e.data[this.parent.taskFields.name],e.data.ganttProperties,!0),this.updateEditedRecord(e)},e.prototype.notedEdited=function(e){this.parent.setRecordValue("taskData."+this.parent.taskFields.notes,e.data[this.parent.taskFields.notes],e.data),this.parent.setRecordValue("notes",e.data[this.parent.taskFields.notes],e.data.ganttProperties,!0),this.updateEditedRecord(e)},e.prototype.taskmodeEdited=function(e){this.parent.setRecordValue("isAutoSchedule",!e.data[this.parent.taskFields.manual],e.data.ganttProperties,!0),this.parent.editModule.updateTaskScheduleModes(e.data),this.updateEditedRecord(e)},e.prototype.startDateEdited=function(e){var t=e.data,n=e.data.ganttProperties,a=e.data[this.parent.taskFields.startDate];a=a?new Date(a.getTime()):null,a=this.parent.dateValidationModule.checkStartDate(a,t.ganttProperties,t.ganttProperties.isMilestone),i.i(r.isNullOrUndefined)(a)?t.hasChildRecords||(this.parent.setRecordValue("startDate",null,n,!0),this.parent.setRecordValue("duration",null,n,!0),this.parent.setRecordValue("isMilestone",!1,n,!0),this.parent.allowUnscheduledTasks&&i.i(r.isNullOrUndefined)(this.parent.taskFields.endDate)&&this.parent.setRecordValue("endDate",null,n,!0)):n.endDate||!i.i(r.isNullOrUndefined)(n.duration)?(this.parent.setRecordValue("startDate",new Date(a.getTime()),n,!0),this.parent.dateValidationModule.calculateEndDate(t)):i.i(r.isNullOrUndefined)(n.endDate)&&i.i(r.isNullOrUndefined)(n.duration)&&this.parent.setRecordValue("startDate",new Date(a.getTime()),n,!0),this.parent.setRecordValue("isMilestone",0===n.duration,n,!0),this.parent.dataOperation.updateWidthLeft(e.data),this.parent.dataOperation.updateMappingData(t,"startDate"),this.parent.dataOperation.updateMappingData(t,"endDate"),this.parent.dataOperation.updateMappingData(t,"duration"),this.updateEditedRecord(e)},e.prototype.validateEndDateWithSegments=function(e){for(var t=[],n=e.segments,a=0;a<n.length;a++){var s=n[a],o=s.endDate;o=!i.i(r.isNullOrUndefined)(e.endDate)&&o.getTime()<e.endDate.getTime()&&a!==n.length-1?o:e.endDate,s.duration=this.parent.dataOperation.getDuration(s.startDate,o,e.durationUnit,e.isAutoSchedule,e.isMilestone),n.length>0&&o.getTime()<s.startDate.getTime()&&o.getTime()<=e.endDate.getTime()?n[a-1].duration=this.parent.dataOperation.getDuration(n[a-1].startDate,e.endDate,e.durationUnit,e.isAutoSchedule,e.isMilestone):t.push(s)}return t},e.prototype.endDateEdited=function(e){var t=e.data.ganttProperties,n=e.data[this.parent.taskFields.endDate];n=n?new Date(n.getTime()):null,i.i(r.isNullOrUndefined)(n)?(this.parent.setRecordValue("endDate",n,t,!0),this.parent.setRecordValue("duration",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0)):(0===n.getHours()&&86400!==this.parent.defaultEndTime&&this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,n),n=this.parent.dateValidationModule.checkEndDate(n,t),this.parent.setRecordValue("endDate",n,t,!0),!i.i(r.isNullOrUndefined)(t.startDate)&&i.i(r.isNullOrUndefined)(t.duration)?-1===this.parent.dateValidationModule.compareDates(t.endDate,t.startDate)&&(this.parent.setRecordValue("endDate",new Date(t.startDate.getTime()),t,!0),this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,t.endDate)):!i.i(r.isNullOrUndefined)(t.duration)&&i.i(r.isNullOrUndefined)(t.startDate)&&this.parent.setRecordValue("startDate",this.parent.dateValidationModule.getStartDate(t.endDate,t.duration,t.durationUnit,t),t,!0),i.i(r.isNullOrUndefined)(t.segments)||(t.segments=this.validateEndDateWithSegments(t)),-1===this.compareDatesFromRecord(t)?this.parent.dateValidationModule.calculateDuration(e.data):this.parent.editModule.revertCellEdit(e),this.parent.setRecordValue("isMilestone",0===t.duration,t,!0),t.isMilestone&&this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(t.startDate,t),t,!0)),!i.i(r.isNullOrUndefined)(e.data.ganttProperties.segments)&&e.data.ganttProperties.segments.length>0&&(this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(e.data,!1),e.data.ganttProperties,!0),this.parent.dataOperation.updateMappingData(e.data,"segments")),this.parent.dataOperation.updateWidthLeft(e.data),this.parent.dataOperation.updateMappingData(e.data,"startDate"),this.parent.dataOperation.updateMappingData(e.data,"endDate"),this.parent.dataOperation.updateMappingData(e.data,"duration"),this.parent.editModule.updateResourceRelatedFields(e.data,"endDate"),this.updateEditedRecord(e)},e.prototype.durationEdited=function(e){var t=e.data.ganttProperties,i=e.data[this.parent.taskFields.duration];this.parent.dataOperation.updateDurationValue(i,t),this.updateDates(e),this.parent.editModule.updateResourceRelatedFields(e.data,"duration"),this.updateEditedRecord(e)},e.prototype.updateDates=function(e){var t=e.data.ganttProperties,n=this.parent.dateValidationModule.getDateFromFormat(t.endDate),a=this.parent.dateValidationModule.getDateFromFormat(t.startDate),s=t.duration;i.i(r.isNullOrUndefined)(s)?(this.parent.setRecordValue("isMilestone",!1,t,!0),null!=e.data[this.parent.taskFields.duration]&&this.parent.setRecordValue("endDate",null,t,!0)):(i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(n)&&this.parent.setRecordValue("startDate",this.parent.dateValidationModule.getStartDate(n,s,t.durationUnit,t),t,!0),0!==s&&t.isMilestone&&(this.parent.setRecordValue("isMilestone",!1,t,!0),this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(t.startDate,t),t,!0)),!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0&&(this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(e.data,!1),t,!0),this.parent.dataOperation.updateMappingData(e.data,"segments")),this.parent.setRecordValue("isMilestone",0===t.duration,t,!0),this.parent.dateValidationModule.calculateEndDate(e.data)),this.parent.dataOperation.updateWidthLeft(e.data),this.parent.dataOperation.updateMappingData(e.data,"endDate"),this.parent.dataOperation.updateMappingData(e.data,"startDate"),this.parent.dataOperation.updateMappingData(e.data,"duration")},e.prototype.progressEdited=function(e){var t=e.data;if(this.parent.setRecordValue("progress",t[this.parent.taskFields.progress]>100?100:t[this.parent.taskFields.progress],t.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.progress,t[this.parent.taskFields.progress]>100?100:t[this.parent.taskFields.progress],e.data),t.ganttProperties.isAutoSchedule||this.parent.setRecordValue("autoWidth",this.parent.dataOperation.calculateWidth(t,!1),t.ganttProperties,!0),!i.i(r.isNullOrUndefined)(e.data.ganttProperties.segments)&&e.data.ganttProperties.segments.length>0&&!i.i(r.isNullOrUndefined)(this.parent.editModule.taskbarEditModule)&&this.parent.editModule.taskbarEditModule.updateSegmentProgress(e.data.ganttProperties),!e.data.hasChildRecords){var n=t.ganttProperties.isAutoSchedule?t.ganttProperties.width:t.ganttProperties.autoWidth;this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(n,t.ganttProperties.progress),t.ganttProperties,!0)}this.updateEditedRecord(e)},e.prototype.baselineEdited=function(e){var t=e.data.ganttProperties,i=e.data[this.parent.taskFields.baselineStartDate],r=e.data[this.parent.taskFields.baselineEndDate];r&&0===r.getHours()&&86400!==this.parent.defaultEndTime&&this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,r),this.parent.setRecordValue("baselineStartDate",this.parent.dateValidationModule.checkBaselineStartDate(i),t,!0),this.parent.setRecordValue("baselineEndDate",this.parent.dateValidationModule.checkBaselineEndDate(r),t,!0),t.baselineStartDate&&t.baselineEndDate&&(this.parent.setRecordValue("baselineLeft",this.parent.dataOperation.calculateBaselineLeft(t),t,!0),this.parent.setRecordValue("baselineWidth",this.parent.dataOperation.calculateBaselineWidth(t),t,!0)),this.updateEditedRecord(e)},e.prototype.resourceEdited=function(e,t,n){var a=this.parent.resourceFields,s=t[this.parent.taskFields.resourceInfo];if(s){this.isResourceCellEdited=!0;for(var o=this.parent.dataOperation.setResourceInfo(t),l=o.length,d=n.ganttProperties.resourceInfo,p=void 0,h=[],u=this.parent.resources,c=void 0,g=0;g<l;g++)!function(e){if(d){var t=d.length;for(c=0;c<t;c++){if(d[c][a.id]===s[e]){p=c;break}p=-1}}if(i.i(r.isNullOrUndefined)(p)||-1===p){var n=u.filter(function(t){return s[e]===t[a.id]}),o=i.i(r.extend)({},n[0]);o[a.unit]=100,h.push(o)}else h.push(d[p])}(g);e.data.ganttProperties.resourceInfo=h,this.parent.dataOperation.updateMappingData(e.data,"resourceInfo"),this.parent.editModule.updateResourceRelatedFields(e.data,"resource"),"ResourceView"===this.parent.viewType&&(this.parent.editModule.dialogModule.isResourceUpdate=!0,this.parent.editModule.dialogModule.previousResource=d),this.updateDates(e),this.updateEditedRecord(e)}},e.prototype.dependencyEdited=function(e,t){this.parent.predecessorModule.updateUnscheduledDependency(e.data),this.parent.connectorLineEditModule.updatePredecessor(e.data,e.data[this.parent.taskFields.dependency],e)||this.parent.editModule.revertCellEdit(t)},e.prototype.workEdited=function(e){var t=e.data.ganttProperties,i=e.data[this.parent.taskFields.work];this.parent.setRecordValue("work",i,t,!0),this.parent.editModule.updateResourceRelatedFields(e.data,"work"),this.updateDates(e),this.updateEditedRecord(e)},e.prototype.typeEdited=function(e,t){var i=e.data.ganttProperties,r=t.taskType;this.parent.setRecordValue("taskType",r,i,!0),this.updateEditedRecord(e)},e.prototype.compareDatesFromRecord=function(e){var t=this.parent.dateValidationModule.getValidStartDate(e),i=this.parent.dateValidationModule.getValidEndDate(e);return this.parent.dateValidationModule.compareDates(t,i)},e.prototype.updateEditedRecord=function(e){this.parent.editModule.initiateUpdateAction(e)},e.prototype.destroy=function(){this.parent.editModule.cellEditModule=void 0},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.previousScroll={top:0,left:0},this.parent=e,this.element=this.parent.ganttChartModule.scrollElement,this.addEventListeners()}return e.prototype.addEventListeners=function(){this.parent.on("grid-scroll",this.gridScrollHandler,this),r.EventHandler.add(this.element,"scroll",this.onScroll,this)},e.prototype.removeEventListeners=function(){r.EventHandler.remove(this.element,"scroll",this.onScroll),this.parent.off("grid-scroll",this.gridScrollHandler)},e.prototype.gridScrollHandler=function(e){this.element.scrollTop=i.i(r.getValue)("top",e),this.isFromTreeGrid=!0},e.prototype.updateTopPosition=function(){var e,t=this.parent.treeGrid.element.querySelector(".e-content"),n=t.scrollTop;if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){e=n-this.parent.virtualScrollModule.getTopPosition()}else e=n;if(!i.i(r.isNullOrUndefined)(this.parent.dayMarkersModule)){var a=i.i(r.getValue)("nonworkingDayRender.holidayContainer",this.parent.dayMarkersModule),s=i.i(r.getValue)("nonworkingDayRender.weekendContainer",this.parent.dayMarkersModule),o=i.i(r.getValue)("eventMarkerRender.eventMarkersContainer",this.parent.dayMarkersModule);a&&(a.style.top=i.i(r.formatUnit)(e)),s&&(s.style.top=i.i(r.formatUnit)(e)),o&&(o.style.top=i.i(r.formatUnit)(e))}this.parent.chartVerticalLineContainer&&(this.parent.chartVerticalLineContainer.style.top=i.i(r.formatUnit)(e))},e.prototype.onScroll=function(){var e={};this.element.scrollTop!==this.previousScroll.top&&(this.isFromTreeGrid?this.isFromTreeGrid=!1:this.parent.notify("chartScroll",{top:this.element.scrollTop}),e.previousScrollTop=this.previousScroll.top,this.previousScroll.top=this.element.scrollTop,e.scrollTop=this.element.scrollTop,e.scrollDirection="Vertical",e.action="VerticalScroll",this.updateTopPosition()),this.element.scrollLeft!==this.previousScroll.left&&(this.parent.ganttChartModule.chartTimelineContainer.scrollLeft=this.element.scrollLeft,e.previousScrollLeft=this.previousScroll.left,this.previousScroll.left=this.element.scrollLeft,e.scrollLeft=this.element.scrollLeft,e.scrollDirection="Horizontal",e.action="HorizontalScroll"),e.requestType="scroll",this.parent.trigger("actionComplete",e)},e.prototype.setHeight=function(e){this.element.style.height=i.i(r.formatUnit)(e)},e.prototype.setWidth=function(e){this.element.style.width=i.i(r.formatUnit)(e)},e.prototype.setScrollTop=function(e){this.element.scrollTop=e,this.parent.treeGrid.element.querySelector(".e-content").scrollTop=e},e.prototype.setScrollLeft=function(e){this.element.scrollLeft=e,this.parent.ganttChartModule.chartTimelineContainer.scrollLeft=this.element.scrollLeft,this.previousScroll.left=this.element.scrollLeft},e.prototype.destroy=function(){this.removeEventListeners()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){r.TreeGrid.Inject(r.ColumnMenu),this.parent=e}return e.prototype.getColumnMenu=function(){return this.parent.treeGrid.columnMenuModule.getColumnMenu()},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"columnMenu"},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Reorder),this.parent.treeGrid.allowReordering=this.parent.allowReordering,this.bindEvents()}return e.prototype.getModuleName=function(){return"reorder"},e.prototype.bindEvents=function(){var e=this;this.parent.treeGrid.columnDragStart=function(t){e.parent.trigger("columnDragStart",t)},this.parent.treeGrid.columnDrag=function(t){e.parent.trigger("columnDrag",t)},this.parent.treeGrid.columnDrop=function(t){e.parent.trigger("columnDrop",t)}},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Resize),this.parent.treeGrid.allowResizing=this.parent.allowResizing,this.bindEvents()}return e.prototype.getModuleName=function(){return"resize"},e.prototype.bindEvents=function(){var e=this;this.parent.treeGrid.resizeStart=function(t){e.parent.trigger("resizeStart",t)},this.parent.treeGrid.resizing=function(t){e.parent.trigger("resizing",t)},this.parent.treeGrid.resizeStop=function(t){e.parent.trigger("resizeStop",t)}},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(3)),a=i(2),s=i(8),o=(i.n(s),function(){function e(e){this.validationPredecessor=null,this.confirmPredecessorDialog=null,this.predecessorIndex=null,this.childRecord=null,this.parent=e,this.dateValidateModule=this.parent.dateValidationModule,this.parent.on("initPredessorDialog",this.initPredecessorValidationDialog,this)}return e.prototype.updateConnectorLineEditElement=function(e){var t=this.getConnectorLineHoverElement(e.target);i.i(r.getValue)("editModule.taskbarEditModule.taskBarEditAction",this.parent)||this.highlightConnectorLineElements(t)},e.prototype.getConnectorLineHoverElement=function(e){var t=i.i(a.j)(e,n._15),r=i.i(a.j)(e,n._16),s=i.i(a.j)(e,n._17);return t||r||s?i.i(a.j)(e,n._1):null},e.prototype.highlightConnectorLineElements=function(e){e?e!==this.connectorLineElement&&(this.removeHighlight(),this.addHighlight(e)):this.removeHighlight()},e.prototype.addHighlight=function(e){this.connectorLineElement=e,i.i(r.addClass)([e],[n._18]),e.querySelectorAll("."+n._15)[0].classList.contains("e-criticalconnector-line")?(i.i(r.addClass)(e.querySelectorAll("."+n._15),[n._19]),i.i(r.addClass)(e.querySelectorAll("."+n._16),[n._20]),i.i(r.addClass)(e.querySelectorAll("."+n._17),[n._21])):(i.i(r.addClass)(e.querySelectorAll("."+n._15),[n._22]),i.i(r.addClass)(e.querySelectorAll("."+n._16),[n._23]),i.i(r.addClass)(e.querySelectorAll("."+n._17),[n._24]))},e.prototype.removeHighlight=function(){i.i(r.isNullOrUndefined)(this.connectorLineElement)||(i.i(r.removeClass)([this.connectorLineElement],[n._18]),this.connectorLineElement.querySelectorAll("."+n._15)[0].classList.contains(n._19)?(i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._15),[n._19]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._16),[n._20]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._17),[n._21])):(i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._15),[n._22]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._16),[n._23]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._17),[n._24])),this.connectorLineElement=null)},e.prototype.getEditedConnectorLineString=function(e){for(var t,n,a,s,o,l,d=[],p=[],h="",u=0;u<e.length;u++)if(t=e[u],n=t.ganttProperties.predecessor){for(var c=0;c<n.length;c++){a=n[c];if(this.parent.connectorLineModule.removeConnectorLineById("parent"+a.from+"child"+a.to),s=this.parent.connectorLineModule.getRecordByID(a.from),o=this.parent.connectorLineModule.getRecordByID(a.to),(s||o)&&(l=this.parent.predecessorModule.updateConnectorLineObject(s,o,a),!i.i(r.isNullOrUndefined)(l))){var g=d.indexOf(l.connectorLineId),f=this.parent.connectorLineModule.getConnectorLineTemplate(l);-1!==g?p[g]=f:(d.push(l.connectorLineId),p.push(f))}}h=p.join("")}return h},e.prototype.refreshEditedRecordConnectorLine=function(e){this.parent.connectorLineModule.removePreviousConnectorLines(this.parent.previousRecords),this.parent.connectorLineModule.expandedRecords=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.updatedRecords:this.parent.getExpandedRecords(this.parent.updatedRecords);var t=this.getEditedConnectorLineString(e);this.parent.connectorLineModule.dependencyViewContainer.innerHTML=this.parent.connectorLineModule.dependencyViewContainer.innerHTML+t},e.prototype.idFromPredecessor=function(e){for(var t,n=e.split(","),a=[],s=[],o=0;o<n.length;o++){var l=[];if(t=n[o].split("+"),"+",n[o].indexOf("-")>=0&&(t=n[o].split("-"),"-"),!i.i(r.isNullOrUndefined)(t[0])){-1===("ResourceView"===this.parent.viewType?this.parent.getTaskIds():this.parent.ids).indexOf(t[0])?-1!=t[0].indexOf(" ")?(s=t[0].split(" "),1===s.length&&(s=t[0].match(/(\d+|[A-z]+)/g)),l.push(s[0])):1===t[0].length||2===t[0].length?l.push(t[0]):l.push(t[0].slice(0,-2)):l.push(t[0])}a.push(l.join(""))}return a},e.prototype.predecessorValidation=function(e,t){for(var n,a,s=t.rowUniqueID,o=0;o<e.length;o++){n=e[o];var l=[];e.slice(0).splice(o,1);for(var d=this;null!==n;){var p=function(){var e=[];return-1!==l.indexOf(n)?"break":i.i(r.isNullOrUndefined)(d.parent.connectorLineModule.getRecordByID(n))?{value:!1}:(a=d.parent.connectorLineModule.getRecordByID(n).ganttProperties,!i.i(r.isNullOrUndefined)(a.predecessor)&&a.predecessor.length>0&&a.predecessor.forEach(function(t){a.rowUniqueID.toString()!==t.from&&e.push(t.from.toString())}),s.toString()===a.rowUniqueID.toString()||-1!==e.indexOf(s.toString())?{value:!1}:(l.push(n),!i.i(r.isNullOrUndefined)(a.predecessor)&&a.predecessor.length>0?void(n=a.predecessor[0].from):"break"))}();if("object"==typeof p)return p.value;if("break"===p)break}}return!0},e.prototype.getRootParent=function(e){var t=e;return e.parentItem?(t=this.parent.flatData.filter(function(t){return t.uniqueID==e.parentUniqueID})[0],t.parentItem&&(t=this.getRootParent(t)),t):t},e.prototype.validateParentPredecessor=function(e,t){if(t.hasChildRecords&&!e.hasChildRecords){if(e.parentUniqueID===t.uniqueID)return!1;do{if(e.parentItem&&(e=this.parent.flatData[this.parent.ids.indexOf(e.parentItem.taskId)],e.uniqueID===t.uniqueID))return!1}while(e.parentItem)}else if(!t.hasChildRecords&&e.hasChildRecords){if(t.parentUniqueID===e.uniqueID)return!1;do{if(t.parentItem&&(t=this.parent.flatData[this.parent.ids.indexOf(t.parentItem.taskId)],t.uniqueID===e.uniqueID))return!1}while(t.parentItem)}else if(t.hasChildRecords&&e.hasChildRecords)if(t.parentItem&&e.parentItem){if(e.parentUniqueID===t.uniqueID||e.uniqueID===t.parentUniqueID)return!1}else if(!t.parentItem&&e.parentItem){var i=this.parent.connectorLineEditModule.getRootParent(e);if(i.uniqueID===t.uniqueID)return!1}else if(t.parentItem&&!e.parentItem){var r=this.parent.connectorLineEditModule.getRootParent(t);if(r.uniqueID===e.uniqueID)return!1}return!0},e.prototype.validatePredecessorRelation=function(e,t){var n,a,s=!0,o="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(!i.i(r.isNullOrUndefined)(t)&&t.length>0){n=this.idFromPredecessor(t);for(var l=this,d=0;d<n.length;d++){var p=function(t){if(parseInt(n[n.length-1])!==e[l.parent.taskFields.id]){var d=l.parent.ids.indexOf(n[n.length-1]),p=l.parent.currentViewData[d];p&&e&&(s=l.validateParentPredecessor(p,e))}var h=n.slice(0),u=[],c=!0;if(h.forEach(function(e){-1===u.indexOf(e)?u.push(e):c=!1}),!c)return{value:!1};a=n[t];var g=[];n.slice(0).splice(t,1);for(;null!==a;){var f=function(){var t,n,s=[];if(-1!==g.indexOf(a))return"break";if(i.i(r.isNullOrUndefined)(l.parent.connectorLineModule.getRecordByID(a.toString())))return{value:!1};if(n=l.parent.connectorLineModule.getRecordByID(a.toString()).ganttProperties,!i.i(r.isNullOrUndefined)(n.predecessor)&&n.predecessor.length>0&&n.predecessor.forEach(function(e,i){n.rowUniqueID.toString()!==e.from&&(s.push(e.from.toString()),t=i)}),o.toString()===n.rowUniqueID.toString()||-1!==s.indexOf(o.toString()))return{value:!1};if(g.push(a),i.i(r.isNullOrUndefined)(n.predecessor)||!(n.predecessor.length>0))return"break";var d=void 0;return s.length>1?d=l.predecessorValidation(s,e.ganttProperties):1===s.length&&(a=n.predecessor[t].from),!1===d?{value:!1}:void 0}();if("object"==typeof f)return f;if("break"===f)break}}(d);if("object"==typeof p)return p.value}}return s},e.prototype.addPredecessor=function(e,t){var n=i.i(r.isNullOrUndefined)(e.ganttProperties.predecessorsName)||""===e.ganttProperties.predecessorsName?t:e.ganttProperties.predecessorsName+","+t;this.updatePredecessorHelper(e,n)},e.prototype.removePredecessor=function(e){this.updatePredecessorHelper(e,null)},e.prototype.updatePredecessor=function(e,t,i){return this.updatePredecessorHelper(e,t,i)},e.prototype.updatePredecessorHelper=function(e,t,n){if(i.i(r.isUndefined)(t)||this.validatePredecessorRelation(e,t)){this.parent.isOnEdit=!0;var a=[];i.i(r.isNullOrUndefined)(t)||""===t||(a=this.parent.predecessorModule.calculatePredecessor(t,e)),this.parent.setRecordValue("predecessor",a,e.ganttProperties,!0);var s=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("predecessorsName",s,e.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,s,e),this.parent.setRecordValue(this.parent.taskFields.dependency,s,e);var o={};return o.action=n&&n.action&&"CellEditing"===n.action?n.action:"DrawConnectorLine",o.data=e,this.parent.editModule.initiateUpdateAction(o),!0}return!1},e.prototype.checkParentRelation=function(e,t){var i=e;if(i&&i.parentItem&&-1!==t.indexOf(i.parentItem.taskId.toString()))return!1;for(var r=this,n=0;n<t.length;n++){var a=function(e){var i=r.parent.currentViewData.filter(function(i){return i&&i.ganttProperties.rowUniqueID.toString()===t[e].toString()});if(i[0]&&i[0].hasChildRecords)return{value:!1}}(n);if("object"==typeof a)return a.value}return!0},e.prototype.initPredecessorValidationDialog=function(){if(this.parent.taskFields.dependency&&this.parent.isInPredecessorValidation){var e=i.i(r.createElement)("div",{id:this.parent.element.id+"_dialogValidationRule"});this.parent.element.appendChild(e),this.renderValidationDialog()}},e.prototype.renderValidationDialog=function(){var e=new s.Dialog({header:"Validate Editing",isModal:!0,visible:!1,width:"50%",showCloseIcon:!0,close:this.validationDialogClose.bind(this),content:"",buttons:[{click:this.validationDialogOkButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("okText"),isPrimary:!0}},{click:this.validationDialogCancelButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("cancel")}}],target:this.parent.element,animationSettings:{effect:"None"}});document.getElementById(this.parent.element.id+"_dialogValidationRule").innerHTML="",e.isStringTemplate=!0,e.appendTo("#"+this.parent.element.id+"_dialogValidationRule"),this.parent.validationDialogElement=e},e.prototype.validationDialogOkButton=function(){var e=this.parent.currentEditedArgs;e.validateMode.preserveLinkWithEditing=document.getElementById(this.parent.element.id+"_ValidationAddlineOffset").checked,e.validateMode.removeLink=document.getElementById(this.parent.element.id+"_ValidationRemoveline").checked,e.validateMode.respectLink=document.getElementById(this.parent.element.id+"_ValidationCancel").checked,this.applyPredecessorOption(),this.parent.validationDialogElement.hide()},e.prototype.validationDialogCancelButton=function(){this.parent.currentEditedArgs.validateMode.respectLink=!0,this.applyPredecessorOption(),this.parent.validationDialogElement.hide()},e.prototype.validationDialogClose=function(e){i.i(r.getValue)("isInteraction",e)&&(this.parent.currentEditedArgs.validateMode.respectLink=!0,this.applyPredecessorOption())},e.prototype.applyPredecessorOption=function(){var e=this.parent.currentEditedArgs,t=e.data;e.validateMode.respectLink?(this.parent.editModule.reUpdatePreviousRecords(),this.parent.chartRowsModule.refreshRecords([e.data])):e.validateMode.removeLink?(this.removePredecessors(t,this.validationPredecessor),this.parent.editModule.updateEditedTask(e.editEventArgs)):e.validateMode.preserveLinkWithEditing&&(this.calculateOffset(t),this.parent.editModule.updateEditedTask(e.editEventArgs))},e.prototype.calculateOffset=function(e){for(var t=i.i(r.extend)([],e.ganttProperties.predecessor,[],!0),n=this.parent.predecessorModule.getValidPredecessor(e),s=0;s<n.length;s++){var o=n[s],l=this.parent.connectorLineModule.getRecordByID(o.from),d=void 0;if(i.i(a.c)(l.ganttProperties)&&i.i(a.c)(e.ganttProperties)){var p=void 0,h=void 0,u=void 0,c=void 0;switch(o.type){case"FS":p=new Date(l.ganttProperties.endDate.getTime()),h=new Date(e.ganttProperties.startDate.getTime());break;case"SS":p=new Date(l.ganttProperties.startDate.getTime()),h=new Date(e.ganttProperties.startDate.getTime());break;case"SF":p=new Date(l.ganttProperties.startDate.getTime()),h=new Date(e.ganttProperties.endDate.getTime());break;case"FF":p=new Date(l.ganttProperties.endDate.getTime()),h=new Date(e.ganttProperties.endDate.getTime())}if(p.getTime()<h.getTime())p=this.dateValidateModule.checkStartDate(p),h=this.dateValidateModule.checkEndDate(h,null),c=!1;else{var g=new Date(p.getTime());p=this.dateValidateModule.checkStartDate(h),h=this.dateValidateModule.checkEndDate(g,null),c=!0}p.getTime()<h.getTime()?(u=this.dateValidateModule.getDuration(p,h,o.offsetUnit,!0,!1),d=c?-1*u:u):d=0}else d=0;t[i.i(a.h)(o,"from",t,"to")].offset=d;var f=i.i(r.extend)([],l.ganttProperties.predecessor,[],!0);f[i.i(a.h)(o,"from",f,"to")].offset=d,this.parent.setRecordValue("predecessor",f,l.ganttProperties,!0)}this.parent.setRecordValue("predecessor",t,e.ganttProperties,!0);var m=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,m,e),this.parent.setRecordValue(this.parent.taskFields.dependency,m,e),this.parent.setRecordValue("predecessorsName",m,e.ganttProperties,!0)},e.prototype.removePredecessors=function(e,t){for(var n=i.i(r.extend)([],[],e.ganttProperties.predecessor,!0),s=t.length,o=0;o<s;o++){var l=this.parent.connectorLineModule.getRecordByID(t[o].from),d=i.i(r.extend)([],[],l.ganttProperties.predecessor,!0),p=i.i(a.h)(t[o],"from",n,"to");n.splice(p,1);var h=i.i(a.h)(t[o],"from",d,"to");d.splice(h,1),this.parent.setRecordValue("predecessor",d,l.ganttProperties,!0)}if(n.length!==e.ganttProperties.predecessor.length){this.parent.setRecordValue("predecessor",n,e.ganttProperties,!0);var u=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("predecessorsName",u,e.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,u,e),this.parent.setRecordValue(this.parent.taskFields.dependency,u,e)}},e.prototype.openValidationDialog=function(e){var t=this.validationDialogTemplate(e);this.parent.validationDialogElement.setProperties({content:t}),this.parent.validationDialogElement.show()},e.prototype.validationDialogTemplate=function(e){var t,n=this.parent.element.id,s=i.i(r.createElement)("div",{className:"e-ValidationContent"}),o=i.i(r.getValue)("task",e),l=i.i(r.getValue)("parentTask",e),d=i.i(r.getValue)("violationType",e),p=o.ganttProperties.taskName,h=this.parent.getFormatedDate(o.ganttProperties.startDate,"MM/dd/yyyy"),u=l.ganttProperties.taskName,c=[p,u];"taskBeforePredecessor_FS"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_FS"):"taskAfterPredecessor_FS"===d?t=this.parent.localeObj.getConstant("taskAfterPredecessor_FS"):"taskBeforePredecessor_SS"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_SS"):"taskAfterPredecessor_SS"===d?t=this.parent.localeObj.getConstant("taskAfterPredecessor_SS"):"taskBeforePredecessor_FF"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_FF"):"taskAfterPredecessor_FF"===d?t=this.parent.localeObj.getConstant("taskAfterPredecessor_FF"):"taskBeforePredecessor_SF"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_SF"):"taskAfterPredecessor_SF"===d&&(t=this.parent.localeObj.getConstant("taskAfterPredecessor_SF")),t=i.i(a.l)(t,c);var g='<div id="'+n+'_ValidationText">'+t+"<div>",f='<table><tr><td><input type="radio" id="'+n+'_ValidationCancel" name="ValidationRule" checked/><label for="'+n+'_ValidationCancel" id= "'+n+'_cancelLink">Cancel, keep the existing link</label></td></tr><tr><td><input type="radio" id="'+n+'_ValidationRemoveline" name="ValidationRule"/><label for="'+n+'_ValidationRemoveline" id="'+n+'_removeLink">Remove the link and move <b>'+p+"</b> to start on <b>"+h+'</b>.</label></td></tr><tr><td><input type="radio" id="'+n+'_ValidationAddlineOffset" name="ValidationRule"/><label for="'+n+'_ValidationAddlineOffset" id="'+n+'_preserveLink">Move the <b>'+p+"</b> to start on <b>"+h+"</b> and keep the link.</label></td></tr></table>";return s.innerHTML=g+f,s},e.prototype.validateTypes=function(e){var t,n=this.parent.predecessorModule.getValidPredecessor(e);this.validationPredecessor=[];for(var a,s,o=this.parent.predecessorModule.getPredecessorDate(e,n),l=e.ganttProperties,d=this.parent.allowUnscheduledTasks&&i.i(r.isNullOrUndefined)(o)?l.endDate:this.dateValidateModule.getEndDate(o,l.duration,l.durationUnit,l,!1),p=0;p<n.length;p++){t=this.parent.connectorLineModule.getRecordByID(n[p].from);var h=null;"FS"===n[p].type?l.startDate<o?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_FS"):l.startDate>o&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_FS"):"SS"===n[p].type?l.startDate<o?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_SS"):l.startDate>o&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_SS"):"FF"===n[p].type?d<=t.ganttProperties.endDate?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_FF"):d>t.ganttProperties.endDate&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_FF"):"SF"===n[p].type&&(d<t.ganttProperties.startDate?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_SF"):d>=t.ganttProperties.startDate&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_SF")),!i.i(r.isNullOrUndefined)(h)&&i.i(r.isNullOrUndefined)(s)&&(a=t,s=h)}return{parentTask:a,task:e,violationType:s}},e.prototype.addRemovePredecessor=function(e){var t=this.parent.previousRecords[e.uniqueID],n=e.ganttProperties.predecessor.slice();if(t&&t.ganttProperties&&t.ganttProperties.hasOwnProperty("predecessor")){var s=t.ganttProperties.predecessor;if(!i.i(r.isNullOrUndefined)(s))for(var o=0;o<s.length;o++){var l=this.parent.connectorLineModule.getRecordByID(s[o].from);if(l===e)e.ganttProperties.predecessor.push(s[o]);else{var d=i.i(r.extend)([],[],l.ganttProperties.predecessor,!0),p=i.i(a.h)(s[o],"from",d,"to");-1!==p&&(d.splice(p,1),this.parent.setRecordValue("predecessor",d,l.ganttProperties,!0))}}if(!i.i(r.isNullOrUndefined)(n))for(var h=0;h<n.length;h++){var l=this.parent.connectorLineModule.getRecordByID(n[h].from),d=i.i(r.extend)([],[],l.ganttProperties.predecessor,!0);d.push(n[h]),this.parent.setRecordValue("predecessor",d,l.ganttProperties,!0)}}},e.prototype.removePredecessorByIndex=function(e,t){var r=e.ganttProperties.predecessor,n=r.splice(t,1),s=this.parent.connectorLineModule.getRecordByID(n[0].from),o=s.ganttProperties.predecessor,l=i.i(a.h)(n[0],"from",o,"to");o.splice(l,1);var d=this.parent.predecessorModule.getPredecessorStringValue(e);r.push(n[0]),this.parent.connectorLineEditModule.updatePredecessor(e,d)},e.prototype.renderPredecessorDeleteConfirmDialog=function(){this.confirmPredecessorDialog=new s.Dialog({width:"320px",isModal:!0,content:this.parent.localeObj.getConstant("confirmPredecessorDelete"),buttons:[{click:this.confirmOkDeleteButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("okText"),isPrimary:!0}},{click:this.confirmCloseDialog.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("cancel")}}],target:this.parent.element,animationSettings:{effect:"None"}});var e=i.i(r.createElement)("div",{id:this.parent.element.id+"_deletePredecessorConfirmDialog"});this.parent.element.appendChild(e),this.confirmPredecessorDialog.isStringTemplate=!0,this.confirmPredecessorDialog.appendTo(e)},e.prototype.confirmCloseDialog=function(){this.confirmPredecessorDialog.destroy()},e.prototype.confirmOkDeleteButton=function(){this.removePredecessorByIndex(this.childRecord,this.predecessorIndex),this.confirmPredecessorDialog.destroy()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(3),n=i(6),a=(i.n(n),i(0)),s=(i.n(a),i(4)),o=(i.n(s),i(13)),l=(i.n(o),function(){function e(e){var t=this;this.segmentIndex=-1,this.headerContextMenuClick=function(e){var r=i.i(a.closest)(e.event.target,".e-row"),n=i.i(a.closest)(e.event.target,".e-chart-row");i.i(a.isNullOrUndefined)(r)&&i.i(a.isNullOrUndefined)(n)&&(e.type="Header",t.parent.trigger("contextMenuClick",e))},this.headerContextMenuOpen=function(e){var r=i.i(a.closest)(e.event.target,".e-row"),n=i.i(a.closest)(e.event.target,".e-chart-row");i.i(a.isNullOrUndefined)(r)&&i.i(a.isNullOrUndefined)(n)?(e.type="Header",t.parent.trigger("contextMenuOpen",e)):e.cancel=!0},this.parent=e,this.ganttID=e.element.id,n.TreeGrid.Inject(n.ContextMenu),this.parent.treeGrid.contextMenuClick=this.headerContextMenuClick.bind(this),this.parent.treeGrid.contextMenuOpen=this.headerContextMenuOpen.bind(this),this.addEventListener(),this.resetItems()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("initiate-contextMenu",this.render,this),this.parent.on("reRender-contextMenu",this.reRenderContextMenu,this),this.parent.on("contextMenuClick",this.contextMenuItemClick,this),this.parent.on("contextMenuOpen",this.contextMenuBeforeOpen,this))},e.prototype.reRenderContextMenu=function(e){e.module===this.getModuleName()&&e.enable&&(this.contextMenu&&(this.contextMenu.destroy(),i.i(a.remove)(this.element)),this.resetItems(),this.render())},e.prototype.render=function(){this.element=this.parent.createElement("ul",{id:this.ganttID+"_contextmenu",className:r.a}),this.parent.element.appendChild(this.element);var e="#"+this.ganttID;this.contextMenu=new o.ContextMenu({items:this.getMenuItems(),locale:this.parent.locale,target:e,animationSettings:{effect:"None"},select:this.contextMenuItemClick.bind(this),beforeOpen:this.contextMenuBeforeOpen.bind(this),onOpen:this.contextMenuOpen.bind(this),onClose:this.contextMenuOnClose.bind(this),cssClass:"e-gantt"}),this.contextMenu.appendTo(this.element),this.parent.treeGrid.contextMenuItems=this.headerMenuItems},e.prototype.contextMenuItemClick=function(e){this.item=this.getKeyFromId(e.item.id);var t,r,n,s=i.i(a.getValue)("parentObj",e.item),o=-1;switch(s&&!i.i(a.isNullOrUndefined)(s.id)&&"DeleteDependency"===this.getKeyFromId(s.id)&&(o=s.items.indexOf(e.item)),this.parent.isAdaptive&&("TaskInformation"!==this.item&&"Above"!==this.item&&"Below"!==this.item&&"Child"!==this.item&&"DeleteTask"!==this.item||this.parent.selectionModule&&"Multiple"===this.parent.selectionSettings.type&&(this.parent.selectionModule.hidePopUp(),document.getElementsByClassName("e-gridpopup")[0].style.display="none")),this.item){case"TaskInformation":isNaN(Number(this.rowData.ganttProperties.rowUniqueID))?this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID):this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));break;case"Above":case"Below":case"Child":if(t=this.item,r=i.i(a.extend)({},{},this.rowData.taskData,!0),n=this.parent.taskFields,r[n.startDate]&&this.parent.setRecordValue(n.startDate,this.rowData.ganttProperties.startDate,r,!0),r[n.endDate]&&this.parent.setRecordValue(n.endDate,this.rowData.ganttProperties.endDate,r,!0),i.i(a.isNullOrUndefined)(n.dependency)||(r[n.dependency]=null),!i.i(a.isNullOrUndefined)(n.child)&&r[n.child]&&delete r[n.child],!i.i(a.isNullOrUndefined)(n.parentID)&&r[n.parentID]&&(r[n.parentID]=null),this.rowData){var l=this.parent.updatedRecords.indexOf(this.rowData);this.parent.addRecord(r,t,l)}break;case"Milestone":case"ToMilestone":this.parent.convertToMilestone(this.rowData.ganttProperties.rowUniqueID);break;case"DeleteTask":this.parent.editModule.deleteRecord(this.rowData);break;case"ToTask":if(r=i.i(a.extend)({},{},this.rowData.taskData,!0),n=this.parent.taskFields,i.i(a.isNullOrUndefined)(n.duration)){r[n.startDate]=new Date(this.rowData.taskData[n.startDate]);var d=new Date(this.rowData.taskData[n.startDate]);d.setDate(d.getDate()+1),r[n.endDate]=d}else{var p=this.rowData.ganttProperties;r[n.duration]="1 "+p.durationUnit}i.i(a.isNullOrUndefined)(r[n.milestone])||!0===r[n.milestone]&&(r[n.milestone]=!1),this.parent.updateRecordByID(r);break;case"Cancel":this.parent.cancelEdit();break;case"Save":this.parent.editModule.cellEditModule.isCellEdit=!1,this.parent.treeGrid.grid.saveCell();break;case"Dependency"+o:this.parent.connectorLineEditModule.removePredecessorByIndex(this.rowData,o);break;case"Auto":case"Manual":this.parent.changeTaskMode(this.rowData);break;case"Indent":this.parent.indent();break;case"Outdent":this.parent.outdent();break;case"Left":case"Right":this.mergeCall(this.item);break;case"SplitTask":this.splitTaskCall(e)}e.type="Content",e.rowData=this.rowData,this.parent.trigger("contextMenuClick",e)},e.prototype.splitTaskCall=function(e){var t=this;this.isEdit=!0;var r=this.parent.taskFields,n=this.getClickedDate(e.element);i.i(a.isNullOrUndefined)(this.parent.timelineSettings.bottomTier)&&"Hour"!==this.parent.timelineSettings.bottomTier.unit&&n.setHours(0,0,0,0);var s={rowData:this.rowData,requestType:"splitTaskbar",splitDate:n,cancel:!1,target:this.targetElement};this.parent.trigger("actionBegin",s,function(e){t.parent.chartRowsModule.splitTask(t.rowData[r.id],n)})},e.prototype.mergeCall=function(e){var t=this;this.isEdit=!0;var i=this.parent.taskFields,r=this.rowData.ganttProperties.segments,n="Right"===e?this.segmentIndex:r[this.segmentIndex-1].segmentIndex,a="Left"===e?this.segmentIndex:r[this.segmentIndex+1].segmentIndex,s=[{firstSegmentIndex:n,secondSegmentIndex:a}],o={rowData:this.rowData,mergeSegmentIndexes:s,requestType:"mergeSegment",cancel:!1,target:this.targetElement};this.parent.trigger("actionBegin",o,function(e){!1===e.cancel&&t.parent.chartRowsModule.mergeTask(t.rowData[i.id],s)})},e.prototype.getClickedDate=function(e){var t=this.parent.getOffsetRect(this.parent.element),r=t.left+this.parent.ganttChartModule.chartElement.offsetLeft+this.rowData.ganttProperties.left-this.parent.ganttChartModule.scrollElement.scrollLeft,n=this.clickedPosition-r,s=Math.ceil(n/this.parent.perDayWidth),o=this.rowData.ganttProperties.startDate;return i.i(a.isNullOrUndefined)(this.parent.timelineSettings.bottomTier)||"Hour"!==this.parent.timelineSettings.bottomTier.unit||(s=Math.ceil(n/this.parent.timelineSettings.timelineUnitSize),s-=1),this.parent.dataOperation.getEndDate(o,s,this.rowData.ganttProperties.durationUnit,this.rowData,!1)},e.prototype.contextMenuBeforeOpen=function(e){var t=this,n=e.event?e.event.target:this.parent.focusModule?this.parent.ganttChartModule.targetElement:this.parent.focusModule.getActiveElement();!i.i(a.isNullOrUndefined)(this.parent.editModule)&&this.parent.editModule.cellEditModule&&this.parent.editModule.cellEditModule.isCellEdit&&n.parentElement.classList.contains("e-row")&&this.parent.treeGrid.closeEdit(),i.i(a.isNullOrUndefined)(e.element)||e.element.id!==this.parent.element.id+"_contextmenu"||(this.clickedPosition=i.i(a.getValue)("event",e).clientX);var o=i.i(a.closest)(n,".e-gantt-child-taskbar");o&&(this.targetElement=e.target=o),e.gridRow=i.i(a.closest)(n,".e-row"),e.chartRow=i.i(a.closest)(n,".e-chart-row");var l=i.i(a.closest)(n,".e-gantt");if(!i.i(a.closest)(n,r.b)&&this.parent.editModule&&this.parent.editModule.cellEditModule&&this.parent.editModule.cellEditModule.isCellEdit&&this.parent.editModule.dialogModule.dialogObj&&!this.parent.editModule.dialogModule.dialogObj.open&&(this.parent.treeGrid.grid.saveCell(),this.parent.editModule.cellEditModule.isCellEdit=!1),this.parent.readOnly&&this.contextMenu.enableItems(["Add","Save","Convert","Delete Dependency","Delete Task","TaskMode","Indent","Outdent","SplitTask","MergeTask"],!1),(i.i(a.isNullOrUndefined)(e.gridRow)&&i.i(a.isNullOrUndefined)(e.chartRow)||0===this.contentMenuItems.length)&&(i.i(a.isNullOrUndefined)(e.parentItem)||i.i(a.isNullOrUndefined)(l)?e.cancel=!0:e.cancel=!1),!e.cancel){var d=-1;e.gridRow?d=parseInt(e.gridRow.getAttribute("data-rowindex"),0):e.chartRow&&(d=parseInt(e.chartRow.getAttribute("aria-rowindex"),0)),this.parent.selectionModule&&this.parent.allowSelection&&!e.parentItem&&!i.i(a.isNullOrUndefined)(e.chartRow)&&this.parent.selectionModule.selectRow(d),e.parentItem||(this.rowData=this.parent.updatedRecords[d]);for(var p=0,h=e.items;p<h.length;p++){var u=h[p];u.separator||(!n.classList.contains("e-gantt-unscheduled-taskbar")||u.text!==this.getLocale("splitTask")&&u.text!==this.getLocale("mergeTask")?this.updateItemStatus(u,n,d):this.hideItems.push(u.text))}if(e.rowData=this.rowData,e.type="Content",e.disableItems=this.disableItems,e.hideItems=this.hideItems,e.hideChildItems=[],0===e.rowData.level&&"ResourceView"===this.parent.viewType)return void(e.cancel=!0);var c=new s.Deferred;return this.parent.trigger("contextMenuOpen",e,function(i){c.resolve(i),t.hideItems=i.hideItems,t.disableItems=i.disableItems,i.parentItem||i.hideItems.length!==i.items.length||(t.revertItemStatus(),i.cancel=!0),t.hideItems.length>0&&t.contextMenu.hideItems(t.hideItems),t.disableItems.length>0&&t.contextMenu.enableItems(t.disableItems,!1),e.hideChildItems.length>0&&t.contextMenu.hideItems(e.hideChildItems)}),c}},e.prototype.updateItemStatus=function(e,t,n){var s=this.getKeyFromId(e.id),o=i.i(a.closest)(t,r.b),l=[],d=i.i(a.closest)(t,".e-gantt-child-taskbar");if(o)"Save"!==s&&"Cancel"!==s&&this.hideItems.push(e.text);else switch(s){case"TaskInformation":this.parent.editSettings.allowEditing&&this.parent.editModule||this.updateItemVisibility(e.text);break;case"Add":this.parent.editSettings.allowAdding&&this.parent.editModule||this.updateItemVisibility(e.text);break;case"Save":case"Cancel":this.hideItems.push(e.text);break;case"Convert":this.rowData.hasChildRecords?this.hideItems.push(e.text):this.parent.editSettings.allowEditing&&this.parent.editModule?(this.rowData.ganttProperties.isMilestone?l.push(this.createItemModel(r.c,"ToTask",this.getLocale("toTask"))):l.push(this.createItemModel(r.c,"ToMilestone",this.getLocale("toMilestone"))),e.items=l):this.updateItemVisibility(e.text);break;case"DeleteDependency":var p=this.getPredecessorsItems();this.rowData.hasChildRecords?this.hideItems.push(e.text):this.parent.editSettings.allowDeleting&&0!==p.length&&this.parent.editModule?p.length>0&&(e.items=p):this.updateItemVisibility(e.text);break;case"DeleteTask":this.parent.editSettings.allowDeleting&&this.parent.editModule||this.updateItemVisibility(e.text);break;case"TaskMode":"Custom"!==this.parent.taskMode?this.updateItemVisibility(e.text):(this.rowData.ganttProperties.isAutoSchedule?l.push(this.createItemModel(r.c,"Manual",this.getLocale("manual"))):l.push(this.createItemModel(r.c,"Auto",this.getLocale("auto"))),e.items=l);break;case"Indent":if(this.parent.allowSelection&&this.parent.editModule&&this.parent.editSettings){var h=this.parent.selectedRowIndex,u=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length),c=this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0]-1];this.parent.editSettings.allowEditing&&0!==h&&-1!==h&&u&&"ResourceView"!==this.parent.viewType&&this.parent.updatedRecords[h].level-c.level!=1||this.updateItemVisibility(e.text)}else this.hideItems.push(e.text);break;case"Outdent":if(this.parent.allowSelection&&this.parent.editModule&&this.parent.editSettings){var g=this.parent.selectionModule.getSelectedRowIndexes()[0],f=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length);this.parent.editSettings.allowEditing&&-1!==g&&0!==g&&f&&"ResourceView"!==this.parent.viewType&&0!==this.parent.updatedRecords[g].level||this.updateItemVisibility(e.text)}else this.hideItems.push(e.text);break;case"SplitTask":var m=this.parent.taskFields;(this.parent.readOnly||!d||i.i(a.isNullOrUndefined)(m.segments)||this.parent.currentViewData[n].hasChildRecords)&&this.updateItemVisibility(e.text);break;case"MergeTask":this.parent.readOnly||!d?this.updateItemVisibility(e.text):this.mergeItemVisiblity(t,e)}},e.prototype.mergeItemVisiblity=function(e,t){var n=[],s=this.parent.taskFields,o=this.getClickedDate(e);this.segmentIndex=this.parent.chartRowsModule.getSegmentIndex(o,this.rowData);var l=this.rowData.ganttProperties.segments;!i.i(a.isNullOrUndefined)(l)&&l.length>0?i.i(a.isNullOrUndefined)(s.segments)&&-1===this.segmentIndex?this.updateItemVisibility(t.text):(0===this.segmentIndex?n.push(this.createItemModel(r.c,"Right",this.getLocale("right"))):this.segmentIndex===l.length-1?n.push(this.createItemModel(r.c,"Left",this.getLocale("left"))):(n.push(this.createItemModel(r.c,"Right",this.getLocale("right"))),n.push(this.createItemModel(r.c,"Left",this.getLocale("left")))),t.items=n):this.hideItems.push(t.text)},e.prototype.updateItemVisibility=function(e){!i.i(a.isNullOrUndefined)(this.parent.contextMenuItems)?this.disableItems.push(e):this.hideItems.push(e)},e.prototype.contextMenuOpen=function(e){this.isOpen=!0;var t=e.element.querySelectorAll("li:not(.e-menu-hide):not(.e-disabled)")[0];i.i(a.isNullOrUndefined)(t)||i.i(a.addClass)([t],"e-focused")},e.prototype.getMenuItems=function(){for(var e=i.i(a.isNullOrUndefined)(this.parent.contextMenuItems)?this.getDefaultItems():this.parent.contextMenuItems,t=0,n=e;t<n.length;t++){var s=n[t];"string"==typeof s&&-1!==this.getDefaultItems().indexOf(s)?this.buildDefaultItems(s):"string"!=typeof s&&(-1!==this.getDefaultItems().indexOf(s.text)?this.buildDefaultItems(s.text,s.iconCss):s.target===r.d?this.headerMenuItems.push(s):this.contentMenuItems.push(s))}return this.contentMenuItems},e.prototype.createItemModel=function(e,t,i,r){return{text:i,id:this.generateID(t),target:e,iconCss:r?"e-icons "+r:null}},e.prototype.getLocale=function(e){return this.parent.localeObj.getConstant(e)},e.prototype.buildDefaultItems=function(e,t){var i;switch(e){case"AutoFitAll":case"AutoFit":case"SortAscending":case"SortDescending":this.headerMenuItems.push(e);break;case"TaskInformation":i=this.createItemModel(r.c,e,this.getLocale("taskInformation"),this.getIconCSS(r.e,t));break;case"Indent":i=this.createItemModel(r.c,e,this.getLocale("indent"),this.getIconCSS(r.f,t));break;case"Outdent":i=this.createItemModel(r.c,e,this.getLocale("outdent"),this.getIconCSS(r.g,t));break;case"Save":i=this.createItemModel(r.e,e,this.getLocale("save"),this.getIconCSS(r.h,t));break;case"Cancel":i=this.createItemModel(r.e,e,this.getLocale("cancel"),this.getIconCSS(r.i,t));break;case"Add":i=this.createItemModel(r.c,e,this.getLocale("add"),this.getIconCSS(r.j,t)),i.items=[],i.items.push(this.createItemModel(r.c,"Above",this.getLocale("above"),this.getIconCSS(r.k,t))),i.items.push(this.createItemModel(r.c,"Below",this.getLocale("below"),this.getIconCSS(r.l,t))),"ResourceView"!==this.parent.viewType&&i.items.push(this.createItemModel(r.c,"Child",this.getLocale("child"))),i.items.push(this.createItemModel(r.c,"Milestone",this.getLocale("milestone")));break;case"DeleteTask":i=this.createItemModel(r.c,e,this.getLocale("deleteTask"),this.getIconCSS(r.m,t));break;case"DeleteDependency":i=this.createItemModel(r.c,e,this.getLocale("deleteDependency")),i.items=[],i.items.push({});break;case"Convert":i=this.createItemModel(r.c,e,this.getLocale("convert")),i.items=[],i.items.push({});break;case"TaskMode":i=this.createItemModel(r.c,e,this.getLocale("changeScheduleMode")),i.items=[],i.items.push({});break;case"SplitTask":i=this.createItemModel(r.c,e,this.getLocale("splitTask"));break;case"MergeTask":i=this.createItemModel(r.c,e,this.getLocale("mergeTask")),i.items=[],i.items.push({})}i&&this.contentMenuItems.push(i)},e.prototype.getIconCSS=function(e,t){return i.i(a.isNullOrUndefined)(t)?e:t},e.prototype.getPredecessorsItems=function(){this.predecessors=this.parent.predecessorModule.getValidPredecessor(this.rowData);for(var e,t=[],i=0,n=0,a=this.predecessors;n<a.length;n++){var s=a[n],o=this.parent.getRecordByID(s.from),l=o.ganttProperties,d=l.rowUniqueID+" - "+l.taskName,p="Dependency"+i++;e=this.createItemModel(r.c,p,d),t.push(e)}return t},e.prototype.getDefaultItems=function(){return["AutoFitAll","AutoFit","TaskInformation","DeleteTask","Save","Cancel","SortAscending","SortDescending","Add","DeleteDependency","Convert","TaskMode","Indent","Outdent","SplitTask","MergeTask"]},e.prototype.getModuleName=function(){return"contextMenu"},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("initiate-contextMenu",this.render),this.parent.off("reRender-contextMenu",this.reRenderContextMenu),this.parent.off("contextMenuClick",this.contextMenuItemClick),this.parent.off("contextMenuOpen",this.contextMenuOpen))},e.prototype.contextMenuOnClose=function(e){e.items.length>0&&e.items[0].parentObj instanceof o.ContextMenu&&this.revertItemStatus()},e.prototype.revertItemStatus=function(){this.contextMenu.showItems(this.hideItems),this.contextMenu.enableItems(this.disableItems),this.hideItems=[],this.disableItems=[],this.isOpen=!1},e.prototype.resetItems=function(){this.hideItems=[],this.disableItems=[],this.headerMenuItems=[],this.contentMenuItems=[],this.item=null},e.prototype.generateID=function(e){return this.ganttID+"_contextMenu_"+e},e.prototype.getKeyFromId=function(e){var t=this.ganttID+"_contextMenu_";return e.indexOf(t)>-1?e.replace(t,""):"Custom"},e.prototype.destroy=function(){this.contextMenu.destroy(),i.i(a.remove)(this.element),this.removeEventListener(),this.contextMenu=null,this.element=null},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(3)),a=function(){function e(e){this.resourceCollectionIds=[],this.criticalTasks=[],this.parent=e}return e.prototype.getCriticalTasks=function(){return this.criticalTasks},e.prototype.showCriticalPath=function(e){var t=this.parent.ids,i=this.parent.flatData;if(e&&this.parent.flatData.length>0){this.parent.enableCriticalPath=!0;var r=this.parent.treeGrid.parentData,n=r[0].ganttProperties.endDate,a=0,s=[],o=[],l=[],d=0,p=[],h=[],u=[],c=[],g=[],f=[];r[0].ganttProperties.autoEndDate>r[0].ganttProperties.endDate&&!r[0].ganttProperties.isAutoSchedule&&(n=r[0].ganttProperties.autoEndDate),r[0].ganttProperties.taskId;for(var m=1;m<r.length;m++)r[m].ganttProperties.endDate>=n&&(n=r[m].ganttProperties.endDate,r[m].ganttProperties.taskId),r[m].ganttProperties.isAutoSchedule||r[m].ganttProperties.autoEndDate>=n&&(n=r[m].ganttProperties.autoEndDate,r[m].ganttProperties.taskId);this.maxEndDate=n;for(var y=0;y<i.length;y++)i[y].isCritical=!1,i[y].ganttProperties.isCritical=!1,a=this.parent.dataOperation.getDuration(i[y].ganttProperties.endDate,n,i[y].ganttProperties.durationUnit,i[y].ganttProperties.isAutoSchedule,i[y].ganttProperties.isMilestone),i[y].slack=a+" "+i[y].ganttProperties.durationUnit,i[y].ganttProperties.slack=a+" "+i[y].ganttProperties.durationUnit,i[y].ganttProperties.endDate>=n&&s.push(i[y].ganttProperties.taskId),i[y].ganttProperties.predecessor&&0!==i[y].ganttProperties.predecessor.length&&(o.push(i[y]),l.push(i[y].ganttProperties.taskId));if("ResourceView"===this.parent.viewType)for(var m=0;m<this.parent.taskIds.length;m++)this.resourceCollectionIds[m]=this.parent.taskIds[m].slice(1);for(var v=this,D=0;D<s.length;D++)!function(e){if(-1===l.indexOf(s[e])){if("ProjectView"===v.parent.viewType)d=t.indexOf(s[e].toString());else for(var r=v.parent.currentViewData.filter(function(t){return parseInt(t.ganttProperties.taskId)==s[e]}),n=0;n<r.length;n++)!r[n].hasChildRecords&&r[n].ganttProperties.endDate>=v.maxEndDate&&(d=r[n].index);i[d].ganttProperties.progress<100&&(i[d].isCritical=!0,i[d].ganttProperties.isCritical=!0),i[d].slack="0 "+i[d].ganttProperties.durationUnit,p.push(s[e])}else h.push(s[e])}(D);for(var w=o.length,k=[],S=0;S<w;S++){for(var T=-1,b=-1,P=-1,C=-1,M=void 0,R=S,x=o[S].ganttProperties.predecessor,O=o[S].ganttProperties.predecessor.length,I=o[S].ganttProperties.taskId,E=0;E<O;E++)M=isNaN(Number(x[E].from))||"string"==typeof I?(isNaN(Number(x[E].from)),x[E].from):parseInt(x[E].from,10),M===I&&(-1===T?x[E].offset?(T=x[E].to+":"+x[E].offset+x[E].offsetUnit,P=x[E].type):(T=x[E].to,P=x[E].type):x[E].offset?(T=T+","+x[E].to+":"+x[E].offset+x[E].offsetUnit,P=P+","+x[E].type):(T=T+","+x[E].to,P=P+","+x[E].type)),(M=isNaN(Number(x[E].to))||"string"==typeof I?(isNaN(Number(x[E].to)),x[E].to):parseInt(x[E].to,10))===I&&(-1===b?x[E].offset?(b=x[E].from+":"+x[E].offset+x[E].offsetUnit,C=x[E].type):(b=x[E].from,C=x[E].type):x[E].offset?(b=b+","+x[E].from+":"+x[E].offset+x[E].offsetUnit,C=C+","+x[E].type):(b=b+","+x[E].from,C=C+","+x[E].type));-1===b&&(b=null,C=null),-1===T&&(T=null,P=null),u.push({from:b,fromPredecessor:C,taskid:I,to:T,toPredecessor:P,currentIndex:R,slack:null,enddate:null}),c.push(I)}for(var F=u.length,U=0,V=void 0,N=0;N<F;N++)if(!u[N].to){V=u[N].taskid,U="ProjectView"===this.parent.viewType?t.indexOf(V.toString()):this.resourceCollectionIds.indexOf(V.toString());var L=i[U].ganttProperties;a=this.parent.dataOperation.getDuration(L.endDate,n,"minute",L.isAutoSchedule,L.isMilestone),u[N].slack=a,u[N].fs=-1,u[N].enddate=L.endDate,k.push({fromdata:u[N].from,todateID:u[N].taskid,fromDataPredecessor:u[N].fromPredecessor})}for(var D=0;D<k.length;D++)g.push(k[D]),this.slackCalculation(g,u,c,n,i,t);f=this.finalCriticalPath(u,p,i,t,n),this.criticalPathCollection=f,this.detailPredecessorCollection=u,this.predecessorCollectionTaskIds=c}if(!1===e&&this.parent.flatData.length>0){var B=void 0;this.parent.enableCriticalPath=!1;for(var N=0;N<this.criticalPathCollection.length;N++)B=t.indexOf(this.criticalPathCollection[N].toString()),i[B].isCritical=!1;this.criticalPathCollection=[],this.detailPredecessorCollection=[],this.predecessorCollectionTaskIds=[]}},e.prototype.slackCalculation=function(e,t,n,a,s,o){var l=e[0].fromdata.split(","),d=e[0].fromDataPredecessor.split(",");n=n.toString(),n=n.split(",");for(var p,h,u,c,g,f,m,y,v=[],D=0;D<l.length;D++){v=l[D].split(":"),p=n.indexOf(v[0].toString()),c=n.indexOf(e[0].todateID.toString()),"ProjectView"===this.parent.viewType?(h=o.indexOf(v[0].toString()),u=o.indexOf(e[0].todateID.toString())):(h=this.resourceCollectionIds.indexOf(v[0].toString()),u=this.resourceCollectionIds.indexOf(e[0].todateID.toString()));var w=s[h].ganttProperties,k=s[u].ganttProperties;v.length>1&&(m=-1!==v[1].indexOf("hour")?60*parseFloat(v[1]):-1!==v[1].indexOf("day")?parseFloat(v[1])*(this.parent.secondsPerDay/3600)*60:parseFloat(v[1])),"FS"===d[D]&&(g=w.endDate>k.startDate?-this.parent.dataOperation.getDuration(k.startDate,w.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.parent.dataOperation.getDuration(w.endDate,k.startDate,"minute",w.isAutoSchedule,w.isMilestone),i.i(r.isNullOrUndefined)(t[p].slack)?v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g):t[p].slack>g&&0!==t[p].slack&&v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g),v.length>1&&(t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate,w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),"SS"===d[D]&&(w.isAutoSchedule?(g=w.startDate>k.startDate?-this.parent.dataOperation.getDuration(k.endDate,w.startDate,"minute",w.isAutoSchedule,w.isMilestone):this.parent.dataOperation.getDuration(w.startDate,k.startDate,"minute",w.isAutoSchedule,w.isMilestone),i.i(r.isNullOrUndefined)(t[p].slack)?v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g):t[p].slack>g&&0!==t[p].slack&&v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g),v.length>1&&(t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate):w.isAutoSchedule||(g=this.getSlackDuration(w.endDate,a,"minute",s[h]),i.i(r.isNullOrUndefined)(t[p].slack)?t[p].slack=g:t[p].slack>g&&0!==t[p].slack&&(t[p].slack=g)),w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),"FF"===d[D]&&(1!==t[c].fs&&1!==t[c].ff&&-1!==t[c].fs||(1!==t[c].fs&&1!==t[c].ff||(f=k.endDate,y=t[c].slack),-1===t[c].fs&&(f=t[c].enddate,y=t[c].slack),g=f>w.endDate?-this.getSlackDuration(w.endDate,f,"minute",s[h]):this.getSlackDuration(f,w.endDate,"minute",s[h]),i.i(r.isNullOrUndefined)(t[p].slack)?v.length<=1&&(t[p].slack=y-g<0?0:y-g):t[p].slack>g&&0!==t[p].slack&&v.length<=1&&(t[p].slack=y-g<0?0:y-g),v.length>1&&(t[p].slack=t[c].slack-g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].ff=1,t[p].enddate=f,t[p].fsslack=y),w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),"SF"===d[D]&&(w.isAutoSchedule?i.i(r.isNullOrUndefined)(t[p].slack)?(v.length<=1?i.i(r.isNullOrUndefined)(t[c].to)?(g=this.getSlackDuration(w.endDate,a,"minute",s[h]),t[p].slack=g):i.i(r.isNullOrUndefined)(t[c].to)||(g=k.endDate>w.startDate?-this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(k.endDate,w.startDate,"minute",s[h]),t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g):v.length>1&&(g=k.endDate>=w.endDate?w.startDate>k.endDate?-this.getSlackDuration(k.endDate,w.startDate,"minute",s[h]):this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(w.endDate,a,"minute",s[h]),t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate):(v.length<=1?(i.i(r.isNullOrUndefined)(t[c].to)?g=this.getSlackDuration(w.endDate,a,"minute",s[h]):i.i(r.isNullOrUndefined)(t[c].to)||(g=k.endDate>w.startDate?-this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(k.endDate,w.startDate,"minute",s[h])),t[p].slack>g&&0!==t[p].slack&&(i.i(r.isNullOrUndefined)(t[c].to)?t[p].slack=g:i.i(r.isNullOrUndefined)(t[c].to)||(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g))):v.length>1&&(g=k.endDate>w.endDate?w.startDate>k.endDate?-this.getSlackDuration(k.endDate,w.startDate,"minute",s[h]):this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(w.endDate,a,"minute",s[h]),t[p].slack>g&&0!==t[p].slack&&(t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0))),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate):w.isAutoSchedule||(g=this.getSlackDuration(w.endDate,a,"minute",s[h]),i.i(r.isNullOrUndefined)(t[p].slack)?t[p].slack=g:t[p].slack>g&&0!==t[p].slack&&(t[p].slack=g)),w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),t[p].from&&e.push({fromdata:t[p].from,todateID:t[p].taskid,fromDataPredecessor:t[p].fromPredecessor})}e&&(e.splice(0,1),e.length>0&&this.slackCalculation(e,t,n,a,s,o))},e.prototype.getSlackDuration=function(e,t,i,r){var n=this.parent.dateValidationModule.checkStartDate(new Date(e)),a=this.parent.dateValidationModule.checkEndDate(new Date(t));return this.parent.dataOperation.getTimeDifference(n,a,!0)<=0?0:this.parent.dataOperation.getDuration(n,a,i,r.ganttProperties.isAutoSchedule,!0)},e.prototype.finalCriticalPath=function(e,t,i,r,n){for(var a,s,o=[],l=e.length-1;l>=0;l--){a="ProjectView"===this.parent.viewType?r.indexOf(e[l].taskid.toString()):this.resourceCollectionIds.indexOf(e[l].taskid.toString());for(var d=i[a].ganttProperties.predecessor,p="0 "+i[a].ganttProperties.durationUnit,h=0;h<d.length;h++){var u=void 0;u="ProjectView"===this.parent.viewType?this.parent.ids.indexOf(d[h].to):this.resourceCollectionIds.indexOf(d[h].to);var c=void 0,g=i[a].ganttProperties;"FS"===d[h].type?(c=this.parent.dataOperation.getDuration(g.endDate,i[u].ganttProperties.startDate,g.durationUnit,g.isAutoSchedule,g.isMilestone),0===c&&a!==u&&i[a].slack!==p?(i[a].slack=i[u].slack,i[a].ganttProperties.slack=i[u].slack):0!==c&&a!==u&&i[u].isCritical&&(i[a].slack=c+" "+i[a].ganttProperties.durationUnit,i[a].ganttProperties.slack=c+" "+i[a].ganttProperties.durationUnit)):c="SF"===d[h].type?this.parent.dataOperation.getDuration(g.startDate,i[u].ganttProperties.endDate,g.durationUnit,g.isAutoSchedule,g.isMilestone):"SS"===d[h].type?this.parent.dataOperation.getDuration(g.startDate,i[u].ganttProperties.startDate,g.durationUnit,g.isAutoSchedule,g.isMilestone):this.parent.dataOperation.getDuration(g.endDate,i[u].ganttProperties.endDate,g.durationUnit,g.isAutoSchedule,g.isMilestone),s="number"==typeof i[a][this.parent.taskFields.id]?parseInt(d[h].from,10):d[h].from,s===i[a][this.parent.taskFields.id]&&i[u].slack===p&&c<=0&&(i[a].slack=p,i[a].ganttProperties.slack=p)}i[a].slack===p&&i[a].ganttProperties.progress<100&&(i[a].isCritical=!0,i[a].ganttProperties.isCritical=!0,this.criticalTasks.push(i[a]),o.push(e[l].taskid))}if(t.length>0)for(var h=0;h<t.length;h++)-1!==(a="ProjectView"===this.parent.viewType?r.indexOf(t[h].toString()):this.resourceCollectionIds.indexOf(t[h].toString()))&&i[a].ganttProperties.progress<100&&(this.criticalTasks.push(i[a]),o=o.concat(t[h]));return o},e.prototype.criticalConnectorLine=function(e,t,a,s){this.parent.ganttChartModule.chartElement;this.parent.removeCriticalPathStyles();for(var o=this,l=0;l<e.length;l++)!function(t){var a;if("ProjectView"===o.parent.viewType)a=o.parent.currentViewData[o.parent.ids.indexOf(e[t].toString())];else for(var s=o.parent.currentViewData.filter(function(i){return i.ganttProperties.taskId.toString()==e[t].toString()}),l=0;l<s.length;l++)(s[l].ganttProperties.isCritical||s[l].ganttProperties.endDate>=o.maxEndDate)&&(a=s[l]);var d=o.parent.currentViewData.indexOf(a),p=o.parent.getRowByIndex(d),h=void 0,u=o.parent.taskFields;if(a.parentItem)for(var c=o.parent.currentViewData.filter(function(e){return a.parentItem.uniqueID==e.uniqueID}),g=o.parent.currentViewData.indexOf(c[0]),f=o.parent.getRowByIndex(g),m=f.querySelectorAll(".e-taskbar-main-container"),y=0;y<m.length;y++)m[y].getAttribute("rowuniqueid")==a.rowUniqueID&&i.i(r.addClass)(m[y].querySelectorAll(".e-gantt-child-taskbar-inner-div"),n.n);h=o.parent.allowUnscheduledTasks&&!a[u.startDate]&&!a[u.endDate]&&a[u.duration]?n.o:n.p,p&&("ProjectView"===o.parent.viewType||"ResourceView"===o.parent.viewType&&!a.hasChildRecords)&&(p.getElementsByClassName("e-milestone-top")[0]&&i.i(r.addClass)(p.querySelectorAll(".e-milestone-top"),n.q),p.getElementsByClassName("e-milestone-bottom")[0]&&i.i(r.addClass)(p.querySelectorAll(".e-milestone-bottom"),n.r),p.getElementsByClassName("e-gantt-child-taskbar-inner-div").length>0&&i.i(r.addClass)(p.querySelectorAll(".e-gantt-child-taskbar-inner-div"),n.n),p.getElementsByClassName("e-gantt-child-progressbar-inner-div").length>0&&i.i(r.addClass)(p.querySelectorAll(".e-gantt-child-progressbar-inner-div"),h))}(l);if(0!==t.length)for(var d=0,p=void 0,h=[],u=void 0,c=void 0,l=0;l<this.criticalPathCollection.length;l++)if(d=s.indexOf(this.criticalPathCollection[l]),p=t[d],-1!==d&&p.to){h=p.to.split(",");for(var g=0;g<h.length;g++)if(c=h[g].split("+"),"+",h[g].indexOf("-")>=0&&(c=h[g].split("-"),"-"),u=c[0].replace(":",""),"number"==typeof e[g]&&(u=parseInt(c[0],10)),-1!==e.indexOf(u)){var f=this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u);f.length>0&&(i.i(r.addClass)(this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u)[0].querySelectorAll(".e-line"),n.s),i.i(r.addClass)(this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u)[0].querySelectorAll(".e-connector-line-right-arrow"),n.t),i.i(r.addClass)(this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u)[0].querySelectorAll(".e-connector-line-left-arrow"),n.u))}}},e.prototype.getModuleName=function(){return"criticalPath"},e.prototype.destroy=function(){!this.parent.enableCriticalPath&&this.parent.criticalPathModule&&(this.parent.criticalPathModule=void 0)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(80),n=i(79),a=i(0),s=(i.n(a),function(){function e(e){this.parent=e,this.nonworkingDayRender=new r.a(this.parent),this.eventMarkerRender=new n.a(this.parent),this.wireEvents()}return e.prototype.wireEvents=function(){this.parent.on("refreshDayMarkers",this.refreshMarkers,this),this.parent.on("updateHeight",this.updateHeight,this),this.parent.on("ui-update",this.propertyChanged,this)},e.prototype.propertyChanged=function(e){for(var t=Object.keys(i.i(a.getValue)("properties",e)),r=0;r<t.length;r++){switch(t[r]){case"eventMarkers":this.eventMarkerRender.renderEventMarkers(),this.updateHeight();break;case"highlightWeekends":this.nonworkingDayRender.renderWeekends(),this.updateHeight();break;case"holidays":this.nonworkingDayRender.renderHolidays(),this.updateHeight()}}},e.prototype.refreshMarkers=function(){this.eventMarkerRender.renderEventMarkers(),this.nonworkingDayRender.renderWeekends(),this.nonworkingDayRender.renderHolidays()},e.prototype.updateHeight=function(){this.nonworkingDayRender.updateContainerHeight(),this.eventMarkerRender.updateContainerHeight()},e.prototype.getModuleName=function(){return"dayMarkers"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.nonworkingDayRender.removeContainers(),this.eventMarkerRender.removeContainer(),this.parent.off("refreshDayMarkers",this.refreshMarkers),this.parent.off("updateHeight",this.updateHeight),this.parent.off("ui-update",this.propertyChanged))},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return f});var r=i(0),n=(i.n(r),i(4)),a=(i.n(n),i(8)),s=(i.n(a),i(13)),o=(i.n(s),i(5)),l=(i.n(o),i(87)),d=(i.n(l),i(12)),p=(i.n(d),i(85)),h=(i.n(p),i(20)),u=(i.n(h),i(21)),c=(i.n(u),i(2)),g=i(6),f=(i.n(g),function(){function e(e){this.updatedEditFields=null,this.updatedAddFields=null,this.addedRecord=null,this.dialogEditValidationFlag=!1,this.ganttResources=[],this.isValidData=!0,this.previousResource=[],this.isResourceUpdate=!1,this.parent=e,this.localeObj=this.parent.localeObj,this.beforeOpenArgs={cancel:!1},this.types=this.getPredecessorType(),this.rowData={},this.editedRecord={},this.inputs={booleanedit:p.CheckBox,dropdownedit:u.DropDownList,datepickeredit:h.DatePicker,datetimepickeredit:h.DateTimePicker,maskededit:d.MaskedTextBox,numericedit:d.NumericTextBox,stringedit:d.TextBox,defaultedit:d.TextBox},this.processDialogFields(),this.wireEvents()}return e.prototype.wireEvents=function(){this.parent.on("chartDblClick",this.dblClickHandler,this)},e.prototype.dblClickHandler=function(e){var t=this.parent.ganttChartModule.getRecordByTarget(e);!i.i(r.isNullOrUndefined)(t)&&this.parent.editModule&&this.parent.editSettings.allowEditing&&this.openEditDialog(t)},e.prototype.processDialogFields=function(){i.i(r.isNullOrUndefined)(this.parent.editDialogFields)||this.parent.editDialogFields&&0===this.parent.editDialogFields.length?(this.updatedEditFields=this.getDefaultDialogFields(),this.updatedEditFields=this.validateDialogFields(this.updatedEditFields)):this.updatedEditFields=this.validateDialogFields(this.parent.editDialogFields),i.i(r.isNullOrUndefined)(this.parent.addDialogFields)||this.parent.addDialogFields&&0===this.parent.addDialogFields.length?(this.updatedAddFields=this.getDefaultDialogFields(),this.updatedAddFields=this.validateDialogFields(this.updatedAddFields)):this.updatedAddFields=this.validateDialogFields(this.parent.addDialogFields)},e.prototype.validateDialogFields=function(e){for(var t=[],n=0,a=0;a<e.length;a++){var s=i.i(o.getActualProperties)(e[a]);"General"!==s.type||!i.i(r.isNullOrUndefined)(s.fields)&&0!==s.fields.length||(s.fields=this.getGeneralColumnFields()),"Dependency"===s.type&&i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)||"Resources"===s.type&&i.i(r.isNullOrUndefined)(this.parent.taskFields.resourceInfo)||"Notes"===s.type&&i.i(r.isNullOrUndefined)(this.parent.taskFields.notes)||("Custom"!==s.type||!i.i(r.isNullOrUndefined)(s.fields)&&0!==s.fields.length||(n+=1,s.fields=this.getCustomColumnFields()),n>1||t.push(s))}return t},e.prototype.getGeneralColumnFields=function(){for(var e=[],t=0,i=Object.keys(this.parent.columnMapping);t<i.length;t++){var r=i[t];"dependency"!==r&&"resourceInfo"!==r&&"notes"!==r&&e.push(this.parent.columnMapping[r])}return e},e.prototype.getCustomColumnFields=function(){for(var e=[],t=0;t<this.parent.customColumns.length;t++)e.push(this.parent.customColumns[t]);return e},e.prototype.getDefaultDialogFields=function(){var e=[],t={},n=this.parent.taskFields,a=this.parent.columnMapping;return 0!==Object.keys(a).length&&(t.type="General",e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("dependency",a))||(t={},!1!==this.parent.columnByField[a.dependency.valueOf()].visible&&(t.type="Dependency"),e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("resourceInfo",a))||(t={},!1!==this.parent.columnByField[a.resourceInfo.valueOf()].visible&&(t.type="Resources"),e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("notes",a))||(t={},!1!==this.parent.columnByField[a.notes.valueOf()].visible&&(t.type="Notes"),e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("segments",n))||(t={},t.type="Segments",e.push(t)),this.parent.customColumns.length>0&&(t={},t.type="Custom",e.push(t)),e},e.prototype.openAddDialog=function(){this.isEdit=!1,this.editedRecord=this.composeAddRecord(),this.createDialog()},e.prototype.getMinimumStartDate=function(){var e=n.DataUtil.aggregates.min(this.parent.flatData,"ganttProperties.startDate");return e=i.i(r.isNullOrUndefined)(e)?new Date(this.parent.timelineModule.timelineStartDate.getTime()):new Date(e.getTime()),e=this.parent.dateValidationModule.checkStartDate(e),new Date(e.getTime())},e.prototype.composeAddRecord=function(){var e={};e.ganttProperties={};for(var t=this.parent.ganttColumns,n=this.parent.taskFields,a=this.parent.editModule.getNewTaskId(),s=0;s<t.length;s++){var o=t[s].field;o===n.id?(e[o]=a,e.ganttProperties.rowUniqueID=e[o]):t[s].field===n.startDate?(i.i(r.isNullOrUndefined)(e[n.endDate])?e[o]=this.getMinimumStartDate():e[o]=new Date(e[n.endDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone)),e.ganttProperties.startDate=new Date(e[o])):t[s].field===n.endDate?(i.i(r.isNullOrUndefined)(e[n.startDate])?e[o]=this.getMinimumStartDate():e[o]=new Date(e[n.startDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone)),e.ganttProperties.endDate=new Date(e[o])):t[s].field===n.duration?(e[o]=1,e.ganttProperties.duration=e[o],e.ganttProperties.durationUnit=this.parent.durationUnit.toLocaleLowerCase()):t[s].field===n.name?(e[o]=this.localeObj.getConstant("addDialogTitle")+" "+a,e.ganttProperties.taskName=e[o]):t[s].field===n.progress?(e[o]=0,e.ganttProperties.progress=e[o]):t[s].field===n.work?(e[o]=0,e.ganttProperties.work=e[o]):t[s].field===n.type?(e[o]=this.parent.taskType,e.ganttProperties.taskType=e[o]):e[this.parent.ganttColumns[s].field]=""}return e.ganttProperties.isAutoSchedule="Auto"===this.parent.taskMode||"Manual"!==this.parent.taskMode&&!0!==e[n.manual],e},e.prototype.openToolbarEditDialog=function(){var e=this.parent;if(e.editModule&&e.editSettings.allowEditing){this.parent.ganttChartModule.focusedRowIndex>-1&&e.selectionModule&&e.selectionModule.selectRow(this.parent.ganttChartModule.focusedRowIndex,!1,!1);var t=e.selectionModule?"Row"!==e.selectionSettings.mode&&"Both"!==e.selectionSettings.mode||1!==e.selectionModule.selectedRowIndexes.length?"Cell"===e.selectionSettings.mode&&1===e.selectionModule.getSelectedRowCellIndexes().length?e.updatedRecords[e.selectionModule.getSelectedRowCellIndexes()[0].rowIndex].ganttProperties.rowUniqueID:null:e.updatedRecords[e.selectionModule.selectedRowIndexes[0]].ganttProperties.rowUniqueID:null;i.i(r.isNullOrUndefined)(t)||this.openEditDialog(t)}},e.prototype.openEditDialog=function(e){var t=this.parent;i.i(r.isNullOrUndefined)(e)||(i.i(r.isNullOrUndefined)(e.ganttProperties)||("string"==typeof e.ganttProperties.taskId?this.numericOrString="stringedit":this.numericOrString="numericedit"),i.i(r.isNullOrUndefined)(e.ganttProperties)&&!i.i(r.isNullOrUndefined)(e)&&(isNaN(Number(e))||"stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType?this.numericOrString="stringedit":this.numericOrString="numericedit")),"object"!=typeof e||i.i(r.isNullOrUndefined)(e)?i.i(r.isNullOrUndefined)(e)?t.selectedRowIndex>-1&&(this.rowData=t.currentViewData[t.selectedRowIndex],this.rowIndex=t.selectedRowIndex):(this.rowIndex=t.ids.indexOf(e.toString()),this.rowIndex>-1&&(this.rowData=t.flatData[this.rowIndex])):(this.rowIndex=this.parent.currentViewData.indexOf(e),this.rowIndex>-1&&(this.rowData=e)),this.isEdit=!0,"ResourceView"===this.parent.viewType&&0===this.rowData.level||0!==Object.keys(this.rowData).length&&(this.editedRecord=i.i(r.extend)({},{},this.rowData,!0),this.createDialog())},e.prototype.createDialog=function(){var e=this,t=this.parent,n={};this.beforeOpenArgs.dialogModel=n,this.beforeOpenArgs.rowData=this.editedRecord,this.beforeOpenArgs.rowIndex=this.rowIndex;var a=this.parent.isAdaptive?"":"600px",s=this.parent.createElement("div",{id:t.element.id+"_dialog",styles:"max-width:"+a});s.classList.add("e-gantt-dialog"),t.element.appendChild(s),n.animationSettings={effect:"None"},n.header=this.localeObj.getConstant(this.isEdit?"editDialogTitle":"addDialogTitle"),n.isModal=!0,n.allowDragging=!this.parent.isAdaptive,n.showCloseIcon=!0;var o=this.parent.isAdaptive?{X:"top",Y:"left"}:{X:"center",Y:"center"};n.position=o,n.height=this.parent.isAdaptive?"100%":"auto",n.target=document.body,n.close=this.dialogClose.bind(this),n.closeOnEscape=!0,n.beforeClose=function(e){"escape"==e.closedBy&&"key-pressed"==e.event.name&&"INPUT"==e.event.target.nodeName&&(e.cancel=!0)},n.open=function(t){var n=i.i(r.getValue)("element",t),a=n.querySelector("#"+e.parent.element.id+"GeneralTabContainer");a&&a.scrollHeight>a.offsetHeight&&a.classList.add("e-scroll"),0===e.tabObj.selectedItem&&e.tabObj.select(0),e.parent.isAdaptive&&(n.style.maxHeight="none"),e.parent.focusModule&&e.parent.focusModule.setActiveElement(n)},n.locale=this.parent.locale,n.buttons=[{buttonModel:{content:this.localeObj.getConstant("saveButton"),cssClass:"e-primary"},click:this.buttonClick.bind(this)},{buttonModel:{cssClass:"e-flat",content:this.localeObj.getConstant("cancel")},click:this.buttonClick.bind(this)}],this.createTab(n,s)},e.prototype.buttonClick=function(e){var t=e.target;t.style.pointerEvents="none",this.localeObj.getConstant("cancel").toLowerCase()===e.target.innerText.trim().toLowerCase()?this.dialog&&!this.dialogObj.isDestroyed&&(this.dialogObj.hide(),this.dialogClose()):(this.initiateDialogSave(),t.style.pointerEvents="auto")},e.prototype.dialogClose=function(){this.dialog&&this.resetValues(),i.i(r.isNullOrUndefined)(this.parent.focusModule)||i.i(r.isNullOrUndefined)(this.parent.focusModule.getActiveElement(!0))||this.parent.focusModule.getActiveElement(!0).focus()},e.prototype.resetValues=function(){this.isEdit=!1,this.isAddNewResource=!1,this.editedRecord={},this.rowData={},this.rowIndex=-1,this.addedRecord=null,this.ganttResources=[],this.dialogEditValidationFlag=!1,this.dialog&&!this.dialogObj.isDestroyed&&(this.destroyDialogInnerElements(),this.dialogObj.destroy(),i.i(r.remove)(this.dialog))},e.prototype.destroyDialogInnerElements=function(){for(var e=this.parent,t=this.beforeOpenArgs.tabModel,n=t.items,a=0;a<n.length;a++){var s=n[a].content,o=s.id;if(!i.i(r.isNullOrUndefined)(o)||""!==o)if(o=o.replace(e.element.id,""),"General"===(o=o.replace("TabContainer","")))this.destroyCustomField(s);else if("Dependency"===o){var l=s.ej2_instances[0];l.destroy()}else if("Notes"===o){var d=s.ej2_instances[0];d.destroy()}else if("Resources"===o){var p=s.ej2_instances[0];p.destroy()}else-1!==o.indexOf("Custom")&&this.destroyCustomField(s)}},e.prototype.destroyCustomField=function(e){for(var t=e.childNodes,n=this.parent,a=0;a<t.length;a++){var s=t[a],l=s.querySelector('input[id^="'+n.element.id+'"]');if(l){var d=l.id.replace(n.element.id,""),p=s.querySelector("#"+n.element.id+d).ej2_instances[0];if(!i.i(r.isNullOrUndefined)(p)){var h=n.columnByField[d];if(!i.i(r.isNullOrUndefined)(h.edit)&&i.i(r.isNullOrUndefined)(h.edit.params)){var u=h.edit.destroy;"string"==typeof u?(u=i.i(o.getObject)(u,window))():h.edit.destroy()}else p.destroy()}}}},e.prototype.destroy=function(){this.resetValues(),this.parent.isDestroyed||(this.parent.off("chartDblClick",this.dblClickHandler),this.parent.editModule.dialogModule=void 0)},e.prototype.getEditFields=function(){return this.isEdit?this.updatedEditFields:this.updatedAddFields},e.prototype.createTab=function(e,t){var n,o=this,l=this.parent,d={},p=[],h=this.getEditFields(),u=l.taskFields,c=h.length;d.items=p,d.locale=this.parent.locale,this.beforeOpenArgs.tabModel=d;var g=0,f=0;if(c>0)for(var m=0;m<c;m++){var y=h[m],v={};if("General"===y.type){if(0===Object.keys(l.columnMapping).length)continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("generalTab")),v.content="General",this.beforeOpenArgs[v.content]=this.getFieldsModel(y.fields)}else if("Segments"===y.type){if(i.i(r.isNullOrUndefined)(u.segments))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("segments")),v.content="Segments",this.beforeOpenArgs[v.content]=this.getSegmentsModel(y.fields)}else if("Dependency"===y.type){if(i.i(r.isNullOrUndefined)(u.dependency))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("dependency")),v.content="Dependency",this.beforeOpenArgs[v.content]=this.getPredecessorModel(y.fields)}else if("Resources"===y.type){if(i.i(r.isNullOrUndefined)(u.resourceInfo))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("resourceName")),v.content="Resources",this.beforeOpenArgs[v.content]=this.getResourcesModel(y.fields)}else if("Notes"===y.type){if(i.i(r.isNullOrUndefined)(u.notes))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("notes")),v.content="Notes",this.beforeOpenArgs[v.content]=this.getNotesModel(y.fields)}else{if(i.i(r.isNullOrUndefined)(y.fields)||0===y.fields.length)continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("customTab"),g++),v.content="Custom"+f++,this.beforeOpenArgs[v.content]=this.getFieldsModel(y.fields)}v.header={text:y.headerText},p.push(v)}this.beforeOpenArgs.requestType=this.isEdit?"beforeOpenEditDialog":"beforeOpenAddDialog";this.beforeOpenArgs.rowData,this.beforeOpenArgs.name,this.beforeOpenArgs.requestType,this.beforeOpenArgs.cancel;this.parent.trigger("actionBegin",this.beforeOpenArgs,function(i){if(o.renderTabItems(),!i.cancel){d.selected=o.tabSelectedEvent.bind(o),d.height=o.parent.isAdaptive?"100%":"auto",d.overflowMode="Scrollable",o.tabObj=new s.Tab(d),o.tabObj.isStringTemplate=!0,n=o.parent.createElement("div",{id:l.element.id+"_Tab"}),o.tabObj.appendTo(n),e.content=n,o.dialog=t,o.dialogObj=new a.Dialog(e),o.dialogObj.isStringTemplate=!0,o.dialogObj.appendTo(o.dialog);var r={action:"OpenDialog",requestType:o.isEdit?"openEditDialog":"openAddDialog",data:o.beforeOpenArgs.rowData,element:o.dialog,cancel:!1};o.parent.trigger("actionComplete",r,function(e){e.cancel&&o.resetValues()})}})},e.prototype.tabSelectedEvent=function(e){var t=this.parent,n=e.selectedContent.childNodes[0].id;if(this.parent.isAdaptive&&this.responsiveTabContent(n,t),n===t.element.id+"ResourcesTabContainer")this.resourceSelection(n);else if(n===t.element.id+"NotesTabContainer"){document.getElementById(n).ej2_instances[0].refresh();var a=document.querySelector("#"+this.parent.element.id+"NotesTabContainer");a.style.overflow="scroll"}else n===t.element.id+"SegmentsTabContainer"&&(i.i(r.isNullOrUndefined)(this.beforeOpenArgs.rowData.ganttProperties.startDate)?document.getElementById(n).ej2_instances[0].enableToolbarItems([this.parent.element.id+"SegmentsTabContainer_add"],!1):document.getElementById(n).ej2_instances[0].enableToolbarItems([this.parent.element.id+"SegmentsTabContainer_add"],!0))},e.prototype.responsiveTabContent=function(e,t){var i=document.getElementById(t.element.id+"_dialog_dialog-content"),r=i.clientHeight;r-=i.querySelector(".e-tab-header").offsetHeight;var n=document.querySelector("#"+e);if(n.classList.contains("e-grid")){r-=n.ej2_instances[0].getHeaderContent().offsetHeight;var a=n.querySelector(".e-toolbar");a&&(r-=a.offsetHeight)}n.parentElement.style.height=r+"px"},e.prototype.getFieldsModel=function(e){for(var t={},n=this.parent.columnByField,a=0;a<e.length;a++)if(e[a]!==this.parent.taskFields.dependency&&e[a]!==this.parent.taskFields.resourceInfo&&e[a]!==this.parent.taskFields.notes&&!i.i(r.isNullOrUndefined)(n[e[a]])){var s=e[a];this.createInputModel(n[s],t)}return t},e.prototype.createInputModel=function(e,t){var n=this,a=this.parent,s=this.parent.locale,o=this.parent.taskFields,l={placeholder:e.headerText,floatLabelType:"Auto"};switch(i.i(r.isNullOrUndefined)(this.parent.taskFields.id)||i.i(r.isNullOrUndefined)(this.parent.columnMapping.id)||i.i(r.isNullOrUndefined)(this.numericOrString)||o.id===e.field&&(e.editType=this.numericOrString),e.editType){case"booleanedit":var d={label:e.headerText,locale:s};t[e.field]=d;break;case"defaultedit":case"stringedit":var p=l;e.field!==a.columnMapping.duration&&e.field!==a.columnMapping.id&&e.field!==a.columnMapping.startDate&&e.field!==a.columnMapping.endDate||(p.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=l;break;case"numericedit":var h=l;o.progress===e.field&&(h.min=0,h.max=100),o.work===e.field&&(h.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=h;break;case"datepickeredit":var u=l;u.format=this.parent.getDateFormat(),u.strictMode=!0,u.firstDayOfWeek=a.timelineModule.customTimelineSettings.weekStartDay,e.field!==a.columnMapping.startDate&&e.field!==a.columnMapping.endDate||(u.renderDayCell=this.parent.renderWorkingDayCell.bind(this.parent),u.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=u;break;case"datetimepickeredit":var c=l;c.format=this.parent.getDateFormat(),c.strictMode=!0,c.firstDayOfWeek=a.timelineModule.customTimelineSettings.weekStartDay,e.field!==a.columnMapping.startDate&&e.field!==a.columnMapping.endDate||(c.renderDayCell=this.parent.renderWorkingDayCell.bind(this.parent),c.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=c;break;case"dropdownedit":if(e.field===a.columnMapping.type||e.field===a.columnMapping.manual){var g=[{ID:1,Value:"FixedUnit"},{ID:2,Value:"FixedWork"},{ID:3,Value:"FixedDuration"}];l.dataSource=g,l.fields={value:"Value"};l.change=function(t){e.field===o.manual&&(n.editedRecord.ganttProperties.isAutoSchedule=!t.value),n.validateScheduleFields(t,e,a)}}t[e.field]=l;break;case"maskededit":t[e.field]=l}return i.i(r.isNullOrUndefined)(e.edit)||i.i(r.isNullOrUndefined)(e.edit.params)||i.i(r.extend)(t[e.field],e.edit.params),t},e.prototype.validateScheduleFields=function(e,t,n){var a,s;i.i(r.isNullOrUndefined)(n.editModule.dialogModule.dialog)||(s=n.editModule.dialogModule.dialog);var o,l=null,p=n.editModule.dialogModule.editedRecord,h=null,u=null,c="ResourceView"===this.parent.viewType?this.parent.getTaskIds():this.parent.ids,g=this.parent.viewType;if(i.i(r.isNullOrUndefined)(e.element)?i.i(r.isNullOrUndefined)(e.container)?i.i(r.isNullOrUndefined)(e.event)||i.i(r.isNullOrUndefined)(e.event.path[1])||(o=e.event.path[1],l=o.querySelector("input").getAttribute("id"),o=o.querySelector("#"+l)):(o=e.container,l=o.querySelector("input").getAttribute("id"),o=o.querySelector("#"+l)):(o=e.element,l=o.getAttribute("id")),i.i(r.isNullOrUndefined)(o))h=e.value,u=t.field;else if(h=o.value,u=l.replace(n.element.id,""),"stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType){var f=function(e){return"ResourceView"===g?-1===c.indexOf("T"+e.value)&&-1===c.indexOf("R"+e.value):-1===c.indexOf(e.value)},m={rules:(a={},a[this.parent.taskFields.id]={required:!0,minLength:[f,"ID is already present, please enter new value"]},a)};new d.FormValidator("#"+this.parent.element.id+"GeneralTabContainer",m)}if(0===u.search("Segments"))return u=u.replace("SegmentsTabContainer",""),this.validateSegmentFields(n,u,h,e),!0;this.validateScheduleValuesByCurrentField(u,h,this.editedRecord);var y=p.ganttProperties,v=n.taskFields;return i.i(r.isNullOrUndefined)(v.startDate)||v.startDate===u||this.updateScheduleFields(s,y,"startDate"),i.i(r.isNullOrUndefined)(v.endDate)||v.endDate===u||this.updateScheduleFields(s,y,"endDate"),i.i(r.isNullOrUndefined)(v.duration)||v.duration===u||this.updateScheduleFields(s,y,"duration"),i.i(r.isNullOrUndefined)(v.work)||v.work===u||this.updateScheduleFields(s,y,"work"),this.dialogEditValidationFlag=!1,!0},e.prototype.updateScheduleFields=function(e,t,n){var a,s=this.parent,o=s.element.id,l=i.i(r.getValue)(n,s.columnMapping),d=s.columnByField[l],p=this.parent.taskFields;if("stringedit"===d.editType){var h=e.querySelector("#"+o+l).ej2_instances[0];a=i.i(r.isNullOrUndefined)(d.edit)||i.i(r.isNullOrUndefined)(d.edit.read)?i.i(r.isNullOrUndefined)(d.valueAccessor)?this.parent.dataOperation.getDurationString(t.duration,t.durationUnit):d.valueAccessor(l,s.editModule.dialogModule.editedRecord,d):d.edit.read(),h.value!==a.toString()&&p.duration===l?(h.value=a,h.dataBind()):p.startDate!==l&&p.endDate!==l||(h.value=p.startDate===l?t.startDate.toString():t.endDate.toString(),h.dataBind())}else if("datepickeredit"===d.editType||"datetimepickeredit"===d.editType){var u=(d.editType,e.querySelector("#"+o+l).ej2_instances[0]);a=t[n],(i.i(r.isNullOrUndefined)(u.value)&&!i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(u.value)||u.value!==a&&!i.i(r.isNullOrUndefined)(u.value)&&!i.i(r.isNullOrUndefined)(a)&&u.value.toString()!==a.toString())&&(u.value=a,u.dataBind())}else if("numericedit"===d.editType){var c=e.querySelector("#"+o+l).ej2_instances[0];a=t[n],i.i(r.isNullOrUndefined)(a)||c.value===a||(c.value=a,c.dataBind())}},e.prototype.validateDuration=function(e){var t=e.ganttProperties;if(!this.dialogEditValidationFlag){i.i(r.isNullOrUndefined)(t.duration)?(this.parent.setRecordValue("endDate",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0)):i.i(c.c)(t)||!i.i(r.isNullOrUndefined)(t.startDate)?(e.ganttProperties.isMilestone&&0!==e.ganttProperties.duration&&this.parent.dateValidationModule.checkStartDate(t.startDate),this.parent.dateValidationModule.calculateEndDate(e)):i.i(c.c)(t)||i.i(r.isNullOrUndefined)(t.endDate)||this.parent.dateValidationModule.calculateStartDate(e);var n=0===t.duration;this.parent.setRecordValue("isMilestone",n,t,!0),this.dialogEditValidationFlag=!0}},e.prototype.validateStartDate=function(e){var t=e.ganttProperties,n=this.parent.taskFields;this.dialogEditValidationFlag||(i.i(r.isNullOrUndefined)(t.startDate)?(this.parent.setRecordValue("duration",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0),this.parent.allowUnscheduledTasks&&i.i(r.isNullOrUndefined)(n.endDate)&&this.parent.setRecordValue("endDate",null,t,!0)):i.i(c.c)(t)?i.i(r.isNullOrUndefined)(n.duration)?this.parent.dateValidationModule.calculateDuration(e):(i.i(r.isNullOrUndefined)(n.endDate),this.parent.dateValidationModule.calculateEndDate(e)):i.i(r.isNullOrUndefined)(t.endDate)?i.i(r.isNullOrUndefined)(t.duration)||this.parent.dateValidationModule.calculateEndDate(e):this.parent.dateValidationModule.calculateDuration(e),this.dialogEditValidationFlag=!0)},e.prototype.validateEndDate=function(e){var t=e.ganttProperties,n=this.parent.taskFields;this.dialogEditValidationFlag||(i.i(r.isNullOrUndefined)(t.endDate)?(this.parent.setRecordValue("duration",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0)):i.i(c.c)(t)?i.i(r.isNullOrUndefined)(n.duration)?this.parent.dateValidationModule.calculateDuration(e):i.i(r.isNullOrUndefined)(t.startDate)?this.parent.dateValidationModule.calculateStartDate(e):(!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0&&(t.segments=this.parent.editModule.cellEditModule.validateEndDateWithSegments(t)),this.parent.dateValidationModule.calculateDuration(e)):i.i(r.isNullOrUndefined)(t.duration)?i.i(r.isNullOrUndefined)(t.startDate)||this.parent.dateValidationModule.calculateDuration(e):this.parent.dateValidationModule.calculateStartDate(e),this.dialogEditValidationFlag=!0)},e.prototype.validateScheduleValuesByCurrentField=function(e,t,n){var a=this.parent,s=n.ganttProperties,o=a.taskFields;if(o.duration===e&&(i.i(r.isNullOrUndefined)(t)||""===t?a.allowUnscheduledTasks&&this.parent.setRecordValue("duration",null,s,!0):a.dataOperation.updateDurationValue(t,s),this.validateDuration(n),this.parent.editModule.updateResourceRelatedFields(n,"duration")),o.startDate===e){if(""!==t){var l=this.parent.dateValidationModule.getDateFromFormat(t);l=this.parent.dateValidationModule.checkStartDate(l,s),this.parent.setRecordValue("startDate",l,s,!0)}else a.allowUnscheduledTasks&&!n.hasChildRecords&&this.parent.setRecordValue("startDate",null,s,!0);this.validateStartDate(n)}if(o.endDate===e){if(""!==t){var d=this.parent.dateValidationModule.getDateFromFormat(t);0===d.getHours()&&86400!==a.defaultEndTime&&this.parent.dateValidationModule.setTime(a.defaultEndTime,d),d=this.parent.dateValidationModule.checkEndDate(d,s),(i.i(r.isNullOrUndefined)(s.startDate)||d.getTime()>s.startDate.getTime())&&this.parent.setRecordValue("endDate",d,s,!0)}else a.allowUnscheduledTasks&&this.parent.setRecordValue("endDate",null,s,!0);this.validateEndDate(n)}return o.work===e&&(i.i(r.isNullOrUndefined)(t)||""===t||(this.parent.setRecordValue("work",t,s,!0),this.parent.editModule.updateResourceRelatedFields(n,"work"),this.validateDuration(n))),e===o.type&&this.parent.setRecordValue("taskType",t,s,!0),o.manual===e&&this.parent.editModule.updateTaskScheduleModes(n),!0},e.prototype.getSegmentsModel=function(e){var t=this,n=this.parent.taskFields;(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=[],i.i(r.isNullOrUndefined)(n.startDate)||e.push("startDate"),i.i(r.isNullOrUndefined)(n.endDate)||e.push("endDate"),i.i(r.isNullOrUndefined)(n.duration)||e.push("duration"));var a={};a.editSettings={allowEditing:!0,allowAdding:!0,allowDeleting:!0,mode:"Normal",newRowPosition:"Bottom"},a.locale=this.parent.locale,a.dataSource=[],a.rowHeight=this.parent.isAdaptive?48:null,a.toolbar=[{id:this.parent.element.id+"SegmentsTabContainer_add",prefixIcon:"e-add",tooltipText:this.localeObj.getConstant("add"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("add")},{id:this.parent.element.id+"SegmentsTabContainer_delete",prefixIcon:"e-delete",tooltipText:this.localeObj.getConstant("delete"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("delete")}];for(var s=[],o=this,l=0;l<e.length;l++)!function(n){var a={};switch(e[n]){case"startDate":case"endDate":a={field:e[n],headerText:o.localeObj.getConstant(e[n]),editType:"stringedit",width:"200px",edit:{write:function(a){var s;if(i.i(r.isNullOrUndefined)(t.beforeOpenArgs.General)){var o=t.getGeneralColumnFields();s=t.getFieldsModel(o)[t.parent.taskFields[e[n]]]}else s=t.beforeOpenArgs.General[t.parent.taskFields[e[n]]];var l=a.rowData[a.column.field];i.i(r.setValue)("value",l,s),new t.inputs[t.parent.columnByField[t.parent.taskFields[e[n]]].editType](s).appendTo(a.element)},read:function(e){return e.ej2_instances[0].value}},format:o.parent.getDateFormat()},"startDate"===e[n]&&(a.validationRules={required:!0}),s.push(a);break;case"duration":a={field:e[n],headerText:o.localeObj.getConstant(e[n]),editType:"stringedit",width:"100px",edit:{write:function(a){var s;if(i.i(r.isNullOrUndefined)(t.beforeOpenArgs.General)){var o=t.getGeneralColumnFields();s=t.getFieldsModel(o)[t.parent.taskFields[e[n]]]}else s=t.beforeOpenArgs.General[t.parent.taskFields[e[n]]];s.floatLabelType="Never";var l=a.rowData[a.column.field];i.i(r.isNullOrUndefined)(l)?i.i(r.setValue)("value",null,s):i.i(r.setValue)("value",l,s),i.i(r.setValue)("value",l,s),new d.TextBox(s).appendTo(a.element)},read:function(e){return e.ej2_instances[0].value.toString()}}},s.push(a)}}(l);return a.columns=s,a.height=this.parent.isAdaptive?"100%":"153px",a},e.prototype.getGridColumnByField=function(e,t){for(var i,r=0;r<t.length;r++)t[r].field===e&&(i=t[r]);return i},e.prototype.updateSegmentField=function(e,t,n){var a,s=this.parent.editModule.dialogModule.dialog,o=i.i(r.getValue)("Segments",this.beforeOpenArgs),l=this.getGridColumnByField(e,o.columns),d=this.parent.element.id,p=n[e];"stringedit"===l.editType?a=s.querySelector("#"+d+"SegmentsTabContainer"+e).ej2_instances[0]:"datepickeredit"===l.editType&&(a=s.querySelector("#"+d+"SegmentsTabContainer"+e).ej2_instances[0]),a.value.toString()!==p.toString()&&(a.value=p,a.dataBind())},e.prototype.validateSegmentFields=function(e,t,n,a){var s=this.parent.taskFields;if(!i.i(r.isNullOrUndefined)(s.duration)&&s.duration.toLowerCase()===t.toLowerCase()&&!i.i(r.isNullOrUndefined)(n)&&""!==n){this.selectedSegment.duration=Number(n);var o=e.dataOperation.getEndDate(this.selectedSegment.startDate,Number(n),this.editedRecord.ganttProperties.durationUnit,this.editedRecord.ganttProperties,!1);o=e.dataOperation.checkEndDate(o,this.editedRecord.ganttProperties,!1),this.selectedSegment.endDate=o}if(!i.i(r.isNullOrUndefined)(s.startDate)&&s.startDate.toLowerCase()===t.toLowerCase()&&""!==n){var l=this.parent.dateValidationModule.getDateFromFormat(n);l=this.parent.dateValidationModule.checkStartDate(l),this.selectedSegment.startDate=l,i.i(r.isNullOrUndefined)(s.endDate)||(this.selectedSegment.endDate=this.parent.dataOperation.getEndDate(l,this.selectedSegment.duration,this.editedRecord.ganttProperties.durationUnit,this.editedRecord.ganttProperties,!1))}if(!i.i(r.isNullOrUndefined)(s.endDate)&&s.endDate.toLowerCase()===t.toLowerCase()&&""!==n){var o=this.parent.dateValidationModule.getDateFromFormat(n);0===o.getHours()&&86400!==e.defaultEndTime&&this.parent.dateValidationModule.setTime(e.defaultEndTime,o),o=this.parent.dateValidationModule.checkEndDate(o,this.editedRecord.ganttProperties),this.selectedSegment.endDate=o,this.selectedSegment.duration=this.parent.dataOperation.getDuration(this.selectedSegment.startDate,this.selectedSegment.endDate,this.editedRecord.ganttProperties.durationUnit,!0,!1,!0)}i.i(r.isNullOrUndefined)(s.startDate)||this.updateSegmentField("startDate",a,this.selectedSegment),i.i(r.isNullOrUndefined)(s.endDate)||this.updateSegmentField("endDate",a,this.selectedSegment),i.i(r.isNullOrUndefined)(s.duration)||this.updateSegmentField("duration",a,this.selectedSegment)},e.prototype.getPredecessorModel=function(e){(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=["ID","Name","Type","Offset","UniqueId"]);var t={};t.editSettings={allowEditing:!0,allowAdding:!0,allowDeleting:!0,mode:"Normal"},t.locale=this.parent.locale,t.dataSource=[],t.rowHeight=this.parent.isAdaptive?48:null,t.toolbar=[{id:this.parent.element.id+"DependencyTabContainer_add",prefixIcon:"e-add",tooltipText:this.localeObj.getConstant("add"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("add")},{id:this.parent.element.id+"DependencyTabContainer_delete",prefixIcon:"e-delete",tooltipText:this.localeObj.getConstant("delete"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("delete")}];for(var n=[],a=0;a<e.length;a++){var s={};"id"===e[a].toLowerCase()?(s={field:"id",headerText:this.localeObj.getConstant("id"),allowEditing:!1,width:"70px"},n.push(s)):"name"===e[a].toLowerCase()?(s={field:"name",headerText:this.localeObj.getConstant("name"),editType:"stringedit",width:"250px",validationRules:{required:!0}},n.push(s)):"type"===e[a].toLowerCase()?(s={field:"type",headerText:this.localeObj.getConstant("type"),editType:"dropdownedit",dataSource:this.types,foreignKeyField:"id",foreignKeyValue:"text",defaultValue:"FS",validationRules:{required:!0},width:"150px"},n.push(s)):"offset"===e[a].toLowerCase()?(s={field:"offset",headerText:this.localeObj.getConstant("offset"),editType:"stringedit",defaultValue:this.parent.dataOperation.getDurationString(0,this.beforeOpenArgs.rowData.ganttProperties.durationUnit),validationRules:{required:!0},width:"100px"},n.push(s)):"uniqueid"===e[a].toLowerCase()&&(s={field:"uniqueId",isPrimaryKey:!0,visible:!1,defaultValue:i.i(c.k)().toString()},n.push(s))}return t.columns=n,t.height=this.parent.isAdaptive?"100%":"153px",t},e.prototype.getResourcesModel=function(e){var t=this.parent,n=t.resourceFields;(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=[n.id,n.name,n.unit,n.group]);for(var a={allowFiltering:!0,treeColumnIndex:-1,childMapping:"",editSettings:{allowEditing:!0,mode:"Cell"},locale:this.parent.locale,allowSelection:!0,rowHeight:this.parent.isAdaptive?48:null,filterSettings:{type:"Menu"},selectionSettings:{checkboxOnly:!0,checkboxMode:"Default",persistSelection:!0,type:"Multiple"}},s=[{type:"checkbox",allowEditing:!1,allowSorting:!1,allowFiltering:!1,width:60}],o=0;o<e.length;o++){var l={};e[o]===n.id?(l={field:n.id,headerText:this.localeObj.getConstant("id"),isPrimaryKey:!0,width:"100px",allowEditing:!1},s.push(l)):e[o]===n.name?(l={field:n.name,headerText:this.localeObj.getConstant("name"),allowEditing:!1},s.push(l)):e[o]===n.unit?(l={field:n.unit,headerText:this.localeObj.getConstant("unit"),editType:"numericedit",edit:{params:{min:0}}},s.push(l)):e[o]!==n.group||i.i(r.isNullOrUndefined)(n.group)||(l={field:n.group,headerText:this.localeObj.getConstant("group"),allowEditing:!1},s.push(l))}return a.columns=s,a.height=this.parent.isAdaptive?"100%":"196px",a},e.prototype.getNotesModel=function(e){return(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateTable","CreateLink","|","ClearFormat","Print","|","Undo","Redo"]),{placeholder:this.localeObj.getConstant("writeNotes"),toolbarSettings:{items:e},height:this.parent.isAdaptive?"100%":"auto",locale:this.parent.locale}},e.prototype.createDivElement=function(e,t){return i.i(r.createElement)("div",{className:e,id:t})},e.prototype.createInputElement=function(e,t,n,a){return i.i(r.createElement)(a||"input",{className:e,attrs:{type:"text",id:t,name:n,title:n}})},e.prototype.renderTabItems=function(){for(var e=this.beforeOpenArgs.tabModel,t=e.items,i=0,r=0;r<t.length;r++){var n=t[r];n.content instanceof HTMLElement||("General"===n.content?n.content=this.renderGeneralTab(n.content):"Dependency"===n.content?n.content=this.renderPredecessorTab(n.content):"Resources"===n.content?n.content=this.renderResourceTab(n.content):n.content==="Custom"+i?(n.content=this.renderCustomTab(n.content),i++):"Notes"===n.content?n.content=this.renderNotesTab(n.content):"Segments"===n.content&&(this.editedRecord.hasChildRecords&&(n.disabled=!0),n.content=this.renderSegmentsTab(n.content)))}},e.prototype.segmentGridActionBegin=function(e){var t=this.parent.taskFields,n=this.beforeOpenArgs.Segments;if("add"===e.requestType||"beginEdit"===e.requestType||"save"===e.requestType){var a=n.dataSource,s=i.i(r.getValue)("rowData",e),o=this.beforeOpenArgs.rowData.ganttProperties.startDate;if(!i.i(r.isNullOrUndefined)(o)&&"add"===e.requestType){var l={},d=i.i(r.getValue)("startDate",s),p=i.i(r.getValue)("endDate",s),h=i.i(r.getValue)("duration",s),u=!i.i(r.isNullOrUndefined)(a)&&a.length>0?i.i(r.isNullOrUndefined)(t.endDate)?new Date(i.i(r.getValue)("startDate",a[0]).getTime()):new Date(i.i(r.getValue)("endDate",a[0]).getTime()):!i.i(r.isNullOrUndefined)(this.beforeOpenArgs.rowData.ganttProperties.startDate)&&new Date(this.beforeOpenArgs.rowData.ganttProperties.startDate.getTime());u.setHours(0,0,0,0),!i.i(r.isNullOrUndefined)(a)&&a.length>0&&u.setDate(u.getDate()+2),d=this.parent.dataOperation.checkStartDate(u),p=this.parent.dateValidationModule.getDateFromFormat(d),0===p.getHours()&&86400!==this.parent.defaultEndTime&&this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,p),p=!i.i(r.isNullOrUndefined)(t.endDate)&&!i.i(r.isNullOrUndefined)(a)&&a.length<=0?this.beforeOpenArgs.rowData.ganttProperties.endDate:p,h=!i.i(r.isNullOrUndefined)(t.duration)&&!i.i(r.isNullOrUndefined)(a)&&a.length<=0?this.beforeOpenArgs.rowData.ganttProperties.duration:1,l={startDate:d,endDate:p,duration:h},e.rowData=l}this.selectedSegment=e.rowData}},e.prototype.renderSegmentsTab=function(e){var t=this.parent,n=this.beforeOpenArgs[e],a=this.beforeOpenArgs.rowData,s=[];this.isEdit&&(s=i.i(r.isNullOrUndefined)(a.ganttProperties.segments)?[]:a.ganttProperties.segments),n.dataSource=s,n.actionBegin=this.segmentGridActionBegin.bind(this),o.Grid.Inject(o.Edit,o.Page,o.Toolbar,o.ForeignKey);var l=new o.Grid(n),d=this.createDivElement("",t.element.id+""+e+"TabContainer");return l.appendTo(d),d},e.prototype.renderGeneralTab=function(e){for(var t=this.parent,i=this.beforeOpenArgs[e],r=this.createDivElement("e-edit-form-row",t.element.id+""+e+"TabContainer"),n=0,a=Object.keys(i);n<a.length;n++){var s=a[n];if(!1!==this.parent.columnByField[s].visible){var o=this.parent.columnByField[s],l=i[s];r.appendChild(this.renderInputElements(l,o))}}return r},e.prototype.isCheckIsDisabled=function(e){var t,n=!1;if(!1===e.allowEditing||e.isPrimaryKey||this.parent.readOnly)if(-1!==this.parent.customColumns.indexOf(e.field))n=!0;else if(e.field===this.parent.taskFields.id||e.field===this.parent.taskFields.name||e.field===this.parent.taskFields.duration||e.field===this.parent.taskFields.progress||e.field===this.parent.taskFields.startDate||e.field===this.parent.taskFields.endDate||e.field===this.parent.taskFields.baselineStartDate||e.field===this.parent.taskFields.baselineEndDate||e.field===this.parent.taskFields.work||e.field===this.parent.taskFields.type){for(var a=0;a<this.parent.currentViewData.length;a++)if(!i.i(r.isNullOrUndefined)(this.parent.currentViewData[a].ganttProperties.taskId)){t=this.parent.currentViewData[a].ganttProperties.taskId;break}n="string"!=typeof t}return this.isEdit&&(e.field===this.parent.taskFields.id&&(n=!0),this.editedRecord.hasChildRecords&&(e.field===this.parent.taskFields.endDate&&(!i.i(r.isNullOrUndefined)(this.editedRecord.isManual)&&0==this.editedRecord.isManual||"Auto"==this.parent.taskMode)||e.field===this.parent.taskFields.duration||e.field===this.parent.taskFields.progress||e.field===this.parent.taskFields.work||e.field===this.parent.taskFields.type)&&(n=!0)),n},e.prototype.isParentValid=function(e){if(e.length>0)for(var t=0;t<e.length;t++){if(e[t].uniqueID==this.beforeOpenArgs.rowData.uniqueID){this.isValidData=!1;break}if(e[t].hasChildRecords&&this.isParentValid(e[t].childRecords),!this.isValidData)break}return this.isValidData},e.prototype.renderPredecessorTab=function(e){var t=this,a=this.parent,s=this.beforeOpenArgs[e],l=this.parent.columnByField[this.parent.taskFields.dependency];(!1===l.allowEditing||l.isPrimaryKey||this.parent.readOnly)&&(s.editSettings.allowEditing=!1,s.editSettings.allowAdding=!1,s.editSettings.allowDeleting=!1);var d=this.beforeOpenArgs.rowData,p=[];this.taskNameCollection(),this.isEdit&&(p=this.predecessorEditCollection(d),this.updatePredecessorDropDownData(d)),s.dataSource=p,s.actionBegin=this.gridActionBegin.bind(this),s.columns[1].edit={write:function(e){"add"===i.i(r.getValue)("requestType",e)&&i.i(r.setValue)("rowData.uniqueId",i.i(c.k)(),e),new u.ComboBox({dataSource:new n.DataManager(t.idCollection),popupHeight:"180px",allowCustom:!1,fields:{value:"text"},value:e.rowData.name,change:function(e){var n=i.i(r.closest)(e.element,"tr"),a=n.querySelector("#"+t.parent.element.id+"DependencyTabContainerid");a&&(i.i(r.isNullOrUndefined)(e.itemData)||i.i(r.isNullOrUndefined)(e.item)?a.value="":a.value=e.itemData.id)},autofill:!0}).appendTo(e.element)},read:function(e){return e.ej2_instances[0].value}},o.Grid.Inject(o.Edit,o.Page,o.Toolbar,o.ForeignKey);var h=new o.Grid(s),g=this.createDivElement("e-dependent-div",a.element.id+""+e+"TabContainer");return h.appendTo(g),g},e.prototype.gridActionBegin=function(e){var t=this,n=this.beforeOpenArgs.Dependency;if("add"===e.requestType||"beginEdit"===e.requestType){var a="add"!==e.requestType;this.idCollection=i.i(r.extend)([],[],this.preTableCollection,!0);for(var s=n.dataSource,o=this,l=0;l<=s.length;l++)!function(n){o.idCollection.forEach(function(o,l){if(o.id===i.i(r.getValue)("id",s[n])){var d=i.i(r.getValue)("rowData",e);if(a&&i.i(r.getValue)("id",d)===o.id)return;t.idCollection.splice(t.idCollection.indexOf(o),1)}})}(l)}},e.prototype.updateResourceCollection=function(e,t){if(!i.i(r.isNullOrUndefined)(e.data)&&Object.keys(e.data).length){var n=(this.parent,document.querySelector("#"+t)),a=n.ej2_instances[0];if(!i.i(r.isNullOrUndefined)(a)&&a.getSelectedRecords().length>0){var s=a.getSelectedRecords(),o=void 0,l=[];for(o=0;o<s.length;o++)l.push(s[o].taskData);this.ganttResources=i.i(r.extend)([],l)}else this.ganttResources=[]}else this.ganttResources=[]},e.prototype.renderResourceTab=function(e){var t=this,n=this.parent,a=n.resourceFields,s=this.beforeOpenArgs.rowData,o=s.ganttProperties.resourceInfo,l=this.beforeOpenArgs[e],d=n.element.id+""+e+"TabContainer",p=[];if("ResourceView"===this.parent.viewType)for(var h=0;h<n.currentViewData.length;h++)for(var u=0;u<n.resources.length;u++)n.currentViewData[h][n.taskFields.id]===n.resources[u][a.id]&&(n.currentViewData[h].hasChildRecords||i.i(r.isNullOrUndefined)(n.currentViewData[h].parentItem))&&p.push(n.resources[u]);else p=i.i(r.extend)([],[],n.resources,!0);if(this.parent.dataOperation.updateResourceUnit(p),!i.i(r.isNullOrUndefined)(o)){var c=void 0,f=o.length,m=void 0,y=p.length;for(c=0;c<f;c++)for(m=0;m<y;m++)o[c][a.id]===p[m][a.id]&&(p[m][a.unit]=o[c][a.unit])}l.dataSource=p;var v=s.ganttProperties.resourceInfo;if(this.isEdit&&!i.i(r.isNullOrUndefined)(v))for(var h=0;h<v.length;h++)this.ganttResources.push(v[h]);l.rowSelected=function(e){t.updateResourceCollection(e,d)},l.rowDeselected=function(e){t.updateResourceCollection(e,d)};var D=this.createDivElement("e-resource-div",d);g.TreeGrid.Inject(g.Selection,g.Filter,g.Edit,g.VirtualScroll);var w=new g.TreeGrid(l),k=this.parent.columnByField[this.parent.taskFields.resourceInfo];return(!1===k.allowEditing||k.isPrimaryKey||this.parent.readOnly)&&(w.allowSelection=!1,w.allowFiltering=!1,w.editSettings.allowEditing=!1),w.dataBound=function(){if(t.parent.editDialogFields.length>=1&&"Resources"===t.parent.editDialogFields[0].type){var e=t.parent.element.id+"ResourcesTabContainer";t.resourceSelection(e)}},w.appendTo(D),D},e.prototype.resourceSelection=function(e){var t=this,n=document.querySelector("#"+e).ej2_instances[0],a=n.getCurrentViewRecords(),s=this.ganttResources;s&&s.length>0&&a.forEach(function(e,a){for(var o=0;o<s.length;o++)e.taskData[t.parent.resourceFields.id]!==s[o][t.parent.resourceFields.id]||i.i(r.isNullOrUndefined)(n.selectionModule)||-1!==n.getSelectedRowIndexes().indexOf(a)||n.selectRow(a)})},e.prototype.renderCustomTab=function(e){return this.renderGeneralTab(e)},e.prototype.renderNotesTab=function(e){var t=this.parent,i=this.beforeOpenArgs[e],r=this.editedRecord.ganttProperties,n=this.createDivElement("",t.element.id+""+e+"TabContainer");l.RichTextEditor.Inject(l.Toolbar,l.Link,l.HtmlEditor,l.QuickToolbar,l.Count),i.value=r.notes;var a=this.parent.columnByField[this.parent.taskFields.notes];return(!1===a.allowEditing||a.isPrimaryKey||this.parent.readOnly)&&(i.enabled=!1),new l.RichTextEditor(i).appendTo(n),n},e.prototype.renderInputElements=function(e,t){var n,a=this,s=this.parent.element.id,l=this.editedRecord,d=this.createDivElement("e-edit-form-column"),p={column:t,data:l};if(!i.i(r.isNullOrUndefined)(t.edit)&&i.i(r.isNullOrUndefined)(t.edit.params)){var h=t.edit.create;"string"==typeof h?(h=i.i(o.getObject)(h,window),n=h(p)):n=t.edit.create(p),n.className="",n.setAttribute("type","text"),n.setAttribute("id",s+""+t.field),n.setAttribute("name",t.field),n.setAttribute("title",t.field),d.appendChild(n)}else n=this.createInputElement("",s+""+t.field,t.field),d.appendChild(n);if(e.enabled=!this.isCheckIsDisabled(t),t.field===this.parent.taskFields.duration)if(i.i(r.isNullOrUndefined)(t.valueAccessor)){if(i.i(r.isNullOrUndefined)(t.edit)){var u=l.ganttProperties;e.value=this.parent.dataOperation.getDurationString(u.duration,u.durationUnit)}}else if("string"==typeof t.valueAccessor){var c=i.i(o.getObject)(t.valueAccessor,window);e.value=c(t.field,l,t)}else e.value=t.valueAccessor(t.field,l,t);else"booleanedit"===t.editType?!0===l[t.field]?e.checked=!0:e.checked=!1:e.value=l[t.field];if(!i.i(r.isNullOrUndefined)(t.edit)&&i.i(r.isNullOrUndefined)(t.edit.params)){var g=t.edit.write,f=void 0;"string"==typeof g?(g=i.i(o.getObject)(g,window),f=g({column:t,rowData:l,element:n})):f=t.edit.write({column:t,rowData:l,element:n}),t.field===this.parent.taskFields.duration&&(f.change=function(e){a.validateScheduleFields(e,t,a.parent)})}else{var f=new this.inputs[t.editType](e);f.appendTo(n)}return d},e.prototype.taskNameCollection=function(){var e=this.parent.flatData;this.preTaskIds=[],this.preTableCollection=[];for(var t=0;t<e.length;t++){var i=e[t],r=i;if(i.parentUniqueID===this.beforeOpenArgs.rowData.uniqueID)this.isValidData=!1;else do{if(r.parentItem&&(r=this.parent.flatData[this.parent.ids.indexOf(r.parentItem.taskId)],r.uniqueID==this.beforeOpenArgs.rowData.uniqueID)){this.isValidData=!1;break}}while(r.parentItem);if(i.hasChildRecords&&this.isValidData&&(this.isValidData=this.isParentValid(i.childRecords)),this.isValidData){var n="ResourceView"===this.parent.viewType?i.ganttProperties.taskId.toString():i.ganttProperties.rowUniqueID.toString(),a={id:n,text:n+"-"+i.ganttProperties.taskName,value:n};this.preTaskIds.push(a.id),this.preTableCollection.push(a)}else this.isValidData=!0}},e.prototype.predecessorEditCollection=function(e){var t=[],n=e.ganttProperties;if(this.isEdit&&!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)&&!i.i(r.isNullOrUndefined)(e)&&!i.i(r.isNullOrUndefined)(n.predecessor))for(var a=n.predecessor,s=this.preTableCollection,o=0;o<a.length;o++){var l=a[o].from.toString(),d={},p="ResourceView"===this.parent.viewType?n.taskId:n.rowUniqueID;if(p.toString()!==l){d.id=l;for(var h=0;h<s.length;h++)if(s[h].value===l){d.name=s[h].text;break}d.type=a[o].type;var u=a[o].offset,g=a[o].offsetUnit;d.offset=this.parent.dataOperation.getDurationString(u,g),d.uniqueId=i.i(c.k)(),t.push(d)}}return t},e.prototype.updatePredecessorDropDownData=function(e){var t=-1,i="ResourceView"===this.parent.viewType?e.ganttProperties.taskId.toString():e.ganttProperties.rowUniqueID.toString();t=this.preTaskIds.indexOf(i),this.preTableCollection.splice(t,1),this.preTaskIds.splice(t,1),this.validSuccessorTasks(e,this.preTaskIds,this.preTableCollection)},e.prototype.validSuccessorTasks=function(e,t,i){var r=this,n=e.ganttProperties;if(n.predecessor&&n.predecessor.length>0){var a=n.predecessor,s="ResourceView"===this.parent.viewType?n.taskId.toString():n.rowUniqueID.toString();a.forEach(function(e){if(e.from.toString()===s){var n=e.to,a=-1;a=t.indexOf(n),a>-1&&(t.splice(a,1),i.splice(a,1));var o=r.parent.connectorLineModule.getRecordByID(n);r.validSuccessorTasks(o,t,i)}})}},e.prototype.getPredecessorType=function(){var e=[this.parent.getPredecessorTextValue("SS"),this.parent.getPredecessorTextValue("SF"),this.parent.getPredecessorTextValue("FS"),this.parent.getPredecessorTextValue("FF")];return[{id:"FS",text:e[2],value:e[2]},{id:"FF",text:e[3],value:e[3]},{id:"SS",text:e[0],value:e[0]},{id:"SF",text:e[1],value:e[1]}]},e.prototype.initiateDialogSave=function(){this.isEdit?this.parent.initiateEditAction(!0):this.addedRecord={};for(var e=this.parent,t=this.beforeOpenArgs.tabModel,n=t.items,a=0;a<n.length;a++){var s=n[a].content,o=s.id;i.i(r.isNullOrUndefined)(o)&&""===o||(o=o.replace(e.element.id,""),o=o.replace("TabContainer",""),"General"===o?this.updateGeneralTab(s,!1):"Dependency"===o?this.updatePredecessorTab(s):"Notes"===o?this.updateNotesTab(s):"Resources"===o?this.updateResourceTab(s):-1!==o.indexOf("Custom")?this.updateCustomTab(s):"Segments"===o&&this.updateSegmentsData(s,this.beforeOpenArgs.rowData))}if(this.isEdit){this.parent.dataOperation.updateWidthLeft(this.rowData);var l={data:this.rowData,action:"DialogEditing"};this.parent.editModule.initiateUpdateAction(l)}else if("ResourceView"===this.parent.viewType){var d=i.i(r.extend)({},this.addedRecord,!0);if(d[this.parent.taskFields.resourceInfo].length)for(var a=0;a<d[this.parent.taskFields.resourceInfo].length;a++){var o=d[this.parent.taskFields.resourceInfo][a].toString(),p=this.parent.getTaskIds().indexOf("R"+o.toString());if(-1!==p){this.parent.editModule.addRecord(this.addedRecord,"Child",p);break}}else this.parent.editModule.addRecord(this.addedRecord,"Bottom")}else this.parent.editModule.addRecord(this.addedRecord,this.parent.editSettings.newRowPosition);return!0},e.prototype.updateSegmentTaskData=function(e){for(var t=[],n=this.parent.taskFields,a=0;a<e.length;a++){var s={};i.i(r.isNullOrUndefined)(n.startDate)||(s[this.parent.taskFields.startDate]=e[a].startDate),i.i(r.isNullOrUndefined)(n.endDate)||(s[this.parent.taskFields.endDate]=e[a].endDate),i.i(r.isNullOrUndefined)(n.duration)||(s[this.parent.taskFields.duration]=Number(e[a].duration),e[a].duration=s[this.parent.taskFields.duration]),t.push(s)}this.isEdit?(this.rowData.ganttProperties.segments=e,this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(this.rowData,!1),this.rowData.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.segments,t,this.rowData),e.length<=0&&this.validateDuration(this.rowData)):this.addedRecord[n.segments]=t},e.prototype.updateSegmentsData=function(e,t){var i,r=e.ej2_instances[0],n=r.isEdit;r.isEdit&&r.endEdit(),i=n?r.dataSource:r.currentViewData,this.updateSegmentTaskData(i)},e.prototype.updateGeneralTab=function(e,t){var n=this.parent,a=e.childNodes,s={};this.isEdit||(s=this.addedRecord);for(var l=0;l<a.length;l++){var d=a[l],p=d.querySelector('input[id^="'+n.element.id+'"]');if(p){var h=p.id.replace(n.element.id,""),u=d.querySelector("#"+n.element.id+h).ej2_instances[0];if("stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType&&h===this.parent.taskFields.id){var c=u.value.toString();u.value=c}var g=n.columnByField[h];if(!i.i(r.isNullOrUndefined)(g.edit)&&i.i(r.isNullOrUndefined)(g.edit.params)){var f=g.edit.read;"string"==typeof f?(f=i.i(o.getObject)(f,window),s[h]=f(p,u.value)):s[h]=g.edit.read(p,u.value)}else t&&"booleanedit"===g.editType?!0===p.checked?s[h]=!0:s[h]=!1:s[h]=u.value}}this.isEdit&&(this.updateScheduleProperties(this.editedRecord,this.rowData),n.editModule.validateUpdateValues(s,this.rowData,!0))},e.prototype.updateScheduleProperties=function(e,t){this.parent.setRecordValue("startDate",e.ganttProperties.startDate,t.ganttProperties,!0),this.parent.setRecordValue("endDate",e.ganttProperties.endDate,t.ganttProperties,!0),this.parent.setRecordValue("duration",e.ganttProperties.duration,t.ganttProperties,!0),this.parent.setRecordValue("durationUnit",e.ganttProperties.durationUnit,t.ganttProperties,!0),this.parent.setRecordValue("work",e.ganttProperties.work,t.ganttProperties,!0),this.parent.setRecordValue("type",e.ganttProperties.taskType,t.ganttProperties,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.startDate)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.startDate),i.i(r.isNullOrUndefined)(this.parent.taskFields.endDate)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.endDate),i.i(r.isNullOrUndefined)(this.parent.taskFields.duration)||(this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.duration),this.parent.setRecordValue("durationUnit",e.ganttProperties.durationUnit,this.rowData,!0),0===this.rowData.ganttProperties.duration?this.parent.setRecordValue("isMilestone",!0,this.rowData.ganttProperties,!0):this.parent.setRecordValue("isMilestone",!1,this.rowData.ganttProperties,!0)),i.i(r.isNullOrUndefined)(this.parent.taskFields.work)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.work),i.i(r.isNullOrUndefined)(this.parent.taskFields.manual)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.manual),i.i(r.isNullOrUndefined)(this.parent.taskFields.type)||this.parent.dataOperation.updateMappingData(this.rowData,"type")},e.prototype.updatePredecessorTab=function(e){var t=e.ej2_instances[0];t.isEdit&&t.endEdit();for(var i=t.dataSource,r=[],n=[],a="",s=[],o=0;o<i.length;o++){var l=i[o];if(-1===s.indexOf(l.id)){var d=l.id+l.type;l.offset&&-1!==l.offset.indexOf("-")?d+=l.offset:d+="+"+l.offset,r.push(d),s.push(l.id)}}this.isEdit?(r.length>0?(n=this.parent.predecessorModule.calculatePredecessor(r.join(","),this.rowData),this.parent.setRecordValue("predecessor",n,this.rowData.ganttProperties,!0),a=this.parent.predecessorModule.getPredecessorStringValue(this.rowData)):(n=[],this.parent.setRecordValue("predecessor",n,this.rowData.ganttProperties,!0),a=""),this.parent.setRecordValue("predecessorsName",a,this.rowData.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,a,this.rowData),this.parent.setRecordValue(this.parent.taskFields.dependency,a,this.rowData),this.parent.predecessorModule.updateUnscheduledDependency(this.rowData)):this.addedRecord[this.parent.taskFields.dependency]=r.length>0?r.join(","):""},e.prototype.updateResourceTab=function(e){var t=e.ej2_instances[0];t&&t.grid.endEdit();var n=this.ganttResources;"ResourceView"!==this.parent.viewType||i.i(r.isNullOrUndefined)(this.rowData.ganttProperties)||(JSON.stringify(this.ganttResources)!==JSON.stringify(this.rowData.ganttProperties.resourceInfo)?(this.isResourceUpdate=!0,this.previousResource=i.i(r.isNullOrUndefined)(this.rowData.ganttProperties.resourceInfo)?[]:this.rowData.ganttProperties.resourceInfo.slice()):this.isResourceUpdate=!1);var a=[];if(this.isEdit)this.parent.setRecordValue("resourceInfo",n,this.rowData.ganttProperties,!0),this.parent.dataOperation.updateMappingData(this.rowData,"resourceInfo"),this.parent.editModule.updateResourceRelatedFields(this.rowData,"resource"),this.validateDuration(this.rowData);else{for(var s=0;s<n.length;s++)a.push(n[s][this.parent.resourceFields.id]),this.isAddNewResource=!0;this.addedRecord[this.parent.taskFields.resourceInfo]=a}},e.prototype.updateNotesTab=function(e){var t=this.parent,i=e.ej2_instances[0];this.isEdit?(t.columnByField[t.taskFields.notes].disableHtmlEncode?this.parent.setRecordValue("notes",i.getHtml(),this.rowData.ganttProperties,!0):this.parent.setRecordValue("notes",i.getText(),this.rowData.ganttProperties,!0),t.dataOperation.updateMappingData(this.rowData,"notes")):this.addedRecord[this.parent.taskFields.notes]=i.getHtml()},e.prototype.updateCustomTab=function(e){this.updateGeneralTab(e,!0)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var r=i(0),n=(i.n(r),i(4)),a=(i.n(n),i(5)),s=(i.n(a),i(2)),o=i(24),l=i(42),d=i(33),p=i(8),h=(i.n(p),i(21)),u=(i.n(h),i(29)),c=function(){function e(e){if(this.isFromDeleteMethod=!1,this.targetedRecords=[],this.updateParentRecords=[],this.isaddtoBottom=!1,this.confirmDialog=null,this.taskbarMoved=!1,this.predecessorUpdated=!1,this.isBreakLoop=!1,this.deletedTaskDetails=[],this.parent=e,this.validatedChildItems=[],this.parent.editSettings.allowEditing&&"Auto"===this.parent.editSettings.mode&&(this.cellEditModule=new o.a(this.parent)),this.parent.taskFields.dependency&&(this.parent.connectorLineEditModule=new u.a(this.parent)),(this.parent.editSettings.allowAdding||this.parent.editSettings.allowEditing&&("Dialog"===this.parent.editSettings.mode||"Auto"===this.parent.editSettings.mode))&&(this.dialogModule=new d.a(this.parent)),this.parent.editSettings.allowTaskbarEditing&&(this.taskbarEditModule=new l.a(this.parent)),this.parent.editSettings.allowDeleting){var t=i.i(r.createElement)("div",{id:this.parent.element.id+"_deleteConfirmDialog"});this.parent.element.appendChild(t),this.renderDeleteConfirmDialog()}this.parent.treeGrid.recordDoubleClick=this.recordDoubleClick.bind(this),this.parent.treeGrid.editSettings.allowAdding=this.parent.editSettings.allowAdding,this.parent.treeGrid.editSettings.allowDeleting=this.parent.editSettings.allowDeleting,this.parent.treeGrid.editSettings.showDeleteConfirmDialog=this.parent.editSettings.showDeleteConfirmDialog,this.parent.treeGrid.editSettings.allowNextRowEdit=this.parent.editSettings.allowNextRowEdit,this.updateDefaultColumnEditors()}return e.prototype.getModuleName=function(){return"edit"},e.prototype.updateDefaultColumnEditors=function(){for(var e=[this.parent.taskFields.id,this.parent.taskFields.progress,this.parent.taskFields.resourceInfo,"taskType"],t=0;t<e.length;t++)if(!i.i(r.isNullOrUndefined)(e[t])&&e[t].length>0){var n=this.parent.getColumnByField(e[t],this.parent.treeGridModule.treeGridColumns);n&&(n.field===this.parent.taskFields.id?this.updateIDColumnEditParams(n):n.field===this.parent.taskFields.progress&&i.i(r.isNullOrUndefined)(n.edit)?this.updateProgessColumnEditParams(n):n.field===this.parent.taskFields.resourceInfo?this.updateResourceColumnEditor(n):"taskType"===n.field&&this.updateTaskTypeColumnEditor(n))}},e.prototype.updateIDColumnEditParams=function(e){var t={min:0,decimals:0,validateDecimalOnType:!0,format:"n0",showSpinButton:!1};this.updateEditParams(e,t)},e.prototype.updateProgessColumnEditParams=function(e){var t={min:0,decimals:0,validateDecimalOnType:!0,max:100,format:"n0"};this.updateEditParams(e,t)},e.prototype.updateEditParams=function(e,t){i.i(r.isNullOrUndefined)(e.edit)?(e.edit={},e.edit.params={}):i.i(r.isNullOrUndefined)(e.edit.params)&&(e.edit.params={}),i.i(r.extend)(t,e.edit.params),e.edit.params=t,this.parent.getColumnByField(e.field,this.parent.ganttColumns).edit=e.edit},e.prototype.updateResourceColumnEditor=function(e){if(this.parent.editSettings.allowEditing&&i.i(r.isNullOrUndefined)(e.edit)&&"Auto"===this.parent.editSettings.mode){e.editType="dropdownedit",e.edit=this.getResourceEditor();var t=this.parent.getColumnByField(e.field,this.parent.ganttColumns);t.editType="dropdownedit",t.edit=e.edit}},e.prototype.getResourceEditor=function(){var e,t=this,a=this.parent.resourceFields,s={};return h.MultiSelect.Inject(h.CheckBoxSelection),s.write=function(i){t.parent.treeGridModule.currentEditRow={},e=new h.MultiSelect({dataSource:new n.DataManager(t.parent.resources),fields:{text:a.name,value:a.id},mode:"CheckBox",showDropDownIcon:!0,popupHeight:"350px",delimiterChar:",",value:t.parent.treeGridModule.getResourceIds(i.rowData)}),e.appendTo(i.element)},s.read=function(e){var n=e.ej2_instances[0].value,s=[];i.i(r.isNullOrUndefined)(n)&&(n=[]);for(var o=0;o<n.length;o++)for(var l=0;l<t.parent.resources.length;l++)if(t.parent.resources[l][a.id]===n[o]){s.push(t.parent.resources[l][a.name]);break}return t.parent.treeGridModule.currentEditRow[t.parent.taskFields.resourceInfo]=n,s.join(",")},s.destroy=function(){e&&e.destroy()},s},e.prototype.updateTaskTypeColumnEditor=function(e){if(this.parent.editSettings.allowEditing&&i.i(r.isNullOrUndefined)(e.edit)&&"Auto"===this.parent.editSettings.mode){e.editType="dropdownedit",e.edit=this.getTaskTypeEditor();var t=this.parent.getColumnByField(e.field,this.parent.ganttColumns);t.editType="dropdownedit",t.edit=e.edit}},e.prototype.getTaskTypeEditor=function(){var e,t=this,a={},s=[{ID:1,Value:"FixedUnit"},{ID:2,Value:"FixedWork"},{ID:3,Value:"FixedDuration"}];return a.write=function(a){t.parent.treeGridModule.currentEditRow={},e=new h.DropDownList({dataSource:new n.DataManager(s),fields:{value:"Value"},popupHeight:"350px",value:i.i(r.getValue)("taskType",a.rowData.ganttProperties)}),e.appendTo(a.element)},a.read=function(e){var i=e.ej2_instances[0].value;return t.parent.treeGridModule.currentEditRow.taskType=i,i},a.destroy=function(){e&&e.destroy()},a},e.prototype.reUpdateEditModules=function(){var e=this.parent.editSettings;if(e.allowEditing?(this.parent.editModule.cellEditModule&&"Dialog"===e.mode?(this.cellEditModule.destroy(),this.parent.treeGrid.recordDoubleClick=this.recordDoubleClick.bind(this)):i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)&&"Auto"===e.mode&&(this.cellEditModule=new o.a(this.parent)),this.parent.editModule.dialogModule&&"Auto"===e.mode?this.parent.treeGrid.recordDoubleClick=void 0:i.i(r.isNullOrUndefined)(this.parent.editModule.dialogModule)&&(this.dialogModule=new d.a(this.parent))):(this.cellEditModule&&this.cellEditModule.destroy(),this.dialogModule&&this.dialogModule.destroy()),e.allowDeleting&&e.showDeleteConfirmDialog){if(i.i(r.isNullOrUndefined)(this.confirmDialog)){var t=i.i(r.createElement)("div",{id:this.parent.element.id+"_deleteConfirmDialog"});this.parent.element.appendChild(t),this.renderDeleteConfirmDialog()}}else e.allowDeleting&&e.showDeleteConfirmDialog||this.confirmDialog&&!this.confirmDialog.isDestroyed&&this.confirmDialog.destroy();e.allowTaskbarEditing?i.i(r.isNullOrUndefined)(this.parent.editModule.taskbarEditModule)&&(this.taskbarEditModule=new l.a(this.parent)):this.taskbarEditModule&&this.taskbarEditModule.destroy()},e.prototype.recordDoubleClick=function(e){if(this.parent.editSettings.allowEditing&&"Dialog"===this.parent.editSettings.mode){var t=void 0;if(e.row){var n=i.i(r.getValue)("rowIndex",e.row);t=this.parent.currentViewData[n]}i.i(r.isNullOrUndefined)(t)||this.dialogModule.openEditDialog(t)}this.parent.ganttChartModule.recordDoubleClick(e)},e.prototype.destroy=function(){this.cellEditModule&&this.cellEditModule.destroy(),this.taskbarEditModule&&this.taskbarEditModule.destroy(),this.dialogModule&&this.dialogModule.destroy(),this.confirmDialog&&!this.confirmDialog.isDestroyed&&this.confirmDialog.destroy()},e.prototype.updateRecordByID=function(e){if(!this.parent.readOnly){var t=this.parent.taskFields;if(i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(e[t.id]))return;var n="ResourceView"===this.parent.viewType?this.parent.flatData[this.parent.getTaskIds().indexOf("T"+e[t.id])]:this.parent.getRecordByID(e[t.id]);if(!i.i(r.isNullOrUndefined)(this.parent.editModule)&&n){this.parent.isOnEdit=!0,this.validateUpdateValues(e,n,!0),e[this.parent.taskFields.resourceInfo]&&(0===n.ganttProperties.duration&&this.parent.dataOperation.updateWorkWithDuration(n),this.updateResourceRelatedFields(n,"resource"),this.parent.dateValidationModule.calculateEndDate(n));var a=Object.keys(e);if(-1===a.indexOf(t.startDate)&&-1===a.indexOf(t.endDate)&&-1===a.indexOf(t.duration)||this.parent.dataOperation.calculateScheduledValues(n,n.taskData,!1),this.parent.dataOperation.updateWidthLeft(n),i.i(r.isUndefined)(e[this.parent.taskFields.dependency])||e[this.parent.taskFields.dependency]===n.ganttProperties.predecessorsName){var s={};s.data=n,"ResourceView"===this.parent.viewType&&(s.action="methodUpdate"),this.parent.editModule.initiateUpdateAction(s)}else this.parent.connectorLineEditModule.updatePredecessor(n,e[this.parent.taskFields.dependency])}}},e.prototype.validateUpdateValues=function(e,t,n){for(var a=this.parent,o=a.taskFields,l=i.i(s.d)(a.columnMapping),d=[],p=!1,h=0,u=Object.keys(e);h<u.length;h++){var c=u[h];if(-1!==[o.startDate,o.endDate,o.duration].indexOf(c)){if(i.i(r.isNullOrUndefined)(e[c])&&!a.allowUnscheduledTasks)continue;if(n)if(o.duration===c)a.dataOperation.updateDurationValue(e[c],t.ganttProperties),t.ganttProperties.duration>0&&t.ganttProperties.isMilestone&&this.parent.setRecordValue("isMilestone",!1,t.ganttProperties,!0),a.dataOperation.updateMappingData(t,l[c]);else{var g="string"==typeof e[c]?new Date(e[c]):e[c];a.setRecordValue(l[c],g,t.ganttProperties,!0),a.dataOperation.updateMappingData(t,l[c])}else d.push(c),p=!0}else if(o.resourceInfo===c){var f=a.dataOperation.setResourceInfo(e);"ResourceView"===this.parent.viewType&&(JSON.stringify(f)!==JSON.stringify(t.ganttProperties.resourceInfo)?(this.parent.editModule.dialogModule.isResourceUpdate=!0,this.parent.editModule.dialogModule.previousResource=i.i(r.isNullOrUndefined)(t.ganttProperties.resourceInfo)?[]:t.ganttProperties.resourceInfo.slice()):this.parent.editModule.dialogModule.isResourceUpdate=!1),t.ganttProperties.resourceInfo=f,a.dataOperation.updateMappingData(t,"resourceInfo")}else if(o.dependency===c);else if(-1!==[o.progress,o.notes,o.durationUnit,o.expandState,o.milestone,o.name,o.baselineStartDate,o.baselineEndDate,o.id,o.segments].indexOf(c)){var m=a.columnByField[c],y=e[c];i.i(r.isNullOrUndefined)(m)||"datepickeredit"!==m.editType&&"datetimepickeredit"!==m.editType||(y=a.dataOperation.getDateFromFormat(y));var v=l[c];if(c===o.id)v="taskId";else if(c===o.name)v="taskName";else if(c===o.segments&&(v="segments",e&&!i.i(r.isNullOrUndefined)(e[this.parent.taskFields.segments])&&e[this.parent.taskFields.segments].length>0)){for(var D=0,w=0;w<t.ganttProperties.segments.length;w++)D+=t.ganttProperties.segments[w].duration;var k=t.ganttProperties.startDate,S=this.parent.dataOperation.getEndDate(k,D,t.ganttProperties.durationUnit,t.ganttProperties,!1);a.setRecordValue("endDate",a.dataOperation.getDateFromFormat(S),t.ganttProperties,!0)}i.i(r.isNullOrUndefined)(v)||a.setRecordValue(v,y,t.ganttProperties,!0),(c===o.baselineStartDate||c===o.baselineEndDate)&&t.ganttProperties.baselineStartDate&&t.ganttProperties.baselineEndDate&&(a.setRecordValue("baselineStartDate",a.dataOperation.checkBaselineStartDate(t.ganttProperties.baselineStartDate),t.ganttProperties,!0),a.dataOperation.setTime(this.parent.defaultEndTime,t.ganttProperties.baselineEndDate),a.setRecordValue("baselineEndDate",a.dataOperation.checkBaselineEndDate(t.ganttProperties.baselineEndDate),t.ganttProperties,!0),a.setRecordValue("baselineLeft",a.dataOperation.calculateBaselineLeft(t.ganttProperties),t.ganttProperties,!0),a.setRecordValue("baselineWidth",a.dataOperation.calculateBaselineWidth(t.ganttProperties),t.ganttProperties,!0)),a.setRecordValue("taskData."+c,y,t),c===o.segments&&e&&!i.i(r.isNullOrUndefined)(e[this.parent.taskFields.segments])&&e[this.parent.taskFields.segments].length>0&&a.dataOperation.setSegmentsInfo(t,!0),a.setRecordValue(c,y,t)}else if(o.indicators===c){var y=e[c];a.setRecordValue("indicators",y,t.ganttProperties,!0),a.setRecordValue("taskData."+c,y,t),a.setRecordValue(c,y,t)}else if(o.work===c)a.setRecordValue("work",e[c],t.ganttProperties,!0),this.parent.dataOperation.updateMappingData(t,"work"),this.parent.dataOperation.updateMappingData(t,"duration"),this.parent.dataOperation.updateMappingData(t,"endDate");else if(c===o.type)a.setRecordValue("taskType",e[c],t.ganttProperties,!0);else if(-1!==a.customColumns.indexOf(c)){var m=a.columnByField[c],y=e[c];i.i(r.isNullOrUndefined)(m.edit)&&("datepickeredit"!==m.editType&&"datetimepickeredit"!==m.editType||(y=a.dataOperation.getDateFromFormat(y))),a.setRecordValue("taskData."+c,y,t),a.setRecordValue(c,y,t)}else o.manual===c&&(a.setRecordValue("isAutoSchedule",!e[c],t.ganttProperties,!0),this.parent.setRecordValue(c,e[c],t),this.updateTaskScheduleModes(t))}p&&this.validateScheduleValues(d,t,e)},e.prototype.updateResourceRelatedFields=function(e,t){var n=e.ganttProperties,a=n.taskType,s=n.isAutoSchedule;if(!i.i(r.isNullOrUndefined)(n.resourceInfo))if(n.work>0||"work"===t)switch(a){case"FixedUnit":if(0===n.resourceInfo.length)return;s&&n.resourceInfo.length&&("work"===t||"resource"===t)?this.parent.dataOperation.updateDurationWithWork(e):s||"work"!==t?this.parent.dataOperation.updateWorkWithDuration(e):this.parent.dataOperation.updateUnitWithWork(e);break;case"FixedWork":if(0===n.resourceInfo.length)return;s?"duration"===t||"endDate"===t?(this.parent.dataOperation.updateUnitWithWork(e),0===n.duration&&(this.parent.setRecordValue("work",0,n,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.work)||this.parent.dataOperation.updateMappingData(e,"work"))):this.parent.dataOperation.updateDurationWithWork(e):"work"===t?this.parent.dataOperation.updateUnitWithWork(e):this.parent.dataOperation.updateWorkWithDuration(e);break;case"FixedDuration":n.resourceInfo.length&&"work"===t?this.parent.dataOperation.updateUnitWithWork(e):this.parent.dataOperation.updateWorkWithDuration(e)}else this.parent.dataOperation.updateWorkWithDuration(e)},e.prototype.validateScheduleValues=function(e,t,i){var r=this.parent;e.length>2?r.dataOperation.calculateScheduledValues(t,i,!1):e.length>1?this.validateScheduleByTwoValues(i,e,t):this.dialogModule.validateScheduleValuesByCurrentField(e[0],i[e[0]],t)},e.prototype.validateScheduleByTwoValues=function(e,t,i){var r,n,a,s=this.parent,o=s.taskFields,l=i.ganttProperties,d=s.allowUnscheduledTasks;-1!==t.indexOf(o.startDate)&&(r=e[o.startDate]),-1!==t.indexOf(o.endDate)&&(n=e[o.endDate]),-1!==t.indexOf(o.duration)&&(a=e[o.duration]),r&&n||d&&-1!==t.indexOf(o.startDate)&&-1!==t.indexOf(o.endDate)?(s.setRecordValue("startDate",s.dataOperation.getDateFromFormat(r),l,!0),s.setRecordValue("endDate",s.dataOperation.getDateFromFormat(n),l,!0),s.dataOperation.calculateDuration(i)):n&&a||d&&-1!==t.indexOf(o.endDate)&&-1!==t.indexOf(o.duration)?(s.setRecordValue("endDate",s.dataOperation.getDateFromFormat(n),l,!0),s.dataOperation.updateDurationValue(a,l)):(r&&a||d&&-1!==t.indexOf(o.startDate)&&-1!==t.indexOf(o.duration))&&(s.setRecordValue("startDate",s.dataOperation.getDateFromFormat(r),l,!0),s.dataOperation.updateDurationValue(a,l))},e.prototype.isTaskbarMoved=function(e){var t=!1,n=e.ganttProperties,a=this.parent.previousRecords&&this.parent.previousRecords[e.uniqueID];if(a&&a.ganttProperties){var s=i.i(r.getValue)("ganttProperties.startDate",a),o=i.i(r.getValue)("ganttProperties.endDate",a),l=i.i(r.getValue)("ganttProperties.duration",a),d=i.i(r.getValue)("ganttProperties.durationUnit",a),p=Object.keys(a.ganttProperties);-1===p.indexOf("startDate")&&-1===p.indexOf("endDate")&&-1===p.indexOf("duration")&&-1===p.indexOf("durationUnit")||(i.i(r.isNullOrUndefined)(s)&&!i.i(r.isNullOrUndefined)(n.startDate)||i.i(r.isNullOrUndefined)(o)&&!i.i(r.isNullOrUndefined)(n.endDate)||i.i(r.isNullOrUndefined)(n.startDate)&&!i.i(r.isNullOrUndefined)(s)||i.i(r.isNullOrUndefined)(n.endDate)&&!i.i(r.isNullOrUndefined)(o)||s&&s.getTime()!==n.startDate.getTime()||o&&o.getTime()!==n.endDate.getTime()||!i.i(r.isNullOrUndefined)(l)&&l!==n.duration||!i.i(r.isNullOrUndefined)(l)&&l===n.duration&&d!==n.durationUnit)&&(t=!0)}return t},e.prototype.isPredecessorUpdated=function(e){var t=!1,i=this.parent.previousRecords[e.uniqueID];return i&&i.ganttProperties&&i.ganttProperties.hasOwnProperty("predecessor")&&(e.ganttProperties.predecessorsName!==i.ganttProperties.predecessorsName?t=!0:this.parent.setRecordValue("predecessor",i.ganttProperties.predecessor,e.ganttProperties,!0)),t},e.prototype.isCheckPredecessor=function(e){var t=!1;return this.parent.previousRecords[e.uniqueID]&&this.parent.taskFields.dependency&&this.parent.isInPredecessorValidation&&this.parent.predecessorModule.getValidPredecessor(e).length>0&&this.isTaskbarMoved(e)&&(t=!0),t},e.prototype.updateGanttProperties=function(e,t){var i=["taskId","uniqueID","rowUniqueID","parentId"];Object.keys(e.ganttProperties).forEach(function(r){-1===i.indexOf(r)&&(t.ganttProperties[r]=e.ganttProperties[r])})},e.prototype.initiateUpdateAction=function(e){var t=this.isCheckPredecessor(e.data);this.taskbarMoved=this.isTaskbarMoved(e.data),this.predecessorUpdated=this.isPredecessorUpdated(e.data),this.predecessorUpdated&&(this.parent.isConnectorLineUpdate=!0,this.parent.connectorLineEditModule.addRemovePredecessor(e.data));var n={};if(t)if(n=this.parent.connectorLineEditModule.validateTypes(e.data),this.parent.isConnectorLineUpdate=!0,i.i(r.isNullOrUndefined)(i.i(r.getValue)("violationType",n)))this.updateEditedTask(e);else{var a=this.validateTaskEvent(e);!1===a.validateMode.preserveLinkWithEditing&&!1===a.validateMode.removeLink&&!1===a.validateMode.respectLink?this.parent.connectorLineEditModule.openValidationDialog(n):this.parent.connectorLineEditModule.applyPredecessorOption()}else this.taskbarMoved&&(this.parent.isConnectorLineUpdate=!0),this.updateEditedTask(e)},e.prototype.validateTaskEvent=function(e){var t={};return this.resetValidateArgs(),this.parent.currentEditedArgs=t,t.cancel=!1,t.data=e.data,t.requestType="validateLinkedTask",t.validateMode=this.parent.dialogValidateMode,t.editEventArgs=e,this.parent.actionBeginTask(t),t},e.prototype.resetValidateArgs=function(){this.parent.dialogValidateMode.preserveLinkWithEditing=!0,this.parent.dialogValidateMode.removeLink=!1,this.parent.dialogValidateMode.respectLink=!1},e.prototype.updateEditedTask=function(e){var t=e.data;if(this.updateParentChildRecord(t),this.parent.isConnectorLineUpdate){for(var i=0;i<this.validatedChildItems.length;i++){var r=this.validatedChildItems[i];r.ganttProperties.predecessor&&r.ganttProperties.predecessor.length>0&&(this.parent.editedTaskBarItem=r,this.parent.predecessorModule.validatePredecessor(r,[],""))}t.ganttProperties.predecessor&&(this.parent.isMileStoneEdited=t.ganttProperties.isMilestone,this.taskbarMoved&&(this.parent.editedTaskBarItem=t),this.parent.predecessorModule.validatePredecessor(t,[],"")),t.hasChildRecords&&this.parent.previousRecords[t.uniqueID].ganttProperties.startDate&&("DrawConnectorLine"===e.action||"DialogEditing"===e.action)&&this.updateChildItems(t),this.updateParentItemOnEditing()}t.parentItem&&this.parent.dataOperation.updateParentItems(t,!0),this.initiateSaveAction(e)},e.prototype.updateParentItemOnEditing=function(){for(var e=i.i(r.getValue)("parentRecord",this.parent.predecessorModule),t=0;t<e.length;t++)this.parent.dataOperation.updateParentItems(e[t]);i.i(r.setValue)("parentRecord",[],this.parent.predecessorModule),i.i(r.setValue)("parentIds",[],this.parent.predecessorModule)},e.prototype.updateParentChildRecord=function(e){var t=e;t.hasChildRecords&&this.taskbarMoved&&"Auto"===this.parent.taskMode&&!i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)&&!this.parent.editModule.cellEditModule.isResourceCellEdited&&this.updateChildItems(t),i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)||(this.parent.editModule.cellEditModule.isResourceCellEdited=!1)},e.prototype.updateTaskScheduleModes=function(e){var t=e[this.parent.taskFields.startDate],i=e.ganttProperties;if(e.hasChildRecords&&i.isAutoSchedule)this.parent.setRecordValue("startDate",i.autoStartDate,i,!0),this.parent.setRecordValue("endDate",i.autoEndDate,i,!0),this.parent.setRecordValue("width",this.parent.dataOperation.calculateWidth(e,!0),i,!0),this.parent.setRecordValue("left",this.parent.dataOperation.calculateLeft(i,!0),i,!0),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(i.width,i.progress),i,!0),this.parent.dataOperation.calculateDuration(e);else if(e.hasChildRecords&&!i.isAutoSchedule)this.parent.dataOperation.updateWidthLeft(e),this.parent.dataOperation.calculateDuration(e),this.parent.setRecordValue("autoStartDate",i.startDate,i,!0),this.parent.setRecordValue("autoEndDate",i.endDate,i,!0),this.parent.setRecordValue("autoDuration",this.parent.dataOperation.calculateAutoDuration(e),i,!0),this.parent.dataOperation.updateAutoWidthLeft(e);else{var r=this.parent.dateValidationModule.checkStartDate(t,e.ganttProperties);this.parent.setRecordValue("startDate",r,e.ganttProperties,!0),this.parent.dataOperation.updateMappingData(e,"startDate"),this.parent.dateValidationModule.calculateEndDate(e),this.parent.setRecordValue("taskData."+this.parent.taskFields.manual,e[this.parent.taskFields.manual],e),this.parent.dataOperation.updateWidthLeft(e)}},e.prototype.calculateDateByRoundOffDuration=function(e,t){var n=e,a=n.ganttProperties,s=new Date(t.getTime());if(!i.i(r.isNullOrUndefined)(a.endDate)&&i.i(r.isNullOrUndefined)(a.startDate)){var o=this.parent.dateValidationModule.checkStartDate(s,a,null);this.parent.setRecordValue("endDate",this.parent.dateValidationModule.checkEndDate(o,n.ganttProperties),a,!0)}else this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(s,a,!1),a,!0),i.i(r.isNullOrUndefined)(a.duration)||this.parent.dateValidationModule.calculateEndDate(n);this.parent.dataOperation.updateWidthLeft(e),this.parent.dataOperation.updateTaskData(n)},e.prototype.updateParentProgress=function(e){var t=0,n=this.parent.getParentTask(e),a=n.childRecords,o=a?a.length:0,l=0,d=0,p=0,h=0,u={};if(a){for(var c=0;c<o;c++)a[c].ganttProperties.isMilestone&&!a[c].hasChildRecords||!i.i(s.c)(a[c].ganttProperties)?d+=1:(u=this.parent.dataOperation.getParentProgress(a[c]),l+=i.i(r.getValue)("totalProgress",u),h+=i.i(r.getValue)("totalDuration",u));p=o-d,t=p>0?Math.round(l/h):0,isNaN(t)&&(t=0),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(n.ganttProperties.isAutoSchedule?n.ganttProperties.width:n.ganttProperties.autoWidth,t),n.ganttProperties,!0),this.parent.setRecordValue("progress",Math.floor(t),n.ganttProperties,!0),this.parent.setRecordValue("totalProgress",l,n.ganttProperties,!0),this.parent.setRecordValue("totalDuration",h,n.ganttProperties,!0)}this.parent.dataOperation.updateTaskData(n),n.parentItem&&this.updateParentProgress(n.parentItem)},e.prototype.revertCellEdit=function(e){this.parent.editModule.reUpdatePreviousRecords(!1,!0),this.resetEditProperties()},e.prototype.reUpdatePreviousRecords=function(e,t){for(var i=this.parent.previousRecords,r=Object.keys(i),n=0;n<r.length;n++){var a=r[n],s=i[a],o=this.parent.getTaskByUniqueID(a);this.copyTaskData(o.taskData,s.taskData),delete s.taskData,this.copyTaskData(o.ganttProperties,s.ganttProperties),delete s.ganttProperties,this.copyTaskData(o,s);var l=this.parent.currentViewData.indexOf(o);if(e&&this.parent.chartRowsModule.refreshRow(l),t){var d="ProjectView"===this.parent.viewType?o.ganttProperties.taskId:o.ganttProperties.rowUniqueID;this.parent.treeGrid.grid.setRowData(d,o);this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[l].getAttribute("data-uid")).data=o}}},e.prototype.copyTaskData=function(e,t){i.i(r.isNullOrUndefined)(t)||i.i(r.extend)(e,t)},e.prototype.updateScheduleDatesOnEditing=function(e){},e.prototype.updateChildItems=function(e){var t,n=this.parent.previousRecords[e.uniqueID];t=i.i(r.isNullOrUndefined)(n)||i.i(r.isNullOrUndefined)(n)&&!i.i(r.isNullOrUndefined)(n.ganttProperties)?new Date(e.ganttProperties.startDate.getTime()):new Date(n.ganttProperties.startDate.getTime());var a,o,l,d,p,h=e.ganttProperties.startDate,u=[];if(this.getUpdatableChildRecords(e,u),0!==u.length){t.getTime()>h.getTime()?(a=this.parent.dateValidationModule.checkStartDate(h),o=this.parent.dateValidationModule.checkEndDate(t,e.ganttProperties),d=!1):(a=this.parent.dateValidationModule.checkStartDate(t),o=this.parent.dateValidationModule.checkEndDate(h,e.ganttProperties),d=!0),p=a.getTime()>=o.getTime()?0:this.parent.dateValidationModule.getDuration(a,o,"minute",!0,!1);for(var c=0;c<u.length;c++)if(u[c].ganttProperties.isAutoSchedule)if(p>0){var g=i.i(s.c)(u[c].ganttProperties)?u[c].ganttProperties.startDate:u[c].ganttProperties.startDate?u[c].ganttProperties.startDate:u[c].ganttProperties.endDate?u[c].ganttProperties.endDate:new Date(t.toString());l=d?this.parent.dateValidationModule.getEndDate(this.parent.dateValidationModule.checkStartDate(g,u[c].ganttProperties,u[c].ganttProperties.isMilestone),p,"minute",u[c].ganttProperties,!1):this.parent.dateValidationModule.getStartDate(this.parent.dateValidationModule.checkEndDate(g,u[c].ganttProperties),p,"minute",u[c].ganttProperties),this.calculateDateByRoundOffDuration(u[c],l),this.parent.isOnEdit&&-1===this.validatedChildItems.indexOf(u[c])&&this.validatedChildItems.push(u[c])}else i.i(r.isNullOrUndefined)(n)&&(l=t,this.calculateDateByRoundOffDuration(u[c],l),this.parent.isOnEdit&&-1===this.validatedChildItems.indexOf(u[c])&&this.validatedChildItems.push(u[c]));u.length&&this.parent.dataOperation.updateParentItems(e,!0)}},e.prototype.getUpdatableChildRecords=function(e,t){for(var i=e.childRecords,r=0;r<i.length;r++)i[r].ganttProperties.isAutoSchedule&&(t.push(i[r]),i[r].hasChildRecords&&this.getUpdatableChildRecords(i[r],t))},e.prototype.initiateSaveAction=function(e){var t=this;this.parent.showSpinner();var a={};a.requestType="beforeSave",a.data=e.data,a.cancel=!1,a.modifiedRecords=this.parent.editedRecords,i.i(r.isNullOrUndefined)(e.target)||(a.target=e.target),a.modifiedTaskData=i.i(s.e)(this.parent.editedRecords,!0),e.action&&"DrawConnectorLine"===e.action&&(a.action="DrawConnectorLine"),this.parent.trigger("actionBegin",a,function(r){if(r.cancel)t.reUpdatePreviousRecords(),t.parent.chartRowsModule.refreshRecords([e.data]),t.resetEditProperties(a);else if(r.modifiedTaskData=i.i(s.e)(r.modifiedRecords,null,null,t.parent),i.i(s.f)(t.parent.dataSource)){var o=t.parent.dataSource,l={changedRecords:r.modifiedTaskData},d=t.parent.query instanceof n.Query?t.parent.query:new n.Query,p=null,h=o.adaptor;if(h instanceof n.WebApiAdaptor&&h instanceof n.ODataAdaptor&&!o.dataSource.batchUrl){p=o.update(t.parent.taskFields.id,l.changedRecords,null,d)}else p=o.saveChanges(l,t.parent.taskFields.id,null,d);p.then(function(i){return t.dmSuccess(i,e)}).catch(function(i){return t.dmFailure(i,e)})}else t.saveSuccess(e)})},e.prototype.dmSuccess=function(e,t){this.saveSuccess(t)},e.prototype.dmFailure=function(e,t){if(this.deletedTaskDetails.length){for(var i=this.deletedTaskDetails,r=0;r<i.length;r++)i[r].isDelete=!1;this.deletedTaskDetails=[]}this.reUpdatePreviousRecords(!0,!0),this.resetEditProperties(),this.parent.trigger("actionFailure",{error:e})},e.prototype.updateSharedTask=function(e){for(var t=e.ganttProperties.sharedTaskUniqueIds,n=0;n<t.length;n++){var a=this.parent.flatData[this.parent.ids.indexOf(t[n].toString())];a.uniqueID!==e.uniqueID&&(this.updateGanttProperties(e,a),this.parent.setRecordValue("taskData",e.taskData,a,!0),this.parent.dataOperation.updateTaskData(a),this.parent.dataOperation.updateResourceName(a),i.i(r.isNullOrUndefined)(a.parentItem)||this.parent.dataOperation.updateParentItems(a.parentItem))}},e.prototype.saveSuccess=function(e){var t={};if(this.parent.timelineSettings.updateTimescaleView){var n=this.parent.editedRecords;this.parent.timelineModule.updateTimeLineOnEditing([n],e.action)}if("ResourceView"===this.parent.viewType){"TaskbarEditing"===e.action?this.updateSharedTask(e.data):"DialogEditing"!==e.action&&"CellEditing"!==e.action&&"methodUpdate"!==e.action||(this.parent.editModule.dialogModule.isResourceUpdate?(this.updateResoures(this.parent.editModule.dialogModule.previousResource,e.data.ganttProperties.resourceInfo,e.data),this.updateSharedTask(e.data),this.isTreeGridRefresh=!0):this.updateSharedTask(e.data));for(var a=0;a<this.updateParentRecords.length;a++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[a]);this.updateParentRecords=[],this.parent.editModule.dialogModule.isResourceUpdate=!1,this.parent.editModule.dialogModule.previousResource=[]}if(this.isTreeGridRefresh||(this.parent.chartRowsModule.refreshRecords(this.parent.editedRecords),this.parent.isConnectorLineUpdate&&!i.i(r.isNullOrUndefined)(this.parent.connectorLineEditModule)&&(this.parent.updatedConnectorLineCollection=[],this.parent.connectorLineIds=[],this.parent.connectorLineEditModule.refreshEditedRecordConnectorLine(this.parent.editedRecords),this.updateScheduleDatesOnEditing(e))),!this.parent.editSettings.allowTaskbarEditing||this.parent.editSettings.allowTaskbarEditing&&!this.taskbarEditModule.dependencyCancel){if(t.requestType="save",t.data=e.data,t.modifiedRecords=this.parent.editedRecords,t.modifiedTaskData=i.i(s.e)(this.parent.editedRecords,null,null,this.parent),i.i(r.isNullOrUndefined)(e.action)||i.i(r.setValue)("action",e.action,t),"TaskbarEditing"===e.action&&(t.taskBarEditAction=e.taskBarEditAction),this.endEditAction(e),this.parent.enableCriticalPath){var o=this.parent.criticalPathModule;o.showCriticalPath(!0),o.criticalConnectorLine(o.criticalPathCollection,o.detailPredecessorCollection,!0,o.predecessorCollectionTaskIds)}this.parent.trigger("actionComplete",t)}else this.taskbarEditModule.dependencyCancel=!1,this.resetEditProperties();"ResourceView"===this.parent.viewType&&this.isTreeGridRefresh&&(this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh(),this.isTreeGridRefresh=!1)},e.prototype.updateResoures=function(e,t,i){var r=this.parent.flatData,n=t?t.length:0,a=e?e.length:0;if(0!==n||0!==a){for(var s=0;s<n;s++){var o=[],l=parseInt(t[s][this.parent.resourceFields.id],10).toString();"NaN"===l&&(l=t[s][this.parent.resourceFields.id]);for(var d=0;d<e.length;d++){var p=parseInt(e[d][this.parent.resourceFields.id],10).toString();if("NaN"===p&&(p=e[d][this.parent.resourceFields.id]),p===l){o.push(d);break}}if(0===o.length){var h=r[this.parent.getTaskIds().indexOf("R"+l)];h&&this.addNewRecord(i,h)}else{var u=parseInt(o[0].toString(),10);"NaN"===u.toString()&&(u=o[0].toString()),e.splice(u,1)}}for(var c=e?e.length:0,s=0;s<c;s++)for(var g=i.ganttProperties.taskId,l=e[s][this.parent.resourceFields.id],f=r[this.parent.getTaskIds().indexOf("R"+l)],m=0;m<f.childRecords.length;m++)f.childRecords[m].ganttProperties.taskId===g&&this.removeChildRecord(f.childRecords[m]);if(n>0){var y=this.parent.getParentTask(i.parentItem);y&&y.ganttProperties.taskName===this.parent.localeObj.getConstant("unassignedTask")&&this.removeChildRecord(i)}0===n&&this.checkWithUnassignedTask(i)}},e.prototype.checkWithUnassignedTask=function(e){for(var t=null,n=0;n<this.parent.flatData.length;n++)this.parent.flatData[n].ganttProperties.taskName===this.parent.localeObj.getConstant("unassignedTask")&&(t=this.parent.flatData[n]);if(i.i(r.isNullOrUndefined)(t)){var a={};a[this.parent.taskFields.id]=0,a[this.parent.taskFields.name]=this.parent.localeObj.getConstant("unassignedTask");var s=this.parent.isOnEdit;this.parent.isOnEdit=!1;var o=this.parent.dataOperation.createRecord(a,0);this.parent.isOnEdit=s,this.addRecordAsBottom(o);var l=this.parent.flatData[this.parent.flatData.length-1];this.addNewRecord(e,l)}else this.addNewRecord(e,t)},e.prototype.addRecordAsBottom=function(e){var t=this.parent.flatData.length;this.parent.currentViewData.splice(t+1,0,e),this.parent.flatData.splice(t+1,0,e),this.parent.ids.splice(t+1,0,e.ganttProperties.rowUniqueID.toString());var i=0===e.level?"R"+e.ganttProperties.taskId:"T"+e.ganttProperties.taskId;this.parent.getTaskIds().splice(t+1,0,i),this.updateTreeGridUniqueID(e,"add")},e.prototype.addNewRecord=function(e,t){var n=null;n=i.i(r.extend)({},{},e,!0),this.parent.setRecordValue("uniqueID",i.i(a.getUid)(this.parent.element.id+"_data_"),n),this.parent.setRecordValue("uniqueID",n.uniqueID,n.ganttProperties,!0);var s=n.uniqueID.replace(this.parent.element.id+"_data_","");this.parent.setRecordValue("rowUniqueID",s,n),this.parent.setRecordValue("rowUniqueID",s,n.ganttProperties,!0),this.parent.setRecordValue("level",1,n),this.parent.taskFields.parentID&&this.parent.setRecordValue("parentId",t.ganttProperties.taskId,n.ganttProperties,!0),this.parent.setRecordValue("parentItem",this.parent.dataOperation.getCloneParent(t),n);var o=n.parentItem?n.parentItem.uniqueID:null;this.parent.setRecordValue("parentUniqueID",o,n),e.ganttProperties.sharedTaskUniqueIds.push(s),n.ganttProperties.sharedTaskUniqueIds=e.ganttProperties.sharedTaskUniqueIds,this.addRecordAsChild(t,n)},e.prototype.removeChildRecord=function(e){var t=this.parent,i=[];i=this.parent.dataSource instanceof n.DataManager&&this.parent.dataSource.dataSource.json.length>0?this.parent.dataSource.dataSource.json:this.parent.currentViewData;var r=this.parent.dataSource,a=e,s=this.parent.getParentTask(a.parentItem);if(a){if(a.parentItem){var o=s?s.childRecords:[],l=0;o&&o.length>0&&(1===o.length&&(this.parent.isOnDelete=!0,o[0].isDelete=!0,this.parent.dataOperation.updateParentItems(s),this.parent.isOnDelete=!1,o[0].isDelete=!1),l=o.indexOf(a),s.childRecords.splice(l,1),this.updateParentRecords.push(s))}if(a.ganttProperties.sharedTaskUniqueIds.length){var d=a.ganttProperties.sharedTaskUniqueIds.indexOf(a.ganttProperties.rowUniqueID);a.ganttProperties.sharedTaskUniqueIds.splice(d,1)}if(this.updateTreeGridUniqueID(a,"delete"),!this.parent.taskFields.parentID){var p=[];p.push(a.ganttProperties.rowUniqueID.toString()),this.parent.editModule.removeFromDataSource(p)}var h=this.parent.flatData.indexOf(a);if(t.taskFields.parentID){for(var u=void 0,c=this.parent.currentViewData,g=0;g<c.length;g++)c[g].ganttProperties.rowUniqueID===a.ganttProperties.rowUniqueID&&(u=g);-1!==u&&(r.length>0&&r.splice(u,1),i.splice(u,1),this.parent.flatData.splice(h,1),this.parent.ids.splice(h,1),this.parent.getTaskIds().splice(h,1))}var f=i.indexOf(a);if(!t.taskFields.parentID){var m=this.parent.editModule.getChildCount(a,0);i.splice(f,m+1),this.parent.flatData.splice(h,m+1),this.parent.ids.splice(h,m+1),this.parent.getTaskIds().splice(h,m+1)}a.parentItem&&s&&s.childRecords&&!s.childRecords.length&&(this.parent.setRecordValue("expanded",!1,s),this.parent.setRecordValue("hasChildRecords",!1,s))}},e.prototype.addRecordAsChild=function(e,t){var n,a=this.parent,s=this.parent.flatData.indexOf(e),o=this.parent.editModule.getChildCount(e,0);if(!i.i(r.isNullOrUndefined)(this.addRowIndex)&&this.addRowPosition&&e.childRecords&&"Child"!==this.addRowPosition){var l=e.childRecords[this.addRowIndex],d="Above"===this.addRowPosition||"Below"===this.addRowPosition?this.addRowPosition:"Child";n=l?this.addRowIndex+s+1:o+s+1,n="Above"===d?n:n+1}else n=i.i(r.isNullOrUndefined)(o)||0===o?s+1:o+s+1;this.parent.currentViewData.splice(n,0,t),this.parent.flatData.splice(n,0,t),this.parent.ids.splice(n,0,t.ganttProperties.rowUniqueID.toString()),this.updateTreeGridUniqueID(t,"add");var p=0===t.level?"R"+t.ganttProperties.taskId:"T"+t.ganttProperties.taskId;this.parent.getTaskIds().splice(n,0,p),e.hasChildRecords||(this.parent.setRecordValue("hasChildRecords",!0,e),this.parent.setRecordValue("expanded",!0,e),e.childRecords.length||(e.childRecords=[],!a.taskFields.parentID&&i.i(r.isNullOrUndefined)(e.taskData[this.parent.taskFields.child])&&(e.taskData[this.parent.taskFields.child]=[]))),e.childRecords.splice(e.childRecords.length,0,t),i.i(r.isNullOrUndefined)(t)||this.parent.taskFields.parentID||i.i(r.isNullOrUndefined)(e.taskData[this.parent.taskFields.child])||e.taskData[this.parent.taskFields.child].splice(e.childRecords.length,0,t.taskData),i.i(r.isNullOrUndefined)(t.parentItem)||this.updateParentRecords.push(e)},e.prototype.resetEditProperties=function(e){this.parent.currentEditedArgs={},this.resetValidateArgs(),this.parent.editedTaskBarItem=null,this.parent.isOnEdit=!1,this.validatedChildItems=[],this.parent.isConnectorLineUpdate=!1,this.parent.editedTaskBarItem=null,this.taskbarMoved=!1,this.predecessorUpdated=!1,i.i(r.isNullOrUndefined)(this.dialogModule)||!i.i(r.isNullOrUndefined)(e)&&(i.i(r.isNullOrUndefined)(e)||"beforeSave"!==e.requestType||e.cancel)||(this.dialogModule.dialog&&!this.dialogModule.dialogObj.isDestroyed&&this.dialogModule.dialogObj.hide(),this.dialogModule.dialogClose()),this.parent.hideSpinner(),this.parent.initiateEditAction(!1)},e.prototype.endEditAction=function(e){this.resetEditProperties(),"TaskbarEditing"===e.action?this.parent.trigger("taskbarEdited",e):"CellEditing"===e.action?this.parent.trigger("endEdit",e):"DialogEditing"===e.action&&(this.dialogModule.dialog&&!this.dialogModule.dialogObj.isDestroyed&&this.dialogModule.dialogObj.hide(),this.dialogModule.dialogClose())},e.prototype.saveFailed=function(e){this.reUpdatePreviousRecords(),this.parent.hideSpinner()},e.prototype.renderDeleteConfirmDialog=function(){var e=new p.Dialog({width:"320px",isModal:!0,visible:!1,content:this.parent.localeObj.getConstant("confirmDelete"),buttons:[{click:this.confirmDeleteOkButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("okText"),isPrimary:!0}},{click:this.closeConfirmDialog.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("cancel")}}],target:this.parent.element,animationSettings:{effect:"None"}});e.appendTo("#"+this.parent.element.id+"_deleteConfirmDialog"),this.confirmDialog=e},e.prototype.closeConfirmDialog=function(){this.confirmDialog.hide()},e.prototype.confirmDeleteOkButton=function(){this.deleteSelectedItems(),this.confirmDialog.hide(),this.parent.element.querySelector(".e-treegrid").focus()},e.prototype.startDeleteAction=function(){if(this.parent.editSettings.allowDeleting&&!this.parent.readOnly)if(this.parent.editSettings.showDeleteConfirmDialog)this.confirmDialog.show();else{this.deleteSelectedItems();var e=this.parent.element.querySelector(".e-treegrid");e.focus()}},e.prototype.deleteResourceRecords=function(e){for(var t=[],i=this,r=0;r<e.length;r++)!function(r){if(e[r].parentItem){for(var n=e[r],a=n.ganttProperties.sharedTaskUniqueIds,s=0;s<a.length;s++)t.push(i.parent.flatData[i.parent.ids.indexOf(a[s].toString())]);t.push(i.parent.flatData[i.parent.ids.indexOf(n.ganttProperties.rowUniqueID)])}else{var o=i.parent.flatData.filter(function(t){return parseInt(t.ganttProperties.taskId)==parseInt(e[r].ganttProperties.taskId)&&t.hasChildRecords})[0];t.push(o)}}(r);this.deleteRow(t)},e.prototype.deleteSelectedItems=function(){if(this.isFromDeleteMethod)this.targetedRecords.length&&("ResourceView"===this.parent.viewType?this.deleteResourceRecords(this.targetedRecords):this.deleteRow(this.targetedRecords)),this.isFromDeleteMethod=!1;else{var e=[];"Cell"!==this.parent.selectionSettings.mode?e=this.parent.selectionModule.getSelectedRecords():"Cell"===this.parent.selectionSettings.mode&&(e=this.parent.selectionModule.getCellSelectedRecords()),"ResourceView"===this.parent.viewType?this.deleteResourceRecords(e):this.deleteRow(e)}},e.prototype.deleteRecord=function(e){this.isFromDeleteMethod=!0;var t=typeof e;switch(this.targetedRecords=[],t){case"number":case"string":var n=e.toString();"ResourceView"===this.parent.viewType?i.i(r.isNullOrUndefined)(n)||-1===this.parent.getTaskIds().indexOf("T"+n)||this.targetedRecords.push(this.parent.flatData[this.parent.getTaskIds().indexOf("T"+n)]):i.i(r.isNullOrUndefined)(n)||-1===this.parent.ids.indexOf(n)||this.targetedRecords.push(this.parent.getRecordByID(n));break;case"object":Array.isArray(e)?this.updateTargetedRecords(e):this.targetedRecords.push(e.valueOf())}this.startDeleteAction()},e.prototype.updateTargetedRecords=function(e){if(e.length){if("object"===typeof e[0])this.targetedRecords=e;else for(var t=0;t<e.length;t++){var n=e[t].toString();"ResourceView"===this.parent.viewType?i.i(r.isNullOrUndefined)(n)||-1===this.parent.getTaskIds().indexOf("T"+n)||this.targetedRecords.push(this.parent.flatData[this.parent.getTaskIds().indexOf("T"+n)]):i.i(r.isNullOrUndefined)(n)||-1===this.parent.ids.indexOf(n)||this.targetedRecords.push(this.parent.getRecordByID(n))}}},e.prototype.deleteRow=function(e){var t=e&&e.length?e:this.parent.selectionModule.getSelectedRecords();if(this.parent.addDeleteRecord=!0,t.length){this.parent.isOnDelete=!0,t.forEach(function(e){e.isDelete=!0}),"ResourceView"!==this.parent.viewType||e.length||(t=[]);for(var n=0;n<t.length;n++){var a=t[n];if(-1===this.deletedTaskDetails.indexOf(a)){if(a.parentItem){var s=this.parent.getParentTask(a.parentItem).childRecords;(1===s.length?s:s.filter(function(e){return!e.isDelete})).length>0&&this.parent.dataOperation.updateParentItems(a.parentItem)}var o=a.ganttProperties.predecessor;o&&o.length&&this.removePredecessorOnDelete(a),this.deletedTaskDetails.push(a),a.hasChildRecords&&this.deleteChildRecords(a)}}this.parent.selectionModule&&this.parent.allowSelection&&this.parent.selectionModule.clearSelection();var l={};l.deletedRecordCollection=this.deletedTaskDetails,l.updatedRecordCollection=this.parent.editedRecords,l.cancel=!1,l.action="delete",this.initiateDeleteAction(l),this.parent.isOnDelete=!1}i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.removePredecessorOnDelete=function(e){for(var t=e.ganttProperties.predecessor,n=0;n<t.length;n++){var a=t[n],s="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(a.from.toString()===s.toString()){var o=this.parent.connectorLineModule.getRecordByID(a.to.toString());if(!i.i(r.isNullOrUndefined)(o)){for(var l=i.i(r.extend)([],[],o.ganttProperties.predecessor,!0),d=void 0,p=0;p<l.length;p++){var h="ResourceView"===this.parent.viewType?o.ganttProperties.taskId:o.ganttProperties.rowUniqueID;if(l[p].to.toString()===h.toString()&&l[p].from.toString()===s.toString()){d=p;break}}l.splice(d,1),this.updatePredecessorValues(o,l)}}else if(a.to.toString()===s.toString()){var u=this.parent.connectorLineModule.getRecordByID(a.from.toString());if(!i.i(r.isNullOrUndefined)(u)){for(var c=i.i(r.extend)([],[],u.ganttProperties.predecessor,!0),d=void 0,p=0;p<c.length;p++){var g="ResourceView"===this.parent.viewType?u.ganttProperties.taskId:u.ganttProperties.rowUniqueID;if(c[p].from.toString()===g.toString()&&c[p].to.toString()===s.toString()){d=p;break}}c.splice(d,1),this.updatePredecessorValues(u,c)}}}},e.prototype.updatePredecessorValues=function(e,t){this.parent.setRecordValue("predecessor",t,e.ganttProperties,!0);var i=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("predecessorsName",i,e.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,i,e),this.parent.setRecordValue(this.parent.taskFields.dependency,i,e)},e.prototype.updateTaskId=function(e,t){if(!this.parent.readOnly){var n="number"==typeof e?e.toString():e,a="number"==typeof t?t.toString():t,s=this.parent.ids;if(!i.i(r.isNullOrUndefined)(n)&&!i.i(r.isNullOrUndefined)(a)){var o=s.indexOf(n),l=s.indexOf(a);if(-1===o||l>-1)return;var d=this.parent.flatData[o];if(d.ganttProperties.taskId=d.ganttProperties.rowUniqueID=a,d.taskData[this.parent.taskFields.id]=a,d[this.parent.taskFields.id]=a,s[o]=a,d.hasChildRecords&&this.parent.taskFields.parentID)for(var p=d.childRecords,h=0;h<p.length;h++){var u=p[h];u[this.parent.taskFields.parentID]=t,this.parent.chartRowsModule.refreshRecords([u])}if(this.parent.taskFields.dependency&&!i.i(r.isNullOrUndefined)(d.ganttProperties.predecessor))for(var c=d.ganttProperties.predecessor,g=void 0,f=0;f<c.length;f++){var m=c[f];m.to===n?g=this.parent.flatData[s.indexOf(m.from)]:m.from===n&&(g=this.parent.flatData[s.indexOf(m.to)]),this.updatePredecessorOnUpdateId(g,n,a)}this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh()}}},e.prototype.updatePredecessorOnUpdateId=function(e,t,i){if(this.parent.flatData.indexOf(e)>-1)for(var r=e.ganttProperties.predecessor,n=0;n<r.length;n++){var a=r[n];a.to===t?a.to=i:a.from===t&&(a.from=i)}this.updatePredecessorValues(e,e.ganttProperties.predecessor)},e.prototype.deleteChildRecords=function(e){for(var t=e.childRecords,i=0;i<t.length;i++){var r=t[i];if(-1===this.deletedTaskDetails.indexOf(r)){var n=r.ganttProperties.predecessor;n&&n.length&&this.removePredecessorOnDelete(r),this.deletedTaskDetails.push(r),r.hasChildRecords&&this.deleteChildRecords(r)}}},e.prototype.removeFromDataSource=function(e){var t;t=this.parent.dataSource instanceof n.DataManager?this.parent.dataSource.dataSource.json:this.parent.dataSource,this.removeData(t,e),this.isBreakLoop=!1},e.prototype.removeData=function(e,t){for(var n=0;n<e.length&&!this.isBreakLoop;n++)if(-1!==t.indexOf(i.i(r.getValue)(this.parent.taskFields.id,e[n]).toString())){if(e[n][this.parent.taskFields.child]){var a=e[n][this.parent.taskFields.child];this.removeData(a,t)}if(t.splice(t.indexOf(i.i(r.getValue)(this.parent.taskFields.id,e[n]).toString()),1),e.splice(n,1),0===t.length){this.isBreakLoop=!0;break}}else if(e[n][this.parent.taskFields.child]){var a=e[n][this.parent.taskFields.child];this.removeData(a,t)}},e.prototype.initiateDeleteAction=function(e){var t=this;this.parent.showSpinner();var r={};r.requestType="beforeDelete",r.data=e.deletedRecordCollection,r.modifiedRecords=e.updatedRecordCollection,r.modifiedTaskData=i.i(s.e)(e.updatedRecordCollection,null,null,this.parent),this.parent.trigger("actionBegin",r,function(r){if(r.cancel){for(var a=t.deletedTaskDetails,o=0;o<a.length;o++)a[o].isDelete=!1;t.deletedTaskDetails=[],t.reUpdatePreviousRecords(),t.parent.initiateEditAction(!1),t.parent.hideSpinner()}else if(i.i(s.f)(t.parent.dataSource)){var l=t.parent.dataSource;t.parent.timezone&&i.i(s.g)(r.modifiedTaskData,t.parent);var d={deletedRecords:i.i(s.e)(r.data,null,null,t.parent),changedRecords:r.modifiedTaskData},p=l.adaptor,h=t.parent.query instanceof n.Query?t.parent.query:new n.Query;if(p instanceof n.WebApiAdaptor&&p instanceof n.ODataAdaptor&&!l.dataSource.batchUrl){for(var u=null,c=0;c<d.deletedRecords.length;c++)u=l.remove(t.parent.taskFields.id,d.deletedRecords[c],null,h);u.then(function(){l.update(t.parent.taskFields.id,d.changedRecords,null,h).then(function(){return t.deleteSuccess(e)}).catch(function(i){return t.dmFailure(i,e)})}).catch(function(i){return t.dmFailure(i,e)})}else{var g=l.saveChanges(d,t.parent.taskFields.id,null,h);g.then(function(){return t.deleteSuccess(e)}).catch(function(i){return t.dmFailure(i,e)})}}else t.deleteSuccess(e)})},e.prototype.deleteSuccess=function(e){var t=this.parent.flatData,n=this.parent.currentViewData,a=this.parent.getRecordFromFlatdata(e.deletedRecordCollection),o=[];a.length>0&&(this.parent.selectedRowIndex=a[a.length-1].index);for(var l=0;l<a.length;l++){var d=a[l],p=n.indexOf(d),h=t.indexOf(d),u=this.parent.treeGrid.parentData.indexOf(d),c=i.i(r.getValue)("dataOperation.dataArray",this.parent),g=c.indexOf(d.taskData),f=void 0;if(-1!==p&&n.splice(p,1),-1!==h&&t.splice(h,1),-1!==g&&c.splice(g,1),!i.i(r.isNullOrUndefined)(d)){if(o.push(d.ganttProperties.taskId.toString()),-1!==h&&(this.parent.ids.splice(h,1),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(h,1)),0===d.level&&-1!==u&&this.parent.treeGrid.parentData.splice(u,1),d.parentItem){var m=this.parent.getParentTask(d.parentItem);if(m){var y=m.childRecords;f=y.indexOf(d),-1!==f&&y.splice(f,1),y.length||this.parent.setRecordValue("hasChildRecords",!1,m)}}this.updateTreeGridUniqueID(d,"delete")}}o.length>0&&this.removeFromDataSource(o);var v={};if(this.parent.updatedConnectorLineCollection=[],this.parent.connectorLineIds=[],this.parent.predecessorModule.createConnectorLinesCollection(this.parent.flatData),this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh(),this.parent.enableImmutableMode&&this.refreshRecordInImmutableMode(),v.requestType="delete",v.data=e.deletedRecordCollection,v.modifiedRecords=e.updatedRecordCollection,v.modifiedTaskData=i.i(s.e)(e.updatedRecordCollection,null,null,this.parent),i.i(r.setValue)("action",e.action,v),this.parent.isOnDelete=!1,"ResourceView"===this.parent.viewType)for(var D=v.data.filter(function(e){return!e.hasChildRecords}),l=0;l<D.length;l++)this.checkWithUnassignedTask(D[l]);this.parent.trigger("actionComplete",v),this.deletedTaskDetails=[],this.parent.initiateEditAction(!1),this.parent.hideSpinner()},e.prototype.getNewTaskId=function(){var e="ResourceView"===this.parent.viewType?this.parent.getTaskIds():this.parent.ids,t=e.length,i=t+1;if("ResourceView"===this.parent.viewType){if((-1!==e.indexOf("T"+i)||-1!==e.indexOf("R"+i))&&(i+=1,-1!==e.indexOf("T"+i)||-1!==e.indexOf("R"+i)))do{i+=1}while(-1!==e.indexOf("T"+i)||-1!==e.indexOf("R"+i))}else if(-1!=e.indexOf(i.toString())&&(i+=1,-1!=e.indexOf(i.toString())))do{i+=1}while(-1!=e.indexOf(i.toString()));return"stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType?i=i.toString():i},e.prototype.prepareNewlyAddedData=function(e,t){var n,a,s=this.parent.taskFields,o=this.parent.ids;if(e[s.id]&&(-1!==o.indexOf(e[s.id].toString())?e[s.id]=null:(a="string"==typeof e[s.id]?e[s.id]:parseInt(e[s.id],10),e[s.id]=i.i(r.isNullOrUndefined)(a)?null:a)),e[s.id]||(n=this.getNewTaskId(),e[s.id]=n),this.parent.allowUnscheduledTasks||e[s.startDate]||(e[s.startDate]=this.parent.projectStartDate),!this.parent.allowUnscheduledTasks&&s.duration&&i.i(r.isNullOrUndefined)(e[s.duration])&&(e[s.endDate]||(e[s.duration]="5")),s.progress&&(e[s.progress]=e[s.progress]?e[s.progress]>100?100:e[s.progress]:0),!this.parent.allowUnscheduledTasks&&!e[s.endDate]&&s.endDate&&!e[s.duration]){var l=this.parent.dataOperation.getDateFromFormat(this.parent.projectStartDate);l.setDate(l.getDate()+4),e[s.endDate]=this.parent.getFormatedDate(l,this.parent.getDateFormat())}},e.prototype.updateNewlyAddedDataBeforeAjax=function(e,t,n,a){var s=this.parent.dataOperation.createRecord(e,t);if(s.index=parseInt(s.ganttProperties.rowUniqueID.toString(),10)-1,!i.i(r.isNullOrUndefined)(a)){this.parent.setRecordValue("parentItem",this.parent.dataOperation.getCloneParent(a),s);var o=s.parentItem?s.parentItem.index:null;this.parent.setRecordValue("parentIndex",o,s);var l=s.parentItem?s.parentItem.uniqueID:null;this.parent.setRecordValue("parentUniqueID",l,s),i.i(r.isNullOrUndefined)(this.parent.taskFields.id)||i.i(r.isNullOrUndefined)(this.parent.taskFields.parentID)||!s.parentItem||("ProjectView"===this.parent.viewType&&this.parent.setRecordValue(this.parent.taskFields.parentID,s.parentItem.taskId,s.taskData,!0),this.parent.setRecordValue("parentId",s.parentItem.taskId,s.ganttProperties,!0),this.parent.setRecordValue(this.parent.taskFields.parentID,s.parentItem.taskId,s,!0))}return this.parent.isOnEdit=!0,this.backUpAndPushNewlyAddedRecord(s,n,a),this.parent.taskFields.dependency&&s.ganttProperties.predecessorsName&&(this.parent.predecessorModule.ensurePredecessorCollectionHelper(s,s.ganttProperties),this.parent.predecessorModule.updatePredecessorHelper(s),this.parent.predecessorModule.validatePredecessorDates(s)),s.parentItem&&this.parent.getParentTask(s.parentItem).ganttProperties.isAutoSchedule&&this.parent.dataOperation.updateParentItems(s.parentItem),this.parent.isOnEdit=!1,s},e.prototype.getChildCount=function(e,t){var i;if(!e.hasChildRecords)return 0;for(var r=0;r<e.childRecords.length;r++)i=e.childRecords[r],t++,i.hasChildRecords&&(t=this.getChildCount(i,t));return t},e.prototype.getVisibleChildRecordCount=function(e,t,i){var r,n;if(e.hasChildRecords){r=e.childRecords,n=r.length;for(var a=0;a<n;a++)-1!==i.indexOf(r[a])&&t++,r[a].hasChildRecords&&(t=this.getVisibleChildRecordCount(r[a],t,i))}else-1!==i.indexOf(e)&&t++;return t},e.prototype.updatePredecessorOnIndentOutdent=function(e){for(var t,n,a=e.ganttProperties.predecessor.length,o=e.ganttProperties,l=o.predecessor,d=[],p=0;p<a;p++)if(l[p].to===o.rowUniqueID.toString()){t=this.parent.getRecordByID(l[p].from),n=i.i(s.h)(l[p],"from",t.ganttProperties.predecessor,"to");var h=i.i(r.extend)([],t.ganttProperties.predecessor,[],!0);h.splice(n,1),this.parent.setRecordValue("predecessor",h,t.ganttProperties,!0)}else if(l[p].from===o.rowUniqueID.toString()){t=this.parent.getRecordByID(l[p].to);var u=t.ganttProperties.predecessorsName.toString().split(","),c=l[p].from+l[p].type,g=u.indexOf(c);u.splice(g,1),this.parent.setRecordValue("predecessorsName",u.join(","),t.ganttProperties,!0),this.parent.setRecordValue(this.parent.taskFields.dependency,u.join(","),t),n=i.i(s.h)(l[p],"from",t.ganttProperties.predecessor,"to");var f=i.i(r.extend)([],t.ganttProperties.predecessor,[],!0);f.splice(n,1),this.parent.setRecordValue("predecessor",f,t.ganttProperties,!0),this.parent.predecessorModule.validatePredecessorDates(t)}this.parent.setRecordValue("predecessor",d,e.ganttProperties,!0),this.parent.setRecordValue("predecessorsName","",e.ganttProperties,!0)},e.prototype.predecessorToString=function(e,t){var i=[],r=0,n=e.length;for(r;r<n;r++)if(t.ganttProperties.rowUniqueID.toString()!==e[r].from){var a=e[r].from+e[r].type;e[r].offset=isNaN(e[r].offset)?0:e[r].offset,0!==e[r].offset&&(e[r].offset<0?a+=e[r].offset.toString()+"d":e[r].offset>0&&(a+="+"+e[r].offset.toString()+"d")),i.push(a)}return i.join(",")},e.prototype.backUpAndPushNewlyAddedRecord=function(e,t,n){var a,s,o,l=this.parent.flatData,d=this.parent.currentViewData,p=this.parent.ids;switch(t){case"Top":l.splice(0,0,e),d.splice(0,0,e),p.splice(0,0,e.ganttProperties.rowUniqueID.toString());break;case"Bottom":if(l.push(e),d.push(e),p.push(e.ganttProperties.rowUniqueID.toString()),"ResourceView"===this.parent.viewType){var h=0===e.level?"R"+e.ganttProperties.taskId:"T"+e.ganttProperties.taskId;this.parent.getTaskIds().push(h)}break;case"Above":s=l.indexOf(this.addRowSelectedItem),o=d.indexOf(this.addRowSelectedItem),this.recordCollectionUpdate(void 0,s,o,e,n,t);break;case"Below":if(a=l.indexOf(this.addRowSelectedItem),this.addRowSelectedItem.hasChildRecords){var u=this.getChildCount(this.addRowSelectedItem,0);s=a+u+1,o=d.indexOf(this.addRowSelectedItem)+this.getVisibleChildRecordCount(this.addRowSelectedItem,0,d)+1}else s=a+1,o=d.indexOf(this.addRowSelectedItem)+1;this.recordCollectionUpdate(NaN,s,o,e,n,t);break;case"Child":if(a=l.indexOf(this.addRowSelectedItem),this.addRowSelectedItem.hasChildRecords){var u=this.getChildCount(this.addRowSelectedItem,0);s=a+u+1,this.addRowSelectedItem.expanded||this.parent.enableMultiTaskbar||this.parent.expandByID(this.addRowSelectedItem.ganttProperties.rowUniqueID),o=d.indexOf(this.addRowSelectedItem)+this.getVisibleChildRecordCount(this.addRowSelectedItem,0,d)+1}else this.parent.setRecordValue("hasChildRecords",!0,this.addRowSelectedItem),this.parent.setRecordValue("isMilestone",!1,this.addRowSelectedItem.ganttProperties,!0),this.parent.setRecordValue("expanded",!0,this.addRowSelectedItem),this.parent.setRecordValue("childRecords",[],this.addRowSelectedItem),s=a+1,o=d.indexOf(this.addRowSelectedItem)+1,this.addRowSelectedItem.ganttProperties.predecessor&&this.updatePredecessorOnIndentOutdent(this.addRowSelectedItem),i.i(r.isNullOrUndefined)(this.addRowSelectedItem.ganttProperties.segments)||(this.addRowSelectedItem.ganttProperties.segments=null);this.recordCollectionUpdate(NaN,s,o,e,n,t)}this.newlyAddedRecordBackup=e},e.prototype.recordCollectionUpdate=function(e,t,a,s,o,l){var d=this.parent.flatData,p=this.parent.currentViewData,h=this.parent.ids;if(d.splice(t,0,s),p.splice(a,0,s),"ResourceView"===this.parent.viewType&&"number"==typeof s.ganttProperties.taskId){var u=s.ganttProperties.taskId;h.push(u.toString())}if(h.splice(t,0,s.ganttProperties.rowUniqueID.toString()),"ResourceView"===this.parent.viewType){var c=0===s.level?"R"+s.ganttProperties.taskId:"T"+s.ganttProperties.taskId;this.parent.getTaskIds().splice(t,0,c)}if(!i.i(r.isNullOrUndefined)(o)&&(e="Above"==l?o.childRecords.indexOf(this.addRowSelectedItem):"Below"==l?o.childRecords.indexOf(this.addRowSelectedItem)+1:o.childRecords.length,o.childRecords.splice(e,0,s),this.parent.taskFields.child||(this.parent.taskFields.child="Children"),this.parent.dataSource instanceof n.DataManager&&i.i(r.isNullOrUndefined)(o.taskData[this.parent.taskFields.parentID])||!i.i(r.isNullOrUndefined)(this.parent.dataSource))){var g=this.parent.taskFields.child;o.taskData[g]&&o.taskData[g].length>0?"Above"===l||"Below"===l?o.taskData[g].splice(e,0,s.taskData):o.taskData[g].push(s.taskData):(o.taskData[g]=[],o.taskData[g].push(s.taskData))}},e.prototype.constructTaskAddedEventArgs=function(e,t,r){var n={};if(n.action=n.requestType=r,e.length>1){n.data=[],n.newTaskData=[],n.recordIndex=[];for(var a=0;a<e.length;a++)n.data[a]=e[a],n.newTaskData[a]=i.i(s.e)([e[a]],n.data[a],n,this.parent),n.recordIndex[a]=e[a].index}else if(1===e.length)for(var a=0;a<e.length;a++)n.data=e[a],n.newTaskData=i.i(s.e)([e[a]],n.data,n,this.parent),n.recordIndex=e[a].index;return n.modifiedRecords=t,n.modifiedTaskData=i.i(s.e)(t,null,null,this.parent),n},e.prototype.addSuccess=function(e){this.parent.treeGrid.parentData=[],this.parent.addDeleteRecord=!0,this.parent.selectedRowIndex=0,this.parent.treeGrid.refresh(),this.parent.enableImmutableMode&&(this.parent.modifiedRecords=e.modifiedRecords,this.parent.modifiedRecords.push(e.data),this.refreshRecordInImmutableMode())},e.prototype.refreshRecordInImmutableMode=function(e,t){if(!t&&!i.i(r.isNullOrUndefined)(e))for(var n=e[0].index+1;n<this.parent.currentViewData.length&&e[0].level<this.parent.currentViewData[n].level;n++)this.parent.modifiedRecords.push(this.parent.currentViewData[n]);for(var a,s=this,n=0;n<this.parent.modifiedRecords.length;n++)!function(e){var t=s.parent.modifiedRecords[e],i=s.parent.allowRowDragAndDrop?1:0,r=s.parent.taskFields.id;a=s.parent.currentViewData.findIndex(function(e){return e[r]==t[r]}),s.parent.treeGrid.getRows()[a]&&(s.parent.treeGrid.renderModule.cellRender({data:t,cell:s.parent.treeGrid.getRows()[a].cells[s.parent.treeColumnIndex+i],column:s.parent.treeGrid.grid.getColumns()[s.parent.treeColumnIndex],requestType:"rowDragAndDrop"}),s.parent.treeGrid.renderModule.RowModifier({data:t,row:s.parent.treeGrid.getRows()[a],rowHeight:s.parent.rowHeight}))}(n)},e.prototype.updateRealDataSource=function(e,t){var a=this.parent.taskFields,o=i.i(s.i)(this.parent)?i.i(r.getValue)("result",this.parent.dataSource):this.parent.dataSource;this.parent.dataSource instanceof n.DataManager&&(o=this.parent.dataSource.dataSource.json);for(var l=0;l<e.length;l++)(i.i(r.isNullOrUndefined)(t)||i.i(r.isNullOrUndefined)(this.addRowSelectedItem))&&(t="Bottom"===t?"Bottom":"Top"),"Top"===t?o.splice(0,0,e[l].taskData):"Bottom"===t?o.push(e[l].taskData):i.i(r.isNullOrUndefined)(a.id)||i.i(r.isNullOrUndefined)(a.parentID)?i.i(r.isNullOrUndefined)(e[l].parentItem)&&this.addDataInRealDataSource(o,e[l].taskData,t):o.push(e[l].taskData),this.isBreakLoop=!1},e.prototype.addDataInRealDataSource=function(e,t,n){for(var a=0;a<e.length;a++){var s=this.parent.taskFields.child;if(this.isBreakLoop)break;if(i.i(r.getValue)(this.parent.taskFields.id,e[a]).toString()===this.addRowSelectedItem.ganttProperties.rowUniqueID.toString()){"Above"===n?e.splice(a,0,t):"Below"===n?e.splice(a+1,0,t):"Child"===n&&(e[a][s]&&e[a][s].length>0?e[a][s].push(t):(e[a][s]=[],e[a][s].push(t))),this.isBreakLoop=!0;break}if(e[a][s]){var o=e[a][s];this.addDataInRealDataSource(o,t,n)}}},e.prototype.addRecord=function(e,t,a){var o=this,l=this.parent.taskFields.id;if(this.parent.editModule&&this.parent.editSettings.allowAdding){this.parent.isDynamicData=!0;var d=[];if(i.i(r.isNullOrUndefined)(e))this.validateTaskPosition(e,t,a,d);else if(e instanceof Array)for(var p=0;p<e.length;p++)this.validateTaskPosition(e[p],t,a,d);else{if("object"!=typeof e)return;this.validateTaskPosition(e,t,a,d)}var h={};h=this.constructTaskAddedEventArgs(d,this.parent.editedRecords,"beforeAdd"),this.parent.showSpinner(),this.parent.trigger("actionBegin",h,function(e){if(i.i(r.isNullOrUndefined)(e.data[l])||e.data[l]!=e.data.ganttProperties.taskId&&(e.data.ganttProperties.taskId=e.data[l],e.newTaskData[l]=e.data[l]),e.cancel)e=e,o.removeAddedRecord(),o.reUpdatePreviousRecords(),o._resetProperties();else if(i.i(s.f)(o.parent.dataSource)){var a=o.parent.dataSource,p={addedRecords:[e.newTaskData],changedRecords:e.modifiedTaskData},h=e.data.ganttProperties.taskId.toString(),u=o.parent.query instanceof n.Query?o.parent.query:new n.Query,c=a.adaptor;if(c instanceof n.WebApiAdaptor&&c instanceof n.ODataAdaptor&&!a.dataSource.batchUrl){var g=a.insert(p.addedRecords,null,u);g.then(function(t){var n;n=i.i(r.isNullOrUndefined)(t[0])?p.addedRecords[0]:t[0],a.update(o.parent.taskFields.id,p.changedRecords,null,u).then(function(){if(o.parent.taskFields.id&&!i.i(r.isNullOrUndefined)(n[o.parent.taskFields.id])&&n[o.parent.taskFields.id].toString()!==h){o.parent.setRecordValue("taskId",n[o.parent.taskFields.id],e.data.ganttProperties,!0),o.parent.setRecordValue("taskData."+o.parent.taskFields.id,n[o.parent.taskFields.id],e.data),o.parent.setRecordValue(o.parent.taskFields.id,n[o.parent.taskFields.id],e.data),o.parent.setRecordValue("rowUniqueID",n[o.parent.taskFields.id].toString(),e.data.ganttProperties,!0);var t=o.parent.ids.indexOf(h);-1!==t&&(o.parent.ids[t]=n[o.parent.taskFields.id].toString())}o.updateNewRecord(d,e)}).catch(function(t){o.removeAddedRecord(),o.dmFailure(t,e),o._resetProperties()})}).catch(function(t){o.removeAddedRecord(),o.dmFailure(t,e),o._resetProperties()})}else{var f=a.saveChanges(p,o.parent.taskFields.id,null,u);f.then(function(t){if(o.parent.taskFields.id&&!i.i(r.isNullOrUndefined)(t.addedRecords[0][o.parent.taskFields.id])&&t.addedRecords[0][o.parent.taskFields.id].toString()!==h){o.parent.setRecordValue("taskId",t.addedRecords[0][o.parent.taskFields.id],e.data.ganttProperties,!0),o.parent.setRecordValue("taskData."+o.parent.taskFields.id,t.addedRecords[0][o.parent.taskFields.id],e.data),o.parent.setRecordValue(o.parent.taskFields.id,t.addedRecords[0][o.parent.taskFields.id],e.data),o.parent.setRecordValue("rowUniqueID",t.addedRecords[0][o.parent.taskFields.id].toString(),e.data.ganttProperties,!0);var n=o.parent.ids.indexOf(h);-1!==n&&(o.parent.ids[n]=t.addedRecords[0][o.parent.taskFields.id].toString())}o.updateNewRecord(d,e)}).catch(function(t){o.removeAddedRecord(),o.dmFailure(t,e),o._resetProperties()})}}else{if("ProjectView"===o.parent.viewType){if("Top"===t||"Bottom"===t||"Above"===t||"Below"===t||"Child"===t||i.i(r.isNullOrUndefined)(t)&&!e.data.parentItem)if(e.data instanceof Array)o.updateRealDataSource(e.data,t);else{var m=[];m.push(e.data),o.updateRealDataSource(m,t)}}else{var y=i.i(s.i)(o.parent)?i.i(r.getValue)("result",o.parent.dataSource):o.parent.dataSource;y.push(e.data.taskData)}0===d.level&&o.parent.treeGrid.parentData.splice(0,0,d),o.updateTreeGridUniqueID(d,"add"),o.refreshNewlyAddedRecord(e,d),o._resetProperties()}})}},e.prototype.createNewRecord=function(){for(var e={},t=this.parent.ganttColumns,n=this.parent.taskFields,a=this.parent.editModule.getNewTaskId(),s=0;s<t.length;s++){var o=t[s].field;o===n.id?e[o]=a:t[s].field===n.startDate?(i.i(r.isNullOrUndefined)(e[n.endDate])?e[o]=this.parent.editModule.dialogModule.getMinimumStartDate():e[o]=new Date(e[n.endDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone))):t[s].field===n.endDate?(i.i(r.isNullOrUndefined)(e[n.startDate])?e[o]=this.parent.editModule.dialogModule.getMinimumStartDate():e[o]=new Date(e[n.startDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone))):t[s].field===n.duration?e[o]=1:t[s].field===n.name?e[o]=this.parent.editModule.dialogModule.localeObj.getConstant("addDialogTitle")+" "+a:t[s].field===n.progress?e[o]=0:t[s].field===n.work?e[o]=0:"taskType"===t[s].field?e[o]=this.parent.taskType:e[this.parent.ganttColumns[s].field]=""}return e},e.prototype.validateTaskPosition=function(e,t,n,a){var s=i.i(r.isNullOrUndefined)(n)||isNaN(parseInt(n.toString(),10))?this.parent.selectionModule?"Row"!==this.parent.selectionSettings.mode&&"Both"!==this.parent.selectionSettings.mode||1!==this.parent.selectionModule.selectedRowIndexes.length?"Cell"===this.parent.selectionSettings.mode&&1===this.parent.selectionModule.getSelectedRowCellIndexes().length?this.parent.selectionModule.getSelectedRowCellIndexes()[0].rowIndex:null:this.parent.selectionModule.selectedRowIndexes[0]:null:n;this.addRowSelectedItem=i.i(r.isNullOrUndefined)(s)?null:this.parent.updatedRecords[s],t=i.i(r.isNullOrUndefined)(t)?this.parent.editSettings.newRowPosition:t,e=i.i(r.isNullOrUndefined)(e)?this.createNewRecord():e,((i.i(r.isNullOrUndefined)(s)||s<0||i.i(r.isNullOrUndefined)(this.addRowSelectedItem))&&("Above"===t||"Below"===t||"Child"===t)||!t||"Above"!==t&&"Below"!==t&&"Child"!==t&&"Top"!==t&&"Bottom"!==t)&&(t="Top");var o,l=0;switch(t){case"Top":case"Bottom":l="ResourceView"===this.parent.viewType?1:0;break;case"Above":case"Below":l=this.addRowSelectedItem.level,o=this.parent.getParentTask(this.addRowSelectedItem.parentItem);break;case"Child":l=this.addRowSelectedItem.level+1,o=this.addRowSelectedItem}this.prepareNewlyAddedData(e,t);var d=this.updateNewlyAddedDataBeforeAjax(e,l,t,o);a.push(d)},e.prototype.updateNewRecord=function(e,t){if(0===e.level){this.parent.treeGrid.parentData.splice(0,0,e);i.i(r.getValue)("dataOperation.dataArray",this.parent).splice(0,0,e.taskData)}this.updateTreeGridUniqueID(e,"add"),this.refreshNewlyAddedRecord(t,e),this._resetProperties()},e.prototype._resetProperties=function(){this.parent.isOnEdit=!1,this.parent.hideSpinner(),this.addRowSelectedItem=null,this.newlyAddedRecordBackup=null,this.isBreakLoop=!1,this.parent.element.tabIndex=0,this.parent.initiateEditAction(!1)},e.prototype.updateTreeGridUniqueID=function(e,t){"add"===t?i.i(r.setValue)("uniqueIDCollection."+e.uniqueID,e,this.parent.treeGrid):"delete"===t&&i.i(r.deleteObject)(i.i(r.getValue)("uniqueIDCollection",this.parent.treeGrid),e.uniqueID)},e.prototype.refreshNewlyAddedRecord=function(e,t){if(this.parent.selectionModule&&this.parent.allowSelection&&("Row"===this.parent.selectionSettings.mode||"Both"===this.parent.selectionSettings.mode)&&(this.parent.staticSelectedRowIndex=this.parent.currentViewData.indexOf(e.data)),this.parent.timelineSettings.updateTimescaleView){var n=[];e.modifiedRecords.length>0?(n=e.data.length>0?e.data:[e.data],n.push.apply(n,e.modifiedRecords)):n=e.data.length>0?e.data:[e.data],this.parent.timelineModule.updateTimeLineOnEditing([n],e.action)}if(this.addSuccess(e),e=this.constructTaskAddedEventArgs(t,e.modifiedRecords,"add"),this.dialogModule.isAddNewResource&&!this.parent.isEdit&&this.parent.taskFields.work&&this.parent.dataOperation.updateWorkWithDuration(t[0]),this.parent.trigger("actionComplete",e),this.dialogModule.dialog&&!this.dialogModule.dialogObj.isDestroyed&&this.dialogModule.dialogObj.hide(),this.dialogModule.dialogClose(),"ResourceView"===this.parent.viewType)if(t.length>1)for(var a=0;a<t.length;a++){if(e.data[a].ganttProperties.sharedTaskUniqueIds.push(e.data[a].ganttProperties.rowUniqueID),e.data[a].ganttProperties.resourceInfo){var s=i.i(r.extend)([],[],e.data[a].ganttProperties.resourceInfo,!0);s.splice(0,1),this.updateResoures([],s,e.data[a])}else this.removeChildRecord(e.data[a]),this.parent.editModule.checkWithUnassignedTask(e.data[a]);for(var o=0;o<this.updateParentRecords.length;o++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[o]);this.updateParentRecords=[]}else{if(e.data.ganttProperties.sharedTaskUniqueIds.push(e.data.ganttProperties.rowUniqueID),e.data.ganttProperties.resourceInfo&&e.data.ganttProperties.resourceInfo.length){if(e.data.ganttProperties.resourceInfo.length>1){var s=i.i(r.extend)([],[],e.data.ganttProperties.resourceInfo,!0);s.splice(0,1),this.updateResoures([],s,e.data)}}else this.removeChildRecord(e.data),this.parent.editModule.checkWithUnassignedTask(e.data);for(var o=0;o<this.updateParentRecords.length;o++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[o]);this.updateParentRecords=[]}},e.prototype.removeAddedRecord=function(){var e=this.parent.flatData,t=this.parent.currentViewData,n=this.parent.ids,a=e.indexOf(this.newlyAddedRecordBackup),s=t.indexOf(this.newlyAddedRecordBackup),o=n.indexOf(this.newlyAddedRecordBackup.ganttProperties.rowUniqueID.toString());if(i.i(r.deleteObject)(this.parent.previousRecords,e[a].uniqueID),this.newlyAddedRecordBackup.parentItem){var l=this.parent.getParentTask(this.newlyAddedRecordBackup.parentItem),d=l.childRecords.indexOf(this.newlyAddedRecordBackup);l.childRecords.splice(d,1)}e.splice(a,1),t.splice(s,1),n.splice(o,1)},e.prototype.getPrevRecordIndex=function(){var e=this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0]-1],t=this.parent.selectionModule.getSelectedRecords()[0],i=this.parent.getRootParent(e,t.level);return this.parent.updatedRecords.indexOf(i)},e.prototype.indent=function(){var e,t=this.parent.selectedRowIndex,i=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length),r=this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0]-1],n=this.parent.selectionModule.getSelectedRecords()[0];this.parent.editSettings.allowEditing&&0!==t&&-1!==t&&i&&"ResourceView"!==this.parent.viewType&&this.parent.updatedRecords[t].level-r.level!=1&&(e=r.level-n.level==0?this.parent.selectionModule.getSelectedRowIndexes()[0]-1:this.getPrevRecordIndex(),this.indentOutdentRow([this.parent.selectionModule.getSelectedRowIndexes()[0]],e,"child"))},e.prototype.outdent=function(){var e,t=this.parent.selectionModule.getSelectedRowIndexes()[0],i=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length);if(this.parent.editSettings.allowEditing&&-1!==t&&0!==t&&i&&"ResourceView"!==this.parent.viewType&&0!==this.parent.updatedRecords[t].level){var r=this.parent.getTaskByUniqueID(this.parent.selectionModule.getSelectedRecords()[0].parentItem.uniqueID);e=this.parent.updatedRecords.indexOf(r),this.indentOutdentRow([t],e,"below")}},e.prototype.indentOutdentRow=function(e,t,i){var r=this;if(e[0],!0){"above"===i&&(this.dropPosition="topSegment"),"below"===i&&(this.dropPosition="bottomSegment"),"child"===i&&(this.dropPosition="middleSegment");for(var n=void 0,a=[],s=0;s<e.length;s++)a[s]=this.parent.updatedRecords[e[s]];var o={data:a,dropIndex:t,dropPosition:this.dropPosition};"middleSegment"===this.dropPosition?n="indenting":"bottomSegment"===this.dropPosition&&(n="outdenting");var l={action:n,data:a[0],cancel:!1};this.parent.trigger("actionBegin",l,function(e){e.cancel||r.reArrangeRows(o,!0)})}},e.prototype.reArrangeRows=function(e,t){if(this.dropPosition=e.dropPosition,"Invalid"!==e.dropPosition&&this.parent.editModule){var n=this.parent,a=void 0;this.droppedRecord=n.updatedRecords[e.dropIndex];var s=[],o=this.droppedRecord;e.data[0]?s=e.data:s.push(e.data);for(var l=0,d=s.length,p=0;p<d;p++){if(this.parent.isOnEdit=!0,a=s[p],this.draggedRecord=a,"Invalid"!==this.dropPosition){t&&this.deleteDragRow();var h=this.treeGridData.indexOf(o);if("bottomSegment"===this.dropPosition){if(o.hasChildRecords){l=this.parent.editModule.getChildCount(o,0),this.parent.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(h+l+1,0,this.draggedRecord.taskData),this.treeGridData.splice(h+l+1,0,this.draggedRecord),this.parent.ids.splice(h+l+1,0,this.draggedRecord.ganttProperties.rowUniqueID.toString());var u=this.parent.ids.indexOf(this.draggedRecord[this.parent.taskFields.id].toString());u!==h+l+1&&(this.parent.ids.splice(u,1),this.parent.ids.splice(h+l+1,0,this.draggedRecord[this.parent.taskFields.id].toString()))}else this.parent.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(h+1,0,this.draggedRecord.taskData),this.treeGridData.splice(h+1,0,this.draggedRecord),this.parent.ids.splice(h+1,0,this.draggedRecord.ganttProperties.rowUniqueID.toString());if(this.parent.setRecordValue("parentItem",this.treeGridData[h].parentItem,a),this.parent.setRecordValue("parentUniqueID",this.treeGridData[h].parentUniqueID,a),this.parent.setRecordValue("level",this.treeGridData[h].level,a),a.hasChildRecords){this.updateChildRecordLevel(a,1),this.updateChildRecord(a,h+l+1)}if(o.parentItem){var c=this.parent.getParentTask(o.parentItem).childRecords,g=c,f=g.indexOf(o)+1;g.splice(f,0,a)}}"middleSegment"===this.dropPosition&&this.dropMiddle(h),i.i(r.isNullOrUndefined)(a.parentItem&&-1!==this.updateParentRecords.indexOf(a.parentItem))||this.updateParentRecords.push(a.parentItem)}if(i.i(r.isNullOrUndefined)(a.parentItem)){var m=this.parent.treeGrid.parentData,y=m.indexOf(this.droppedRecord);"bottomSegment"===this.dropPosition&&m.splice(y+1,0,a)}this.refreshDataSource()}"middleSegment"===this.dropPosition&&(o.ganttProperties.predecessor&&(this.parent.editModule.removePredecessorOnDelete(o),o.ganttProperties.predecessor=null,o.ganttProperties.predecessorsName=null,o[this.parent.taskFields.dependency]=null,o.taskData[this.parent.taskFields.dependency]=null),o.ganttProperties.isMilestone&&(this.parent.setRecordValue("isMilestone",!1,o.ganttProperties,!0),i.i(r.isNullOrUndefined)(o.taskData[this.parent.taskFields.milestone])||!0===o.taskData[this.parent.taskFields.milestone]&&(o.taskData[this.parent.taskFields.milestone]=!1)));for(var v=0;v<this.updateParentRecords.length;v++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[v]);this.updateParentRecords=[],this.parent.isOnEdit=!1}this.refreshRecord(e)},e.prototype.refreshRecord=function(e,t){var r=this;if(i.i(s.f)(this.parent.dataSource)){var a=this.parent.dataSource,o={changedRecords:i.i(s.e)(this.parent.editedRecords,null,null,this.parent)},l=this.parent.query instanceof n.Query?this.parent.query:new n.Query,d=null,p=a.adaptor;if(p instanceof n.WebApiAdaptor&&p instanceof n.ODataAdaptor&&!a.dataSource.batchUrl){d=a.update(this.parent.taskFields.id,o.changedRecords,null,l)}else d=a.saveChanges(o,this.parent.taskFields.id,null,l);d.then(function(i){return r.indentSuccess(i,e,t)}).catch(function(e){return r.indentFailure(e)})}else this.indentOutdentSuccess(e,t)},e.prototype.indentSuccess=function(e,t,i){this.indentOutdentSuccess(t,i)},e.prototype.indentFailure=function(e){this.parent.trigger("actionFailure",{error:e})},e.prototype.indentOutdentSuccess=function(e,t){if(this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh(),this.parent.enableImmutableMode&&this.refreshRecordInImmutableMode(e.data,t),t?e.requestType="rowDropped":"middleSegment"===this.dropPosition?e.requestType="indented":"bottomSegment"===this.dropPosition&&(e.requestType="outdented"),e.modifiedRecords=this.parent.editedRecords,this.parent.timezone)for(var r=0;r<e.modifiedRecords.length;r++)i.i(s.g)(e.modifiedRecords[r],this.parent);this.parent.trigger("actionComplete",e),this.parent.editedRecords=[]},e.prototype.refreshDataSource=function(){var e,t,a=this.draggedRecord,s=this.droppedRecord,o=this.parent;if(e=this.parent.dataSource instanceof n.DataManager?i.i(r.getValue)("dataOperation.dataArray",this.parent):o.dataSource,e.length>0&&!i.i(r.isNullOrUndefined)(s)&&!s.parentItem){for(var l=0;l<Object.keys(e).length;l++)e[l][this.parent.taskFields.child]===s.taskData[this.parent.taskFields.child]&&(t=l);"topSegment"===this.dropPosition?this.parent.taskFields.parentID||e.splice(t,0,a.taskData):"bottomSegment"===this.dropPosition&&(this.parent.taskFields.parentID||e.splice(t+1,0,a.taskData))}else if(!this.parent.taskFields.parentID&&!i.i(r.isNullOrUndefined)(s)&&s.parentItem&&("topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition)){var d="topSegment"===this.dropPosition?"Above":"Below";this.parent.editModule.addRowSelectedItem=s,this.parent.editModule.updateRealDataSource(a,d),delete this.parent.editModule.addRowSelectedItem}this.parent.taskFields.parentID&&(a.parentItem?"topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition?(a[this.parent.taskFields.parentID]=s[this.parent.taskFields.parentID],a.taskData[this.parent.taskFields.parentID]=s[this.parent.taskFields.parentID],a.ganttProperties.parentId=s[this.parent.taskFields.parentID]):(a[this.parent.taskFields.parentID]=s[this.parent.taskFields.id],a.taskData[this.parent.taskFields.parentID]=s[this.parent.taskFields.id],a.ganttProperties.parentId=s[this.parent.taskFields.id]):(a[this.parent.taskFields.parentID]=null,a.taskData[this.parent.taskFields.parentID]=null,a.ganttProperties.parentId=null))},e.prototype.deleteDragRow=function(){this.parent.dataSource instanceof n.DataManager?this.ganttData=i.i(r.getValue)("dataOperation.dataArray",this.parent):this.ganttData=i.i(s.i)(this.parent)?i.i(r.getValue)("result",this.parent.dataSource):this.parent.dataSource,this.treeGridData=i.i(s.i)(this.parent)?i.i(r.getValue)("result",this.parent.treeGrid.dataSource):this.parent.treeGrid.dataSource;var e=this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);this.removeRecords(e)},e.prototype.updateIndentedChildRecords=function(e){for(var t={uniqueID:e.uniqueID,expanded:e.expanded,level:e.level,index:e.index,taskId:e.ganttProperties.rowUniqueID},i=0;i<e.childRecords.length;i++)this.parent.setRecordValue("parentItem",t,e.childRecords[i]),this.parent.setRecordValue("parentUniqueID",e.uniqueID,e.childRecords[i]);if(e.hasChildRecords){e=e.childRecords;for(var r=0;r<e.length;r++)this.updateIndentedChildRecords(e[r])}},e.prototype.dropMiddle=function(e){var t=this.parent,n=this.parent.editModule.getChildCount(this.droppedRecord,0),a=i.i(r.isNullOrUndefined)(n)||0===n?e+1:n+e+1;if("middleSegment"===this.dropPosition){if(t.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(a,0,this.draggedRecord.taskData),this.treeGridData.splice(a,0,this.draggedRecord),this.parent.ids.splice(a,0,this.draggedRecord[this.parent.taskFields.id].toString()),this.recordLevel(),this.draggedRecord.hasChildRecords&&(this.updateChildRecord(this.draggedRecord,a,this.droppedRecord.expanded),this.parent.enableImmutableMode)){var s=this.draggedRecord;this.updateIndentedChildRecords(s)}i.i(r.isNullOrUndefined)(this.draggedRecord.parentItem&&-1!==this.updateParentRecords.indexOf(this.draggedRecord.parentItem))&&this.updateParentRecords.push(this.draggedRecord.parentItem)}},e.prototype.updateChildRecordLevel=function(e,t){var i,r=0;if(t++,!e.hasChildRecords)return 0;r=e.childRecords.length;for(var n=0;n<r;n++){i=e.childRecords[n];var a=void 0;if(e.parentItem){a=this.parent.treeGrid.uniqueIDCollection[e.parentItem.uniqueID]}i.level=e.parentItem?a.level+t:e.level+1,i.hasChildRecords&&(t--,t=this.updateChildRecordLevel(i,t))}return t},e.prototype.updateChildRecord=function(e,t,i){var r,n=this.parent,a=0;if(!e.hasChildRecords)return 0;a=e.childRecords.length;for(var s=0;s<a;s++)r=e.childRecords[s],t++,n.flatData.splice(t,0,r),this.parent.ids.splice(t,0,r.ganttProperties.rowUniqueID.toString()),n.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(t,0,r.taskData),r.hasChildRecords&&(t=this.updateChildRecord(r,t));return t},e.prototype.removeRecords=function(e){var t,a=this.parent;t=this.parent.dataSource instanceof n.DataManager?i.i(r.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;var s=e,o=this.parent.getParentTask(s.parentItem);if(s){if(s.parentItem){var l=o?o.childRecords:[],d=0;l&&l.length>0&&(d=l.indexOf(s),o.childRecords.splice(d,1),this.parent.taskFields.parentID||o.taskData[this.parent.taskFields.child].splice(d,1),this.updateParentRecords.push(o))}if(a.taskFields.parentID){s.hasChildRecords&&s.childRecords.length>0&&this.removeChildItem(s);for(var p=void 0,h=t.length>0?t:this.parent.currentViewData,u=0;u<h.length;u++)h[u][this.parent.taskFields.id]===s.taskData[this.parent.taskFields.id]&&(p=u);if(-1!==p){t.length>0&&t.splice(p,1);for(var c=void 0,u=0;u<this.treeGridData.length;u++)this.treeGridData[u][this.parent.taskFields.id]===s.taskData[this.parent.taskFields.id]&&(c=u);this.treeGridData.splice(c,1),this.parent.ids.splice(c,1),-1!==this.parent.treeGrid.parentData.indexOf(s)&&this.parent.treeGrid.parentData.splice(this.parent.treeGrid.parentData.indexOf(s),1)}}var g=this.treeGridData.indexOf(s);if(!a.taskFields.parentID){var f=this.getChildCount(s,0);this.treeGridData.splice(g,f+1),this.parent.ids.splice(g,f+1);var m=this.ganttData.indexOf(s.taskData);-1!==m&&(this.ganttData.splice(m,1),this.parent.treeGrid.parentData.splice(m,1))}s.parentItem&&o&&o.childRecords&&!o.childRecords.length&&(this.parent.setRecordValue("expanded",!1,o),this.parent.setRecordValue("hasChildRecords",!1,o))}},e.prototype.removeChildItem=function(e){for(var t,a,s=0;s<e.childRecords.length;s++){t=e.childRecords[s];var o=void 0;o=this.parent.dataSource instanceof n.DataManager?i.i(r.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;for(var l=0;l<o.length;l++)o[l][this.parent.taskFields.id]===t.taskData[this.parent.taskFields.id]&&(a=l);if(-1!==a){o.length>0&&o.splice(a,1);for(var d=void 0,p=0;p<this.treeGridData.length;p++)this.treeGridData[p][this.parent.taskFields.id]===t.taskData[this.parent.taskFields.id]&&(d=p);this.treeGridData.splice(d,1),this.parent.ids.splice(d,1)}t.hasChildRecords&&this.removeChildItem(t)}},e.prototype.recordLevel=function(){var e=this.parent,t=this.draggedRecord,n=this.droppedRecord,a=e.taskFields.child;if(n.hasChildRecords||(n.hasChildRecords=!0,n.childRecords.length||(n.childRecords=[],!e.taskFields.parentID&&i.i(r.isNullOrUndefined)(n.taskData[a])&&(n.taskData[a]=[]))),"middleSegment"===this.dropPosition){var s=i.i(r.extend)({},n);delete s.childRecords;var o={uniqueID:s.uniqueID,expanded:s.expanded,level:s.level,index:s.index,taskId:s.ganttProperties.rowUniqueID};if(this.parent.setRecordValue("parentItem",o,t),this.parent.setRecordValue("parentUniqueID",n.uniqueID,t),n.childRecords.splice(n.childRecords.length,0,t),i.i(r.isNullOrUndefined)(t)||e.taskFields.parentID||i.i(r.isNullOrUndefined)(n.taskData[a])||n.taskData[e.taskFields.child].splice(n.childRecords.length,0,t.taskData),!i.i(r.isNullOrUndefined)(n.ganttProperties.segments)&&n.ganttProperties.segments.length>0&&(n.ganttProperties.segments=null,n.taskData[e.taskFields.segments]=null),t.hasChildRecords){t.level=n.level+1,this.updateChildRecordLevel(t,1)}else t.level=n.level+1;n.expanded=!0}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.ExcelExport),this.parent.treeGrid.allowExcelExport=this.parent.allowExcelExport,this.bindEvents()}return e.prototype.getModuleName=function(){return"excelExport"},e.prototype.destroy=function(){},e.prototype.bindEvents=function(){var e=this;this.parent.treeGrid.beforeExcelExport=function(t){e.parent.trigger("beforeExcelExport",t)},this.parent.treeGrid.excelQueryCellInfo=function(t){e.parent.trigger("excelQueryCellInfo",t)},this.parent.treeGrid.excelHeaderQueryCellInfo=function(t){e.parent.trigger("excelHeaderQueryCellInfo",t)},this.parent.treeGrid.excelExportComplete=function(t){e.parent.trigger("excelExportComplete",t)}},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(6),n=(i.n(r),i(5)),a=(i.n(n),i(0)),s=(i.n(a),i(12)),o=(i.n(s),i(20)),l=(i.n(o),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Filter),this.parent.treeGrid.allowFiltering=this.parent.allowFiltering,this.updateCustomFilters(),this.parent.treeGrid.filterSettings=i.i(n.getActualProperties)(this.parent.filterSettings),this.addEventListener()}return e.prototype.getModuleName=function(){return"filter"},e.prototype.updateCustomFilters=function(){for(var e=this.parent.taskFields,t=0;t<this.parent.ganttColumns.length;t++){var i=this.parent.ganttColumns[t];("datepickeredit"!==i.editType&&"datetimepickeredit"!==i.editType||i.field!==e.startDate&&i.field!==e.endDate&&i.field!==e.baselineStartDate&&i.field!==e.baselineEndDate)&&(i.field!==e.duration||"stringedit"!==i.editType)||this.initiateFiltering(this.parent.ganttColumns[t])}},e.prototype.updateModel=function(){this.parent.filterSettings=this.parent.treeGrid.filterSettings},e.prototype.addEventListener=function(){this.parent.on("updateModel",this.updateModel,this),this.parent.on("actionBegin",this.actionBegin,this),this.parent.on("actionComplete",this.actionComplete,this),this.parent.on("columnMenuOpen",this.columnMenuOpen,this)},e.prototype.wireEvents=function(e){a.EventHandler.add(document.getElementById(e),"click",this.mouseClickHandler,this)},e.prototype.initiateFiltering=function(e){var t=this.parent.getColumnByField(e.field,this.parent.treeGridModule.treeGridColumns);e.allowFiltering=!1!==e.allowFiltering,!e.allowFiltering||"Menu"!==this.parent.filterSettings.type&&"Excel"!==this.parent.filterSettings.type||e.filter||(e.filter={ui:this.getCustomFilterUi(e)}),t&&(t.allowFiltering=e.allowFiltering,t.filter=e.allowFiltering?e.filter:{})},e.prototype.getCustomFilterUi=function(e){var t=this.parent.taskFields,i={};return"datepickeredit"!==e.editType||e.field!==t.startDate&&e.field!==t.endDate&&e.field!==t.baselineStartDate&&e.field!==t.baselineEndDate?"datetimepickeredit"!==e.editType||e.field!==t.startDate&&e.field!==t.endDate&&e.field!==t.baselineStartDate&&e.field!==t.baselineEndDate?e.field===t.duration&&"stringedit"===e.editType&&(i=this.getDurationFilter()):i=this.getDateTimePickerFilter():i=this.getDatePickerFilter(e.field),i},e.prototype.mouseClickHandler=function(e){i.i(a.closest)(e.target,".e-excelfilter")&&this.parent.treeGrid.grid.notify("click",e)},e.prototype.unWireEvents=function(){a.EventHandler.remove(this.parent.element,"click",this.mouseClickHandler)},e.prototype.getDatePickerFilter=function(e){var t,r=this,s=this.parent,l=e===s.taskFields.startDate||e===s.taskFields.baselineStartDate?s.defaultStartTime:s.defaultEndTime;return{create:function(e){var s=i.i(n.getCustomDateFormat)(e.column.format,e.column.type),l=i.i(a.createElement)("input",{className:"flm-input"});e.target.appendChild(l),t=new o.DatePicker({placeholder:r.parent.localeObj.getConstant("enterValue"),format:s}),t.appendTo(l)},write:function(e){t.value=e.filteredValue},read:function(e){t.value&&t.value.setSeconds(l),e.fltrObj.filterByColumn(e.column.field,e.operator,t.value)}}},e.prototype.getDateTimePickerFilter=function(){var e,t=this;return{create:function(r){var s=i.i(n.getCustomDateFormat)(r.column.format,r.column.type),l=i.i(a.createElement)("input",{className:"flm-input"});r.target.appendChild(l),e=new o.DateTimePicker({placeholder:t.parent.localeObj.getConstant("enterValue"),format:s}),e.appendTo(l)},write:function(t){e.value=t.filteredValue},read:function(t){t.fltrObj.filterByColumn(t.column.field,t.operator,e.value)}}},e.prototype.getDurationFilter=function(){var e,t=this,r=this.parent,n="";return{create:function(r){var n=i.i(a.createElement)("input",{className:"e-input"});n.setAttribute("placeholder",t.parent.localeObj.getConstant("enterValue")),r.target.appendChild(n),e=new s.TextBox,e.appendTo(n)},write:function(t){e.value=t.filteredValue?n:""},read:function(s){var o=t.parent.dataOperation.getDurationValue(e.value),l=i.i(a.getValue)("duration",o),d=i.i(a.getValue)("durationUnit",o);if(l>=0){var p=void 0;"minute"===d?p=60*l/r.secondsPerDay:"hour"===d?p=60*l*60/r.secondsPerDay:(p=l,d="day"),s.fltrObj.filterByColumn(s.column.field,s.operator,p),n=t.parent.dataOperation.getDurationString(l,d)}else s.fltrObj.filterByColumn(s.column.field,s.operator,null),n=null}}},e.prototype.columnMenuOpen=function(e){this.filterMenuElement&&document.body.contains(this.filterMenuElement)&&i.i(a.remove)(this.filterMenuElement),this.filterMenuElement=null},e.prototype.actionBegin=function(e){},e.prototype.closeFilterOnContextClick=function(e){var t=document.querySelector("body > div.e-datepicker"),r=document.querySelector("body > div.e-datetimepicker");if(this.filterMenuElement&&document.body.contains(this.filterMenuElement)){var n=i.i(a.closest)(e,"#"+this.parent.element.id)||e.querySelector("#"+this.parent.element.id);(!this.filterMenuElement.contains(e)&&!i.i(a.isNullOrUndefined)(n)||!this.filterMenuElement.contains(e)&&i.i(a.isNullOrUndefined)(t)&&i.i(a.isNullOrUndefined)(r)&&("DIV"===e.nodeName||"HTML"===e.nodeName||"SPAN"===e.nodeName||"BUTTON"===e.nodeName))&&(i.i(a.remove)(this.filterMenuElement),this.parent.treeGrid.grid.notify("filter-menu-close",{isOpen:!1}),this.filterMenuElement=null)}},e.prototype.actionComplete=function(e){if(i.i(a.isNullOrUndefined)(e.filterModel)||i.i(a.isNullOrUndefined)(e.filterModel.dialogObj)||i.i(a.isNullOrUndefined)(e.filterModel.dialogObj.element)||"Excel"===this.parent.filterSettings.type&&this.wireEvents(e.filterModel.dialogObj.element.id),e.requestType===n.filterAfterOpen){"Menu"===this.parent.treeGrid.filterSettings.type?this.filterMenuElement=i.i(a.getValue)("filterModel.dlgObj.element",e):this.filterMenuElement=i.i(a.getValue)("filterModel.dialogObj.element",e),this.updateFilterMenuPosition(this.filterMenuElement,e);var t=this.parent.taskFields.id,r=this.parent.taskFields.dependency,s=this.parent.taskFields.resourceInfo,o=this.parent.treeGrid.grid.filterModule,l=i.i(a.getValue)("values",o);if(e.columnName===r&&i.i(a.isNullOrUndefined)(i.i(a.getValue)(r,l))||e.columnName===s&&i.i(a.isNullOrUndefined)(i.i(a.getValue)(s,l))){var d=this.filterMenuElement.querySelector(".e-dropdownlist"),p=void 0;i.i(a.isNullOrUndefined)(d)||(p=i.i(a.getValue)("ej2_instances[0]",d),p.index=2,p.dataBind())}else if(e.columnName===t&&i.i(a.isNullOrUndefined)(i.i(a.getValue)(t,l))&&"Menu"===this.parent.treeGrid.filterSettings.type){var d=this.filterMenuElement.querySelector(".e-flmenu-input"),p=i.i(a.getValue)("ej2_instances[0]",d);!i.i(a.isNullOrUndefined)(p)&&i.i(a.isNullOrUndefined)(this.parent.columnByField[e.columnName].format)&&(p.format="n")}}},e.prototype.updateFilterMenuPosition=function(e,t){i.i(a.addClass)([e],"e-gantt"),document.querySelector("#"+this.parent.treeGrid.grid.element.id).appendChild(e),"Menu"===this.parent.treeGrid.filterSettings.type&&e.querySelector(".e-valid-input").focus()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateModel",this.updateModel),this.parent.off("actionBegin",this.actionBegin),this.parent.off("actionComplete",this.actionComplete),this.parent.off("columnMenuOpen",this.columnMenuOpen))},e.prototype.destroy=function(){this.removeEventListener(),this.unWireEvents()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.parent=e,this.activeElement=null,this.previousActiveElement=null}return e.prototype.getActiveElement=function(e){return e?this.previousActiveElement:this.activeElement},e.prototype.setActiveElement=function(e){this.previousActiveElement=this.activeElement,this.activeElement=e},e.prototype.onKeyPress=function(e){var t=this.parent,n=t.getExpandedRecords(t.currentViewData);if(i.i(r.isNullOrUndefined)(this.parent.focusModule.getActiveElement())&&("expandAll"===e.action||"collapseAll"===e.action)){var a=this.parent.element.querySelector(".e-treegrid");a.focus()}var s=this.parent.focusModule.getActiveElement();if("home"!==e.action&&"end"!==e.action&&"downArrow"!==e.action&&"upArrow"!==e.action&&"delete"!==e.action&&"rightArrow"!==e.action&&"leftArrow"!==e.action&&"focusTask"!==e.action&&"focusSearch"!==e.action&&"expandAll"!==e.action&&"collapseAll"!==e.action||i.i(r.isNullOrUndefined)(t.editModule)||i.i(r.isNullOrUndefined)(t.editModule.cellEditModule)||!0!==t.editModule.cellEditModule.isCellEdit)switch(t.isAdaptive&&("addRowDialog"!==e.action&&"editRowDialog"!==e.action&&"delete"!==e.action&&"addRow"!==e.action||t.selectionModule&&"Multiple"===t.selectionSettings.type&&(t.selectionModule.hidePopUp(),document.getElementsByClassName("e-gridpopup")[0].style.display="none")),e.action){case"home":if(t.selectionModule&&"Cell"!==t.selectionSettings.mode){if(0===t.selectedRowIndex)return;t.selectionModule.selectRow(0,!1,!0)}break;case"end":if(t.selectionModule&&"Cell"!==t.selectionSettings.mode){var o=n[n.length-1];if(t.selectedRowIndex===t.flatData.indexOf(o))return;t.selectionModule.selectRow(t.flatData.indexOf(o),!1,!0)}break;case"downArrow":case"upArrow":var l=t.element.querySelector("#"+t.element.id+"_searchbar");l&&l.parentElement.classList.contains("e-input-focus")&&t.selectionModule.clearSelection(),t.element.classList.contains("e-scroll-disabled")||(this.upDownKeyNavigate(e),i.i(r.isNullOrUndefined)(s)||i.i(r.isNullOrUndefined)(s.closest(".e-chart-row"))||t.ganttChartModule.manageFocus(this.getActiveElement(),"remove",!0));break;case"expandAll":t.ganttChartModule.expandCollapseAll("expand");break;case"collapseAll":t.ganttChartModule.expandCollapseAll("collapse");break;case"expandRow":case"collapseRow":this.expandCollapseKey(e);break;case"saveRequest":if(!i.i(r.isNullOrUndefined)(t.editModule)&&!i.i(r.isNullOrUndefined)(t.editModule.cellEditModule)&&t.editModule.cellEditModule.isCellEdit){var d=t.editModule.cellEditModule.editedColumn;if(d.field===t.columnMapping.duration&&!i.i(r.isNullOrUndefined)(d.edit)&&!i.i(r.isNullOrUndefined)(d.edit.read)){var p=e.target.ej2_instances[0],h=e.target.value,u=t.currentViewData[t.selectedRowIndex].ganttProperties,c=void 0;d.field===t.columnMapping.duration&&(c=i.i(r.isNullOrUndefined)(d.edit)||i.i(r.isNullOrUndefined)(d.edit.read)?i.i(r.isNullOrUndefined)(d.valueAccessor)?t.dataOperation.getDurationString(u.duration,u.durationUnit):d.valueAccessor(t.columnMapping.duration,t.editedRecords,d):d.edit.read(),h!==c.toString()&&(p.value=h,p.dataBind()))}if(t.editModule.dialogModule.dialogObj&&i.i(r.getValue)("dialogOpen",t.editModule.dialogModule.dialogObj))return;t.editModule.cellEditModule.isCellEdit=!1,t.treeGrid.grid.saveCell();var a=t.element.querySelector(".e-treegrid");a.focus()}if(!i.i(r.isNullOrUndefined)(this.parent.onTaskbarClick)&&!i.i(r.isNullOrUndefined)(s)&&!i.i(r.isNullOrUndefined)(s.closest(".e-chart-row"))){var g=e.target,f=s.querySelector(".e-gantt-parent-taskbar,.e-gantt-child-taskbar,.e-gantt-milestone");f&&this.parent.ganttChartModule.onTaskbarClick(e,g,f)}break;case"cancelRequest":i.i(r.isNullOrUndefined)(t.editModule)||i.i(r.isNullOrUndefined)(t.editModule.cellEditModule)||(t.editModule.cellEditModule.isCellEdit=!1,i.i(r.isNullOrUndefined)(t.toolbarModule)||t.toolbarModule.refreshToolbarItems());break;case"addRow":if(i.i(r.isNullOrUndefined)(document.getElementById(this.parent.element.id+"_dialog"))){e.preventDefault(),t.addRecord(void 0,this.parent.editSettings.newRowPosition);var a=t.element;a.focus()}break;case"addRowDialog":if(e.preventDefault(),t.editModule&&t.editModule.dialogModule&&t.editSettings.allowAdding){if(t.editModule.dialogModule.dialogObj&&i.i(r.getValue)("dialogOpen",t.editModule.dialogModule.dialogObj))return;t.editModule.dialogModule.openAddDialog()}break;case"editRowDialog":e.preventDefault();if(t.element.querySelector(".e-treegrid").focus(),t.editModule&&t.editModule.dialogModule&&t.editSettings.allowEditing){if(t.editModule.dialogModule.dialogObj&&i.i(r.getValue)("dialogOpen",t.editModule.dialogModule.dialogObj))return;t.editModule.dialogModule.openToolbarEditDialog()}break;case"delete":t.selectionModule&&t.editModule&&t.editModule.dialogModule&&(!t.editModule.dialogModule.dialogObj||t.editModule.dialogModule.dialogObj&&!t.editModule.dialogModule.dialogObj.visible)&&(!t.editSettings.allowTaskbarEditing||t.editSettings.allowTaskbarEditing&&!t.editModule.taskbarEditModule.touchEdit)&&("Cell"!==t.selectionSettings.mode&&t.selectionModule.selectedRowIndexes.length||"Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length)&&t.editModule.startDeleteAction();break;case"focusTask":e.preventDefault();var m=void 0;if(t.selectionModule){var y=t.currentViewData;if("Cell"===t.selectionSettings.mode||i.i(r.isNullOrUndefined)(y[t.selectedRowIndex])){if("Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length>0){var v=t.selectionModule.getSelectedRowCellIndexes();m=y[v[v.length-1].rowIndex].ganttProperties.rowUniqueID}}else m=t.currentViewData[t.selectedRowIndex].ganttProperties.rowUniqueID}m&&t.scrollToTask(m.toString());break;case"focusSearch":if(t.element.querySelector("#"+t.element.id+"_searchbar")){var l=t.element.querySelector("#"+t.element.id+"_searchbar");l.setAttribute("tabIndex","-1"),l.focus()}break;case"tab":case"shiftTab":t.element.classList.contains("e-scroll-disabled")||t.ganttChartModule.onTabAction(e);break;case"contextMenu":var D=document.getElementById(this.parent.element.id+"_contextmenu").ej2_instances[0],w=this.parent.getOffsetRect(e.target),k=w.top+w.height/2,S=w.left+w.width/2;this.setActiveElement(e.target),D.open(k,S),e.preventDefault();break;default:var T={requestType:"keyPressed",action:e.action,keyEvent:e};t.trigger("actionComplete",T)}},e.prototype.upDownKeyNavigate=function(e){e.preventDefault();var t=this.parent,i=t.getExpandedRecords(t.currentViewData);if(t.selectionModule){if("Cell"!==t.selectionSettings.mode&&-1!==t.selectedRowIndex){var r=t.currentViewData[t.selectedRowIndex],n=(this.parent.ganttChartModule.focusedRowIndex,i.indexOf(r)),a="downArrow"===e.action?i[n+1]:i[n-1];t.selectionModule.selectRow(t.currentViewData.indexOf(a),!1,!0)}else if("Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length>0){var s=t.selectionModule.getSelectedRowCellIndexes(),o=s[s.length-1],l=o.cellIndexes[o.cellIndexes.length-1],r=t.currentViewData[o.rowIndex],n=i.indexOf(r),a="downArrow"===e.action?i[n+1]:i[n-1],d={rowIndex:t.currentViewData.indexOf(a),cellIndex:l};t.selectionModule.selectCell(d)}this.parent.ganttChartModule.focusedRowIndex=this.parent.selectedRowIndex}},e.prototype.expandCollapseKey=function(e){var t=this.parent;if(t.selectionModule&&-1!==t.selectedRowIndex){var i=void 0;if("Cell"!==t.selectionSettings.mode)i=t.selectedRowIndex;else if("Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length>0){var r=t.selectionModule.getSelectedRowCellIndexes();i=r[r.length-1].rowIndex}"expandRow"===e.action?t.expandByIndex(i):t.collapseByIndex(i)}},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(17),n=i(7),a=i(0),s=(i.n(a),i(50)),o=i(1),l=(i.n(o),i(57)),d=function(){function e(e){this.isPdfExport=!1,this.parent=e,this.helper=new s.a(this.parent),this.pdfDocument=void 0}return e.prototype.getModuleName=function(){return"pdfExport"},e.prototype.destroy=function(){},e.prototype.initGantt=function(){this.pdfDocument=void 0,this.gantt=new l.a(this.parent)},e.prototype.export=function(e,t,r){var n=this,s={requestType:"beforePdfExport",ganttObject:this.parent,cancel:!1};return this.parent.trigger("beforePdfExport",s),i.i(a.getValue)("cancel",s)?new Promise(function(e,t){return e()}):new Promise(function(i,a){n.exportWithData(r,i,e,t)})},e.prototype.exportWithData=function(e,t,r,n){var s=this,l=[];i.i(a.isNullOrUndefined)(r)&&(r={}),l="CurrentViewData"===r.exportType?this.parent.currentViewData:this.parent.flatData,this.initGantt(),i.i(a.isNullOrUndefined)(e)?this.pdfDocument=new o.PdfDocument:this.pdfDocument=e,this.processExport(l,r,n).then(function(){s.parent.trigger("pdfExportComplete",{}),t(s.pdfDocument)})},e.prototype.processExport=function(e,t,r){var s=this,l=this.pdfDocument.sections.add();this.processSectionExportProperties(l,t);var d=l.pages.add();return new Promise(function(i,r){s.helper.processGridExport(e,s.gantt,t),s.helper.initializePdf(s.pdfDocument),i()}).then(function(){var e=new n.a;e.break=o.PdfLayoutBreakType.FitElement;var l=s.gantt.drawGrid(d,0,0,e);return s.gantt.drawChart(l),r||(!i.i(a.isNullOrUndefined)(t)&&t.fileName?s.pdfDocument.save(t.fileName):s.pdfDocument.save("Export.pdf"),s.pdfDocument.destroy()),s.pdfDocument})},e.prototype.processSectionExportProperties=function(e,t){if(i.i(a.isNullOrUndefined)(t))this.gantt.ganttStyle=new r.a(t.theme).style;else{var n=new o.PdfPageSettings;if(i.i(a.isNullOrUndefined)(t.pageOrientation)||"Portrait"!==t.pageOrientation?n.orientation=o.PdfPageOrientation.Landscape:n.orientation=o.PdfPageOrientation.Portrait,i.i(a.isNullOrUndefined)(t.pageSize)||(n.size=this.getPageSize(t.pageSize)),e.setPageSettings(n),i.i(a.isNullOrUndefined)(t.ganttStyle))this.gantt.ganttStyle=new r.a(t.theme).style;else{var s=new r.a(t.theme).style;this.gantt.ganttStyle=i.i(a.extend)({},s,t.ganttStyle,!0)}}},e.prototype.getPageSize=function(e){switch(e){case"Letter":return new o.SizeF(612,792);case"Note":return new o.SizeF(540,720);case"Legal":return new o.SizeF(612,1008);case"A0":return new o.SizeF(2380,3368);case"A1":return new o.SizeF(1684,2380);case"A2":return new o.SizeF(1190,1684);case"A3":return new o.SizeF(842,1190);case"A5":return new o.SizeF(421,595);case"A6":return new o.SizeF(297,421);case"A7":return new o.SizeF(210,297);case"A8":return new o.SizeF(148,210);case"A9":return new o.SizeF(105,148);case"B0":return new o.SizeF(2836,4008);case"B1":return new o.SizeF(2004,2836);case"B2":return new o.SizeF(1418,2004);case"B3":return new o.SizeF(1002,1418);case"B4":return new o.SizeF(709,1002);case"B5":return new o.SizeF(501,709);case"Archa":return new o.SizeF(648,864);case"Archb":return new o.SizeF(864,1296);case"Archc":return new o.SizeF(1296,1728);case"Archd":return new o.SizeF(1728,2592);case"Arche":return new o.SizeF(2592,3456);case"Flsa":return new o.SizeF(612,936);case"HalfLetter":return new o.SizeF(396,612);case"Letter11x17":return new o.SizeF(792,1224);case"Ledger":return new o.SizeF(1224,792);default:return new o.SizeF(595,842)}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(6),n=(i.n(r),i(0)),a=(i.n(n),i(4)),s=(i.n(a),i(15)),o=function(){function e(e){this.isTest=!1,this.updateParentRecords=[],this.isaddtoBottom=!1,this.isSharedTask=!1,this.canDrop=!0,this.parent=e,r.TreeGrid.Inject(r.RowDD),this.parent.treeGrid.allowRowDragAndDrop=this.parent.allowRowDragAndDrop,this.bindEvents()}return e.prototype.getModuleName=function(){return"rowDragAndDrop"},e.prototype.destroy=function(){},e.prototype.bindEvents=function(){this.parent.treeGrid.rowDragStart=this.rowDragStart.bind(this),this.parent.treeGrid.rowDragStartHelper=this.rowDragStartHelper.bind(this),this.parent.treeGrid.rowDrag=this.rowDrag.bind(this),this.parent.treeGrid.rowDrop=this.rowDrop.bind(this)},e.prototype.rowDragStart=function(e){this.parent.trigger("rowDragStart",e),this.parent.element.style.position="relative"},e.prototype.addErrorElem=function(){var e=document.getElementsByClassName("e-ganttdrag")[0];if(!e.querySelectorAll(".e-errorelem").length){var t=document.createElement("div");i.i(n.classList)(t,["e-errorcontainer"],[]),i.i(n.classList)(t,["e-icons","e-errorelem"],[]);var r=e.querySelector(".errorValue"),a=e.querySelector(".e-rowcell").innerHTML;r&&(a=r.innerHTML,r.parentNode.removeChild(r)),e.querySelector(".e-rowcell").innerHTML="";var s=document.createElement("span");s.className="errorValue",s.style.paddingLeft="16px",s.innerHTML=a,e.querySelector(".e-rowcell").appendChild(t),e.querySelector(".e-rowcell").appendChild(s)}},e.prototype.removeErrorElem=function(){var e=document.querySelector(".e-errorelem");e&&e.remove()},e.prototype.rowDrag=function(e){var t=this.parent.element.querySelector(".e-cloneproperties");t.style.display="none";var r=t.cloneNode(!0);r.classList.add("e-ganttdrag"),r.style.display="",this.parent.element.querySelectorAll(".e-cloneproperties").length<=1?this.parent.element.appendChild(r):document.getElementsByClassName("e-cloneproperties")[0].querySelectorAll(".e-errorelem").length?this.addErrorElem():this.removeErrorElem(),"Both"===this.parent.gridLines&&i.i(n.addClass)(this.parent.element.querySelectorAll(".e-ganttdrag .e-rowcell"),["e-bothganttlines"]);var a=this.parent.element.querySelector(".e-ganttdrag"),s=this.parent.element.getClientRects()[0].top,o=this.parent.element.getClientRects()[0].left,l=i.i(n.getValue)("event",e.originalEvent).clientX-o,d=i.i(n.getValue)("event",e.originalEvent).clientY-s;a.style.left=l+20+"px",a.style.top=d+20+"px",this.parent.trigger("rowDrag",e)},e.prototype.rowDragStartHelper=function(e){this.parent.trigger("rowDragStartHelper",e),this.parent.readOnly&&(e.cancel=!0),"ResourceView"===this.parent.viewType&&0===i.i(n.getValue)("level",e.data[0])&&(e.cancel=!0)},e.prototype.rowDrop=function(e){var t=document.querySelector(".e-ganttdrag");t&&t.remove();var r=i.i(n.closest)(e.target,".e-row"),a=r?parseInt(r.getAttribute("data-rowindex"),10):e.dropIndex;e.dropIndex=a,e.dropRecord=this.parent.updatedRecords[e.dropIndex],this.parent.trigger("rowDrop",e),"ResourceView"===this.parent.viewType&&("middleSegment"===e.dropPosition&&(1!==e.dropRecord.level&&e.dropRecord.uniqueID!==i.i(n.getValue)("parentItem",e.data[0]).uniqueID||(e.cancel=!0)),"middleSegment"!==e.dropPosition&&(0!==e.dropRecord.level&&i.i(n.getValue)("parentItem",e.data[0]).uniqueID!==e.dropRecord.parentItem.uniqueID||(e.cancel=!0))),e.cancel||(e.requestType="beforeDrop",this.parent.trigger("actionBegin",e),e.cancel||(this.dropRows(e,!0),e.cancel=!0))},e.prototype.dropRows=function(e,t){if(!this.parent.readOnly){if(this.dropPosition=e.dropPosition,"Invalid"!==e.dropPosition&&this.parent.editModule){var r=this.parent,a=void 0;this.droppedRecord=r.updatedRecords[e.dropIndex];var s=[],o=this.droppedRecord;e.data[0]?s=e.data:s.push(e.data);for(var l=0,d=s.length,p=this,h=0;h<d;h++){var u=function(e){if(p.parent.isOnEdit=!0,a=s[e],p.draggedRecord=a,"Invalid"!==p.dropPosition){if("ResourceView"===p.parent.viewType&&(p.checkisSharedTask(),p.previousParent=p.draggedRecord.parentItem.uniqueID),p.isSharedTask)return{value:void 0};t&&p.deleteDragRow();var d=p.treeGridData.indexOf(o);if("topSegment"===p.dropPosition&&p.dropAtTop(d),"bottomSegment"===p.dropPosition&&!p.isSharedTask){if(o.hasChildRecords){if(l=p.parent.editModule.getChildCount(o,0),p.parent.taskFields.parentID&&p.ganttData.length>0&&p.ganttData.splice(d+l+1,0,p.draggedRecord.taskData),p.treeGridData.splice(d+l+1,0,p.draggedRecord),p.parent.ids.splice(d+l+1,0,p.draggedRecord.ganttProperties.rowUniqueID.toString()),"ResourceView"===p.parent.viewType){var h=0===p.draggedRecord.level?"R"+p.draggedRecord.ganttProperties.taskId:"T"+p.draggedRecord.ganttProperties.taskId;p.parent.getTaskIds().splice(d+l+1,0,h)}}else if(p.parent.taskFields.parentID&&p.ganttData.length>0&&p.ganttData.splice(d+1,0,p.draggedRecord.taskData),p.treeGridData.splice(d+1,0,p.draggedRecord),p.parent.ids.splice(d+1,0,p.draggedRecord.ganttProperties.rowUniqueID.toString()),"ResourceView"===p.parent.viewType){var u=0===p.draggedRecord.level?"R"+p.draggedRecord.ganttProperties.taskId:"T"+p.draggedRecord.ganttProperties.taskId;p.parent.getTaskIds().splice(d+1,0,u)}if(p.parent.setRecordValue("parentItem",p.treeGridData[d].parentItem,a),p.parent.setRecordValue("parentUniqueID",p.treeGridData[d].parentUniqueID,a),p.parent.setRecordValue("level",p.treeGridData[d].level,a),a.hasChildRecords){p.updateChildRecordLevel(a,1),p.updateChildRecord(a,d+l+1)}if(o.parentItem){var c=p.parent.getParentTask(o.parentItem).childRecords,g=c,f=g.indexOf(o)+1;g.splice(f,0,a)}}"middleSegment"===p.dropPosition&&(p.dropMiddle(d),o.childRecords.length>0&&(delete o.ganttProperties.segments,delete o.taskData[p.parent.taskFields.segments])),i.i(n.isNullOrUndefined)(a.parentItem&&-1!==p.updateParentRecords.indexOf(a.parentItem))||p.updateParentRecords.push(a.parentItem)}if(!p.parent.enableVirtualization){var m=r.flatData,y=void 0,v=void 0,D=p.parent.dataSource,w=p.parent.taskFields.id;if(a.index<o.index){y=a.index;for(var k=0;k<D.length;k++){if("break"===function(e){var t=p.parent.currentViewData.filter(function(t){return t[w]===D[e][w]})[0];if(t&&t.index>o.index)return v=t.index,"break"}(k))break}}else{y=o.index;for(var S=0;S<D.length;S++){if("break"===function(e){var t=p.parent.currentViewData.filter(function(t){return t[w]===D[e][w]})[0];if(t&&t.index>a.index)return v=t.index,"break"}(S))break}}for(var T=y;T<=v;T++)!function(e){if(!i.i(n.isNullOrUndefined)(m[e])&&(m[e].index=e,!i.i(n.isNullOrUndefined)(m[e].parentItem))){var t=m.filter(function(t){return t.uniqueID===m[e].parentUniqueID})[0];m[e].parentItem.index=t.index}}(T)}r.rowDragAndDropModule.refreshDataSource()}(h);if("object"==typeof u)return u.value}if("middleSegment"===this.dropPosition&&(o.ganttProperties.predecessor&&(this.parent.editModule.removePredecessorOnDelete(o),o.ganttProperties.predecessor=null,o.ganttProperties.predecessorsName=null,o[this.parent.taskFields.dependency]=null,o.taskData[this.parent.taskFields.dependency]=null),o.ganttProperties.isMilestone&&(this.parent.setRecordValue("isMilestone",!1,o.ganttProperties,!0),i.i(n.isNullOrUndefined)(o.taskData[this.parent.taskFields.milestone])||!0===o.taskData[this.parent.taskFields.milestone]&&(o.taskData[this.parent.taskFields.milestone]=!1))),"ResourceView"===this.parent.viewType&&!this.isSharedTask){var c=void 0;c="middleSegment"===this.dropPosition?this.droppedRecord.uniqueID:this.droppedRecord.parentItem.uniqueID;var g=this.parent.getTaskByUniqueID(c),f={};f[this.parent.taskFields.resourceInfo]=[],f[this.parent.taskFields.resourceInfo].push(g.ganttProperties.taskId),this.removeExistingResources();var m=this.parent.dataOperation.setResourceInfo(f),y=this.draggedRecord;i.i(n.isNullOrUndefined)(y.ganttProperties.resourceInfo)&&(y.ganttProperties.resourceInfo=[]),"Unassigned Task"===g.ganttProperties.taskName?(y.ganttProperties.resourceInfo=[],y.ganttProperties.sharedTaskUniqueIds=[y.ganttProperties.rowUniqueID]):y.ganttProperties.resourceInfo.push(m[0]),this.updateCurrentTask(y),"Unassigned Task"===g.ganttProperties.taskName?this.deleteSharedResourceTask():this.updateSharedResourceTask()}if(this.parent.taskFields.dependency){var v,D=!0,w=void 0;w=a.parentItem?this.parent.currentViewData[this.parent.ids.indexOf(a.parentItem.taskId)]:a,v=o.parentItem?this.parent.currentViewData[this.parent.ids.indexOf(o.parentItem.taskId)]:o;var k=void 0;if(v.uniqueID===w.uniqueID||w.parentItem&&v.uniqueID==this.parent.currentViewData[this.parent.ids.indexOf(w.parentItem.taskId)].uniqueID){k=this.parent.currentViewData.filter(function(e){if(e.ganttProperties.predecessor&&e.ganttProperties.predecessor.length>0)for(var t=0;t<e.ganttProperties.predecessor.length;t++)return parseInt(e.ganttProperties.predecessor[t].to)===parseInt(v.ganttProperties.taskId)||parseInt(e.ganttProperties.predecessor[t].from)===parseInt(v.ganttProperties.taskId);return null});for(var S=[],h=0;h<k.length;h++){if(S=[],k[h].ganttProperties.predecessor)for(var T=0;T<k[h].ganttProperties.predecessor.length;T++)parseInt(k[h].ganttProperties.taskId)!==parseInt(k[h].ganttProperties.predecessor[T].from)?S.push(k[h].ganttProperties.predecessor[T].from):S.push(k[h].ganttProperties.predecessor[T].to);for(var b=this,P=0;P<S.length;P++)!function(e){var t=S[e].replace(/\D/g,""),i=b.parent.currentViewData.filter(function(e){return parseInt(e.ganttProperties.taskId)==parseInt(t)});(D=b.parent.connectorLineEditModule.validateParentPredecessor(k[h],i[0]))||(b.parent.dataOperation.resetDependency(k[h]),b.parent.dataOperation.resetDependency(i[0]))}(P)}}}for(var P=0;P<this.updateParentRecords.length;P++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[P]);this.updateParentRecords=[],this.parent.isOnEdit=!1}i.i(n.isNullOrUndefined)(this.parent.editModule)||this.parent.editModule.refreshRecord(e,!0)}},e.prototype.updateCurrentTask=function(e){this.parent.dataOperation.updateMappingData(e,"resourceInfo"),this.parent.editModule.updateResourceRelatedFields(e,"resource"),this.parent.editModule.dialogModule.dialogEditValidationFlag=!1,this.parent.editModule.dialogModule.validateDuration(e),this.parent.dataOperation.updateWidthLeft(e),this.parent.dataOperation.updateTaskData(e)},e.prototype.deleteSharedResourceTask=function(){for(var e=0;e<this.parent.getTaskIds().length;e++)this.parent.getTaskIds()[e]==="T"+this.draggedRecord.ganttProperties.taskId&&("Unassigned Task"!==this.parent.getTaskByUniqueID(this.parent.currentViewData[e].parentItem.uniqueID).ganttProperties.taskName&&this.removeRecords(this.parent.currentViewData[e]),i.i(n.isNullOrUndefined)(this.parent.currentViewData[e].parentItem&&-1!==this.updateParentRecords.indexOf(this.parent.currentViewData[e].parentItem))||this.updateParentRecords.push(this.parent.currentViewData[e].parentItem))},e.prototype.removeExistingResources=function(){var e=this.parent.getTaskByUniqueID(this.previousParent);if(this.draggedRecord.ganttProperties.resourceInfo)for(var t=0;t<this.draggedRecord.ganttProperties.resourceInfo.length;t++)if(this.draggedRecord.ganttProperties.resourceInfo[t][this.parent.resourceFields.id]===e.ganttProperties.taskId){this.draggedRecord.ganttProperties.resourceInfo.splice(t,1);break}},e.prototype.updateSharedResourceTask=function(){for(var e=0;e<this.parent.getTaskIds().length;e++)this.parent.getTaskIds()[e]==="T"+this.draggedRecord.ganttProperties.taskId&&(this.parent.editModule.updateGanttProperties(this.draggedRecord,this.parent.flatData[e]),this.parent.dataOperation.updateTaskData(this.parent.flatData[e]),i.i(n.isNullOrUndefined)(this.parent.flatData[e].parentItem&&-1!==this.updateParentRecords.indexOf(this.parent.currentViewData[e].parentItem))||this.updateParentRecords.push(this.parent.flatData[e].parentItem))},e.prototype._getExistingTaskWithID=function(e){for(var t=[],i=0;i<this.parent.getTaskIds().length;i++)this.parent.getTaskIds()[i]==="T"+e.ganttProperties.taskId&&t.push(this.parent.flatData[i]);return t},e.prototype.removeResourceInfo=function(e){var t=this.parent.getTaskByUniqueID(this.draggedRecord.parentItem.uniqueID);if(e.ganttProperties.resourceInfo&&e.ganttProperties.resourceInfo.length>1){var r=this._getExistingTaskWithID(e),a=void 0;if(null==r)return;for(var s=0;s<r.length;s++){a=r[s];for(var o=a.ganttProperties.resourceInfo,l=0;l<o.length;l++)if(o[l][this.parent.resourceFields.id]===t.ganttProperties.taskId){o.splice(l,1),this.parent.setRecordValue("resourceInfo",o,a.ganttProperties,!0),this.updateCurrentTask(a),i.i(n.isNullOrUndefined)(a.parentItem&&-1!==this.updateParentRecords.indexOf(a.parentItem))||this.updateParentRecords.push(a.parentItem);break}}}},e.prototype.refreshDataSource=function(){var e,t,r=this.draggedRecord,s=this.droppedRecord,o=this.parent,l=this.parent.taskFields;if(e=this.parent.dataSource instanceof a.DataManager?i.i(n.getValue)("dataOperation.dataArray",this.parent):o.dataSource,e.length>0&&!i.i(n.isNullOrUndefined)(s)&&!s.parentItem){for(var d=0;d<Object.keys(e).length;d++)i.i(n.isNullOrUndefined)(s.taskData[l.child])||e[d][l.child]!==s.taskData[l.child]?i.i(n.isNullOrUndefined)(s.taskData[l.child])&&s.taskData[l.id]===e[d][l.id]&&(t=d):t=d;"topSegment"===this.dropPosition?this.parent.taskFields.parentID||e.splice(t,0,r.taskData):"bottomSegment"===this.dropPosition&&(this.parent.taskFields.parentID||e.splice(t+1,0,r.taskData))}else if(!this.parent.taskFields.parentID&&!i.i(n.isNullOrUndefined)(s)&&s.parentItem&&("topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition)){var p="topSegment"===this.dropPosition?"Above":"Below";this.parent.editModule.addRowSelectedItem=s,this.parent.editModule.updateRealDataSource([r],p),delete this.parent.editModule.addRowSelectedItem}if(this.parent.taskFields.parentID)if(r.parentItem){var h="middleSegment"===this.dropPosition?this.parent.taskFields.id:this.parent.taskFields.parentID;r[this.parent.taskFields.parentID]=s[h],r.ganttProperties.parentId=s[h],("ResourceView"===this.parent.viewType&&"middleSegment"!==this.dropPosition||"ProjectView"===this.parent.viewType)&&(r.taskData[this.parent.taskFields.parentID]=s.taskData[h])}else r[this.parent.taskFields.parentID]=null,r.taskData[this.parent.taskFields.parentID]=null,r.ganttProperties.parentId=null},e.prototype.dropMiddle=function(e){var t=this.parent,r=this.parent.editModule.getChildCount(this.droppedRecord,0),a=i.i(n.isNullOrUndefined)(r)||0===r?e+1:r+e+1;if("middleSegment"===this.dropPosition&&!this.isSharedTask){if(t.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(a,0,this.draggedRecord.taskData),this.treeGridData.splice(a,0,this.draggedRecord),this.parent.ids.splice(a,0,this.draggedRecord.ganttProperties.rowUniqueID.toString()),"ResourceView"===this.parent.viewType){var s=0===this.draggedRecord.level?"R"+this.draggedRecord.ganttProperties.taskId:"T"+this.draggedRecord.ganttProperties.taskId;this.parent.getTaskIds().splice(a,0,s)}this.draggedRecord.hasChildRecords&&this.updateChildRecord(this.draggedRecord,a,this.droppedRecord.expanded),this.recordLevel(),i.i(n.isNullOrUndefined)(this.draggedRecord.parentItem&&-1!==this.updateParentRecords.indexOf(this.draggedRecord.parentItem))&&this.updateParentRecords.push(this.draggedRecord.parentItem)}},e.prototype.recordLevel=function(){var e=this.parent,t=this.draggedRecord,r=this.droppedRecord,a=e.taskFields.child;if(r.hasChildRecords||(r.hasChildRecords=!0,r.childRecords.length||(r.childRecords=[],!e.taskFields.parentID&&i.i(n.isNullOrUndefined)(r.taskData[a])&&(r.taskData[a]=[]))),"middleSegment"===this.dropPosition){var s=i.i(n.extend)({},r);delete s.childRecords;var o={uniqueID:s.uniqueID,expanded:s.expanded,level:s.level,index:s.index,taskId:s.ganttProperties.rowUniqueID};if(this.parent.setRecordValue("parentItem",o,t),this.parent.setRecordValue("parentUniqueID",r.uniqueID,t),r.childRecords.splice(r.childRecords.length,0,t),i.i(n.isNullOrUndefined)(t)||e.taskFields.parentID||i.i(n.isNullOrUndefined)(r.taskData[a])||r.taskData[e.taskFields.child].splice(r.childRecords.length,0,t.taskData),t.hasChildRecords){t.level=r.level+1,this.parent.setRecordValue("level",this.draggedRecord.level,this.draggedRecord),this.updateChildRecordLevel(t,1)}else t.level=r.level+1;r.expanded=!0}},e.prototype.deleteDragRow=function(){this.treeGridData=i.i(s.e)(this.parent)?i.i(n.getValue)("result",this.parent.treeGrid.dataSource):this.parent.treeGrid.dataSource,this.parent.dataSource instanceof a.DataManager?this.ganttData=i.i(n.getValue)("dataOperation.dataArray",this.parent):this.ganttData=i.i(s.e)(this.parent)?i.i(n.getValue)("result",this.parent.dataSource):this.parent.dataSource;var e=this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);this.removeRecords(e)},e.prototype.checkisSharedTask=function(){this.isSharedTask=!1;for(var e=null,t=0===this.droppedRecord.level?this.droppedRecord.uniqueID:this.droppedRecord.parentItem.uniqueID,i=this.parent.getTaskByUniqueID(t),r=i.childRecords,n=0;n<r.length;n++)"T"+this.draggedRecord.ganttProperties.taskId=="T"+r[n].ganttProperties.taskId&&(this.isSharedTask=!0,e=r[n]);this.isSharedTask&&this.removeResourceInfo(e)},e.prototype.dropAtTop=function(e){var t=this.parent;if(!this.isSharedTask){if(t.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(e,0,this.draggedRecord.taskData),this.treeGridData.splice(e,0,this.draggedRecord),this.parent.ids.splice(e,0,this.draggedRecord.ganttProperties.rowUniqueID.toString()),this.parent.setRecordValue("parentItem",this.droppedRecord.parentItem,this.draggedRecord),this.parent.setRecordValue("parentUniqueID",this.droppedRecord.parentUniqueID,this.draggedRecord),this.parent.setRecordValue("level",this.droppedRecord.level,this.draggedRecord),"ResourceView"===this.parent.viewType){var r=0===this.draggedRecord.level?"R"+this.draggedRecord.ganttProperties.taskId:"T"+this.draggedRecord.ganttProperties.taskId;this.parent.getTaskIds().splice(e,0,r)}if(this.draggedRecord.hasChildRecords){this.updateChildRecord(this.draggedRecord,e),this.updateChildRecordLevel(this.draggedRecord,1)}if(this.droppedRecord.parentItem){var a=this.parent.getParentTask(this.droppedRecord.parentItem).childRecords,s=a,o=s.indexOf(this.droppedRecord);s.splice(o,0,this.draggedRecord)}i.i(n.isNullOrUndefined)(this.draggedRecord.parentItem&&-1!==this.updateParentRecords.indexOf(this.draggedRecord.parentItem))||this.updateParentRecords.push(this.draggedRecord.parentItem)}},e.prototype.updateChildRecordLevel=function(e,t){var i,r=0;if(t++,!e.hasChildRecords)return 0;r=e.childRecords.length;for(var n=0;n<r;n++){i=e.childRecords[n];var a=void 0;if(e.parentItem){a=this.parent.treeGrid.uniqueIDCollection[e.parentItem.uniqueID]}i.level=e.parentItem?a.level+t:e.level+1,this.parent.setRecordValue("level",i.level,i),i.hasChildRecords&&(t--,t=this.updateChildRecordLevel(i,t))}return t},e.prototype.updateChildRecord=function(e,t,i){var r,n=this.parent,a=0;if(!e.hasChildRecords)return 0;a=e.childRecords.length;for(var s=0;s<a;s++)r=e.childRecords[s],t++,n.flatData.splice(t,0,r),this.parent.ids.splice(t,0,r.ganttProperties.rowUniqueID.toString()),n.taskFields.parentID&&n.dataSource.length>0&&this.ganttData.splice(t,0,r.taskData),r.hasChildRecords&&(t=this.updateChildRecord(r,t));return t},e.prototype.removeRecords=function(e){var t,r=this.parent;t=this.parent.dataSource instanceof a.DataManager?i.i(n.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;var s=e,o=this.parent.getParentTask(s.parentItem);if(s){if(s.parentItem){var l=o?o.childRecords:[],d=0;l&&l.length>0&&("ResourceView"===this.parent.viewType&&1===l.length&&(this.parent.isOnDelete=!0,l[0].isDelete=!0,this.parent.dataOperation.updateParentItems(o),this.parent.isOnDelete=!1,l[0].isDelete=!1),d=l.indexOf(s),o.childRecords.splice(d,1),!this.parent.taskFields.parentID&&o.taskData[this.parent.taskFields.child]&&o.taskData[this.parent.taskFields.child].splice(d,1),this.updateParentRecords.push(o))}if(!this.parent.taskFields.parentID){var p=[];p.push(s.ganttProperties.taskId.toString()),("ProjectView"===this.parent.viewType||"ResourceView"===this.parent.viewType&&"middleSegment"!==this.dropPosition)&&this.parent.editModule.removeFromDataSource(p)}if(r.taskFields.parentID){s.hasChildRecords&&s.childRecords.length>0&&this.removeChildItem(s);for(var h=void 0,u=t.length>0&&"ResourceView"!==this.parent.viewType?t:this.parent.flatData,c=0;c<u.length;c++)"ResourceView"===this.parent.viewType?u[c].ganttProperties.rowUniqueID===s.ganttProperties.rowUniqueID&&(h=c):u[c][this.parent.taskFields.id]===s.taskData[this.parent.taskFields.id]&&(h=c);if(-1!==h){t.length>0&&t.splice(h,1);var g=this.treeGridData.indexOf(s);this.treeGridData.splice(g,1),this.parent.ids.splice(g,1),-1!==this.parent.treeGrid.parentData.indexOf(s)&&this.parent.treeGrid.parentData.splice(this.parent.treeGrid.parentData.indexOf(s),1),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(h,1)}}var f=this.treeGridData.indexOf(s);if(!r.taskFields.parentID){var m=this.parent.editModule.getChildCount(s,0);this.treeGridData.splice(f,m+1),this.parent.ids.splice(f,m+1);var y=this.ganttData.indexOf(s.taskData);-1!==y&&(this.ganttData.splice(y,1),this.parent.treeGrid.parentData.splice(y,1)),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(f,m+1)}s.parentItem&&o&&o.childRecords&&!o.childRecords.length&&(o.expanded=!1,o.hasChildRecords=!1)}},e.prototype.removeChildItem=function(e){for(var t,r,s=0;s<e.childRecords.length;s++){t=e.childRecords[s];var o=void 0;o=this.parent.dataSource instanceof a.DataManager?i.i(n.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;for(var l=0;l<o.length;l++)o[l][this.parent.taskFields.id]===t.taskData[this.parent.taskFields.id]&&(r=l);if(-1!==r){o.length>0&&o.splice(r,1);var d=this.treeGridData.indexOf(t);this.treeGridData.splice(d,1),this.parent.ids.splice(d,1),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(r,1)}t.hasChildRecords&&this.removeChildItem(t)}},e.prototype.reorderRows=function(e,t,i){if(!this.parent.readOnly){if(e[0],0)return;"above"===i&&(this.dropPosition="topSegment"),"below"===i&&(this.dropPosition="bottomSegment"),"child"===i&&(this.dropPosition="middleSegment");for(var r=[],n=0;n<e.length;n++)r[n]=this.parent.updatedRecords[e[n]];var a={data:r,dropIndex:t,dropPosition:this.dropPosition};this.dropRows(a,!0)}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(5),n=(i.n(r),i(0)),a=(i.n(n),i(4)),s=(i.n(a),function(){function e(e){this.isSelectionFromChart=!1,this.multipleIndexes=[],this.selectedRowIndexes=[],this.enableSelectMultiTouch=!1,this.openPopup=!1,this.parent=e,this.bindEvents(),this.parent.treeGrid.selectedRowIndex=this.parent.selectedRowIndex,this.parent.treeGrid.allowSelection=this.parent.allowSelection,this.parent.treeGrid.grid.selectionSettings.enableToggle=this.parent.selectionSettings.enableToggle,this.parent.treeGrid.selectionSettings=i.i(r.getActualProperties)(this.parent.selectionSettings),this.wireEvents()}return e.prototype.getModuleName=function(){return"selection"},e.prototype.wireEvents=function(){this.parent.on("selectRowByIndex",this.selectRowByIndex,this),this.parent.isAdaptive?(this.parent.on("chartMouseClick",this.mouseUpHandler,this),this.parent.on("treeGridClick",this.popUpClickHandler,this)):this.parent.on("chartMouseUp",this.mouseUpHandler,this)},e.prototype.selectRowByIndex=function(){-1===this.parent.selectedRowIndex&&-1===this.parent.staticSelectedRowIndex||!this.parent.isLoad||(this.selectRow(-1!==this.parent.staticSelectedRowIndex?this.parent.staticSelectedRowIndex:this.parent.selectedRowIndex),this.parent.staticSelectedRowIndex=-1)},e.prototype.bindEvents=function(){this.parent.treeGrid.rowSelecting=this.rowSelecting.bind(this),this.parent.treeGrid.rowSelected=this.rowSelected.bind(this),this.parent.treeGrid.rowDeselecting=this.rowDeselecting.bind(this),this.parent.treeGrid.rowDeselected=this.rowDeselected.bind(this),this.parent.treeGrid.cellSelecting=this.cellSelecting.bind(this),this.parent.treeGrid.cellSelected=this.cellSelected.bind(this),this.parent.treeGrid.cellDeselecting=this.cellDeselecting.bind(this),this.parent.treeGrid.cellDeselected=this.cellDeselected.bind(this)},e.prototype.rowSelecting=function(e){if(!this.parent.isGanttChartRendered)return void(e.cancel=!0);e.isCtrlPressed=this.isMultiCtrlRequest,e.isShiftPressed=this.isMultiShiftRequest,e.target=this.actualTarget,i.i(n.isNullOrUndefined)(e.foreignKeyData)||0!==Object.keys(e.foreignKeyData).length||delete e.foreignKeyData,this.parent.trigger("rowSelecting",e)},e.prototype.rowSelected=function(e){var t="Multiple"!==this.parent.selectionSettings.type||i.i(n.isNullOrUndefined)(e.rowIndexes)?[e.rowIndex]:e.rowIndexes;this.addRemoveClass(t),this.selectedRowIndexes=i.i(n.extend)([],this.getSelectedRowIndexes(),[],!0),this.parent.setProperties({selectedRowIndex:this.parent.treeGrid.grid.selectedRowIndex},!0),this.isMultiShiftRequest&&(this.selectedRowIndexes=t),this.parent.autoFocusTasks&&this.parent.ganttChartModule.updateScrollLeft(i.i(n.getValue)("data.ganttProperties.left",e)),e.target=this.actualTarget,i.i(n.isNullOrUndefined)(e.foreignKeyData)||0!==Object.keys(e.foreignKeyData).length||delete e.foreignKeyData,this.prevRowIndex=e.rowIndex,i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(e),this.parent.trigger("rowSelected",e)},e.prototype.rowDeselecting=function(e){e.target=this.actualTarget,e.isInteracted=this.isInteracted,this.parent.trigger("rowDeselecting",e)},e.prototype.rowDeselected=function(e){var t,r;if(0!==this.multipleIndexes.length)t=this.multipleIndexes;else if(i.i(n.isNullOrUndefined)(e.rowIndexes))t=[e.rowIndex];else{for(var a=0;a<e.rowIndexes.length;a++)e.rowIndexes[a]===e.rowIndex&&(r=!0);t=r?e.rowIndexes:[e.rowIndex]}this.addRemoveClass(t),this.selectedRowIndexes=i.i(n.extend)([],this.getSelectedRowIndexes(),[],!0),this.parent.setProperties({selectedRowIndex:-1},!0),1===this.selectedRowIndexes.length&&this.parent.setProperties({selectedRowIndex:this.selectedRowIndexes[0]},!0),i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(),"Multiple"===this.parent.selectionSettings.type&&this.parent.isAdaptive&&0===this.selectedRowIndexes.length&&this.hidePopUp(),e.target=this.actualTarget,e.isInteracted=this.isInteracted,this.parent.trigger("rowDeselected",e),this.isInteracted=!1,this.multipleIndexes=[]},e.prototype.cellSelecting=function(e){var t=new a.Deferred;return this.parent.trigger("cellSelecting",e,function(e){t.resolve(e)}),t},e.prototype.cellSelected=function(e){this.parent.trigger("cellSelected",e),i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.cellDeselecting=function(e){this.parent.trigger("cellDeselecting",e)},e.prototype.cellDeselected=function(e){this.parent.trigger("cellDeselected",e),i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.selectCell=function(e,t){this.parent.treeGrid.selectCell(e,t)},e.prototype.selectCells=function(e){this.parent.treeGrid.grid.selectCells(e)},e.prototype.selectRow=function(e,t,r){var a,s=[].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector("tbody").children),o=s.filter(function(t){return parseInt(t.getAttribute("aria-rowindex"),0)===e})[0];-1===e||i.i(n.isNullOrUndefined)(o)||"Cell"===this.parent.selectionSettings.mode||(this.parent.showActiveElement&&!r?this.parent.treeGrid.grid.selectionModule.preventFocus=!0:this.parent.treeGrid.grid.selectionModule.preventFocus=!1,i.i(n.isNullOrUndefined)(this.selectedClass)||this.selectedClass!==o||t||(a=!0),!0!==a&&this.parent.treeGrid.selectRow(e,t),this.parent.treeGrid.grid.selectionModule.preventFocus=!0!==this.parent.treeGrid.grid.selectionModule.preventFocus&&this.parent.treeGrid.grid.selectionModule.preventFocus,this.prevRowIndex=e,this.selectedClass=o)},e.prototype.selectRows=function(e){!i.i(n.isNullOrUndefined)(e)&&e.length>0&&this.parent.treeGrid.selectRows(e)},e.prototype.getSelectedRowIndexes=function(){return this.parent.treeGrid.getSelectedRowIndexes()},e.prototype.getSelectedRowCellIndexes=function(){return this.parent.treeGrid.getSelectedRowCellIndexes()},e.prototype.getSelectedRecords=function(){return this.parent.treeGrid.getSelectedRecords()},e.prototype.getCellSelectedRecords=function(){for(var e=this.parent.selectionModule.getSelectedRowCellIndexes(),t=[],i=0;i<e.length;i++)t.push(this.parent.currentViewData[e[i].rowIndex]);return t},e.prototype.getSelectedRows=function(){return this.parent.treeGrid.getSelectedRows()},e.prototype.clearSelection=function(){this.addRemoveClass(this.selectedRowIndexes),this.parent.treeGrid.clearSelection(),this.parent.selectedRowIndex=-1,this.selectedRowIndexes=[],this.selectedClass=null,i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(),this.isInteracted=!1},e.prototype.highlightSelectedRows=function(e,t){if(this.isMultiCtrlRequest=e.ctrlKey||this.enableSelectMultiTouch,this.isMultiShiftRequest=e.shiftKey,this.actualTarget=e.target,this.isInteracted=!0,this.isSelectionFromChart=t,t){var r=i.i(n.closest)(e.target,"tr.e-chart-row"),a=parseInt(r.getAttribute("aria-rowindex"),10),s=this.parent.selectionSettings.enableToggle;if("Single"===this.parent.selectionSettings.type||!this.isMultiCtrlRequest&&!this.isMultiShiftRequest)this.selectRow(a,s);else if(this.isMultiShiftRequest)this.selectRowsByRange(i.i(n.isNullOrUndefined)(this.prevRowIndex)?a:this.prevRowIndex,a);else{i.i(n.setValue)("isMultiCtrlRequest",!0,this.parent.treeGrid.grid.selectionModule),this.parent.treeGrid.grid.selectionModule.addRowsToSelection([a]);var o=this.selectedRowIndexes.indexOf(a)>-1;o&&this.addRemoveClass([a])}}},e.prototype.getselectedrowsIndex=function(e,t){for(var i=[],r=e<t?{i:e,max:t}:{i:t,max:e},n=r.i,a=r.max;n<=a;n++)i.push(n);e>t&&i.reverse(),this.selectedRowIndexes=i},e.prototype.selectRowsByRange=function(e,t){this.isSelectionFromChart=!0,this.getselectedrowsIndex(e,t),this.selectRows(this.selectedRowIndexes)},e.prototype.addRemoveClass=function(e){for(var t=[].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector("tbody").children),r=this,a=0;a<e.length;a++)!function(a){var s=t.filter(function(t){return parseInt(t.getAttribute("aria-rowindex"),0)===e[a]})[0];i.i(n.isNullOrUndefined)(s)||(r.getSelectedRowIndexes().indexOf(e[a])>-1?r.addClass(s):r.removeClass(s))}(a)},e.prototype.addClass=function(e){i.i(n.addClass)([e],"e-active"),e.setAttribute("aria-selected","true")},e.prototype.removeClass=function(e){i.i(n.removeClass)([e],"e-active"),e.removeAttribute("aria-selected")},e.prototype.showPopup=function(e){this.isSelectionFromChart?(i.i(r.setCssInGridPopUp)(this.parent.element.querySelector(".e-ganttpopup"),e,"e-rowselect e-icons e-icon-rowselect"+(this.enableSelectMultiTouch&&(this.getSelectedRecords().length>1||this.getSelectedRowCellIndexes().length>1)?" e-spanclicked":"")),document.getElementsByClassName("e-gridpopup")[0].style.display="none",this.openPopup=!0):0===this.selectedRowIndexes.length&&this.hidePopUp()},e.prototype.hidePopUp=function(){this.openPopup?(document.getElementsByClassName("e-ganttpopup")[0].style.display="none",this.openPopup=!1):document.getElementsByClassName("e-gridpopup")[0].style.display="none"},e.prototype.popUpClickHandler=function(e){var t=e.target,r=this.parent.treeGrid.grid,a=i.i(n.closest)(t,".e-ganttpopup")?i.i(n.closest)(t,".e-ganttpopup"):i.i(n.closest)(t,".e-gridpopup");if(a){var s=a.querySelector(".e-rowselect");i.i(n.closest)(t,".e-ganttpopup")&&!s.classList.contains("e-spanclicked")?(this.enableSelectMultiTouch=!0,s.classList.add("e-spanclicked")):i.i(n.closest)(t,".e-gridpopup")&&s.classList.contains("e-spanclicked")?(this.openPopup=!0,this.enableSelectMultiTouch=!0):(this.hidePopUp(),this.enableSelectMultiTouch=!1,i.i(n.closest)(t,".e-ganttpopup")&&s.classList.remove("e-spanclicked"))}else if("Multiple"===this.parent.selectionSettings.type&&this.parent.isAdaptive){var o=i.i(n.closest)(t,".e-rowcell");o&&0===this.selectedRowIndexes.length&&this.hidePopUp()}r&&i.i(n.setValue)("enableSelectMultiTouch",this.enableSelectMultiTouch,r.selectionModule)},e.prototype.mouseUpHandler=function(e){var t=!1,a=null;if(e.target.closest(".e-rowcell")?a=e.target:e.target.closest(".e-chart-row")&&(a=e.target.closest(".e-left-label-container")||e.target.closest(".e-taskbar-main-container")||e.target.closest(".e-right-label-container")),this.parent.focusModule&&this.parent.focusModule.setActiveElement(a),this.parent.editModule&&this.parent.editSettings.allowTaskbarEditing&&this.parent.editModule.taskbarEditModule){var s=this.parent.editModule.taskbarEditModule;(s.isMouseDragged||s.tapPointOnFocus)&&(t=!0)}if(!t&&this.parent.element.contains(e.target)){var o=i.i(r.parentsUntil)(e.target,"e-chart-row"),l=e.target.classList.contains("e-rowcell")||e.target.classList.contains("e-row")||e.target.classList.contains("e-treegridexpand")||e.target.classList.contains("e-treegridcollapse")||!i.i(n.isNullOrUndefined)(o);this.popUpClickHandler(e),"Cell"!==this.parent.selectionSettings.mode&&l?(i.i(n.closest)(e.target,"tr.e-chart-row")?(this.parent.enableVirtualization&&(this.parent.treeGrid.grid.selectionModule.isInteracted=!0),this.highlightSelectedRows(e,!0)):this.highlightSelectedRows(e,!1),"Multiple"===this.parent.selectionSettings.type&&this.parent.isAdaptive&&(this.selectedRowIndexes.length>0?this.showPopup(e):this.hidePopUp())):this.isSelectionFromChart=!1}},e.prototype.maintainSelectedRecords=function(e){this.parent.selectionModule.getSelectedRowIndexes().indexOf(e)>-1&&this.addRemoveClass([e])},e.prototype.destroy=function(){this.parent.isDestroyed||(this.parent.off("selectRowByIndex",this.selectRowByIndex),this.parent.isAdaptive?(this.parent.off("chartMouseClick",this.mouseUpHandler),this.parent.off("treeGridClick",this.popUpClickHandler)):this.parent.off("chartMouseUp",this.mouseUpHandler))},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(6),n=(i.n(r),i(5)),a=(i.n(n),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Sort),this.parent.treeGrid.allowSorting=this.parent.allowSorting,this.parent.treeGrid.sortSettings=i.i(n.getActualProperties)(this.parent.sortSettings),this.addEventListener()}return e.prototype.getModuleName=function(){return"sort"},e.prototype.addEventListener=function(){this.parent.on("updateModel",this.updateModel,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off("updateModel",this.updateModel)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.sortColumn=function(e,t,i){this.parent.treeGrid.sortByColumn(e,t,i)},e.prototype.clearSorting=function(){this.parent.treeGrid.clearSorting()},e.prototype.updateModel=function(){this.parent.sortSettings=this.parent.treeGrid.sortSettings},e.prototype.removeSortColumn=function(e){this.parent.treeGrid.grid.removeSortColumn(e)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(2)),a=i(10),s=i(3),o=i(78),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d=this&&this.__assign||function(){return d=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},d.apply(this,arguments)},p=function(e){function t(t){var i=e.call(this,t)||this;return i.isMouseDragged=!1,i.dependencyCancel=!1,i.editElement=null,i.elementOffsetLeft=0,i.elementOffsetTop=0,i.elementOffsetWidth=0,i.elementOffsetHeight=0,i.segmentIndex=-1,i.parent=t,i.initPublicProp(),i.wireEvents(),i.editTooltip=new o.a(i.parent,i),i}return l(t,e),t.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)},t.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},t.prototype.mouseDownHandler=function(e){if(this.parent.editSettings.allowTaskbarEditing&&!this.parent.readOnly)if(this.canDrag=!1,this.parent.isAdaptive&&this.taskBarEditElement){var t=this.getElementByPosition(e),r=i.i(n.j)(t,s.F);!r||r.innerHTML!==this.taskBarEditElement.innerHTML||t.classList.contains(s.G)||t.classList.contains(s.H)||this.tapPointOnFocus||(this.updateTaskBarEditElement(e),this.canDrag=!0,e.preventDefault())}else this.parent.isAdaptive||this.updateTaskBarEditElement(e)},t.prototype.mouseClickHandler=function(e){if(this.parent.editSettings.allowTaskbarEditing){var t=this.getElementByPosition(e),r=i.i(n.j)(t,s.F);if(this.parent.selectionModule&&this.parent.selectionModule.enableSelectMultiTouch)return void(this.tapPointOnFocus&&this.updateTaskBarEditElement(e));this.tapPointOnFocus&&r&&r.innerHTML!==this.taskBarEditElement.innerHTML?(this.connectorSecondRecord=this.parent.ganttChartModule.getRecordByTaskBar(r),this.connectorSecondAction="ConnectorPointLeftDrag",this.connectorSecondElement=r,this.fromPredecessorText="Finish",this.validateConnectorPoint()&&this.taskBarEditingAction(e,!0),this.showHideActivePredecessors(!1),this.initPublicProp()):t.classList.contains(s.I)||t.classList.contains(s.J)?(this.canDrag=!1,this.multipleSelectionEnabled(),this.showHideTaskBarEditingElements(t,this.taskBarEditElement),this.tapPointOnFocus=!0,this.taskBarEditAction="ConnectorPointRightDrag",this.connectorSecondRecord=this.taskBarEditRecord,this.taskBarEditingAction(e,!1)):(this.tapPointOnFocus&&(this.showHideActivePredecessors(!1),this.showHideTaskBarEditingElements(r,this.taskBarEditElement)),this.updateTaskBarEditElement(e))}},t.prototype.showHideActivePredecessors=function(e){var t=this.taskBarEditRecord.ganttProperties,n=t.predecessor,a="ResourceView"===this.parent.viewType?t.taskId:t.rowUniqueID;if(n)for(var o=0;o<n.length;o++){var l=n[o];a.toString()!==l.from&&a.toString()!==l.to||this.applyActiveColor(l.from,l.to,e)}var d=this.parent.ganttChartModule.chartBodyContainer;e?(i.i(r.addClass)([this.taskBarEditElement],[s.K]),i.i(r.addClass)([d],[s.L])):(i.i(r.removeClass)([this.taskBarEditElement],[s.K]),i.i(r.removeClass)([d],[s.L])),this.touchEdit=e,i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},t.prototype.applyActiveColor=function(e,t,n){var a="ProjectView"===this.parent.viewType?this.taskBarEditRecord.ganttProperties.taskId.toString():this.taskBarEditRecord.ganttProperties.rowUniqueID.toString(),o=a===e?this.parent.connectorLineModule.getRecordByID(t):this.parent.connectorLineModule.getRecordByID(e),l=this.parent.ganttChartModule.getChartRows()[this.parent.currentViewData.indexOf(o)];if(!i.i(r.isNullOrUndefined)(l)){var d=l.querySelector("."+s.F),p=this.parent.element.querySelector("#ConnectorLineparent"+e+"child"+t);n?(i.i(r.addClass)([d],[s.M]),p&&i.i(r.addClass)([p],[s.M])):(i.i(r.removeClass)([d],[s.M]),p&&i.i(r.removeClass)([p],[s.M]))}},t.prototype.validateConnectorPoint=function(){var e=this.taskBarEditRecord.ganttProperties,t=this.connectorSecondRecord.ganttProperties,i=!0,r="ResourceView"===this.parent.viewType?e.taskId:e.rowUniqueID,n="ResourceView"===this.parent.viewType?t.taskId:t.rowUniqueID;if(this.connectorSecondRecord.hasChildRecords)i=!1;else if(t.predecessor)for(var a=0;a<t.predecessor.length;a++){var s=t.predecessor[a];if(s.from===r.toString()&&s.to===n.toString()){this.parent.connectorLineEditModule.childRecord=this.connectorSecondRecord,this.parent.connectorLineEditModule.predecessorIndex=a,this.parent.connectorLineEditModule.renderPredecessorDeleteConfirmDialog(),i=!1;break}if(s.from===n.toString()&&s.to===r.toString()){this.parent.connectorLineEditModule.childRecord=this.taskBarEditRecord,this.parent.connectorLineEditModule.predecessorIndex=a,this.parent.connectorLineEditModule.renderPredecessorDeleteConfirmDialog(),i=!1;break}}return i},t.prototype.mouseLeaveHandler=function(e){this.dragMouseLeave=!0},t.prototype.updateTaskBarEditElement=function(e){var t,a=this.getElementByPosition(e);if(a.classList.contains(s.N)||a.classList.contains(s.O)||a.classList.contains(s.P))t=i.i(n.j)(a,s.O);else if(a.classList.contains(s.Q)||a.classList.contains(s.R)||a.classList.contains(s.S))t=i.i(n.j)(a,s.S);else if(t=i.i(n.j)(a,s.F),!i.i(r.isNullOrUndefined)(t)&&!a.classList.contains("e-connectorpoint-left")&&!a.classList.contains("e-connectorpoint-right")){var o=this.parent.ganttChartModule.getRecordByTaskBar(t);!i.i(r.isNullOrUndefined)(o.ganttProperties.segments)&&o.ganttProperties.segments.length>0&&(t=i.i(n.j)(a,s.T))}if(this.parent.editSettings.allowTaskbarEditing&&t){this.showHideTaskBarEditingElements(t,this.taskBarEditElement),this.editElement=t,this.taskBarEditElement=t;var l=this.taskBarEditElement.getAttribute("data-segment-index");if(i.i(r.isNullOrUndefined)(l)?this.segmentIndex=-1:this.segmentIndex=Number(l),this.taskBarEditRecord=this.parent.ganttChartModule.getRecordByTaskBar(this.taskBarEditElement),("mousedown"===e.type||"touchstart"===e.type||"click"===e.type)&&(this.roundOffDuration=!0,this.taskBarEditAction=this.getTaskBarAction(e),"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)||(this.taskBarEditAction=null),this.updateMouseDownProperties(e),"ResourceView"===this.parent.viewType)){if(0===this.taskBarEditRecord.level)return;if(this.parent.enableMultiTaskbar){var d=this.parent.getTaskByUniqueID(this.taskBarEditRecord.parentItem.uniqueID);i.i(r.isNullOrUndefined)(d)||d.expanded||(this.prevZIndex=this.taskBarEditElement.style.zIndex,this.taskBarEditElement.style.zIndex="1000",i.i(r.addClass)([this.taskBarEditElement.querySelector(".e-gantt-child-taskbar")],"e-collapsed-taskbar-drag"))}}}else this.parent.isAdaptive?(this.taskBarEditElement&&this.showHideTaskBarEditingElements(t,this.taskBarEditElement),this.initPublicProp()):this.showHideTaskBarEditingElements(t,this.taskBarEditElement)},t.prototype.showHideTaskBarEditingElements=function(e,t,n){t=t||this.editElement;var a=!!this.parent.taskFields.progress,o=!0;if(!this.parent.readOnly){if("ResourceView"===this.parent.viewType&&this.parent.enableMultiTaskbar&&e){var l=this.parent.ganttChartModule.getRecordByTaskBar(e),d=this.parent.getParentTask(l.parentItem);i.i(r.isNullOrUndefined)(d)||d.expanded||(a=!1,o=!1)}if(e){if(e.querySelector("."+s.U)){if(i.i(r.addClass)([e.querySelector("."+s.U)],[s.V]),i.i(r.addClass)([e.querySelector("."+s.W)],[s.X]),a){var p=!i.i(r.isNullOrUndefined)(e.querySelector("."+s.Y));p&&i.i(r.addClass)([e.querySelector("."+s.Y)],[s.Z])}}else if(this.parent.isAdaptive&&a){var l=this.parent.ganttChartModule.getRecordByTaskBar(e);l.hasChildRecords&&i.i(r.addClass)([e],[s._0])}if(i.i(r.addClass)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+s._1),[s._2]),!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)&&(e.querySelector("."+s.G)||e.parentElement.querySelector("."+s.G))&&o){var h=i.i(r.isNullOrUndefined)(e.querySelector("."+s.G))?e.parentElement:e;i.i(r.addClass)([h.querySelector("."+s.G)],[s.I]),i.i(r.addClass)([h.querySelector("."+s.H)],[s.J])}}else n||i.i(r.removeClass)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+s._1),[s._2]);if(t&&e!==t){if(t.querySelector("."+s.U)&&(i.i(r.removeClass)([t.querySelector("."+s.U)],[s.V]),i.i(r.removeClass)([t.querySelector("."+s.W)],[s.X]),t.querySelector("."+s.Y)&&i.i(r.removeClass)([t.querySelector("."+s.Y)],[s.Z])),i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)||!t.querySelector("."+s.G)&&!t.parentElement.querySelector("."+s.G)){if(this.parent.isAdaptive){var l=this.parent.ganttChartModule.getRecordByTaskBar(t);l&&l.hasChildRecords&&i.i(r.removeClass)([t],[s._0])}}else{var h=i.i(r.isNullOrUndefined)(t.querySelector("."+s.G))?t.parentElement:t;i.i(r.removeClass)([h.querySelector("."+s.G)],[s.I]),i.i(r.removeClass)([h.querySelector("."+s.H)],[s.J])}this.editElement=null}}},t.prototype.getTaskBarAction=function(e){var t=this.getElementByPosition(e),n=this.taskBarEditRecord,a="";return t.classList.contains(s.U)?a="LeftResizing":t.classList.contains(s.W)?a="RightResizing":(t.classList.contains(s.Y)||i.i(r.closest)(t,"."+s.Y))&&this.parent.taskFields.progress?a="ProgressResizing":t.classList.contains(s.G)?a="ConnectorPointLeftDrag":t.classList.contains(s.H)?a="ConnectorPointRightDrag":t.classList.contains(s.N)?a="ParentResizing":t.classList.contains(s.P)||t.classList.contains(s.O)||t.classList.contains(s.S)||t.classList.contains(s.Q)||t.classList.contains(s.R)||t.classList.contains(s.S)?a="ManualParentDrag":n&&(a=n.hasChildRecords?"Auto"===this.parent.taskMode?"ParentDrag":"":n.ganttProperties.isMilestone?"MilestoneDrag":"ChildDrag"),a},t.prototype.updateMouseDownProperties=function(e){var t=this.getCoordinate(e);if(t.pageX||t.pageY){var i=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);this.mouseDownX=t.pageX-i.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.tooltipPositionX=this.mouseDownX,this.mouseDownY=t.pageY-i.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,"",""))},t.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 e=this.taskBarEditRecord.ganttProperties;this.previousItem=this.parent.timelineModule.extendFunction(e,this.previousItemProperty),"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction&&this.editTooltip.showHideTaskbarEditTooltip(!0,this.segmentIndex),this.taskBarEditElement.setAttribute("aria-grabbed","true")}},t.prototype.mouseMoveAction=function(e){var t=this;if(this.parent.isAdaptive){if(!this.canDrag)return;this.multipleSelectionEnabled()}var i=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer),r=this.getCoordinate(e);if(this.mouseMoveX=r.pageX-i.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.mouseMoveY=r.pageY-i.top+this.parent.ganttChartModule.scrollObject.previousScroll.top,this.dragMouseLeave=!1,this.isMouseDragCheck(),this.isMouseDragged&&this.taskBarEditAction){var n={cancel:!1,requestType:"taskbarediting",taskBarEditAction:this.taskBarEditAction,data:this.taskBarEditRecord};-1!==this.segmentIndex&&(n.requestType="mergeSegment"),this.parent.trigger("actionBegin",n,function(i){!1===i.cancel&&t.taskBarEditingAction(e,!1)})}else this.parent.isAdaptive||this.taskBarEditAction||this.updateTaskBarEditElement(e)},t.prototype.taskBarEditingAction=function(e,t){var n=this,a={},s=this.parent.ganttChartModule.getIndexByTaskBar(this.taskBarEditElement);if(null!==this.taskBarEditRecord){if(a.editingFields=this.taskBarEditRecord.ganttProperties,a.data=this.taskBarEditRecord,"ResourceView"===this.parent.viewType&&0===a.data.level)return;a.recordIndex=s,a.taskBarEditAction=this.taskBarEditAction,a.roundOffDuration=this.roundOffDuration,a.cancel=!1,a.previousData=this.previousItem,a.segmentIndex=this.segmentIndex,this.roundOffDuration=a.roundOffDuration,this.targetElement=a.target=i.i(r.closest)(e.target,".e-gantt-child-taskbar"),this.updateMouseMoveProperties(e),"ProgressResizing"===this.taskBarEditAction?this.performProgressResize(e):"LeftResizing"===this.taskBarEditAction?this.enableLeftResizing(e):"RightResizing"===this.taskBarEditAction||"ParentResizing"===this.taskBarEditAction?this.enableRightResizing(e):"ParentDrag"===this.taskBarEditAction||"ChildDrag"===this.taskBarEditAction||"MilestoneDrag"===this.taskBarEditAction||"ManualParentDrag"===this.taskBarEditAction?this.enableDragging(e):"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||(this.updateConnectorLineSecondProperties(e),this.triggerDependencyEvent(e),this.parent.isAdaptive||this.drawFalseLine()),this.setItemPosition(),this.updateEditedItem(),this.editTooltip.updateTooltip(this.segmentIndex),t&&this.taskBarEditedAction(e),this.parent.trigger("taskbarEditing",a,function(e){e.cancel&&null!==n.taskBarEditRecord&&(n.tapPointOnFocus=!1,i.i(r.merge)(n.taskBarEditRecord.ganttProperties,e.previousData))})}},t.prototype.updateMouseMoveProperties=function(e){var t=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer),i=this.getCoordinate(e);(i.pageX||i.pageY)&&(this.mouseMoveX=i.pageX-t.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.tooltipPositionX=this.mouseMoveX,this.mouseMoveY=i.pageY-t.top+this.parent.ganttChartModule.scrollObject.previousScroll.top);var r="ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction;if(this.taskBarEditRecord.ganttProperties.width>3&&("ProgressResizing"!==this.taskBarEditAction||0!==this.taskBarEditRecord.ganttProperties.progress&&100!==this.taskBarEditRecord.ganttProperties.progress)||r){var n=this.mouseMoveX-this.parent.ganttChartModule.scrollObject.previousScroll.left+t.left,a=this.mouseMoveY-this.parent.ganttChartModule.scrollObject.previousScroll.top+t.top;n+20>t.left+this.parent.ganttChartModule.chartBodyContainer.offsetWidth?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.left,this.startScrollTimer("right")):n-20<t.left?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.left,this.startScrollTimer("left")):r&&a+80>t.top+this.parent.ganttChartModule.chartBodyContainer.offsetHeight?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.top,this.startScrollTimer("bottom")):r&&a-20<t.top?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.top,this.startScrollTimer("top")):this.stopScrollTimer()}else this.stopScrollTimer()},t.prototype.startScrollTimer=function(e){var t=this;this.stopScrollTimer(),this.scrollTimer=window.setInterval(function(){t.timerCount="right"===e?t.timerCount+1>=t.parent.timelineModule.totalTimelineWidth?t.parent.timelineModule.totalTimelineWidth:t.timerCount+1:"bottom"===e?t.timerCount+1:t.timerCount-1<0?0:t.timerCount-1,"bottom"===e||"top"===e?t.parent.ganttChartModule.scrollObject.setScrollTop(t.timerCount):t.parent.ganttChartModule.scrollObject.setScrollLeft(t.timerCount),"ConnectorPointLeftDrag"!==t.taskBarEditAction&&"ConnectorPointRightDrag"!==t.taskBarEditAction||t.drawFalseLine()},0)},t.prototype.stopScrollTimer=function(){window.clearInterval(this.scrollTimer),this.scrollTimer=null},t.prototype.enableDragging=function(e){var t=this.taskBarEditRecord.ganttProperties,n=0;if(this.taskBarEditElement.classList.contains("e-segmented-taskbar")&&!this.taskBarEditElement.classList.contains("e-segment-first")){var a=this.taskBarEditRecord.ganttProperties.segments.map(function(e){return d({},e)}),s=a[this.segmentIndex];this.mouseDownX>this.mouseMoveX?(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,s.left=s.left-n):(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,s.left=s.left+n);var o=a[this.segmentIndex-1],l=a[this.segmentIndex+1],p=void 0;p=this.taskBarEditElement.classList.contains("e-segment-inprogress")?s.left<o.left+o.width?o.left+o.width:s.width+s.left>l.left?l.left-s.width:s.left:s.left<o.left+o.width?o.left+o.width:t.left+s.width+s.left>=this.parent.timelineModule.totalTimelineWidth?this.parent.timelineModule.totalTimelineWidth-s.width:s.left,s.left=p,this.parent.setRecordValue("segments",a,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")}else{this.mouseDownX>this.mouseMoveX?(n=this.mouseDownX-this.mouseMoveX)>0&&this.parent.setRecordValue("left",this.previousItem.left-n,t,!0):(n=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("left",this.previousItem.left+n,t,!0));var p=t.left<0?0:t.left+t.width>=this.parent.timelineModule.totalTimelineWidth?this.parent.timelineModule.totalTimelineWidth-t.width:t.left;this.parent.setRecordValue("left",p,t,!0)}},t.prototype.performProgressResize=function(e){var t=this.taskBarEditRecord.ganttProperties,i=0;this.mouseDownX>this.mouseMoveX?this.mouseMoveX>t.left&&this.mouseMoveX<t.left+t.width&&t.left>0?(i=this.mouseMoveX-t.left,this.parent.setRecordValue("progressWidth",i,t,!0)):this.mouseMoveX>=t.left+t.width?this.parent.setRecordValue("progressWidth",t.width,t,!0):this.parent.setRecordValue("progressWidth",0,t,!0):this.mouseMoveX>t.left&&this.mouseMoveX<t.left+t.width?(i=this.mouseMoveX-t.left,this.parent.setRecordValue("progressWidth",i,t,!0)):this.mouseMoveX<=t.left?this.parent.setRecordValue("progressWidth",0,t,!0):this.parent.setRecordValue("progressWidth",t.width,t,!0);var r=t.progressWidth>t.width?t.width:t.progressWidth;r=t.progressWidth<0?0:t.progressWidth,this.parent.setRecordValue("progressWidth",r,t,!0);var n=t.width-t.progressWidth;this.progressBorderRadius=n<=4?4-n:0},t.prototype.enableLeftResizing=function(e){var t=this.taskBarEditRecord.ganttProperties,i=0;this.taskBarEditElement.classList.contains("e-segmented-taskbar")?this.enableSplitTaskLeftResize(t):(this.mouseDownX>this.mouseMoveX?this.mouseMoveX<t.left+t.width?(i=this.mouseDownX-this.mouseMoveX,t.left>0&&(this.parent.setRecordValue("left",this.previousItem.left-i,t,!0),this.parent.setRecordValue("width",this.previousItem.width+i,t,!0))):this.mouseMoveX>t.left+t.width&&(i=this.mouseDownX-this.mouseMoveX,this.parent.setRecordValue("left",this.previousItem.left-i,t,!0),this.parent.setRecordValue("width",3,t,!0)):this.mouseMoveX<t.left+t.width?(i=this.mouseMoveX-this.mouseDownX,t.left<t.left+t.width&&this.previousItem.left+i<=this.previousItem.left+this.previousItem.width&&(this.parent.setRecordValue("left",this.previousItem.left+i,t,!0),this.parent.setRecordValue("width",this.previousItem.width-i,t,!0))):(i=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("left",this.previousItem.left+i,t,!0),this.parent.setRecordValue("width",3,t,!0)),this.updateEditPosition(e,t),this.parent.setRecordValue("left",this.previousItem.left+this.previousItem.width-t.width,t,!0))},t.prototype.enableSplitTaskLeftResize=function(e){var t=this.taskBarEditRecord.ganttProperties.segments.map(function(e){return d({},e)}),n=t[this.segmentIndex],a=0;if(this.mouseDownX>this.mouseMoveX)if(this.mouseMoveX<e.left+n.width+n.left){if(a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,n.left>0){if(n.left=n.left-a,n.width=n.width+a,0!==this.segmentIndex){var s=t[this.segmentIndex-1];if(e.left+n.left<e.left+s.left+s.width){var o=e.left+s.left+s.width-(e.left+n.left);n.width-=o,n.left=n.left+o}}}else if(n.left<=0&&0===this.segmentIndex){this.parent.setRecordValue("left",e.left-a,e,!0),this.parent.setRecordValue("width",e.width+a,e,!0),n.width=n.width+a;for(var l=1;l<e.segments.length;l++){var p=t[l];p.left=p.left+a}}}else this.mouseMoveX>e.left+n.width+n.left&&(a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,n.left=n.left-a,n.width=this.parent.perDayWidth);else if(this.mouseMoveX<e.left+n.width+n.left-this.parent.perDayWidth)if(a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,0===this.segmentIndex&&n.left<=0){this.parent.setRecordValue("left",e.left+a,e,!0),this.parent.setRecordValue("width",e.width-a,e,!0),n.width=n.width-a;for(var l=1;l<e.segments.length;l++){var h=t[l];h.left=h.left-a}}else n.left<n.left+n.width&&n.left+a<=n.left+n.width&&(n.left=n.left+a,n.width=n.width-a);else if(this.mouseMoveX<e.left+n.left+n.width&&n.width>this.parent.perDayWidth){a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX;var u=n.width-a<this.parent.perDayWidth?this.parent.perDayWidth>n.width?this.parent.perDayWidth-n.width:n.width-this.parent.perDayWidth:0;if(a-=u,0===this.segmentIndex){this.parent.setRecordValue("width",e.width-a,e,!0),this.parent.setRecordValue("left",e.left+a,e,!0);for(var l=1;l<e.segments.length;l++){var c=t[l];c.left=c.left-a}}else n.left=n.left+a,n.width=n.width-a}this.parent.setRecordValue("segments",t,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},t.prototype.updateEditPosition=function(e,t){this.updateIsMilestone(t),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(t.width,t.progress),t,!0)},t.prototype.updateIsMilestone=function(e){e.width<=3?(this.parent.setRecordValue("width",3,e,!0),this.parent.setRecordValue("isMilestone",!0,e,!0)):(this.parent.setRecordValue("width",e.width,e,!0),this.parent.setRecordValue("isMilestone",!1,e,!0))},t.prototype.enableRightResizing=function(e){var t=this.taskBarEditRecord.ganttProperties,n=0;if(this.taskBarEditElement.classList.contains("e-segmented-taskbar")){var a=this.taskBarEditRecord.ganttProperties.segments.map(function(e){return d({},e)}),s=a[this.segmentIndex];this.mouseDownX>this.mouseMoveX?this.mouseMoveX>t.left+s.left&&this.mouseDownX-this.mouseMoveX>3?(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,s.width=s.width-n):this.mouseMoveX<t.left+s.left&&(s.width=this.parent.perDayWidth):this.mouseMoveX>s.left&&(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,s.width=s.width+n);var o=void 0,l=this.segmentIndex!==a.length-1?a[this.segmentIndex+1]:null;i.i(r.isNullOrUndefined)(l)||(this.taskBarEditElement.classList.contains("e-segment-last")||(o=s.left+s.width>l.left?l.left-s.left:s.width),s.width=o),this.segmentIndex===t.segments.length-1&&0===this.segmentIndex&&this.parent.setRecordValue("width",s.width,t,!0),this.parent.setRecordValue("segments",a,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")}else this.mouseDownX>this.mouseMoveX?this.mouseMoveX>t.left&&this.mouseDownX-this.mouseMoveX>3?(n=this.mouseDownX-this.mouseMoveX,this.parent.setRecordValue("width",this.previousItem.width-n,t,!0)):this.mouseMoveX<t.left&&this.parent.setRecordValue("width",3,t,!0):this.mouseMoveX>t.left&&(n=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("width",this.previousItem.width+n,t,!0)),this.updateEditPosition(e,t)},t.prototype.updateEditedItem=function(){var e,t,n,a,s=this.taskBarEditRecord.ganttProperties;switch(this.taskBarEditAction){case"ProgressResizing":this.parent.setRecordValue("progress",this.getProgressPercent(s.width,s.progressWidth),s,!0);break;case"LeftResizing":-1===this.segmentIndex?(e=this.getRoundOffStartLeft(s,this.roundOffDuration),t=this.getDateByLeft(e),i.i(r.isNullOrUndefined)(s.endDate)&&(n=this.parent.dateValidationModule.getValidEndDate(s),this.parent.setRecordValue("endDate",n,s,!0)),a=this.parent.dateValidationModule.checkStartDate(t,s,null),this.parent.setRecordValue("startDate",new Date(a.getTime()),s,!0),0===this.parent.dateValidationModule.compareDates(s.startDate,s.endDate)&&i.i(r.isNullOrUndefined)(s.isMilestone)&&!1===s.isMilestone&&0===s.duration&&this.parent.setRecordValue("duration",1,s,!0),s.isMilestone&&this.parent.setRecordValue("endDate",new Date(a.getTime()),s,!0),this.parent.dateValidationModule.calculateDuration(this.taskBarEditRecord),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")):this.updateSplitLeftResize(s);break;case"RightResizing":case"ParentResizing":if(-1===this.segmentIndex){e=this.getRoundOffEndLeft(s,this.roundOffDuration);var o=this.getDateByLeft(e);i.i(r.isNullOrUndefined)(s.startDate)&&(a=this.parent.dateValidationModule.getValidStartDate(s),this.parent.setRecordValue("startDate",a,s,!0));var l=i.i(r.isNullOrUndefined)(s.startDate)?a:s.startDate;n=s.isMilestone?l:this.parent.dateValidationModule.checkEndDate(o,this.taskBarEditRecord.ganttProperties),this.parent.setRecordValue("endDate",new Date(n.getTime()),s,!0),this.parent.dateValidationModule.calculateDuration(this.taskBarEditRecord),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")}else this.updateSplitRightResizing(s);break;case"ParentDrag":case"ChildDrag":case"MilestoneDrag":case"ManualParentDrag":-1===this.segmentIndex||0===this.segmentIndex?this.updateChildDrag(s):this.setSplitTaskDrag(s)}},t.prototype.updateChildDrag=function(e){var t,n=this.getRoundOffStartLeft(e,this.roundOffDuration),a=this.getDateByLeft(n);0===this.segmentIndex?(this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(a,e,null),e,!0),e.segments[0].startDate=a,e.segments[0].endDate=this.parent.dataOperation.getEndDate(e.segments[0].startDate,e.segments[0].duration,e.durationUnit,e,!1),this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments"),this.parent.chartRowsModule.incrementSegments(e.segments,0,this.taskBarEditRecord),this.parent.setRecordValue("endDate",e.segments[e.segments.length-1].endDate,e,!0)):!i.i(r.isNullOrUndefined)(e.endDate)&&i.i(r.isNullOrUndefined)(e.startDate)?(t=this.parent.dateValidationModule.checkStartDate(a,e,null),t=this.parent.dateValidationModule.checkEndDate(t,this.taskBarEditRecord.ganttProperties),this.parent.setRecordValue("endDate",t,e,!0)):(this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(a,e,null),e,!0),i.i(r.isNullOrUndefined)(e.duration)||this.parent.dateValidationModule.calculateEndDate(this.taskBarEditRecord))},t.prototype.updateSplitLeftResize=function(e){var t=e.segments[this.segmentIndex],n=0===this.segmentIndex?this.getRoundOffStartLeft(e,this.roundOffDuration):this.getRoundOffStartLeft(t,this.roundOffDuration),a=0===this.segmentIndex?this.getDateByLeft(n):this.getDateByLeft(e.left+n),s=this.parent.dataOperation.checkStartDate(a,e,!1),o=this.parent.dataOperation.getDuration(s,t.endDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);if(t.startDate=new Date(s.getTime()),t.duration=o,this.parent.setRecordValue("duration",this.sumOfDuration(e.segments),e,!0),0===this.segmentIndex&&this.parent.setRecordValue("startDate",t.startDate,e,!0),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration"),!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex-1])){var l=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex-1].endDate,e.segments[this.segmentIndex].startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);t.offsetDuration=l}this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},t.prototype.updateSplitRightResizing=function(e){var t=e.segments[this.segmentIndex],n=this.getRoundOffEndLeft(e,this.roundOffDuration),a=this.getDateByLeft(n),s=this.parent.dataOperation.checkEndDate(a,e,!1),o=this.parent.dataOperation.getDuration(t.startDate,s,e.durationUnit,e.isAutoSchedule,e.isMilestone);if(t.endDate=new Date(s.getTime()),t.duration=o,!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex+1])){var l=e.segments[this.segmentIndex+1],d=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex].endDate,l.startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);t.offsetDuration=d}this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments"),this.parent.setRecordValue("duration",this.sumOfDuration(e.segments),e,!0),this.parent.setRecordValue("endDate",e.segments[e.segments.length-1].endDate,e,!0),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")},t.prototype.sumOfDuration=function(e){for(var t=0,i=0;i<e.length;i++){t+=e[i].duration}return t},t.prototype.setSplitTaskDrag=function(e){var t=e.segments[this.segmentIndex],n=this.getRoundOffStartLeft(t,this.roundOffDuration),a=this.getDateByLeft(e.left+n);if(a=this.parent.dateValidationModule.checkStartDate(a,e,null),t.startDate=a,t.endDate=this.parent.dataOperation.getEndDate(t.startDate,t.duration,e.durationUnit,e,!1),t.duration=this.parent.dataOperation.getDuration(t.startDate,t.endDate,e.durationUnit,e.isAutoSchedule,e.isMilestone),this.parent.setRecordValue("duration",this.sumOfDuration(e.segments),e,!0),this.parent.setRecordValue("endDate",e.segments[e.segments.length-1].endDate,e,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.endDate)||this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"endDate"),!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex-1])){var s=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex-1].endDate,e.segments[this.segmentIndex].startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);1!==t.startDate.getDay()||0!==s||this.parent.includeWeekend||(s=1),t.offsetDuration=s}if(!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex+1])){var o=e.segments[this.segmentIndex+1],s=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex].endDate,o.startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);1!==o.startDate.getDay()||0!==s||this.parent.includeWeekend||(s=1),o.offsetDuration=s}this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},t.prototype.getRoundOffEndLeft=function(e,t){var i="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier,r=e.width+e.left;if(-1!==this.segmentIndex){var n=e.segments[this.segmentIndex];r=r-e.width+n.width+n.left}var a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(r),1,"Day")/864e5),s=this.parent.perDayWidth-this.parent.perDayWidth/a,o=s/this.parent.perDayWidth;if(void 0===t&&(t=!1),t){if(t)if("Hour"===i){var l=this.parent.perDayWidth/24;a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(r),1,"Hour")/36e5),s=this.parent.perDayWidth/24-this.parent.perDayWidth/24/a,0!==s&&(r=r-s+l)}else if("Minutes"===i){var d=this.parent.perDayWidth/1440;a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(r),1,"Minutes")/6e4),s=this.parent.perDayWidth/1440-this.parent.perDayWidth/1440/a,0!==s&&(r=r-s+d)}else 0!==s&&(r=r-s+this.parent.perDayWidth)}else"Hour"!==i&&"Minutes"!==i&&(o>.5?r=r-s+this.parent.perDayWidth:o<.5&&(r=r-s+this.parent.perDayWidth/2));return r},t.prototype.getRoundOffStartLeft=function(e,t){var n=(i.i(r.isNullOrUndefined)(e),e.left),a="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier,s=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(n),1,"Day")/864e5),o=this.parent.perDayWidth-this.parent.perDayWidth/s,l=o/this.parent.perDayWidth;return void 0===t&&(t=!1),t?t&&("Hour"===a?(s=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(n),1,"Hour")/36e5),o=this.parent.perDayWidth/24-this.parent.perDayWidth/24/s,n-=o):"Minutes"===a?(s=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(n),1,"Minutes")/6e4),o=this.parent.perDayWidth/1440-this.parent.perDayWidth/1440/s,n-=o):n-=o):"Hour"!==a&&"Minutes"!==a&&(l<=.5?n-=o:l>.5&&(n=n-o+this.parent.perDayWidth/2)),n},t.prototype.getDateByLeft=function(e){var t=new Date(this.parent.timelineModule.timelineStartDate.toString()),i=864e5/this.parent.perDayWidth;t.setTime(t.getTime()+e*i);var r="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.topTier:this.parent.timelineModule.bottomTier;return"Hour"!==r&&"Minutes"!==r&&(this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString()))&&!this.parent.isInDst(t)?t.setTime(t.getTime()+36e5):!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString()))&&this.parent.isInDst(t)&&t.setTime(t.getTime()-36e5)),t},t.prototype.setItemPosition=function(){var e=this.taskBarEditRecord.ganttProperties,t=i.i(r.isNullOrUndefined)(e.segments)?null:e.segments[this.segmentIndex],n="MilestoneDrag"===this.taskBarEditAction||e.isMilestone?this.parent.chartRowsModule.milestoneHeight:e.width,a=this.parent.isAdaptive?n-2:n-10;i.i(r.isNullOrUndefined)(t)||(a=this.parent.isAdaptive?t.width-2:t.width-10);var o=this.taskBarEditElement.classList.contains(s.F)?this.taskBarEditElement:i.i(r.closest)(this.taskBarEditElement,"tr."+s._3).querySelector("."+s.F),l=this.taskBarEditElement.classList.contains("e-segmented-taskbar"),d=i.i(r.closest)(this.taskBarEditElement,"tr."+s._3).querySelector("."+s._4),p=i.i(r.closest)(this.taskBarEditElement,"tr."+s._3).querySelector("."+s._5),h=this.taskBarEditElement.querySelector("."+s._6),u=this.taskBarEditElement.querySelector("."+s._7),c=this.taskBarEditElement.querySelector("."+s.Y),g=this.taskBarEditElement.querySelector("."+s.W),f=this.taskBarEditElement.querySelector("."+s._8),m=this.taskBarEditElement.querySelector("."+s._9),y=this.taskBarEditElement.querySelector("."+s._10),v=this.taskBarEditElement,D=this.taskBarEditElement.querySelector("."+s.P),w=this.taskBarEditElement.querySelector("."+s.N),k=this.taskBarEditElement.querySelector("."+s._11);if("ConnectorPointRightDrag"!==this.taskBarEditAction&&"ConnectorPointLeftDrag"!==this.taskBarEditAction){if("ParentResizing"!==this.taskBarEditAction&&"ManualParentDrag"!==this.taskBarEditAction){if(!l||i.i(r.isNullOrUndefined)(e.segments)||"RightResizing"!==this.taskBarEditAction&&0===this.segmentIndex||(this.taskBarEditElement.style.width=t.width+"px",this.taskBarEditElement.style.left=t.left+"px"),o.style.width=n+"px",o.style.left=e.left+"px",d.style.width=e.left+"px","LeftResizing"===this.taskBarEditAction&&0===this.segmentIndex)for(var S=this.taskBarEditElement.parentElement,T=S.getElementsByClassName("e-segmented-taskbar"),b=0;b<e.segments.length;b++){var P=e.segments[b],C=T[b];C.style.width=P.width+"px",C.style.left=P.left+"px"}i.i(r.isNullOrUndefined)(p)||(p.style.left=e.left+n+"px")}y&&(y.style.left=(this.parent.isAdaptive?n+10:n+2)+"px"),"MilestoneDrag"===this.taskBarEditAction||e.isMilestone?(o.style.left=e.left-n/2+"px",d.style.width=e.left-n/2+"px",i.i(r.isNullOrUndefined)(p)||(p.style.left=e.left+n/2+"px")):"ProgressResizing"===this.taskBarEditAction?-1===this.segmentIndex?(u.style.left=e.left+e.progressWidth-10+"px",i.i(r.isNullOrUndefined)(h)||(h.style.width=e.progressWidth+"px",h.style.borderBottomRightRadius=this.progressBorderRadius+"px",h.style.borderTopRightRadius=this.progressBorderRadius+"px",c.style.left=e.progressWidth-8+"px")):(this.updateSegmentProgress(this.taskBarEditRecord.ganttProperties),h.style.width=e.segments[this.segmentIndex].progressWidth+"px",h.style.borderBottomRightRadius=this.progressBorderRadius+"px",h.style.borderTopRightRadius=this.progressBorderRadius+"px",c.style.left=e.segments[this.segmentIndex].progressWidth-8+"px"):"RightResizing"!==this.taskBarEditAction||i.i(r.isNullOrUndefined)(u)?"ParentDrag"===this.taskBarEditAction?(i.i(r.isNullOrUndefined)(f)||(f.style.width=n+"px"),i.i(r.isNullOrUndefined)(h)||(m.style.width=e.progressWidth+"px")):"ParentResizing"===this.taskBarEditAction?(v.style.width=D.style.width=e.width+"px",w.style.left=e.width-k.offsetLeft+"px"):"ManualParentDrag"===this.taskBarEditAction?v.style.left=e.left-e.autoLeft+"px":(i.i(r.isNullOrUndefined)(u)||l||(u.style.width=n+"px"),i.i(r.isNullOrUndefined)(h)||(g.style.left=a+"px",h.style.width=e.progressWidth+"px",i.i(r.isNullOrUndefined)(c)||(c.style.left=e.progressWidth-10+"px")),l&&(g.style.left=a+"px",h.style.width=t.progressWidth+"px",i.i(r.isNullOrUndefined)(c)||(c.style.left=t.progressWidth-10+"px"))):(u.style.width=n+"px",i.i(r.isNullOrUndefined)(h)||(h.style.width=e.progressWidth+"px",g.style.left=a+"px",i.i(r.isNullOrUndefined)(c)||(c.style.left=e.progressWidth-10+"px")))}},t.prototype.mouseUpHandler=function(e){var t=this.isMouseDragged;if(this.previousMouseMove=null,this.editTooltip.showHideTaskbarEditTooltip(!1,this.segmentIndex),this.taskBarEditAction&&this.isMouseDragged)if(!this.dragMouseLeave&&this.taskBarEditedAction)this.taskBarEditedAction(e),this.isMouseDragged=!1;else if(this.parent.isOnEdit=!1,this.cancelTaskbarEditActionInMouseLeave(),this.parent.enableCriticalPath&&this.parent.criticalPathModule){var n=this.parent.criticalPathModule;n.criticalConnectorLine(n.criticalPathCollection,n.detailPredecessorCollection,!0,n.predecessorCollectionTaskIds)}"ResourceView"===this.parent.viewType&&this.parent.enableMultiTaskbar&&!i.i(r.isNullOrUndefined)(this.taskBarEditElement)&&(i.i(r.isNullOrUndefined)(this.taskBarEditElement.querySelector(".e-gantt-child-taskbar"))||this.taskBarEditElement.querySelector(".e-gantt-child-taskbar").classList.contains("e-collapsed-taskbar-drag")&&(i.i(r.removeClass)([this.taskBarEditElement.querySelector(".e-gantt-child-taskbar")],"e-collapsed-taskbar-drag"),this.taskBarEditElement.style.zIndex=this.prevZIndex,this.prevZIndex="")),this.parent.isAdaptive&&!t||this.initPublicProp(),this.stopScrollTimer()},t.prototype.taskBarEditedAction=function(e){var t={},i=this.mouseDownX,r=this.mouseDownY,n=this.taskBarEditRecord,a=this.parent.ganttChartModule.getIndexByTaskBar(this.taskBarEditElement),s=this.mouseMoveX,o=this.getCoordinate(e),l=o.pageY-this.parent.ganttChartModule.chartBodyContainer.offsetTop;"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||this.drawPredecessor||(this.dependencyCancel=!0),"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||!this.drawPredecessor?(i!==s||Math.abs(r-l)>=(this.parent.rowHeight-this.parent.taskbarHeight)/2)&&null!==n&&(t.editingFields=n.ganttProperties,t.data=n,t.recordIndex=a,t.previousData=this.previousItem,t.taskBarEditAction=this.taskBarEditAction,t.action="TaskbarEditing",t.roundOffDuration=this.roundOffDuration,t.target=this.targetElement,this.taskbarEditedArgs=t,this.taskbarEdited(t)):this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord,this.finalPredecessor)},t.prototype.cancelTaskbarEditActionInMouseLeave=function(){this.parent.editModule.reUpdatePreviousRecords(!0)},t.prototype.updateSegmentProgress=function(e){for(var t=e.segments,i=!0,r=this.splitTasksDuration(t)*this.parent.perDayWidth,n=this.parent.dataOperation.getProgressWidth(r,e.progress),a=0;a<t.length;a++){var s=t[a];delete s.progressWidth,n>0&&n>s.width?(n-=s.width,s.progressWidth=s.width,s.showProgress=!1):i&&(s.progressWidth=n,s.showProgress=!0,n-=s.width,i=!1)}},t.prototype.taskbarEdited=function(e){var t=i.i(r.extend)({},e),n=t.data,a=n.ganttProperties;if("ProgressResizing"===t.taskBarEditAction)t.previousData.progress!==a.progress&&(this.parent.setRecordValue("progress",this.getProgressPercent(a.width,a.progressWidth),a,!0),n.parentItem&&this.parent.editModule.updateParentProgress(n.parentItem),i.i(r.isNullOrUndefined)(a.segments)||this.updateSegmentProgress(a));else{var s=t.data.ganttProperties.segments;if(!i.i(r.isNullOrUndefined)(s)&&s.length>0&&("LeftResizing"===this.taskBarEditAction&&0!==this.segmentIndex||"ChildDrag"===this.taskBarEditAction&&0!==this.segmentIndex||"RightResizing"===this.taskBarEditAction)){var o=s[this.segmentIndex],l=this.taskBarEditRecord.ganttProperties,d=0===this.segmentIndex?null:s[this.segmentIndex-1],p=this.segmentIndex===s.length-1?null:s[this.segmentIndex+1],h=i.i(r.isNullOrUndefined)(p)?this.parent.cloneProjectEndDate:new Date(p.startDate.getTime()),u=i.i(r.isNullOrUndefined)(d)?this.parent.cloneProjectStartDate:new Date(d.endDate.getTime());h.setHours(0,0,0,0),u.setHours(0,0,0,0);var c=new Date(o.startDate.getTime()),g=new Date(o.endDate.getTime());if(c.setDate(c.getDate()-1),g.setDate(g.getDate()+1),c.setHours(0,0,0,0),g.setHours(0,0,0,0),c.getTime()<=u.getTime()&&!i.i(r.isNullOrUndefined)(d)&&!i.i(r.isNullOrUndefined)(o)){var f=[{firstSegmentIndex:d.segmentIndex,secondSegmentIndex:o.segmentIndex}];this.parent.chartRowsModule.mergeTask(l.taskId,f)}else if(g.getTime()>=h.getTime()&&this.segmentIndex!==s.length-1){var f=[{firstSegmentIndex:o.segmentIndex,secondSegmentIndex:p.segmentIndex}];this.parent.chartRowsModule.mergeTask(l.taskId,f)}else if(g.getTime()>=h.getTime()){o.endDate.setDate(this.parent.cloneProjectEndDate.getDate()-1),o.startDate=this.parent.dataOperation.getStartDate(o.endDate,o.duration,l.durationUnit,l);for(var m=s.length-2;m>=0;m++){var y=s[m],v=y.endDate;v.setDate(v.getDate()-y.offsetDuration),y.endDate=v,y.startDate=this.parent.dataOperation.getStartDate(y.endDate,y.duration,l.durationUnit,l)}}}this.parent.dataOperation.updateWidthLeft(t.data)}this.parent.dataOperation.updateTaskData(n),this.parent.editModule.initiateUpdateAction(t)},t.prototype.getProgressPercent=function(e,t){return Math.ceil(t/e*100)},t.prototype.drawFalseLine=function(){var e,t=this.mouseDownX,n=this.mouseDownY,a=this.mouseMoveX,o=this.mouseMoveY,l=Math.sqrt((t-a)*(t-a)+(n-o)*(n-o)),d=180*Math.atan2(o-n,a-t)/Math.PI,p="rotate("+d+"deg)";"ConnectorPointLeftDrag"===this.taskBarEditAction&&(e=this.elementOffsetLeft-this.parent.chartRowsModule.connectorPointWidth/2-this.parent.ganttChartModule.scrollObject.previousScroll.left),"ConnectorPointRightDrag"===this.taskBarEditAction&&(e=this.elementOffsetLeft+this.elementOffsetWidth+this.parent.chartRowsModule.connectorPointWidth/2-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=i.i(r.createElement)("div",{className:s._12,id:"ganttfalseline"+this.parent.element.id,styles:"transform-origin: 0% 100%;right: auto;position: absolute;transform:"+p+";border-top-width: 1px;border-top-style: dashed;z-index: 5;width:"+(l-3)+"px;left:"+e+"px;top:"+h+"px;"}),this.parent.ganttChartModule.chartBodyContainer.appendChild(this.falseLine)},t.prototype.removeFalseLine=function(e){this.falseLine&&(i.i(r.remove)(this.falseLine),this.falseLine=null,e&&(this.elementOffsetLeft=0,this.elementOffsetTop=0,this.elementOffsetWidth=0,this.elementOffsetHeight=0,i.i(r.removeClass)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+s._1),[s._2])))},t.prototype.updateConnectorLineSecondProperties=function(e){var t=this.getElementByPosition(e),a=i.i(n.j)(t,s.F);this.connectorSecondAction=null;var o=0;if(i.i(n.j)(t,s.G)?(this.connectorSecondAction="ConnectorPointLeftDrag",this.toPredecessorText="Start"):i.i(n.j)(t,s.H)?(this.connectorSecondAction="ConnectorPointRightDrag",this.toPredecessorText="Finish"):(this.connectorSecondAction=null,this.toPredecessorText=null),this.taskBarEditElement!==a&&this.taskBarEditElement!==this.highlightedSecondElement){if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){o=this.parent.virtualScrollModule.getTopPosition()}(this.parent.virtualScrollModule&&this.parent.enableVirtualization&&!this.elementOffsetLeft||!this.parent.enableVirtualization)&&(this.taskBarEditElement.children[0].classList.contains("e-manualparent-main-container")?(this.elementOffsetLeft=this.taskBarEditElement.children[0].offsetLeft+this.taskBarEditElement.offsetLeft,this.elementOffsetTop=this.taskBarEditElement.offsetTop-5+this.taskBarEditElement.children[0].offsetTop+o):(this.elementOffsetLeft=this.taskBarEditElement.offsetLeft,this.elementOffsetTop=this.taskBarEditElement.offsetTop+o),this.elementOffsetWidth=this.taskBarEditElement.offsetWidth,this.elementOffsetHeight=this.taskBarEditElement.offsetHeight),this.showHideTaskBarEditingElements(a,this.highlightedSecondElement,!0)}i.i(r.isNullOrUndefined)(this.connectorSecondAction)&&!i.i(r.isNullOrUndefined)(this.connectorSecondElement)&&(this.editTooltip.showHideTaskbarEditTooltip(!1,this.segmentIndex),i.i(r.removeClass)([this.connectorSecondElement.querySelector("."+s.G)],[s._13]),i.i(r.removeClass)([this.connectorSecondElement.querySelector("."+s.H)],[s._13])),this.connectorSecondElement=this.connectorSecondAction?a:null,this.highlightedSecondElement=a,this.connectorSecondRecord=i.i(r.isNullOrUndefined)(this.connectorSecondElement)?null:this.parent.ganttChartModule.getRecordByTaskBar(this.connectorSecondElement)},t.prototype.triggerDependencyEvent=function(e,t){var n,a,o=this.taskBarEditRecord.ganttProperties,l=this.connectorSecondRecord?this.connectorSecondRecord.ganttProperties:null,d=this.getElementByPosition(e),p=d,h="ResourceView"===this.parent.viewType?o.taskId:o.rowUniqueID;if("ConnectorPointLeftDrag"===this.taskBarEditAction?n=h+"S":"ConnectorPointRightDrag"===this.taskBarEditAction&&(n=h+"F"),this.connectorSecondAction&&("ConnectorPointLeftDrag"===this.connectorSecondAction?(n+="S",a="start"):"ConnectorPointRightDrag"===this.connectorSecondAction&&(n+="F",a="finish")),i.i(r.isNullOrUndefined)(l))return void(this.drawPredecessor=!1);l.predecessorsName?this.finalPredecessor=l.predecessorsName+","+n:this.finalPredecessor=n;var u=this.parent.connectorLineEditModule.validatePredecessorRelation(this.connectorSecondRecord,this.finalPredecessor),c=this.parent.predecessorModule.calculatePredecessor(n,this.connectorSecondRecord),g={};if(g.fromItem=o,g.toItem=l,g.newPredecessorString=this.finalPredecessor,g.predecessor=c&&c[0],g.isValidLink=u,g.requestType="ValidateDependency",this.parent.trigger("actionBegin",g),g.isValidLink=!(!u&&g.isValidLink)&&g.isValidLink,g.isValidLink){if(this.editTooltip.toolTipObj||this.parent.isAdaptive||this.editTooltip.showHideTaskbarEditTooltip(!0,this.segmentIndex),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");f[1].innerText=l.taskName,f[2].innerText=this.parent.localeObj.getConstant(a);var m=this.parent.connectorLineModule.tooltipTable.parentElement.parentElement;m.offsetTop+m.offsetHeight>e.pageY&&(m.style.top=e.pageY-m.offsetHeight-20+"px")}this.drawPredecessor=!0}else this.parent.isAdaptive?(d.classList.contains(s.G)||d.classList.contains(s.H))&&this.showHideActivePredecessors(!0):i.i(r.addClass)([p],[s._13]),this.drawPredecessor=!1},t.prototype.getCoordinate=function(e){var t={};if(this.parent.isAdaptive&&e&&"click"!==e.type){var i=e;"touchmove"!==i.type&&"touchstart"!==i.type&&"touchend"!==i.type||(t.pageX=i.changedTouches[0].pageX,t.pageY=i.changedTouches[0].pageY)}else if(e){var i=e;t.pageX=i.pageX,t.pageY=i.pageY}return t},t.prototype.getElementByPosition=function(e){if(this.parent.isAdaptive){var t=this.getCoordinate(e);return document.elementFromPoint(t.pageX-window.pageXOffset,t.pageY-window.pageYOffset)}return e.target},t.prototype.multipleSelectionEnabled=function(){this.parent.selectionModule&&"Cell"!==this.parent.selectionSettings.mode&&"Multiple"===this.parent.selectionSettings.type&&this.parent.selectionModule.hidePopUp()},t.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))},t.prototype.destroy=function(){this.unWireEvents(),this.stopScrollTimer(),this.parent.editModule.taskbarEditModule=void 0},t}(a.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(13),n=(i.n(r),i(0)),a=(i.n(n),i(3)),s=i(16),o=i(12),l=(i.n(o),function(){function e(e){this.predefinedItems={},this.items=["Add","Edit","Update","Delete","Cancel","ExpandAll","CollapseAll","Search","PrevTimeSpan","NextTimeSpan","ZoomIn","ZoomOut","ZoomToFit","ExcelExport","CsvExport","PdfExport","Indent","Outdent","CriticalPath"],this.parent=e,this.id=this.parent.element.id,this.parent.on("ui-toolbarupdate",this.propertyChanged,this)}return e.prototype.getModuleName=function(){return"toolbar"},e.prototype.renderToolbar=function(){if((this.parent.toolbar||[]).length>0){this.element=i.i(n.createElement)("div",{id:this.parent.controlId+"_Gantt_Toolbar",className:a.E}),this.parent.treeGrid.grid.headerModule?this.parent.element.insertBefore(this.element,this.parent.treeGridPane.offsetParent):this.parent.element.appendChild(this.element);for(var e=["Add","Edit","Update","Delete","Cancel","ExpandAll","CollapseAll","PrevTimeSpan","NextTimeSpan","ZoomIn","ZoomOut","ZoomToFit","ExcelExport","CsvExport","PdfExport","Indent","Outdent","CriticalPath"],t=0,r=e;t<r.length;t++){var s=r[t],o=void 0,l=void 0;"CriticalPath"===s?(o="critical-path",l="criticalPath"):(o=s.toLowerCase(),l=s[0].toLowerCase()+s.slice(1)),this.predefinedItems[s]={id:this.parent.element.id+"_"+o,prefixIcon:"e-"+o,text:this.parent.isAdaptive?"":this.parent.localeObj.getConstant(l),tooltipText:this.parent.localeObj.getConstant(l)+("add"===l||"edit"===l||"delete"===l?this.parent.localeObj.getConstant("task"):"expandAll"===l||"collapseAll"===l?this.parent.localeObj.getConstant("tasks"):""),align:this.parent.isAdaptive?"Right":"Left"}}var d=this.parent.localeObj.getConstant("search");this.parent.isAdaptive?this.predefinedItems.Search={id:this.id+"_searchbutton",prefixIcon:"e-search-icon",tooltipText:d,align:"Right"}:this.predefinedItems.Search={id:this.id+"_search",template:'<div class="e-input-group e-search" role="search"><input id="'+this.id+'_searchbar" class="e-input" name="input" type="search"placeholder= "'+d+'"/><span id="'+this.id+'_searchbutton" class="e-input-group-icon e-search-icon e-icons"tabindex="-1" title="'+d+'" aria-label= "search"></span></div>',tooltipText:d,align:"Right",cssClass:"e-search-wrapper"},this.createToolbar()}},e.prototype.createToolbar=function(){var e=this.getItems();this.toolbar=new r.Toolbar({items:e,clicked:this.toolbarClickHandler.bind(this),height:this.parent.isAdaptive?48:"auto"}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.element);var t=this.element.querySelector("#"+this.parent.element.id+"_cancel"),s=this.element.querySelector("#"+this.parent.element.id+"_update");if(t&&i.i(n.addClass)([t],a.a),s&&i.i(n.addClass)([s],a.a),this.parent.isAdaptive){this.element.insertBefore(this.getSearchBarElement(),this.element.childNodes[0]),this.searchElement=this.element.querySelector("#"+this.parent.element.id+"_searchbar");new o.TextBox({placeholder:this.parent.localeObj.getConstant("search"),floatLabelType:"Never",showClearButton:!0}).appendTo(this.searchElement)}else this.searchElement=this.element.querySelector("#"+this.parent.element.id+"_searchbar");this.parent.filterModule&&(this.wireEvent(),this.parent.searchSettings&&this.updateSearchTextBox()),this.parent.readOnly&&this.enableItems([this.parent.element.id+"_add",this.parent.element.id+"_update",this.parent.element.id+"_delete",this.parent.element.id+"_cancel",this.parent.element.id+"_indent",this.parent.element.id+"_outdent"],!1)},e.prototype.getSearchBarElement=function(){var e=this,t=i.i(n.createElement)("div",{className:"e-adaptive-searchbar",styles:"display: none"}),r=i.i(n.createElement)("input",{attrs:{type:"text"},id:this.parent.element.id+"_searchbar"}),a=i.i(n.createElement)("span",{className:"e-backarrowspan e-icons"});return a.onclick=function(){t.style.display="none",e.element.childNodes[1].style.display="block"},t.appendChild(a),t.appendChild(r),t},e.prototype.wireEvent=function(){this.searchElement&&(n.EventHandler.add(this.searchElement,"keyup",this.keyUpHandler,this),n.EventHandler.add(this.searchElement,"focus",this.focusHandler,this),n.EventHandler.add(this.searchElement,"blur",this.blurHandler,this))},e.prototype.propertyChanged=function(e){i.i(n.getValue)("module",e)===this.getModuleName()&&this.parent.toolbar&&(this.element&&this.element.parentNode&&i.i(n.remove)(this.element),this.renderToolbar(),this.refreshToolbarItems())},e.prototype.unWireEvent=function(){this.searchElement&&(n.EventHandler.remove(this.searchElement,"keyup",this.keyUpHandler),n.EventHandler.remove(this.searchElement,"focus",this.focusHandler),n.EventHandler.remove(this.searchElement,"blur",this.blurHandler),this.searchElement=null),this.parent.off("ui-toolbarupdate",this.propertyChanged)},e.prototype.keyUpHandler=function(e){13===e.keyCode&&this.parent.searchSettings.key!==this.searchElement.value&&(this.parent.searchSettings.key=this.searchElement.value,this.parent.dataBind())},e.prototype.focusHandler=function(e){e.target.parentElement.classList.add("e-input-focus")},e.prototype.blurHandler=function(e){e.target.parentElement.classList.remove("e-input-focus")},e.prototype.updateSearchTextBox=function(){this.searchElement&&this.searchElement.value!==this.parent.searchSettings.key&&(this.searchElement.value=this.parent.searchSettings.key)},e.prototype.getItems=function(){var e=[],t=this.parent.toolbar,i=-1;if(t.forEach(function(e,t){("string"==typeof e&&"Search"===e||"object"==typeof e&&"Search"===e.text)&&(i=t)}),i>-1){var r=t.splice(i,1);t.push(r[0])}for(var n=0,a=t;n<a.length;n++){var s=a[n];"string"==typeof s?e.push(this.getItemObject(s)):e.push(this.getItem(s))}return e},e.prototype.getItem=function(e){var t=this.predefinedItems[e.text];return t?i.i(n.extend)(t,t,e):e},e.prototype.getItemObject=function(e){return this.predefinedItems[e]||{text:e,id:this.id+"_"+e}},e.prototype.toolbarClickHandler=function(e){var t=this,r=this.parent,a=this.id;i.i(n.extend)(e,{cancel:!1}),r.trigger(s.a,e,function(e){if(!e.cancel)switch(!0===t.parent.isAdaptive&&(e.item.id!==a+"_edit"&&e.item.id!==a+"_add"&&e.item.id!==a+"_delete"&&e.item.id!==a+"_searchbutton"&&e.item.id!==a+"_expandall"&&e.item.id!==a+"_collapseall"||t.parent.selectionModule&&"Multiple"===t.parent.selectionSettings.type&&(t.parent.selectionModule.hidePopUp(),document.getElementsByClassName("e-gridpopup")[0].style.display="none")),!i.i(n.isNullOrUndefined)(e.item)&&e.item.id){case a+"_edit":r.editModule&&r.editSettings.allowEditing&&r.editModule.dialogModule.openToolbarEditDialog();break;case a+"_indent":r.editModule&&r.selectionModule.getSelectedRecords().length&&r.indent();break;case a+"_critical-path":r.enableCriticalPath?r.enableCriticalPath=!1:r.enableCriticalPath=!0;break;case a+"_outdent":r.editModule&&r.selectionModule.getSelectedRecords().length&&r.outdent();break;case a+"_update":r.editModule.cellEditModule.isCellEdit=!1,r.treeGrid.grid.saveCell();break;case a+"_cancel":r.cancelEdit();break;case a+"_add":r.editModule&&r.editSettings.allowAdding&&r.editModule.dialogModule.openAddDialog();break;case a+"_delete":t.parent.selectionModule&&t.parent.editModule&&("Cell"!==t.parent.selectionSettings.mode&&t.parent.selectionModule.selectedRowIndexes.length||"Cell"===t.parent.selectionSettings.mode&&t.parent.selectionModule.getSelectedRowCellIndexes().length)&&t.parent.editModule.startDeleteAction();break;case a+"_search":if(i.i(n.getValue)("originalEvent.target.id",e)===t.parent.element.id+"_searchbutton"&&t.parent.filterModule){var s=t.element.querySelector("#"+t.parent.element.id+"_searchbar").value;t.parent.searchSettings.key!==s&&(t.parent.searchSettings.key=s,t.parent.dataBind())}break;case a+"_searchbutton":var o=t.element.querySelector(".e-adaptive-searchbar");o.parentElement.childNodes[1].style.display="none",o.style.display="block";break;case a+"_expandall":t.parent.ganttChartModule.expandCollapseAll("expand");break;case a+"_collapseall":t.parent.ganttChartModule.expandCollapseAll("collapse");break;case a+"_prevtimespan":t.parent.previousTimeSpan();break;case a+"_nexttimespan":t.parent.nextTimeSpan();break;case a+"_zoomin":t.zoomIn();break;case a+"_zoomout":t.zoomOut();break;case a+"_zoomtofit":t.zoomToFit()}})},e.prototype.zoomIn=function(){this.parent.timelineModule.processZooming(!0)},e.prototype.zoomToFit=function(){this.parent.timelineModule.processZoomToFit(),this.parent.ganttChartModule.updateScrollLeft(0)},e.prototype.zoomOut=function(){this.parent.timelineModule.processZooming(!1)},e.prototype.refreshToolbarItems=function(e){var t,r=this.parent,a=[],s=[],o=r.editSettings,l=this.id,d=r.selectedRowIndex,p=!!r.selectionModule&&(1===r.selectionModule.selectedRowIndexes.length||1===r.selectionModule.getSelectedRowCellIndexes().length),h=this.toolbar?this.toolbar.items:[],u=[l+"_add",l+"_edit",l+"_delete",l+"_update",l+"_cancel",l+"_indent",l+"_outdent"],c="ResourceView"===this.parent.viewType&&0!==i.i(n.getValue)("data.level",e)||"ProjectView"===this.parent.viewType;if(i.i(n.isNullOrUndefined)(this.parent.editModule))s.push(l+"_delete"),s.push(l+"_add"),s.push(l+"_edit"),s.push(l+"_update"),s.push(l+"_cancel"),s.push(l+"_indent"),s.push(l+"_outdent");else{var g=!!r.editModule.taskbarEditModule&&r.editModule.taskbarEditModule.touchEdit,f=r.flatData&&r.flatData.length;o.allowAdding&&!g?a.push(l+"_add"):s.push(l+"_add"),o.allowEditing&&c&&f&&p&&!g?a.push(l+"_edit"):s.push(l+"_edit"),o.allowEditing&&0!==d&&-1!==d&&f&&p&&"ResourceView"!==this.parent.viewType?0===r.updatedRecords[d].level&&f&&!g?(a.push(l+"_indent"),s.push(l+"_outdent")):(t=r.updatedRecords[d-1],r.updatedRecords[d].level-t.level==1&&-1!==d?(s.push(l+"_indent"),a.push(l+"_outdent")):-1!==d&&(a.push(l+"_indent"),a.push(l+"_outdent"))):(s.push(l+"_indent"),s.push(l+"_outdent"));var m=!!r.selectionModule&&(r.selectionModule.selectedRowIndexes.length>0||r.selectionModule.getSelectedRowCellIndexes().length>0);if(o.allowDeleting&&f&&m&&!g?a.push(l+"_delete"):s.push(l+"_delete"),"Auto"===r.editSettings.mode&&!i.i(n.isNullOrUndefined)(r.editModule.cellEditModule)&&r.editModule.cellEditModule.isCellEdit){a=[],a.push(l+"_update",l+"_cancel"),s=[];for(var y=0;y<h.length;y++)h[y].id!==l+"_update"&&h[y].id!==l+"_cancel"&&-1!==u.indexOf(h[y].id)&&s.push(h[y].id)}else{s.push(l+"_update",l+"_cancel");for(var y=0;y<h.length;y++)-1===a.indexOf(h[y].id)&&-1===s.indexOf(h[y].id)&&a.push(h[y].id)}}for(var v=0;v<a.length;v++){for(var D=void 0,y=0;y<h.length;y++)if(h[y].id===a[v]){D=y;break}h.length>0&&this.toolbar.hideItem(D,!1)}for(var w=0;w<s.length;w++){for(var D=void 0,y=0;y<h.length;y++)if(h[y].id===s[w]){D=y;break}h.length>0&&this.toolbar.hideItem(D,!0)}},e.prototype.enableItems=function(e,t){for(var i=0,r=e;i<r.length;i++){var n=r[i],a=this.element.querySelector("#"+n);a&&this.toolbar.enableItems(a.parentElement,t)}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.toolbar.destroy(),this.parent.filterModule&&this.unWireEvent(),i.i(n.remove)(this.element))},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,this.bindTreeGridProperties()}return e.prototype.getModuleName=function(){return"virtualScroll"},e.prototype.bindTreeGridProperties=function(){this.parent.treeGrid.enableVirtualization=this.parent.enableVirtualization,r.TreeGrid.Inject(r.VirtualScroll)},e.prototype.getTopPosition=function(){var e,t=this.parent.ganttChartModule.scrollElement.querySelector(".e-virtualtable"),i=t.style.transform.split(",");if(i.length>1)e=i[1].trim().split(")")[0];else{var r=t.style.transform;e=r.substring(r.lastIndexOf("(")+1,r.lastIndexOf(")"))}return parseFloat(e)},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(0),n=(i.n(r),i(3)),a=i(25),s=i(5),o=(i.n(s),i(83)),l=function(){function e(e){this.isExpandCollapseFromChart=!1,this.isExpandAll=!1,this.isGanttElement=!1,this.parent=e,this.chartTimelineContainer=null,this.rangeViewContainer=i.i(r.createElement)("div",{className:n._28}),this.rangeViewContainer.setAttribute("role","RangeContainer"),this.virtualRender=new o.a(this.parent),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("renderPanels",this.renderChartContainer,this),this.parent.on("recordsUpdated",this.renderChartElements,this),this.parent.on("dataReady",this.renderInitialContents,this),this.parent.on("tree-grid-created",this.renderChartContents,this),this.parent.on("destroy",this.destroy,this)},e.prototype.renderChartContents=function(){this.parent.notify("refreshDayMarkers",{}),this.wireEvents()},e.prototype.renderChartContainer=function(){this.chartElement=i.i(r.createElement)("div",{id:this.parent.element.id+"GanttChart",className:n._79}),this.parent.chartPane.appendChild(this.chartElement),this.renderTimelineContainer(),this.renderBodyContainers()},e.prototype.renderInitialContents=function(){this.parent.timelineModule.createTimelineSeries()},e.prototype.renderOverAllocationContainer=function(){for(var e=0;e<this.parent.flatData.length;e++){var t=this.parent.flatData[e];t.childRecords.length>0&&this.parent.dataOperation.updateOverlappingValues(t)}var i=this.parent.element.querySelector("."+n._28);i&&(i.innerHTML=""),0===this.parent.treeGrid.grid.filterSettings.columns.length&&this.renderRangeContainer(this.parent.currentViewData)},e.prototype.renderChartElements=function(){if(this.parent.isFromOnPropertyChange)this.rangeViewContainer.innerHTML="",this.parent.updateProjectDates(this.parent.cloneProjectStartDate,this.parent.cloneProjectEndDate,this.parent.isTimelineRoundOff),this.parent.isFromOnPropertyChange=!1;else{if(this.parent.chartRowsModule.renderChartRows(),this.parent.predecessorModule&&this.parent.taskFields.dependency&&(this.parent.connectorLineIds=[],this.parent.updatedConnectorLineCollection=[],this.parent.predecessorModule.createConnectorLinesCollection()),this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection),this.parent.enableCriticalPath){var e=this.parent.criticalPathModule;this.parent.criticalPathModule.criticalConnectorLine(e.criticalPathCollection,e.detailPredecessorCollection,this.parent.enableCriticalPath,e.predecessorCollectionTaskIds)}"ResourceView"===this.parent.viewType&&this.parent.showOverAllocation&&this.renderOverAllocationContainer()}this.updateWidthAndHeight(),this.parent.notify("selectRowByIndex",{})},e.prototype.renderRangeContainer=function(e){var t,i,r,n=e.length;if(0===this.parent.treeGrid.grid.filterSettings.columns.length)for(t=0;t<n;t++)i=e[t],(r=i.ganttProperties.workTimelineRanges)&&this.renderRange(r,i)},e.prototype.getTopValue=function(e){var t=this.parent.getExpandedRecords(this.parent.currentViewData),i=t.indexOf(e);return e.expanded?(i+1)*this.parent.rowHeight:i*this.parent.rowHeight},e.prototype.getRangeHeight=function(e){return!e.expanded&&e.hasChildRecords?this.parent.rowHeight-Math.floor(this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight):e.childRecords.length*this.parent.rowHeight-Math.floor(this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight)},e.prototype.renderRange=function(e,t){var a=this.getTopValue(t),s=this.rangeViewContainer.querySelector(".rangeContainer"+t.ganttProperties.rowUniqueID);s&&s.remove();var o=i.i(r.createElement)("div",{className:"rangeContainer"+t.ganttProperties.rowUniqueID,styles:"top:"+a+"px; position: absolute;"});if(0!==t.level||t.expanded||!i.i(r.isNullOrUndefined)(t.parentItem)||this.parent.enableMultiTaskbar){for(var l=0;l<e.length;l++){var d=this.getRangeHeight(t),p=i.i(r.createElement)("div",{className:n._80+" e-leftarc",styles:"left:"+e[l].left+"px;\n top: "+Math.floor((this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight)/2)+"px;\n height: "+(d+1)+"px; border-right: 0px"}),h=i.i(r.createElement)("div",{className:n._80+" e-rightarc",styles:"left:"+(e[l].left+e[l].width-5)+"px;\n top: "+Math.floor((this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight)/2)+"px; height: "+(d+1)+"px;\n border-left: 0px"});o.appendChild(p),o.appendChild(h),this.rangeViewContainer.appendChild(o)}this.parent.ganttChartModule.chartBodyContent.appendChild(this.rangeViewContainer)}},e.prototype.renderTimelineContainer=function(){this.chartTimelineContainer=i.i(r.createElement)("div",{className:n._81}),this.chartTimelineContainer.setAttribute("role","presentation"),this.chartElement.appendChild(this.chartTimelineContainer)},e.prototype.renderBodyContainers=function(){this.chartBodyContainer=i.i(r.createElement)("div",{className:n._82}),this.chartElement.appendChild(this.chartBodyContainer),this.scrollElement=i.i(r.createElement)("div",{className:n._83+" "+n._84,styles:"position:relative;"}),this.chartBodyContainer.appendChild(this.scrollElement),this.chartBodyContent=i.i(r.createElement)("div",{className:n._85,styles:"position:relative; overflow:hidden "}),this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.ganttChartModule.virtualRender.renderWrapper():this.scrollElement.appendChild(this.chartBodyContent),this.scrollObject=new a.a(this.parent);var e=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(e=this.parent.toolbarModule.element.offsetHeight),this.scrollObject.setHeight(this.parent.ganttHeight-this.chartTimelineContainer.offsetHeight-e)},e.prototype.updateWidthAndHeight=function(){var e=0===this.parent.contentHeight?this.parent.flatData.length>1?36:0:this.parent.contentHeight,t=this.parent.element.getElementsByClassName("e-chart-scroll-container e-content")[0];if(e>=t.offsetHeight||"auto"===this.parent.height)this.chartBodyContent.style.height=i.i(r.formatUnit)(e);else{var n=this.parent.element.getElementsByClassName("e-chart-rows-container")[0].offsetHeight;t.offsetHeight>=n?this.chartBodyContent.style.height=t.offsetHeight-17+"px":this.chartBodyContent.style.height=t.offsetHeight+"px"}this.chartBodyContent.style.width=i.i(r.formatUnit)(this.parent.timelineModule.totalTimelineWidth),this.setVirtualHeight(),this.parent.notify("updateHeight",{}),this.parent.updateGridLineContainerHeight(),this.updateLastRowBottomWidth()},e.prototype.setVirtualHeight=function(){if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){i.i(r.getValue)("virtualTrack",this.parent.ganttChartModule.virtualRender).style.height=this.parent.updatedRecords.length*this.parent.rowHeight+"px"}},e.prototype.updateLastRowBottomWidth=function(){if(this.parent.currentViewData.length>0&&"auto"!==this.parent.height){var e=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.currentViewData:this.parent.getExpandedRecords(this.parent.currentViewData),t=e[e.length-1],n=this.parent.currentViewData.indexOf(t),a=this.parent.getRowByIndex(n),s=this.parent.chartRowsModule.ganttChartTableBody;if(s.querySelectorAll(".e-chart-row-cell.e-chart-row-border.e-lastrow")&&i.i(r.removeClass)(s.querySelectorAll(".e-chart-row-cell.e-chart-row-border.e-lastrow"),"e-lastrow"),this.chartBodyContent.clientHeight<this.chartBodyContainer.clientHeight&&a){i.i(r.addClass)(a.querySelectorAll("td"),"e-lastrow");var o=0===this.parent.contentHeight?this.parent.flatData.length>1?36:0:this.parent.contentHeight,l=this.parent.element.getElementsByClassName("e-chart-scroll-container e-content")[0];if(o>=l.offsetHeight)this.chartBodyContent.style.height=i.i(r.formatUnit)(o);else{var d=this.parent.element.getElementsByClassName("e-chart-rows-container")[0].offsetHeight;l.offsetHeight>=d?this.chartBodyContent.style.height=l.offsetHeight-17+"px":this.chartBodyContent.style.height=l.offsetHeight+"px"}}}},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("renderPanels",this.renderChartContainer),this.parent.off("recordsUpdated",this.renderChartElements),this.parent.off("dataReady",this.renderInitialContents),this.parent.off("tree-grid-created",this.renderChartContents),this.parent.off("destroy",this.destroy))},e.prototype.ganttChartMouseDown=function(e){3!==e.which&&this.parent.editSettings.allowTaskbarEditing&&(this.parent.notify("chartMouseDown",e),this.parent.element.tabIndex=0)},e.prototype.ganttChartMouseClick=function(e){this.parent.autoFocusTasks&&this.scrollToTarget(e),this.parent.notify("chartMouseClick",e)},e.prototype.ganttChartMouseUp=function(e){this.parent.editSettings.allowTaskbarEditing&&this.parent.notify("chartMouseUp",e)},e.prototype.scrollToTarget=function(e){var t=i.i(r.closest)(e.target,"tr");if(t&&this.parent.element.contains(t)&&(this.parent.element.querySelectorAll(".e-chart-rows-container")[0].contains(e.target)||this.parent.element.querySelectorAll(".e-gridcontent")[0].contains(e.target))&&this.parent.currentViewData.length>0){var n=i.i(r.getValue)("rowIndex",i.i(r.closest)(e.target,"tr")),a=this.parent.currentViewData[n].ganttProperties.startDate;if(!i.i(r.isNullOrUndefined)(a)){var s=this.parent.dataOperation.getTaskLeft(a,!1);this.parent.autoFocusTasks&&this.updateScrollLeft(s)}}},e.prototype.updateScrollLeft=function(e){e=e>0?e:0,e=this.scrollElement.scrollWidth<=e?this.scrollElement.scrollWidth:e,(this.scrollElement.offsetWidth+this.parent.ganttChartModule.scrollElement.scrollLeft<e||this.scrollElement.scrollLeft>e)&&this.scrollObject.setScrollLeft(e-50)},e.prototype.mouseUp=function(e){if(this.parent.allowRowDragAndDrop){var t=this.parent.element.querySelector(".e-ganttdrag");t&&t.remove()}this.isGanttElement||this.parent.notify("chartMouseUp",e),this.isGanttElement=!1},e.prototype.documentMouseUp=function(e){if(this.isGanttElement=!0,this.parent.allowRowDragAndDrop){var t=this.parent.element.querySelector(".e-ganttdrag");t&&t.remove()}if(!this.parent.isDestroyed&&3!==e.which){var a=!1;if(this.parent.editSettings.allowTaskbarEditing&&i.i(r.getValue)("editModule.taskbarEditModule.isMouseDragged",this.parent)&&i.i(r.getValue)("editModule.taskbarEditModule.taskBarEditAction",this.parent)&&(a=!0),this.parent.notify("chartMouseUp",e),this.parent.showActiveElement&&this.focusedElement&&!e.target.classList.contains("e-split-bar")&&(this.focusedElement.tabIndex=0===this.focusedElement.tabIndex?-1:this.focusedElement.tabIndex,i.i(r.removeClass)([this.focusedElement],"e-active-container")),!a){var s=e.target,o=e.target.classList.contains(n.F)||i.i(r.closest)(e.target,"."+n.F);i.i(r.closest)(s,".e-gantt-parent-taskbar")&&!this.parent.editSettings.allowEditing?this.chartExpandCollapseRequest(e):!o&&this.parent.autoFocusTasks&&this.scrollToTarget(e)}if(this.parent.editModule&&this.parent.editModule.taskbarEditModule&&this.parent.editModule.taskbarEditModule.removeFalseLine(!0),!i.i(r.isNullOrUndefined)(this.parent.onTaskbarClick)&&!a){var s=e.target,l=i.i(r.closest)(s,".e-gantt-parent-taskbar,.e-gantt-child-taskbar,.e-gantt-milestone");l&&this.onTaskbarClick(e,s,l)}}},e.prototype.onTaskbarClick=function(e,t,n){var a=i.i(r.closest)(t,"tr"),s=i.i(r.getValue)("rowIndex",a),o=this.getRecordByTarget(e),l={data:o,taskbarElement:n,rowIndex:s,target:t};this.parent.trigger("onTaskbarClick",l)},e.prototype.ganttChartLeave=function(e){this.parent.editSettings.allowTaskbarEditing&&this.parent.notify("chartMouseLeave",e)},e.prototype.ganttChartMove=function(e){this.parent.editSettings.allowTaskbarEditing&&(this.parent.notify("chartMouseMove",e),!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)&&this.parent.connectorLineEditModule&&this.parent.connectorLineEditModule.updateConnectorLineEditElement(e))},e.prototype.contextClick=function(e){this.parent.allowFiltering&&this.parent.filterModule&&this.parent.filterModule.closeFilterOnContextClick(e.srcElement)},e.prototype.mouseMoveHandler=function(e){if(!i.i(r.isNullOrUndefined)(this.parent.onMouseMove)&&(this.parent.flatData.length||e.target.classList.contains("e-header-cell-label")||e.target.classList.contains("e-headercell"))){var t=e.target,n={originalEvent:e},a=i.i(r.closest)(t,".e-chart-row-cell,.e-connector-line-container,.e-event-markers,.e-header-cell-label,.e-rowcell,.e-headercell,.e-indicator-span");if(a){var s=void 0,o=i.i(r.closest)(t,".e-rowcell,.e-chart-row-cell"),l=i.i(r.closest)(t,".e-rowcell,.e-headercell");if(o&&(s=this.parent.ganttChartModule.getRecordByTarget(e),n.data=s),l){var d=i.i(r.getValue)("cellIndex",l);n.column=this.parent.treeGrid.columns[d]}if(i.i(r.closest)(t,".e-indicator-span")){var p=0,h=s.ganttProperties.indicators;if(h.length>1)for(p=0;p<h.length&&h[p].name!==a.innerText.trim();p++);n.indicator=h[p]}if(i.i(r.closest)(t,".e-connector-line-container")){var u={};u.target=a,n.predecessor=this.parent.tooltipModule.getPredecessorTooltipData(u)}if(i.i(r.closest)(t,".e-event-markers")){var u={};u.target=a,n.eventMarkers=this.parent.tooltipModule.getMarkerTooltipData(u)}t.classList.contains("e-header-cell-label")&&(n.date=new Date(t.dataset.content))}this.parent.trigger("onMouseMove",n)}},e.prototype.doubleClickHandler=function(e){this.parent.notify("chartDblClick",e);var t=e.target,n=i.i(r.closest)(t,"tr"),a=i.i(r.getValue)("rowIndex",n),s=this.parent.ganttChartModule.getRecordByTarget(e),o={row:n,rowData:s,rowIndex:a,target:t};this.recordDoubleClick(o)},e.prototype.recordDoubleClick=function(e){this.parent.trigger("recordDoubleClick",e)},e.prototype.getRecordByTarget=function(e){var t,a=i.i(r.closest)(e.target,"div."+n.F);if(i.i(r.isNullOrUndefined)(a)){if(a=i.i(r.closest)(e.target,"tr")){var s=i.i(r.getValue)("rowIndex",i.i(r.closest)(e.target,"tr"));t=this.parent.currentViewData[s]}}else{var o=a.getAttribute("rowUniqueId");t=this.parent.getRecordByID(o)}return t},e.prototype.getChartRows=function(){return null!=document.getElementById(this.parent.element.id+"GanttTaskTableBody")?document.getElementById(this.parent.element.id+"GanttTaskTableBody").querySelectorAll(".e-chart-row"):null},e.prototype.chartExpandCollapseRequest=function(e){if(!this.parent.enableMultiTaskbar){var t=e.target,n=i.i(r.closest)(t,".e-gantt-parent-taskbar"),a=this.getRecordByTarget(e),s=i.i(r.closest)(t,"tr"),o=i.i(r.getValue)("rowIndex",s),l=this.parent.treeGrid.getRows()[o],d={data:a,gridRow:l,chartRow:s,cancel:!1};this.isExpandCollapseFromChart=!0,n.classList.contains("e-row-expand")?this.collapseGanttRow(d):n.classList.contains("e-row-collapse")&&this.expandGanttRow(d)}},e.prototype.reRenderConnectorLines=function(){if(this.parent.connectorLineModule.dependencyViewContainer.innerHTML="",this.parent.connectorLineIds=[],this.parent.updatedConnectorLineCollection=[],this.parent.predecessorModule.createConnectorLinesCollection(),this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection),this.parent.enableCriticalPath&&this.parent.criticalPathModule){var e=this.parent.criticalPathModule;e.criticalConnectorLine(e.criticalPathCollection,e.detailPredecessorCollection,!0,e.predecessorCollectionTaskIds)}},e.prototype.collapseGanttRow=function(e,t){var n=this;t?this.collapsedGanttRow(e):this.parent.trigger("collapsing",e,function(e){n.isExpandCollapseFromChart&&!i.i(r.getValue)("cancel",e)&&n.collapsedGanttRow(e),n.isExpandCollapseFromChart=!1})},e.prototype.collapsedGanttRow=function(e){if(!(i.i(r.isNullOrUndefined)(e.gridRow)&&this.parent.enableVirtualization||i.i(r.isNullOrUndefined)(e.chartRow))){var t=i.i(r.getValue)("data",e);this.isExpandCollapseFromChart?(this.expandCollapseChartRows("collapse",i.i(r.getValue)("chartRow",e),t,null),this.parent.treeGrid.collapseRow(i.i(r.getValue)("gridRow",e),t),this.isExpandCollapseFromChart=!1):this.expandCollapseChartRows("collapse",i.i(r.getValue)("chartRow",e),t,null),"ResourceView"===this.parent.viewType&&this.renderMultiTaskbar(t),this.parent.enableVirtualization||this.parent.updateContentHeight(),this.updateWidthAndHeight(),this.reRenderConnectorLines(),i.i(r.getValue)("chartRow",e).setAttribute("aria-expanded","false"),this.parent.trigger("collapsed",e)}},e.prototype.expandGanttRow=function(e,t){var n=this;t?this.expandedGanttRow(e):this.parent.trigger("expanding",e,function(e){n.isExpandCollapseFromChart&&!i.i(r.getValue)("cancel",e)&&n.expandedGanttRow(e),n.isExpandCollapseFromChart=!1})},e.prototype.expandedGanttRow=function(e){if(!(i.i(r.isNullOrUndefined)(e.gridRow)&&this.parent.enableVirtualization||i.i(r.isNullOrUndefined)(e.chartRow))){var t=i.i(r.getValue)("data",e);this.isExpandCollapseFromChart?(this.expandCollapseChartRows("expand",i.i(r.getValue)("chartRow",e),t,null),this.parent.treeGrid.expandRow(i.i(r.getValue)("gridRow",e),t),this.isExpandCollapseFromChart=!1):(this.parent.isExpandCollapseLevelMethod||this.expandCollapseChartRows("expand",i.i(r.getValue)("chartRow",e),t,null),this.parent.isExpandCollapseLevelMethod=!1),"ResourceView"===this.parent.viewType&&this.renderMultiTaskbar(t),this.parent.enableVirtualization||this.parent.updateContentHeight(),this.updateWidthAndHeight(),this.reRenderConnectorLines(),i.i(r.getValue)("chartRow",e).setAttribute("aria-expanded","true"),this.parent.trigger("expanded",e)}},e.prototype.renderMultiTaskbar=function(e){this.parent.enableMultiTaskbar?this.parent.chartRowsModule.refreshRecords([e],!0):this.parent.showOverAllocation&&this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData)},e.prototype.expandCollapseChartRows=function(e,t,n,a){var s;if("expand"===e){s="table-row",a||(n.expanded=!0);for(var o=t.querySelectorAll(".e-row-collapse"),l=0;l<o.length;l++)i.i(r.addClass)([o[l]],"e-row-expand"),i.i(r.removeClass)([o[l]],"e-row-collapse")}else if("collapse"===e){s="none",a||(n.expanded=!1);for(var o=t.querySelectorAll(".e-row-expand"),l=0;l<o.length;l++)i.i(r.addClass)([o[l]],"e-row-collapse"),i.i(r.removeClass)([o[l]],"e-row-expand")}for(var d=n.childRecords,p=this.getChartRows(),h=[],u=0;u<p.length;u++)p[u].classList.contains("gridrowtaskId"+n.ganttProperties.rowUniqueID+"level"+(n.level+1))&&h.push(p[u]);for(var u=0;u<h.length;u++)h[u].style.display=s,d[u].childRecords&&d[u].childRecords.length&&("collapse"===e||d[u].expanded||this.isExpandAll)&&this.expandCollapseChartRows(e,h[u],d[u],!0)},e.prototype.expandCollapseAll=function(e){"expand"===e?(this.isExpandAll=!0,this.parent.treeGrid.expandAll()):this.parent.treeGrid.collapseAll(),this.isExpandAll=!1},e.prototype.expandAtLevel=function(e){this.parent.treeGrid.expandAtLevel(e)},e.prototype.collapseAtLevel=function(e){this.parent.enableVirtualization&&(this.parent.isExpandCollapseLevelMethod=!0),this.parent.treeGrid.collapseAtLevel(e)},e.prototype.wireEvents=function(){var e=r.Browser.isPointer,t=r.Browser.touchStartEvent,i=r.Browser.touchEndEvent,n=r.Browser.touchMoveEvent,a=e?"pointerleave":"mouseleave";r.EventHandler.add(this.parent.chartPane,t,this.ganttChartMouseDown,this),r.EventHandler.add(this.parent.chartPane,a,this.ganttChartLeave,this),r.EventHandler.add(this.parent.chartPane,n,this.ganttChartMove,this),this.parent.isAdaptive&&(r.EventHandler.add(this.parent.chartPane,s.click,this.ganttChartMouseClick,this),r.EventHandler.add(this.parent.chartPane,i,this.ganttChartMouseUp,this)),this.parent.isAdaptive||(r.EventHandler.add(this.parent.element,i,this.documentMouseUp,this),r.EventHandler.add(document,i,this.mouseUp,this)),r.EventHandler.add(this.parent.element,"mousemove",this.mouseMoveHandler,this),r.EventHandler.add(document.body,"contextmenu",this.contextClick,this),r.EventHandler.add(document,"mouseup",this.contextClick,this),r.EventHandler.add(this.parent.chartRowsModule.ganttChartTableBody,"dblclick",this.doubleClickHandler,this)},e.prototype.unWireEvents=function(){var e=r.Browser.isPointer,t=r.Browser.touchStartEvent,i=r.Browser.touchEndEvent,n=r.Browser.touchMoveEvent,a=e?"pointerleave":"mouseleave";r.EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody,t,this.ganttChartMouseDown),r.EventHandler.remove(this.parent.chartPane,a,this.ganttChartLeave),r.EventHandler.remove(this.parent.chartPane,n,this.ganttChartMove),this.parent.isAdaptive&&(r.EventHandler.remove(this.parent.chartPane,s.click,this.ganttChartMouseClick),r.EventHandler.remove(this.parent.chartPane,i,this.ganttChartMouseUp)),this.parent.isAdaptive||(r.EventHandler.remove(this.parent.element,i,this.documentMouseUp),r.EventHandler.remove(document,i,this.mouseUp)),r.EventHandler.remove(this.parent.element,"mousemove",this.mouseMoveHandler),r.EventHandler.remove(document.body,"contextmenu",this.contextClick),r.EventHandler.remove(document,"mouseup",this.contextClick),r.EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody,"dblclick",this.doubleClickHandler)},e.prototype.getRecordByTaskBar=function(e){return this.parent.currentViewData[this.getIndexByTaskBar(e)]},e.prototype.onTabAction=function(e){this.parent.treeGrid.grid.enableHeaderFocus=this.parent.enableHeaderFocus;var t=this.parent.editModule&&this.parent.editModule.cellEditModule&&this.parent.editModule.cellEditModule.isCellEdit;if(this.parent.showActiveElement||t){var n=t?e.target.closest(".e-rowcell"):e.target;(n.closest(".e-rowcell")||n.closest(".e-chart-row"))&&this.parent.focusModule.setActiveElement(n),this.focusedRowIndex=n.closest(".e-rowcell")?n.parentElement.rowIndex:n.closest(".e-chart-row")?n.closest(".e-chart-row").rowIndex:-1;var a="tab"===e.action,s=this.getNextElement(n,a,t);if(this.tempNextElement=s,i.i(r.isNullOrUndefined)(s.cellIndex)||(this.parent.allowRowDragAndDrop?(this.childrenIndex=s.cellIndex,this.nextElementIndex=s.cellIndex-1):(this.childrenIndex=s.cellIndex,this.nextElementIndex=s.cellIndex),this.parent.ganttColumns[this.nextElementIndex].allowEditing||this.parent.ganttColumns[this.nextElementIndex].field===this.parent.taskFields.id?this.isEditableElement=!1:this.isEditableElement=!0),"noNextRow"===s)return void this.manageFocus(n,"remove",!0);if("string"!=typeof s){if((n.classList.contains("e-rowcell")||n.closest(".e-chart-row-cell")||n.classList.contains("e-headercell")||n.closest(".e-segmented-taskbar"))&&e.preventDefault(),a&&n.classList.contains("e-rowdragdrop"))return void this.parent.treeGrid.grid.notify("key-pressed",e);if(n.classList.contains("e-rowcell")&&s&&s.classList.contains("e-rowcell")||n.classList.contains("e-headercell"))if(a)if(this.parent.editSettings.allowNextRowEdit){var o=this.parent.currentViewData[this.focusedRowIndex],l=this.parent.ganttColumns[s.getAttribute("data-colindex")].field;o.hasChildRecords?l===this.parent.taskFields.endDate||l===this.parent.taskFields.duration||l===this.parent.taskFields.dependency||l===this.parent.taskFields.progress||l===this.parent.taskFields.work||"taskType"===l?(this.parent.treeGrid.grid.endEdit(),this.parent.treeGrid.grid.notify("key-pressed",e)):l===this.parent.taskFields.name||l===this.parent.taskFields.startDate?this.parent.treeGrid.grid.notify("key-pressed",e):(this.parent.treeGrid.grid.notify("key-pressed",e),t&&this.parent.treeGrid.editCell(this.focusedRowIndex,l)):this.parent.treeGrid.grid.notify("key-pressed",e)}else this.parent.treeGrid.grid.notify("key-pressed",e);else this.parent.treeGrid.grid.notify("key-pressed",e);if((!this.parent.editModule||!this.parent.editModule.cellEditModule||i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule.editedColumn))&&s){if(n.classList.contains("e-rowcell")?this.manageFocus(n,"remove",!1):this.manageFocus(n,"remove",!0),s.classList.contains("e-rowcell")&&n.nextElementSibling||n.classList.contains("e-right-label-container")){if(!n.classList.contains("e-rowcell")){this.parent.treeGrid.grid.notify("key-pressed",e);var d=i.i(r.getValue)("focusModule",this.parent.treeGrid.grid);d.currentInfo.element=s,d.currentInfo.elementToFocus=s,d.content.matrix.current=[s.parentElement.rowIndex,s.cellIndex]}this.manageFocus(s,"add",!1)}else this.manageFocus(s,"add",!0);this.parent.focusModule.setActiveElement(s)}}}},e.prototype.getNextElement=function(e,t,n){for(var a=t?e.nextElementSibling:e.previousElementSibling;a&&a.parentElement.classList.contains("e-row");){if(!a.matches(".e-hide")&&!a.matches(".e-rowdragdrop"))return a;a=t?a.nextElementSibling:a.previousElementSibling}if(!i.i(r.isNullOrUndefined)(a)&&(a.classList.contains("e-taskbar-main-container")||a.classList.contains("e-right-connectorpoint-outer-div"))){var s=this.parent.currentViewData[this.focusedRowIndex];!i.i(r.isNullOrUndefined)(s.ganttProperties.segments)&&s.ganttProperties.segments.length>0&&(a=a.classList.contains("e-right-connectorpoint-outer-div")?a.parentElement.nextElementSibling:a.getElementsByClassName("e-gantt-child-taskbar-inner-div")[0])}if(this.validateNextElement(a))return a;var o=-1,l=null;if(e.classList.contains("e-rowcell")&&n&&this.parent.editSettings.allowNextRowEdit)return o=e.parentElement.rowIndex,l=this.getNextRowElement(o,t,!0),this.getChildElement(l,t);if(e.classList.contains("e-rowcell"))if(o=e.parentElement.rowIndex,t){if(l=this.parent.getRowByIndex(o),this.validateNextElement(l,"e-left-label-container"))return l.getElementsByClassName("e-left-label-container")[0];if(this.validateNextElement(l,"e-taskbar-main-container"))return l.getElementsByClassName("e-taskbar-main-container")[0];if(this.validateNextElement(l,"e-right-label-container"))return l.getElementsByClassName("e-right-label-container")[0]}else{if(l=this.getNextRowElement(o,t,!1),this.validateNextElement(l,"e-right-label-container"))return l.getElementsByClassName("e-right-label-container")[0];if(this.validateNextElement(l,"e-taskbar-main-container"))return l.getElementsByClassName("e-taskbar-main-container")[0];if(this.validateNextElement(l,"e-left-label-container"))return l.getElementsByClassName("e-left-label-container")[0]}else if(e.parentElement.classList.contains("e-chart-row-cell")||e.parentElement.parentElement.classList.contains("e-chart-row-cell")){o=i.i(r.closest)(e,".e-chart-row").rowIndex,l=t?this.getNextRowElement(o,t,!0):this.parent.treeGrid.grid.getRowByIndex(o);var d=this.getChildElement(l,t);return d}return null},e.prototype.getNextRowElement=function(e,t,i){var r=this.parent.getExpandedRecords(this.parent.currentViewData),n=this.parent.currentViewData[e],a=r.indexOf(n),s=t?r[a+1]:r[a-1],o=this.parent.currentViewData.indexOf(s);return s?i?this.parent.treeGrid.grid.getRowByIndex(o):this.parent.getRowByIndex(o):null},e.prototype.validateNextElement=function(e,t){if(e&&e.classList.contains("e-rowcell"))return!0;if(e&&t){var n=e.getElementsByClassName(t)[0];return!(!n||!n.hasChildNodes())}return!!e&&!(i.i(r.isNullOrUndefined)(e)||!e.hasChildNodes())},e.prototype.getChildElement=function(e,t){var i;if(!e)return"noNextRow";for(i=t?e.children[0]:e.children[e.children.length-1];i;){if(!i.matches(".e-hide")&&!i.matches(".e-rowdragdrop"))return i;i=t?i.nextElementSibling:i.previousElementSibling}return i},e.prototype.manageFocus=function(e,t,n){if(n){var a=null;if(e.classList.contains("e-left-label-container")||e.classList.contains("e-right-label-container"))a=e.getElementsByTagName("span")[0];else if(e.classList.contains("e-taskbar-main-container")||e.classList.contains("e-gantt-child-taskbar-inner-div")){var s=i.i(r.closest)(e,".e-chart-row").rowIndex,o=this.parent.currentViewData[s],l=o.hasChildRecords?o.ganttProperties.isAutoSchedule?"e-gantt-parent-taskbar":"e-manualparent-main-container":o.ganttProperties.isMilestone?"e-gantt-milestone":!i.i(r.isNullOrUndefined)(o.ganttProperties.segments)&&o.ganttProperties.segments.length>0?"e-segmented-taskbar":"e-gantt-child-taskbar";a=e.getElementsByClassName(l)[0],i.i(r.isNullOrUndefined)(a)&&(a=e)}(e.classList.contains("e-right-label-temp-container")||e.classList.contains("e-left-label-temp-container")||e.classList.contains("e-indicator-span"))&&("add"===t?(e.setAttribute("tabIndex","0"),i.i(r.addClass)([e],"e-active-container"),e.focus()):(i.i(r.removeClass)([e],"e-active-container"),e.setAttribute("tabIndex","-1"),e.blur())),"add"!==t||i.i(r.isNullOrUndefined)(a)?i.i(r.isNullOrUndefined)(a)||(i.i(r.removeClass)([a],"e-active-container"),e.setAttribute("tabIndex","-1"),e.blur()):(e.setAttribute("tabIndex","0"),i.i(r.addClass)([a],"e-active-container"),e.focus(),this.focusedElement=a)}else"add"===t?(e.setAttribute("tabIndex","0"),i.i(r.addClass)([e],["e-focused","e-focus"]),e.focus()):(e.setAttribute("tabIndex","-1"),i.i(r.removeClass)([e],["e-focused","e-focus"]),e.blur())},e.prototype.getIndexByTaskBar=function(e){var t,a;if(t=e.classList.contains(n.F)?e:i.i(r.closest)(e,"div."+n.F),i.i(r.isNullOrUndefined)(t))t=i.i(r.closest)(e,"tr."+n._3),a=[].slice.call(this.parent.chartRowsModule.ganttChartTableBody.childNodes).indexOf(t);else{var s=t.getAttribute("rowUniqueId"),o=this.parent.getRecordByID(s);a=this.parent.currentViewData.indexOf(o)}return a},e.prototype.destroy=function(){this.removeEventListener(),this.unWireEvents(),this.scrollObject.destroy(),this.scrollObject=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return T});var r=i(0),n=(i.n(r),i(8)),a=(i.n(n),i(48)),s=i(45),o=i(81),l=i(49),d=i(9),p=i(10),h=i(76),u=i(14),c=i(3),g=i(6),f=(i.n(g),i(5)),m=(i.n(f),i(77)),y=i(47),v=i(82),D=i(37),w=i(2),k=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),S=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},T=function(e){function t(t,n){var a=e.call(this,t,n)||this;return a.isCancelled=!1,a.previousRecords={},a.editedRecords=[],a.modifiedRecords=[],a.isOnEdit=!1,a.isOnDelete=!1,a.isExpandCollapseLevelMethod=!1,a.isDynamicData=!1,a.isConnectorLineUpdate=!1,a.staticSelectedRowIndex=-1,a.needsID=!0,a.showActiveElement=!0,a.addDeleteRecord=!1,a.enableHeaderFocus=!0,a.enableValidation=!0,a.isTreeGridRendered=!1,a.isFromOnPropertyChange=!1,a.isGanttChartRendered=!1,a.isEdit=!1,i.i(r.setValue)("mergePersistData",a.mergePersistGanttData,a),a}return k(t,e),t.prototype.getModuleName=function(){return"gantt"},t.prototype.preRender=function(){this.initProperties()},t.prototype.initProperties=function(){this.globalize=new r.Internationalization(this.locale),this.isAdaptive=r.Browser.isDevice,this.flatData=[],this.currentViewData=[],this.updatedRecords=[],this.ids=[],this.ganttColumns=[],this.localeObj=new r.L10n(this.getModuleName(),this.getDefaultLocale(),this.locale),this.dataOperation=new a.a(this),this.nonWorkingHours=[],this.nonWorkingTimeRanges=[],this.workingTimeRanges=[],this.defaultEndTime=null,this.defaultStartTime=null,this.durationUnitTexts={days:"days",hours:"hours",minutes:"minutes",day:"day",hour:"hour",minute:"minute"},this.durationUnitEditText={minute:["m","min","minute","minutes"],hour:["h","hr","hour","hours"],day:["d","dy","day","days"]},this.perDayWidth=null,this.isMileStoneEdited=!1,this.chartVerticalLineContainer=null,this.updatedConnectorLineCollection=[],this.connectorLineIds=[],this.predecessorsCollection=[],this.isInPredecessorValidation=this.enablePredecessorValidation,this.isValidationEnabled=!0,this.isLoad=!0,this.editedTaskBarItem=null,this.validationDialogElement=null,this.currentEditedArgs={},this.dialogValidateMode={respectLink:!1,removeLink:!1,preserveLinkWithEditing:!0},this.secondsPerDay=this.dataOperation.getSecondsPerDay(),this.nonWorkingDayIndex=[],this.dataOperation.getNonWorkingDayIndex(),this.columnMapping={},this.controlId=this.element.id,this.cloneProjectStartDate=this.enablePersistence&&this.cloneProjectStartDate?this.cloneProjectStartDate:null,this.cloneProjectEndDate=this.enablePersistence&&this.cloneProjectEndDate?this.cloneProjectEndDate:null,this.totalHolidayDates=this.dataOperation.getHolidayDates(),this.ganttChartModule=new s.a(this),this.timelineModule=new o.a(this),this.chartRowsModule=new h.a(this),this.treeGridModule=new l.a(this),this.dateValidationModule=new p.a(this),this.predecessorModule=new u.a(this),this.connectorLineModule=new m.a(this),this.splitterModule=new y.a(this),this.tooltipModule=new v.a(this),this.keyConfig={home:"home",end:"end",downArrow:"downarrow",upArrow:"uparrow",collapseAll:"ctrl+uparrow",expandAll:"ctrl+downarrow",collapseRow:"ctrl+shift+uparrow",expandRow:"ctrl+shift+downarrow",saveRequest:"13",cancelRequest:"27",addRow:"insert",addRowDialog:"ctrl+insert",editRowDialog:"ctrl+f2",delete:"delete",tab:"tab",shiftTab:"shift+tab",focusTask:"shift+f5",indentLevel:"shift+leftarrow",outdentLevel:"shift+rightarrow",focusSearch:"ctrl+shift+70",contextMenu:"shift+F10"},this.focusModule=new D.a(this),this.zoomingLevels=this.getZoomingLevels(),this.resourceFieldsMapping(),i.i(r.isNullOrUndefined)(this.resourceFields.unit)&&(this.resourceFields.unit="unit"),i.i(r.isNullOrUndefined)(this.taskFields.work)||(this.taskType="FixedWork"),this.taskIds=[]},t.prototype.getDateFormat=function(){if(i.i(r.isNullOrUndefined)(this.dateFormat)){return this.globalize.getDatePattern({skeleton:"yMd"})}return this.dateFormat},t.prototype.getDefaultTZOffset=function(){var e=new Date((new Date).getFullYear(),0,1),t=new Date((new Date).getFullYear(),6,1);return Math.max(e.getTimezoneOffset(),t.getTimezoneOffset())},t.prototype.isInDst=function(e){return e.getTimezoneOffset()<this.getDefaultTZOffset()},t.prototype.resourceFieldsMapping=function(){var e=this.resourceFields;e.id=i.i(r.isNullOrUndefined)(e.id)?this.resourceIDMapping:e.id,e.name=i.i(r.isNullOrUndefined)(e.name)?this.resourceNameMapping:e.name},t.prototype.validateDimentionValue=function(e){return i.i(r.isNullOrUndefined)(e)?null:"string"==typeof e&&"auto"!==e&&-1===e.indexOf("%")?-1===e.indexOf("px")?e+"px":e:"number"==typeof e?e+"px":e.toString()},t.prototype.calculateDimensions=function(){var e=this.validateDimentionValue(this.height),t=this.validateDimentionValue(this.width);i.i(r.isNullOrUndefined)(this.width)||"string"!=typeof this.width||-1===this.width.indexOf("%")||(t=this.width);var n=this.element.style.height,a=this.element.style.width;t&&(this.element.style.width=t),e&&(this.element.style.height=e),e||n||(this.element.style.height="auto"),t||a||(this.element.style.width="auto"),this.ganttHeight=this.element.offsetHeight,this.ganttWidth=this.element.offsetWidth},t.prototype.render=function(){this.isReact&&(this.treeGrid.isReact=!0,this.treeGrid.grid.isReact=!0),i.i(n.createSpinner)({target:this.element},this.createElement),this.trigger("load",{}),this.element.classList.add(c._25),this.isAdaptive?this.element.classList.add(c._26):this.element.classList.remove(c._26),this.calculateDimensions(),i.i(r.isNullOrUndefined)(this.toolbarModule)||this.renderToolbar(),this.splitterModule.renderSplitter(),this.notify("renderPanels",null),this.showSpinner(),this.dataOperation.checkDataBinding()},t.prototype.showSpinner=function(){i.i(n.showSpinner)(this.element)},t.prototype.hideSpinner=function(){i.i(n.hideSpinner)(this.element)},t.prototype.processTimeline=function(){this.timelineModule.processTimelineUnit(),this.timelineModule.calculateZoomingLevelsPerDayWidth()},t.prototype.renderGantt=function(e){if(this.predecessorModule&&this.taskFields.dependency&&(this.predecessorModule.parentIds=[],this.predecessorModule.parentRecord=[],this.predecessorModule.updatePredecessors(),this.isInPredecessorValidation&&this.enableValidation&&this.predecessorModule.updatedRecordsDateByPredecessor()),this.enableValidation&&(this.dataOperation.calculateProjectDates(),this.timelineModule.validateTimelineProp()),e)if(this.isFromOnPropertyChange=e,this.enableValidation&&this.dataOperation.updateGanttData(),this.predecessorModule.updateParentPredecessor(),this.dataSource instanceof Object&&i.i(w.i)(this)){var t=i.i(r.getValue)("count",this.dataSource);this.treeGrid.dataSource={result:this.flatData,count:t}}else this.treeGrid.setProperties({dataSource:this.flatData},!1);else this.enableValidation&&this.dataOperation.updateGanttData(),this.predecessorModule.updateParentPredecessor(),this.treeGridPane.classList.remove("e-temp-content"),i.i(r.remove)(this.treeGridPane.querySelector(".e-gantt-temp-header")),this.notify("dataReady",{}),this.enableContextMenu&&this.notify("initiate-contextMenu",{}),this.renderTreeGrid(),this.wireEvents(),this.notify("initPredessorDialog",{});this.splitterModule.updateSplitterPosition(),"Vertical"!==this.gridLines&&"Both"!==this.gridLines||this.renderChartVerticalLines()},t.prototype.removeCriticalPathStyles=function(){var e=this.ganttChartModule.chartElement;i.i(r.removeClass)(e.querySelectorAll(".e-gantt-child-taskbar-inner-div"),c.n),i.i(r.removeClass)(e.querySelectorAll(".e-gantt-child-progressbar-inner-div"),c.p),i.i(r.removeClass)(e.querySelectorAll(".e-milestone-top"),c.q),i.i(r.removeClass)(e.querySelectorAll(".e-milestone-bottom"),c.r),i.i(r.removeClass)(this.element.querySelectorAll(".e-line"),c.s),i.i(r.removeClass)(this.element.querySelectorAll(".e-connector-line-right-arrow"),c.t),i.i(r.removeClass)(this.element.querySelectorAll(".e-connector-line-left-arrow"),c.u)},t.prototype.wireEvents=function(){this.allowKeyboard&&(this.keyboardModule=new r.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfig,eventName:"keydown"})),r.EventHandler.add(window,"resize",this.windowResize,this)},t.prototype.windowResize=function(){if(!i.i(r.isNullOrUndefined)(this.element)&&(this.updateContentHeight(),this.ganttChartModule.updateWidthAndHeight(),this.treeGridModule.ensureScrollBar(),this.predecessorModule&&this.taskFields.dependency&&(this.updateRowHeightInConnectorLine(this.updatedConnectorLineCollection),this.connectorLineModule.renderConnectorLines(this.updatedConnectorLineCollection)),this.enableCriticalPath)){var e=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(e.criticalPathCollection,e.detailPredecessorCollection,!0,e.predecessorCollectionTaskIds)}},t.prototype.keyActionHandler=function(e){this.focusModule.onKeyPress(e)},t.prototype.updateRowHeightInConnectorLine=function(e){if(e&&e.length){var t=this.ganttChartModule.getChartRows()[0]&&this.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;if(t&&!isNaN(t))for(var i=0;i<e.length;i++)e[i].rowHeight=t}},t.prototype.renderToolbar=function(){i.i(r.isNullOrUndefined)(this.toolbarModule)||(this.toolbarModule.renderToolbar(),this.toolbarModule.refreshToolbarItems())},t.prototype.renderTreeGrid=function(){this.treeGridModule.renderTreeGrid()},t.prototype.updateCurrentViewData=function(){this.currentViewData=this.treeGrid.getCurrentViewRecords().slice()},t.prototype.getRecordFromFlatdata=function(e){for(var t=[],i=0;i<e.length;i++)t.push(this.getTaskByUniqueID(e[i].uniqueID));return t},t.prototype.updateContentHeight=function(e){if(this.virtualScrollModule&&this.enableVirtualization&&!i.i(r.isNullOrUndefined)(e)){var t=i.i(r.getValue)("result.length",e);this.contentHeight=t*this.rowHeight}else{var n=this.virtualScrollModule&&this.enableVirtualization?this.currentViewData:this.getExpandedRecords(this.currentViewData),a=void 0,s=i.i(r.isNullOrUndefined)(this.ganttChartModule.getChartRows())?null:this.ganttChartModule.getChartRows()[0];a=!i.i(r.isNullOrUndefined)(s)&&s.getBoundingClientRect().height>0?s.getBoundingClientRect().height:this.rowHeight,this.contentHeight=n.length*a}},t.prototype.getExpandStatus=function(e){var t=this.getParentTask(e.parentItem);if(i.i(r.isNullOrUndefined)(t))return!0;if(!1===t.expanded)return!1;if(t.parentItem){return!1!==this.getParentTask(t.parentItem).expanded&&this.getExpandStatus(this.getParentTask(t.parentItem))}return!0},t.prototype.getExpandedRecords=function(e){var t=this;return i.i(r.isNullOrUndefined)(e)?[]:e.filter(function(e){return!0===t.getExpandStatus(e)})},t.prototype.getZoomingLevels=function(){var e=this.timelineSettings.weekStartDay;return[{topTier:{unit:"Year",format:"yyyy",count:50},bottomTier:{unit:"Year",format:"yyyy",count:10},timelineUnitSize:99,level:0,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:20},bottomTier:{unit:"Year",format:"yyyy",count:5},timelineUnitSize:99,level:1,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:5},bottomTier:{unit:"Year",format:"yyyy",count:1},timelineUnitSize:99,level:2,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"MMM, yy",count:1},bottomTier:{unit:"Month",formatter:this.displayHalfValue,count:6},timelineUnitSize:66,level:3,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"MMM, yy",count:1},bottomTier:{unit:"Month",formatter:this.displayHalfValue,count:6},timelineUnitSize:99,level:4,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"MMM, yy",count:1},bottomTier:{unit:"Month",formatter:this.displayQuarterValue,count:3},timelineUnitSize:66,level:5,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:1},bottomTier:{unit:"Month",formatter:this.displayQuarterValue,count:3},timelineUnitSize:99,level:6,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:1},bottomTier:{unit:"Month",format:"MMM yyyy",count:1},timelineUnitSize:99,level:7,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Month",format:"MMM, yy",count:1},bottomTier:{unit:"Week",format:"dd",count:1},timelineUnitSize:33,level:8,timelineViewMode:"Month",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Month",format:"MMM, yyyy",count:1},bottomTier:{unit:"Week",format:"dd MMM",count:1},timelineUnitSize:66,level:9,timelineViewMode:"Month",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Month",format:"MMM, yyyy",count:1},bottomTier:{unit:"Week",format:"dd MMM",count:1},timelineUnitSize:99,level:10,timelineViewMode:"Month",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Week",format:"MMM dd, yyyy",count:1},bottomTier:{unit:"Day",format:"d",count:1},timelineUnitSize:33,level:11,timelineViewMode:"Week",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Week",format:"MMM dd, yyyy",count:1},bottomTier:{unit:"Day",format:"d",count:1},timelineUnitSize:66,level:12,timelineViewMode:"Week",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Week",format:"MMM dd, yyyy",count:1},bottomTier:{unit:"Day",format:"d",count:1},timelineUnitSize:99,level:13,timelineViewMode:"Week",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:12},timelineUnitSize:66,level:14,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:12},timelineUnitSize:99,level:15,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:6},timelineUnitSize:66,level:16,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:6},timelineUnitSize:99,level:17,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:2},timelineUnitSize:66,level:18,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:2},timelineUnitSize:99,level:19,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:1},timelineUnitSize:66,level:20,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:1},timelineUnitSize:99,level:21,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Hour",format:"ddd MMM, h a",count:1},bottomTier:{unit:"Minutes",format:"mm",count:30},timelineUnitSize:66,level:22,timelineViewMode:"Hour",weekStartDay:0,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Hour",format:"ddd MMM, h a",count:1},bottomTier:{unit:"Minutes",format:"mm",count:15},timelineUnitSize:66,level:23,timelineViewMode:"Hour",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Hour",format:"ddd MMM, h a",count:1},bottomTier:{unit:"Minutes",format:"mm",count:1},timelineUnitSize:66,level:24,timelineViewMode:"Hour",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0}]},t.prototype.displayQuarterValue=function(e){var t=e.getMonth();return t>=0&&t<=2?"Q1":t>=3&&t<=5?"Q2":t>=6&&t<=8?"Q3":"Q4"},t.prototype.displayHalfValue=function(e){var t=e.getMonth();return t>=0&&t<=5?"H1":"H2"},t.prototype.getFormatedDate=function(e,t){return i.i(r.isNullOrUndefined)(e)?null:(i.i(r.isNullOrUndefined)(t)&&(t=this.getDateFormat()),this.globalize.formatDate(e,{format:t}))},t.prototype.getDurationString=function(e,t){return this.dateValidationModule.getDurationString(e,t)},t.prototype.getWorkString=function(e,t){return this.dateValidationModule.getWorkString(e,t)},t.prototype.updateTreeColumns=function(){var e,t=this.treeGrid.grid.getColumns();-1!==this.treeColumnIndex&&this.columns[this.treeColumnIndex]&&!i.i(r.isNullOrUndefined)(this.columns[this.treeColumnIndex].template)&&(e=this.columns[this.treeColumnIndex].template,this.columns[this.treeColumnIndex].field);for(var n,a=0;a<t.length;a++){n={};for(var s=0;s<this.columns.length;s++)if(this.columns[s].field==t[a].field){for(var o=0,l=Object.keys(this.columns[s]);o<l.length;o++){var d=l[o];i.i(r.isUndefined)(this.columns[s][d])||(n[d]=t[a][d]),n.visible=t[a].visible,n.width=t[a].width}this.columns[s]=n,"checkbox"===this.columns[s].type||i.i(r.isNullOrUndefined)(e)||""===e||(this.columns[s].template=e)}}this.columns.length>0&&this.treeGrid.setProperties({columns:this.columns},!0)},t.prototype.treeDataBound=function(e){this.element.getElementsByClassName("e-chart-root-container")[0].style.height="100%";var t=(this.element.getElementsByClassName("e-gridcontent")[0].style.height,this.element.getElementsByClassName("e-timeline-header-container")[0].offsetHeight);if("calc(100% - "+t+"px)",this.element.getElementsByClassName("e-chart-scroll-container e-content")[0].style.height="calc(100% - "+t+"px)",i.i(r.isNullOrUndefined)(this.toolbarModule)||i.i(r.isNullOrUndefined)(this.toolbarModule.element)?this.splitterElement.style.height="100%":this.splitterElement.style.height="calc(100% - "+this.toolbarModule.element.offsetHeight+"px)",this.isLoad){if(this.enablePersistence&&this.updateTreeColumns(),this.updateCurrentViewData(),this.enableVirtualization||this.updateContentHeight(),!this.isTreeGridRendered){this.isTreeGridRendered=!0;i.i(r.isNullOrUndefined)(this.toolbarModule)||i.i(r.isNullOrUndefined)(this.toolbarModule.element)||this.toolbarModule.element.offsetHeight,this.timelineModule.isSingleTier?(i.i(r.addClass)(this.treeGrid.element.querySelectorAll(".e-headercell"),c._27),i.i(r.addClass)(this.treeGrid.element.querySelectorAll(".e-columnheader"),c._27)):(i.i(r.removeClass)(this.treeGrid.element.querySelectorAll(".e-headercell"),c._27),i.i(r.removeClass)(this.treeGrid.element.querySelectorAll(".e-columnheader"),c._27)),this.treeGrid.height="100%",this.notify("tree-grid-created",{}),this.createGanttPopUpElement(),this.hideSpinner(),i.i(r.setValue)("isGanttCreated",!0,e),this.renderComplete()}}else this.getCurrentRecords(e);if(this.enableCriticalPath&&this.criticalPathModule&&this.criticalPathModule.showCriticalPath(this.enableCriticalPath),this.notify("recordsUpdated",{}),this.enableCriticalPath&&this.criticalPathModule){var n=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(n.criticalPathCollection,n.detailPredecessorCollection,!0,n.predecessorCollectionTaskIds)}this.initialChartRowElements=this.ganttChartModule.getChartRows(),this.isLoad=!1,this.trigger("dataBound",e)},t.prototype.getCurrentRecords=function(e){this.predecessorModule&&this.taskFields.dependency&&this.connectorLineModule.removePreviousConnectorLines(this.currentViewData),this.updateCurrentViewData(),this.enableVirtualization||this.updateContentHeight(),this.virtualScrollModule&&this.enableVirtualization&&(this.ganttChartModule.virtualRender.adjustTable(),this.ganttChartModule.scrollObject.updateTopPosition())},t.prototype.onPropertyChanged=function(e,t){for(var n=!1,a=0,s=Object.keys(e);a<s.length;a++){var o=s[a];switch(o){case"allowSelection":case"allowRowDragAndDrop":case"allowFiltering":case"showColumnMenu":case"allowResizing":case"allowReordering":case"enableImmutableMode":this.treeGrid[o]=this[o],this.treeGrid.dataBind();break;case"workWeek":this.dataOperation.getNonWorkingDayIndex(),this.dataOperation.reUpdateGanttData(),this.chartRowsModule.initiateTemplates(),this.taskFields.dependency&&this.predecessorModule.updatedRecordsDateByPredecessor(),this.chartRowsModule.refreshGanttRows(),this.treeGrid.refreshColumns(),this.timelineModule.refreshTimeline();break;case"toolbar":this.notify("ui-toolbarupdate",{module:"toolbar",properties:e});break;case"columnMenuItems":this.treeGrid.grid.columnMenuItems=i.i(f.getActualProperties)(this.columnMenuItems);break;case"eventMarkers":case"highlightWeekends":this.notify("ui-update",{module:"day-markers",properties:e});break;case"sortSettings":this.treeGrid.sortSettings=i.i(f.getActualProperties)(this.sortSettings),this.treeGrid.dataBind();break;case"timelineSettings":this.timelineModule.refreshTimeline();break;case"rowHeight":case"taskbarHeight":this.treeGrid.rowHeight=this.rowHeight,this.treeGrid.dataBind(),this.chartRowsModule.initiateTemplates(),this.timelineModule.updateChartByNewTimeline(),this.taskFields.dependency&&this.ganttChartModule.reRenderConnectorLines();break;case"timezone":this.dataOperation.checkDataBinding(!0);break;case"enableCriticalPath":if(this.enableCriticalPath&&this.criticalPathModule){this.criticalPathModule.showCriticalPath(this.enableCriticalPath);var l=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(l.criticalPathCollection,l.detailPredecessorCollection,!0,l.predecessorCollectionTaskIds)}else this.removeCriticalPathStyles();break;case"filterSettings":this.treeGrid.filterSettings=i.i(f.getActualProperties)(this.filterSettings),this.treeGrid.dataBind();break;case"gridLines":this.treeGrid.gridLines=this.gridLines,this.treeGrid.dataBind(),this.renderChartGridLines();break;case"tooltipSettings":this.tooltipModule.toolTipObj&&this.tooltipModule.toolTipObj.destroy(),this.tooltipModule.createTooltip();break;case"splitterSettings":this.splitterModule.updateSplitterPosition();break;case"selectionSettings":this.treeGrid.selectionSettings=i.i(f.getActualProperties)(this.selectionSettings),this.treeGrid.grid.selectionSettings.enableToggle=this.selectionSettings.enableToggle,this.treeGrid.dataBind();break;case"searchSettings":void 0!==e.searchSettings.key&&(this.treeGrid.grid.searchSettings=i.i(f.getActualProperties)(this.searchSettings),this.treeGrid.grid.dataBind()),this.treeGrid.searchSettings=i.i(f.getActualProperties)(this.searchSettings),this.treeGrid.dataBind(),this.toolbarModule&&this.toolbarModule.updateSearchTextBox();break;case"labelSettings":case"renderBaseline":case"baselineColor":this.chartRowsModule.initiateTemplates(),this.chartRowsModule.refreshGanttRows();break;case"resourceIDMapping":case"resourceNameMapping":case"resources":this.dataOperation.reUpdateResources(),this.treeGrid.refreshColumns(),this.chartRowsModule.initiateTemplates(),this.chartRowsModule.refreshGanttRows();break;case"includeWeekend":case"dayWorkingTime":case"allowUnscheduledTasks":case"holidays":"holidays"===o&&(this.totalHolidayDates=this.dataOperation.getHolidayDates(),this.notify("ui-update",{module:"day-markers",properties:e})),this.dataOperation.reUpdateGanttData(),this.treeGrid.refreshColumns(),this.chartRowsModule.initiateTemplates(),this.chartRowsModule.refreshGanttRows();break;case"addDialogFields":case"editDialogFields":this.editModule&&this.editModule.dialogModule&&this.editModule.dialogModule.processDialogFields();break;case"columns":this.treeGridModule.treeGridColumns=[],this.treeGridModule.validateGanttColumns(),this.treeGrid.columns=this.treeGridModule.treeGridColumns,this.chartRowsModule.initiateTemplates(),this.timelineModule.updateChartByNewTimeline();break;case"width":case"height":this.reUpdateDimention();break;case"editSettings":this.treeGrid.editSettings.allowAdding=this.editSettings.allowAdding,this.treeGrid.editSettings.allowDeleting=this.editSettings.allowDeleting,this.treeGrid.editSettings.showDeleteConfirmDialog=this.editSettings.showDeleteConfirmDialog,this.treeGrid.editSettings.allowEditing=this.editSettings.allowEditing,this.treeGrid.editSettings.allowNextRowEdit=this.editSettings.allowNextRowEdit,i.i(r.isNullOrUndefined)(this.editModule)||this.editModule.reUpdateEditModules(),i.i(r.isNullOrUndefined)(this.toolbarModule)||this.toolbarModule.refreshToolbarItems();break;case"connectorLineBackground":case"connectorLineWidth":this.taskFields.dependency&&(this.connectorLineModule.initPublicProp(),this.ganttChartModule.reRenderConnectorLines());break;case"treeColumnIndex":this.treeGrid.treeColumnIndex=this.treeColumnIndex;break;case"projectStartDate":case"projectEndDate":this.dataOperation.calculateProjectDates(),this.updateProjectDates(this.cloneProjectStartDate,this.cloneProjectEndDate,this.isTimelineRoundOff);break;case"selectedRowIndex":i.i(r.isNullOrUndefined)(this.selectionModule)||this.selectionModule.selectRowByIndex();break;case"dataSource":if(this.closeGanttActions(),this.dataSource instanceof Object&&i.i(w.i)(this)){this.treeGrid.hasChildMapping="isParent";var d=i.i(r.getValue)("count",this.dataSource);this.treeGrid.dataSource={result:this.flatData,count:d}}else this.treeGrid.hasChildMapping=null;this.dataOperation.checkDataBinding(!0);break;case"enableContextMenu":case"contextMenuItems":this.enableContextMenu||"contextMenuItems"===o?this.notify("reRender-contextMenu",{module:"contextMenu",enable:this.contextMenuItems}):this.treeGrid.contextMenuItems=[],this.treeGrid.dataBind();break;case"currencyCode":case"locale":case"enableRtl":case"readOnly":case"viewType":n=!0;break;case"validateManualTasksOnLinking":this.validateManualTasksOnLinking=e.validateManualTasksOnLinking;break;case"showOverAllocation":this.updateOverAllocationCotainer()}}n&&this.refresh()},t.prototype.updateOverAllocationCotainer=function(){if(this.showOverAllocation&&"ResourceView"===this.viewType)this.ganttChartModule.renderOverAllocationContainer();else{var e=this.element.querySelector("."+c._28);e&&(e.innerHTML="")}},t.prototype.getPersistData=function(){for(var e=["sortSettings","filterSettings","columns","searchSettings","selectedRowIndex","treeColumnIndex","currentZoomingLevel","cloneProjectStartDate","cloneProjectEndDate"],t={filterSettings:["type","mode","showFilterBarStatus","immediateModeDelay","ignoreAccent","hierarchyMode"],searchSettings:["fields","operator","ignoreCase"],sortSettings:[],columns:[],selectedRowIndex:[]},n=["filter","edit","filterBarTemplate","headerTemplate","template","commandTemplate","commands","dataSource"],a=0;a<e.length;a++)for(var s=this[e[a]],o=0,l=t[e[a]];!i.i(r.isNullOrUndefined)(l)&&o<l.length;o++){var d=l[o];delete s[d]}return this.ignoreInArrays(n,this.columns),this.addOnPersist(e)},t.prototype.ignoreInArrays=function(e,t){for(var i=0;i<t.length;i++)this.ignoreInColumn(e,t[i])},t.prototype.ignoreInColumn=function(e,t){for(var i=0;i<e.length;i++)delete t[e[i]],t.filter={}},t.prototype.destroy=function(){this.notify("destroy",{}),i.i(r.isNullOrUndefined)(this.validationDialogElement)||this.validationDialogElement.isDestroyed||this.validationDialogElement.destroy();for(var t=["ganttChartModule","timelineModule","chartRowsModule","treeGridModule","ganttDataUpdatesModule","dateValidationModule","tooltipModule"],n=0;n<t.length;n++)this[t[n]]&&(this[t[n]]=null);this.keyboardModule&&this.keyboardModule.destroy(),this.editModule&&this.editModule.dialogModule&&this.editModule.dialogModule.destroy(),e.prototype.destroy.call(this),this.chartVerticalLineContainer=null,this.element.innerHTML="",i.i(r.removeClass)([this.element],c._25),this.element.innerHTML="",this.isTreeGridRendered=!1,this.resetTemplates(),r.EventHandler.remove(window,"resize",this.windowResize)},t.prototype.getTaskbarHeight=function(){return this.chartRowsModule.taskBarHeight},t.prototype.requiredModules=function(){var e=[];return this.isDestroyed?e:(this.allowSorting&&e.push({member:"sort",args:[this]}),(this.allowFiltering||this.toolbar&&-1!==this.toolbar.indexOf("Search"))&&e.push({member:"filter",args:[this]}),this.allowReordering&&e.push({member:"reorder",args:[this]}),this.allowExcelExport&&e.push({member:"excelExport",args:[this]}),this.allowRowDragAndDrop&&e.push({member:"rowDragAndDrop",args:[this]}),this.enableCriticalPath&&e.push({member:"criticalPath",args:[this]}),this.allowResizing&&e.push({member:"resize",args:[this]}),this.toolbar&&e.push({member:"toolbar",args:[this]}),(this.editSettings.allowAdding||this.editSettings.allowEditing||this.editSettings.allowDeleting||this.editSettings.allowTaskbarEditing||this.allowRowDragAndDrop)&&e.push({member:"edit",args:[this]}),this.allowSelection&&e.push({member:"selection",args:[this]}),this.tooltipSettings.showTooltip&&e.push({member:"tooltip",args:[this]}),(this.highlightWeekends||this.holidays&&this.holidays.length>0||this.eventMarkers&&this.eventMarkers.length>0)&&e.push({member:"dayMarkers",args:[this]}),this.enableContextMenu&&e.push({member:"contextMenu",args:[this]}),this.showColumnMenu&&e.push({member:"columnMenu",args:[this]}),this.allowPdfExport&&e.push({member:"pdfExport",args:[this]}),this.enableVirtualization&&e.push({member:"virtualScroll",args:[this]}),e)},t.prototype.sortColumn=function(e,t,i){this.sortModule&&this.allowSorting&&this.sortModule.sortColumn(e,t,i)},t.prototype.mergePersistGanttData=function(){this.treeGrid||(this.treeGrid=new g.TreeGrid);this.treeGrid.grid.mergePersistGridData.apply(this)},t.prototype.mergeColumns=function(e,t){this.treeGrid.grid.mergeColumns.apply(this,[e,t])},t.prototype.clearSorting=function(){this.sortModule.clearSorting()},t.prototype.renderChartGridLines=function(){var e="e-chart-row-border",t=this.chartVerticalLineContainer,n=document.getElementById(this.element.id+"GanttTaskTableBody").querySelectorAll("td");if("Vertical"===this.gridLines){if(i.i(r.isNullOrUndefined)(t)?this.renderChartVerticalLines():"none"===t.style.display&&(t.style.display="block"),n[0].classList.contains(e))for(var a=0;a<n.length;a++)i.i(r.removeClass)([n[a]],e)}else if("Horizontal"===this.gridLines){if(i.i(r.isNullOrUndefined)(t)||(t.style.display="none"),!n[0].classList.contains(e))for(var a=0;a<n.length;a++)i.i(r.addClass)([n[a]],e)}else if("Both"===this.gridLines){if(i.i(r.isNullOrUndefined)(t)?this.renderChartVerticalLines():"none"===t.style.display&&(t.style.display="block"),!n[0].classList.contains(e))for(var a=0;a<n.length;a++)i.i(r.addClass)([n[a]],e)}else if("None"===this.gridLines&&(i.i(r.isNullOrUndefined)(t)||"none"===t.style.display||(t.style.display="none"),n[0].classList.contains(e)))for(var a=0;a<n.length;a++)i.i(r.removeClass)([n[a]],e)},t.prototype.updateGridLineContainerHeight=function(){this.chartVerticalLineContainer&&(this.chartVerticalLineContainer.style.height=i.i(r.formatUnit)(this.getContentHeight()))},t.prototype.getContentHeight=function(){var e=this.ganttChartModule.scrollElement.offsetHeight-16,t=this.ganttChartModule.chartBodyContent.offsetHeight;return t<e?t:e},t.prototype.reUpdateDimention=function(){var e=0;if(this.calculateDimensions(),i.i(r.isNullOrUndefined)(this.toolbarModule)||i.i(r.isNullOrUndefined)(this.toolbarModule.element)||(this.toolbarModule.toolbar.refresh(),this.toolbarModule.refreshToolbarItems(),e=this.toolbarModule.element.offsetHeight),this.treeGrid.height=this.ganttHeight-e-this.treeGrid.grid.getHeaderContent().offsetHeight,this.splitterModule.splitterObject.height=(this.ganttHeight-e).toString(),i.i(r.isNullOrUndefined)(this.chartVerticalLineContainer)||(this.chartVerticalLineContainer.style.height=this.ganttHeight+"px"),!i.i(r.isNullOrUndefined)(this.dayMarkersModule)){var t=i.i(r.getValue)("nonworkingDayRender.holidayContainer",this.dayMarkersModule),n=i.i(r.getValue)("nonworkingDayRender.weekendContainer",this.dayMarkersModule),a=i.i(r.getValue)("eventMarkerRender.eventMarkersContainer",this.dayMarkersModule);t&&(t.style.height=this.ganttHeight+"px"),n&&(n.style.height=this.ganttHeight+"px"),a&&(a.style.height=this.ganttHeight+"px")}this.splitterModule.splitterObject.width=this.ganttWidth.toString(),this.ganttChartModule.scrollObject.setHeight(this.ganttHeight-this.ganttChartModule.chartTimelineContainer.offsetHeight-e)},t.prototype.renderChartVerticalLines=function(){this.element.contains(this.chartVerticalLineContainer)||(this.chartVerticalLineContainer=i.i(r.createElement)("div",{id:this.element.id+"line-container",styles:"position:absolute;height:100%;z-index:1"}),this.ganttChartModule.chartBodyContent.appendChild(this.chartVerticalLineContainer)),this.chartVerticalLineContainer.innerHTML="";var e=this.element.getElementsByClassName("e-timeline-header-table-container")[1];i.i(r.isNullOrUndefined)(e)&&(e=this.element.getElementsByClassName("e-timeline-header-table-container")[0]);for(var t,n=e.getElementsByTagName("th"),a=n.length,s=0,o=i.i(r.createElement)("div"),l=0;l<a;l++){s=0===l?-1:s+parseFloat(t),t=n[l].style.width;var d=i.i(r.createElement)("div",{className:"e-line-container-cell",styles:"left:"+s+"px"});o.appendChild(d)}this.chartVerticalLineContainer.innerHTML=o.innerHTML},t.prototype.getDefaultLocale=function(){return{emptyRecord:"No records to display",id:"ID",name:"Name",startDate:"Start Date",endDate:"End Date",duration:"Duration",progress:"Progress",dependency:"Dependency",notes:"Notes",criticalPath:"Critical Path",baselineStartDate:"Baseline Start Date",baselineEndDate:"Baseline End Date",taskMode:"Task Mode",changeScheduleMode:"Change Schedule Mode",subTasksStartDate:"SubTasks Start Date",subTasksEndDate:"SubTasks End Date",scheduleStartDate:"Schedule Start Date",scheduleEndDate:"Schedule End Date",auto:"Auto",manual:"Manual",type:"Type",offset:"Offset",resourceName:"Resources",resourceID:"Resource ID",day:"day",hour:"hour",minute:"minute",days:"days",hours:"hours",minutes:"minutes",generalTab:"General",customTab:"Custom Columns",writeNotes:"Write Notes",addDialogTitle:"New Task",editDialogTitle:"Task Information",add:"Add",edit:"Edit",update:"Update",delete:"Delete",cancel:"Cancel",search:"Search",task:" task",tasks:" tasks",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomToFit:"Zoom to fit",excelExport:"Excel export",csvExport:"CSV export",pdfExport:"Pdf export",expandAll:"Expand all",collapseAll:"Collapse all",nextTimeSpan:"Next timespan",prevTimeSpan:"Previous timespan",saveButton:"Save",taskBeforePredecessorFS:'You moved "{0}" to start before "{1}" finishes and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorFS:'You moved "{0}" away from "{1}" and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskBeforePredecessorSS:'You moved "{0}" to start before "{1}" starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorSS:'You moved "{0}" to start after "{1}" starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskBeforePredecessorFF:'You moved "{0}" to finish before "{1}" finishes and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorFF:'You moved "{0}" to finish after "{1}" finishes and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskBeforePredecessorSF:'You moved "{0}" away from "{1}" to starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorSF:'You moved "{0}" to finish after "{1}" starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',okText:"Ok",confirmDelete:"Are you sure you want to Delete Record?",from:"From",to:"To",taskLink:"Task Link",lag:"Lag",start:"Start",finish:"Finish",enterValue:"Enter the value",taskInformation:"Task Information",deleteTask:"Delete Task",deleteDependency:"Delete Dependency",convert:"Convert",save:"Save",above:"Above",below:"Below",child:"Child",milestone:"Milestone",toTask:"To Task",toMilestone:"To Milestone",eventMarkers:"Event markers",leftTaskLabel:"Left task label",rightTaskLabel:"Right task label",timelineCell:"Timeline cell",confirmPredecessorDelete:"Are you sure you want to remove dependency link?",unit:"Unit",work:"Work",taskType:"Task Type",unassignedTask:"Unassigned Task",group:"Group",indent:"Indent",outdent:"Outdent",segments:"Segments",splitTask:"Split Task",mergeTask:"Merge Task",left:"Left",right:"Right"}},t.prototype.removeSortColumn=function(e){this.sortModule.removeSortColumn(e)},t.prototype.actionBeginTask=function(e){this.trigger("actionBegin",e)},t.prototype.scrollToDate=function(e){var t=this.dateValidationModule.getDateFromFormat(e),i=this.dataOperation.getTaskLeft(t,!1);this.ganttChartModule.updateScrollLeft(i)},t.prototype.scrollToTask=function(e){if(-1!==this.ids.indexOf(e)){var t=this.flatData[this.ids.indexOf(e)].ganttProperties.left;this.ganttChartModule.updateScrollLeft(t)}},t.prototype.updateChartScrollOffset=function(e,t){i.i(r.isNullOrUndefined)(e)||(e=this.ganttChartModule.scrollElement.scrollWidth<=e?this.ganttChartModule.scrollElement.scrollWidth:e,this.ganttChartModule.scrollObject.setScrollLeft(e)),i.i(r.isNullOrUndefined)(t)||(t=this.ganttChartModule.scrollElement.scrollHeight<=t?this.ganttChartModule.scrollElement.scrollHeight:t,this.ganttChartModule.scrollObject.setScrollTop(t))},t.prototype.getParentTask=function(e){if(i.i(r.isNullOrUndefined)(e))return null;var t=this.flatData.filter(function(t){return e.uniqueID===t.uniqueID});return t.length>0?t[0]:null},t.prototype.getRootParent=function(e,t){return e.level===t?e:this.getRootParent(this.getParentTask(e.parentItem),t)},t.prototype.filterByColumn=function(e,t,i,r,n,a){this.treeGrid.filterByColumn(e,t,i,r,n,a)},t.prototype.excelExport=function(e,t,i,r){return this.excelExportModule?this.treeGrid.excelExport(e,t,i,r):null},t.prototype.csvExport=function(e,t,i,r){return this.excelExportModule?this.treeGrid.csvExport(e,t,i,r):null},t.prototype.pdfExport=function(e,t,i){return this.pdfExportModule?this.pdfExportModule.export(e,t,i):null},t.prototype.clearFiltering=function(e){this.treeGrid.grid.clearFiltering(e)},t.prototype.removeFilteredColsByField=function(e){this.treeGrid.removeFilteredColsByField(e,!1)},t.prototype.renderWorkingDayCell=function(e){var t="Auto"!==this.taskMode||!!this.includeWeekend,i=t?[]:this.nonWorkingDayIndex,r=this.totalHolidayDates;if(i.length>0&&-1!==i.indexOf(e.date.getDay()))e.isDisabled=!0;else if(r.length>0){var n=new Date(e.date.getTime());n.setHours(0,0,0),-1!==r.indexOf(n.getTime())&&(e.isDisabled=!0)}},t.prototype.previousTimeSpan=function(e){this.timelineModule.performTimeSpanAction("prevTimeSpan","publicMethod",new Date(this.timelineModule.timelineStartDate.getTime()),new Date(this.timelineModule.timelineEndDate.getTime()),e)},t.prototype.nextTimeSpan=function(e){this.timelineModule.performTimeSpanAction("nextTimeSpan","publicMethod",new Date(this.timelineModule.timelineStartDate.getTime()),new Date(this.timelineModule.timelineEndDate.getTime()),e)},t.prototype.updateProjectDates=function(e,t,n,a){this.timelineModule.totalTimelineWidth=0,this.cloneProjectStartDate=e,this.cloneProjectEndDate=t,this.isTimelineRoundOff=n,this.timelineModule.refreshTimelineByTimeSpan(),this.dataOperation.reUpdateGanttDataPosition(),this.timelineModule.updateChartByNewTimeline(),this.ganttChartModule.chartBodyContent.style.width=i.i(r.formatUnit)(this.timelineModule.totalTimelineWidth),this.ganttChartModule.updateLastRowBottomWidth(),"Vertical"!==this.gridLines&&"Both"!==this.gridLines||this.renderChartVerticalLines(),this.taskFields.dependency&&this.ganttChartModule.reRenderConnectorLines(),"beforeAdd"!==a&&this.notify("selectRowByIndex",{})},t.prototype.splitTask=function(e,t){this.isEdit=!0,this.chartRowsModule.splitTask(e,t)},t.prototype.mergeTask=function(e,t){this.chartRowsModule.mergeTask(e,t)},t.prototype.reorderColumns=function(e,t){this.treeGrid.reorderColumns(e,t)},t.prototype.initiateEditAction=function(e){this.isOnEdit=e,this.previousRecords={},this.editedRecords=[]},t.prototype.setRecordValue=function(e,t,n,a){if(this.isOnEdit||this.isOnDelete){this.makeCloneData(e,n,a);var s=a?n.rowUniqueID:n.ganttProperties.rowUniqueID,o=this.getRecordByID(s);o&&-1===this.editedRecords.indexOf(o)&&(this.editedRecords.push(o),this.enableImmutableMode&&this.modifiedRecords.push(o))}t=i.i(r.isUndefined)(t)?null:t,i.i(r.setValue)(e,t,n)},t.prototype.makeCloneData=function(e,t,n){var a,s,o,l=i.i(r.getValue)(e,t);if(n&&(e="ganttProperties."+e),i.i(r.isNullOrUndefined)(this.previousRecords[t.uniqueID])){var d={};this.previousRecords[t.uniqueID]=d}a=this.previousRecords[t.uniqueID],s=i.i(r.getValue)(e,a),i.i(r.isUndefined)(s)&&(o=l instanceof Date?new Date(l.getTime()):i.i(r.isObjectArray)(l)?i.i(r.extend)([],l,[],!0):i.i(r.isObject)(l)?i.i(r.extend)({},{},l,!0):l,i.i(r.isUndefined)(o)?i.i(r.setValue)(e,null,a):i.i(r.setValue)(e,o,a))},t.prototype.closeGanttActions=function(){this.editModule&&(this.editModule.cellEditModule&&this.editModule.cellEditModule.isCellEdit?(this.treeGrid.closeEdit(),this.editModule.cellEditModule.isCellEdit=!1,i.i(r.isNullOrUndefined)(this.toolbarModule)||this.toolbarModule.refreshToolbarItems()):this.editModule.dialogModule&&this.editModule.dialogModule.dialogObj&&this.editModule.dialogModule.dialogObj.visible&&(this.editModule.dialogModule.dialogObj.hide(),this.editModule.dialogModule.dialogClose()))},t.prototype.getTaskByUniqueID=function(e){var t=this.flatData.filter(function(t){return t.uniqueID===e});return t.length>0?t[0]:null},t.prototype.getRecordByID=function(e){return i.i(r.isNullOrUndefined)(e)?null:this.flatData[this.ids.indexOf(e.toString())]},t.prototype.setSplitterPosition=function(e,t){var i={};i[t]=e;var r=this.splitterModule.calculateSplitterPosition(i),n=this.splitterModule.splitterObject.element.querySelectorAll(".e-pane")[0],a=this.splitterModule.splitterObject.element.querySelectorAll(".e-pane")[1];this.splitterModule.splitterPreviousPositionGrid=n.scrollWidth+1+"px",this.splitterModule.splitterPreviousPositionChart=a.scrollWidth+1+"px",this.splitterModule.splitterObject.paneSettings[0].size=r,this.splitterModule.triggerCustomResizedEvent()},t.prototype.expandByIndex=function(e){if("number"==typeof e){var t=this.contructExpandCollapseArgs(null,e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.expandGanttRow(t)}else for(var i=0;i<e.length;i++)if("number"==typeof e[i]){var r=e[i],t=this.contructExpandCollapseArgs(null,r);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.expandGanttRow(t)}},t.prototype.expandByID=function(e){var t=this.contructExpandCollapseArgs(e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.expandGanttRow(t)},t.prototype.collapseByIndex=function(e){var t=this.contructExpandCollapseArgs(null,e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.collapseGanttRow(t)},t.prototype.collapseByID=function(e){var t=this.contructExpandCollapseArgs(e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.collapseGanttRow(t)},t.prototype.addRecord=function(e,t,n){if(this.editModule&&this.editSettings.allowAdding)if("ResourceView"===this.viewType){this.editModule.addRowPosition=t,this.editModule.addRowIndex=n;var a=void 0;i.i(r.isNullOrUndefined)(e)||(a=e[this.taskFields.resourceInfo]);var s=void 0,o=void 0;if(!i.i(r.isNullOrUndefined)(a)&&a.length){for(var l=0;l<a.length&&(s="object"==typeof a[l]?a[l][this.resourceFields.id]:a[0],!(o=this.flatData[this.getTaskIds().indexOf("R"+s)]));l++);if(o&&o.childRecords.length||0===o.level){var d=o.childRecords[n];if(d){var p="Above"===t||"Below"===t?t:"Child";"Child"===p?this.editModule.addRecord(e,p,this.getTaskIds().indexOf("R"+s)):this.editModule.addRecord(e,p,this.flatData.indexOf(d))}else this.editModule.addRecord(e,"Child",this.getTaskIds().indexOf("R"+s))}else this.editModule.addRecord(e,"Bottom")}else this.editModule.addRecord(e,"Bottom");this.editModule.addRowPosition=null,this.editModule.addRowIndex=null}else this.editModule.addRecord(e,t,n)},t.prototype.updateRecordByID=function(e){this.editModule&&this.editSettings.allowEditing&&this.editModule.updateRecordByID(e)},t.prototype.updateTaskId=function(e,t){this.editModule&&this.editSettings.allowEditing&&this.editModule.updateTaskId(e,t)},t.prototype.expandAtLevel=function(e){this.enableVirtualization&&(this.isExpandCollapseLevelMethod=!0),this.ganttChartModule.expandAtLevel(e)},t.prototype.indent=function(){this.editModule&&this.editSettings.allowEditing&&this.editModule.indent()},t.prototype.outdent=function(){this.editModule&&this.editSettings.allowEditing&&this.editModule.outdent()},t.prototype.showCriticalPath=function(e){if(this.criticalPathModule){this.criticalPathModule.showCriticalPath(e);var t=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(t.criticalPathCollection,t.detailPredecessorCollection,!0,t.predecessorCollectionTaskIds)}},t.prototype.getCriticalTasks=function(){return!i.i(r.isNullOrUndefined)(this.criticalPathModule)&&this.enableCriticalPath?this.criticalPathModule.getCriticalTasks():null},t.prototype.zoomIn=function(){this.timelineModule.processZooming(!0)},t.prototype.zoomOut=function(){this.timelineModule.processZooming(!1)},t.prototype.fitToProject=function(){this.timelineModule.processZoomToFit(),this.ganttChartModule.updateScrollLeft(0)},t.prototype.reorderRows=function(e,t,i){this.rowDragAndDropModule.reorderRows(e,t,i)},t.prototype.updateRecordByIndex=function(e,t){if(this.editModule&&this.editSettings.allowEditing){var n=this.taskFields,a=this.updatedRecords.length>0?i.i(r.isNullOrUndefined)(this.updatedRecords[e])?null:this.updatedRecords[e]:null;i.i(r.isNullOrUndefined)(a)||(t[n.id]=a[n.id],this.editModule.updateRecordByID(t))}},t.prototype.addPredecessor=function(e,t){var n=this.getRecordByID(e.toString());this.editModule&&!i.i(r.isNullOrUndefined)(n)&&this.editSettings.allowTaskbarEditing&&this.connectorLineEditModule.addPredecessor(n,t)},t.prototype.removePredecessor=function(e){var t=this.getRecordByID(e.toString());this.editModule&&!i.i(r.isNullOrUndefined)(t)&&this.editSettings.allowTaskbarEditing&&this.connectorLineEditModule.removePredecessor(t)},t.prototype.updatePredecessor=function(e,t){var n=this.getRecordByID(e.toString());this.editModule&&!i.i(r.isNullOrUndefined)(n)&&this.editSettings.allowTaskbarEditing&&this.connectorLineEditModule.updatePredecessor(n,t)},t.prototype.openAddDialog=function(){this.editModule&&this.editModule.dialogModule&&this.editSettings.allowAdding&&this.editModule.dialogModule.openAddDialog()},t.prototype.openEditDialog=function(e){this.editModule&&this.editModule.dialogModule&&this.editSettings.allowEditing&&this.editModule.dialogModule.openEditDialog(e)},t.prototype.contructExpandCollapseArgs=function(e,t){var n,a,s;return i.i(r.isNullOrUndefined)(t)?(a=this.getRecordByID(e.toString()),n=this.getRowByID(e),i.i(r.isNullOrUndefined)(n)||(s=i.i(r.getValue)("rowIndex",n))):i.i(r.isNullOrUndefined)(t)||(n=this.getRowByIndex(t),s=i.i(r.getValue)("rowIndex",n),a=this.currentViewData[s]),{data:a,gridRow:this.treeGrid.getRows()[s],chartRow:n,cancel:!1}},t.prototype.getRowByIndex=function(e){try{var t=this.element.querySelectorAll(".e-chart-row");return i.i(r.isNullOrUndefined)(e)?null:t[e]}catch(e){return null}},t.prototype.getRowByID=function(e){var t=this.getRecordByID(e.toString()),i=this.updatedRecords.indexOf(t);return-1!==i?this.getRowByIndex(i):null},t.prototype.getUnscheduledTaskClass=function(e){return i.i(r.isNullOrUndefined)(e.startDate)&&i.i(r.isNullOrUndefined)(e.endDate)&&i.i(r.isNullOrUndefined)(e.duration)?" "+c._29:i.i(r.isNullOrUndefined)(e.startDate)||i.i(r.isNullOrUndefined)(e.endDate)||i.i(r.isNullOrUndefined)(e.duration)?" "+c._29:""},t.prototype.isUnscheduledTask=function(e){return!!(i.i(r.isNullOrUndefined)(e.startDate)||i.i(r.isNullOrUndefined)(e.endDate)||i.i(r.isNullOrUndefined)(e.duration))},t.prototype.createGanttPopUpElement=function(){var e=this.createElement("div",{className:"e-ganttpopup",styles:"display:none;"}),t=this.createElement("div",{className:"e-content",attrs:{tabIndex:"-1"}});i.i(r.append)([t,this.createElement("div",{className:"e-uptail e-tail"})],e),t.appendChild(this.createElement("span")),i.i(r.append)([t,this.createElement("div",{className:"e-downtail e-tail"})],e),document.getElementById(this.element.id+"GanttChart").appendChild(e)},t.prototype.getPredecessorTextValue=function(e){var t;switch(e){case"SS":t=this.localeObj.getConstant("start")+"-"+this.localeObj.getConstant("start");break;case"FF":t=this.localeObj.getConstant("finish")+"-"+this.localeObj.getConstant("finish");break;case"SF":t=this.localeObj.getConstant("start")+"-"+this.localeObj.getConstant("finish");break;case"FS":t=this.localeObj.getConstant("finish")+"-"+this.localeObj.getConstant("start")}return t},t.prototype.search=function(e){this.filterModule&&(this.searchSettings.key=e,this.dataBind())},t.prototype.getOffsetRect=function(e){var t=e.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,r=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.clientTop||document.body.clientTop||0,a=document.documentElement.clientLeft||document.body.clientLeft||0,s=t.top+i-n,o=t.left+r-a;return{top:Math.round(s),left:Math.round(o),width:t.width,height:t.height}},t.prototype.expandAll=function(){this.ganttChartModule.expandCollapseAll("expand")},t.prototype.updateDataSource=function(e,t){if(this.isDynamicData=!0,!i.i(r.isNullOrUndefined)(t))for(var n=0,a=Object.keys(t);n<a.length;n++){var s=a[n];switch(s){case"projectStartDate":this.setProperties({projectStartDate:t[s]},!0);break;case"projectEndDate":this.setProperties({projectEndDate:t[s]},!0)}}this.dataSource=e},t.prototype.collapseAll=function(){this.ganttChartModule.expandCollapseAll("collapse")},t.prototype.getGridColumns=function(){return this.treeGrid.getColumns()},t.prototype.getColumnByField=function(e,t){var i=t.filter(function(t){return t.field===e});return i.length>0?i[0]:null},t.prototype.getGanttColumns=function(){return this.ganttColumns},t.prototype.showColumn=function(e,t){this.treeGrid.showColumns(e,t),this.updateTreeColumns()},t.prototype.hideColumn=function(e,t){this.treeGrid.hideColumns(e,t),this.updateTreeColumns()},t.prototype.setScrollTop=function(e){this.ganttChartModule.scrollObject.setScrollTop(e)},t.prototype.cancelEdit=function(){this.isCancelled=!0,this.closeGanttActions()},t.prototype.selectCell=function(e,t){this.selectionModule&&this.selectionModule.selectCell(e,t)},t.prototype.selectCells=function(e){this.selectionModule&&this.selectionModule.selectCells(e)},t.prototype.selectRow=function(e,t){this.selectionModule&&this.selectionModule.selectRow(e,t)},t.prototype.selectRows=function(e){this.selectionModule&&this.selectionModule.selectRows(e)},t.prototype.deleteRecord=function(e){this.editModule&&this.editModule.deleteRecord(e)},t.prototype.enableItems=function(e,t){this.toolbarModule&&this.toolbarModule.enableItems(e,t)},t.prototype.clearSelection=function(){this.selectionModule&&this.selectionModule.clearSelection()},t.prototype.updateDataArgs=function(e){if(!Array.isArray(e.data)){var t=[];t.push(e.data),i.i(r.setValue)("data",t,e)}return e},t.prototype.convertToMilestone=function(e){var t=this.getRecordByID(e);if(!i.i(r.isNullOrUndefined)(t)){var n=i.i(r.extend)({},{},t.taskData,!0),a=this.taskFields;if(n[a.startDate]&&this.setRecordValue(a.startDate,t.ganttProperties.startDate,n,!0),i.i(r.isNullOrUndefined)(a.duration)?(n[a.startDate]=new Date(t.ganttProperties.startDate),n[a.endDate]=new Date(t.ganttProperties.endDate)):n[a.duration]=0,i.i(r.isNullOrUndefined)(a.milestone)||!1===n[a.milestone]&&(n[a.milestone]=!0),i.i(r.isNullOrUndefined)(a.progress)||(n[a.progress]=0),!i.i(r.isNullOrUndefined)(a.child)&&n[a.child]&&(n[a.child]=[]),!i.i(r.isNullOrUndefined)(a.parentID)&&n[a.parentID]&&(n[a.parentID]=null),i.i(r.isNullOrUndefined)(a.segments)||(n[a.segments]=null),!i.i(r.isNullOrUndefined)(this.contextMenuModule)&&this.contextMenuModule.isOpen&&"Milestone"===this.contextMenuModule.item){i.i(r.isNullOrUndefined)(a.dependency)||(n[a.dependency]=null);this.addRecord(n,"Below")}else t.hasChildRecords||t.ganttProperties.isMilestone||this.updateRecordByID(n)}},t.prototype.changeTaskMode=function(e){var t=this.taskFields,n=this.getRecordByID(e[t.id]),a=n.ganttProperties;this.isOnEdit=!0,this.setRecordValue("isAutoSchedule",!a.isAutoSchedule,a,!0),i.i(r.isNullOrUndefined)(this.taskFields.manual)||(this.setRecordValue("taskData."+t.manual,!a.isAutoSchedule,n),this.setRecordValue(t.manual,!a.isAutoSchedule,n)),this.editModule.updateTaskScheduleModes(n);var s={data:n};this.editModule.initiateUpdateAction(s)},t.prototype.getTaskIds=function(){return this.taskIds},t.prototype.setTaskIds=function(e){if("ProjectView"!==this.viewType){var t=e.ganttProperties.taskId;t=0===e.level?"R"+t:"T"+t,this.taskIds.push(t)}},t.prototype.renderTemplates=function(){this.isReact&&this.renderReactTemplates()},t.prototype.resetTemplates=function(){this.isReact&&this.clearTemplate()},S([i.i(r.Property)(!0)],t.prototype,"allowKeyboard",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableImmutableMode",void 0),S([i.i(r.Property)(!0)],t.prototype,"disableHtmlEncode",void 0),S([i.i(r.Property)(!0)],t.prototype,"autoFocusTasks",void 0),S([i.i(r.Property)(!0)],t.prototype,"allowSelection",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowSorting",void 0),S([i.i(r.Property)(!0)],t.prototype,"enablePredecessorValidation",void 0),S([i.i(r.Property)(!1)],t.prototype,"showColumnMenu",void 0),S([i.i(r.Property)()],t.prototype,"columnMenuItems",void 0),S([i.i(r.Property)()],t.prototype,"timezone",void 0),S([i.i(r.Property)(!1)],t.prototype,"collapseAllParentTasks",void 0),S([i.i(r.Property)(!1)],t.prototype,"highlightWeekends",void 0),S([i.i(r.Property)(0)],t.prototype,"treeColumnIndex",void 0),S([i.i(r.Property)([])],t.prototype,"dataSource",void 0),S([i.i(r.Property)("day")],t.prototype,"durationUnit",void 0),S([i.i(r.Property)(null)],t.prototype,"query",void 0),S([i.i(r.Property)(null)],t.prototype,"dateFormat",void 0),S([i.i(r.Property)("auto")],t.prototype,"height",void 0),S([i.i(r.Property)(!1)],t.prototype,"renderBaseline",void 0),S([i.i(r.Property)("Horizontal")],t.prototype,"gridLines",void 0),S([i.i(r.Complex)({},d.j)],t.prototype,"labelSettings",void 0),S([i.i(r.Property)(null)],t.prototype,"taskbarTemplate",void 0),S([i.i(r.Property)(null)],t.prototype,"parentTaskbarTemplate",void 0),S([i.i(r.Property)(null)],t.prototype,"milestoneTemplate",void 0),S([i.i(r.Property)()],t.prototype,"baselineColor",void 0),S([i.i(r.Property)("auto")],t.prototype,"width",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableVirtualization",void 0),S([i.i(r.Property)()],t.prototype,"toolbar",void 0),S([i.i(r.Property)(["Monday","Tuesday","Wednesday","Thursday","Friday"])],t.prototype,"workWeek",void 0),S([i.i(r.Property)(!1)],t.prototype,"includeWeekend",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowUnscheduledTasks",void 0),S([i.i(r.Property)(!1)],t.prototype,"showInlineNotes",void 0),S([i.i(r.Property)(36)],t.prototype,"rowHeight",void 0),S([i.i(r.Property)(null)],t.prototype,"taskbarHeight",void 0),S([i.i(r.Property)(null)],t.prototype,"projectStartDate",void 0),S([i.i(r.Property)(null)],t.prototype,"projectEndDate",void 0),S([i.i(r.Property)(null)],t.prototype,"resourceIDMapping",void 0),S([i.i(r.Property)(null)],t.prototype,"resourceNameMapping",void 0),S([i.i(r.Property)([])],t.prototype,"resources",void 0),S([i.i(r.Property)([])],t.prototype,"segmentData",void 0),S([i.i(r.Property)(null)],t.prototype,"connectorLineBackground",void 0),S([i.i(r.Property)(1)],t.prototype,"connectorLineWidth",void 0),S([i.i(r.Property)([])],t.prototype,"columns",void 0),S([i.i(r.Property)([])],t.prototype,"addDialogFields",void 0),S([i.i(r.Property)([])],t.prototype,"editDialogFields",void 0),S([i.i(r.Property)(-1)],t.prototype,"selectedRowIndex",void 0),S([i.i(r.Property)("hour")],t.prototype,"workUnit",void 0),S([i.i(r.Property)("FixedUnit")],t.prototype,"taskType",void 0),S([i.i(r.Property)("ProjectView")],t.prototype,"viewType",void 0),S([i.i(r.Collection)([{from:8,to:12},{from:13,to:17}],d.b)],t.prototype,"dayWorkingTime",void 0),S([i.i(r.Collection)([],d.i)],t.prototype,"holidays",void 0),S([i.i(r.Collection)([],d.f)],t.prototype,"eventMarkers",void 0),S([i.i(r.Complex)({},d.m)],t.prototype,"taskFields",void 0),S([i.i(r.Complex)({},d.s)],t.prototype,"resourceFields",void 0),S([i.i(r.Complex)({},d.o)],t.prototype,"timelineSettings",void 0),S([i.i(r.Complex)({},d.r)],t.prototype,"sortSettings",void 0),S([i.i(r.Complex)({},d.e)],t.prototype,"editSettings",void 0),S([i.i(r.Complex)({},d.p)],t.prototype,"tooltipSettings",void 0),S([i.i(r.Complex)({},d.k)],t.prototype,"selectionSettings",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowFiltering",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowExcelExport",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowRowDragAndDrop",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowReordering",void 0),S([i.i(r.Property)(!1)],t.prototype,"readOnly",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowResizing",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableContextMenu",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableCriticalPath",void 0),S([i.i(r.Property)()],t.prototype,"contextMenuItems",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowPdfExport",void 0),S([i.i(r.Property)(!1)],t.prototype,"validateManualTasksOnLinking",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableMultiTaskbar",void 0),S([i.i(r.Property)(!1)],t.prototype,"showOverAllocation",void 0),S([i.i(r.Property)("Auto")],t.prototype,"taskMode",void 0),S([i.i(r.Complex)({},d.g)],t.prototype,"filterSettings",void 0),S([i.i(r.Complex)({},d.h)],t.prototype,"searchSettings",void 0),S([i.i(r.Complex)({},d.l)],t.prototype,"splitterSettings",void 0),S([i.i(r.Event)()],t.prototype,"queryTaskbarInfo",void 0),S([i.i(r.Event)()],t.prototype,"beforeExcelExport",void 0),S([i.i(r.Event)()],t.prototype,"excelExportComplete",void 0),S([i.i(r.Event)()],t.prototype,"excelQueryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"excelHeaderQueryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"rowDrag",void 0),S([i.i(r.Event)()],t.prototype,"rowDragStart",void 0),S([i.i(r.Event)()],t.prototype,"rowDragStartHelper",void 0),S([i.i(r.Event)()],t.prototype,"rowDrop",void 0),S([i.i(r.Event)()],t.prototype,"collapsing",void 0),S([i.i(r.Event)()],t.prototype,"collapsed",void 0),S([i.i(r.Event)()],t.prototype,"expanding",void 0),S([i.i(r.Event)()],t.prototype,"expanded",void 0),S([i.i(r.Event)()],t.prototype,"actionBegin",void 0),S([i.i(r.Event)()],t.prototype,"actionComplete",void 0),S([i.i(r.Event)()],t.prototype,"actionFailure",void 0),S([i.i(r.Event)()],t.prototype,"dataStateChange",void 0),S([i.i(r.Event)()],t.prototype,"taskbarEdited",void 0),S([i.i(r.Event)()],t.prototype,"endEdit",void 0),S([i.i(r.Event)()],t.prototype,"cellEdit",void 0),S([i.i(r.Event)()],t.prototype,"load",void 0),S([i.i(r.Event)()],t.prototype,"created",void 0),S([i.i(r.Event)()],t.prototype,"destroyed",void 0),S([i.i(r.Event)()],t.prototype,"taskbarEditing",void 0),S([i.i(r.Event)()],t.prototype,"dataBound",void 0),S([i.i(r.Event)()],t.prototype,"resizeStart",void 0),S([i.i(r.Event)()],t.prototype,"resizing",void 0),S([i.i(r.Event)()],t.prototype,"resizeStop",void 0),S([i.i(r.Event)()],t.prototype,"splitterResizeStart",void 0),S([i.i(r.Event)()],t.prototype,"splitterResizing",void 0),S([i.i(r.Event)()],t.prototype,"splitterResized",void 0),S([i.i(r.Event)()],t.prototype,"columnDragStart",void 0),S([i.i(r.Event)()],t.prototype,"columnDrag",void 0),S([i.i(r.Event)()],t.prototype,"columnDrop",void 0),S([i.i(r.Event)()],t.prototype,"beforeTooltipRender",void 0),S([i.i(r.Event)()],t.prototype,"rowSelecting",void 0),S([i.i(r.Event)()],t.prototype,"rowSelected",void 0),S([i.i(r.Event)()],t.prototype,"rowDeselecting",void 0),S([i.i(r.Event)()],t.prototype,"rowDeselected",void 0),S([i.i(r.Event)()],t.prototype,"cellSelecting",void 0),S([i.i(r.Event)()],t.prototype,"cellSelected",void 0),S([i.i(r.Event)()],t.prototype,"cellDeselecting",void 0),S([i.i(r.Event)()],t.prototype,"cellDeselected",void 0),S([i.i(r.Event)()],t.prototype,"queryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"headerCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"rowDataBound",void 0),S([i.i(r.Event)()],t.prototype,"columnMenuOpen",void 0),S([i.i(r.Event)()],t.prototype,"toolbarClick",void 0),S([i.i(r.Event)()],t.prototype,"columnMenuClick",void 0),S([i.i(r.Event)()],t.prototype,"contextMenuOpen",void 0),S([i.i(r.Event)()],t.prototype,"contextMenuClick",void 0),S([i.i(r.Event)()],t.prototype,"onTaskbarClick",void 0),S([i.i(r.Event)()],t.prototype,"recordDoubleClick",void 0),S([i.i(r.Event)()],t.prototype,"onMouseMove",void 0),S([i.i(r.Event)()],t.prototype,"beforePdfExport",void 0),S([i.i(r.Event)()],t.prototype,"pdfExportComplete",void 0),S([i.i(r.Event)()],t.prototype,"pdfQueryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"pdfQueryTaskbarInfo",void 0),S([i.i(r.Event)()],t.prototype,"pdfQueryTimelineCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"pdfColumnHeaderQueryCellInfo",void 0),t=S([r.NotifyPropertyChanges],t)}(r.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(3)),a=i(86),s=(i.n(a),i(4)),o=(i.n(s),function(){function e(e){this.parent=e,this.parent.on("destroy",this.destroy,this)}return e.prototype.renderSplitter=function(){var e=this,t=this.calculateSplitterPosition(this.parent.splitterSettings);this.parent.splitterElement=i.i(r.createElement)("div",{className:n._31}),this.parent.treeGridPane=i.i(r.createElement)("div",{className:n._32}),this.parent.chartPane=i.i(r.createElement)("div",{className:n._33}),this.parent.splitterElement.appendChild(this.parent.treeGridPane),this.parent.splitterElement.appendChild(this.parent.chartPane),this.splitterObject=new a.Splitter({height:null,width:this.parent.ganttWidth.toString(),enablePersistence:this.parent.enablePersistence,separatorSize:this.parent.splitterSettings.separatorSize,paneSettings:[{resizable:!0,size:t,min:this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum)},{resizable:!0}],orientation:"Horizontal",resizeStart:function(t){var i=t.pane[0],r=t.pane[1];e.splitterPreviousPositionGrid=i.scrollWidth+1+"px",e.splitterPreviousPositionChart=r.scrollWidth+1+"px";var n=new s.Deferred;return e.parent.trigger("splitterResizeStart",t,function(e){n.resolve(e)}),n},resizing:function(t){e.parent.trigger("splitterResizing",t)},resizeStop:function(t){var n=new s.Deferred;return e.parent.trigger("splitterResized",t,function(t){!0===t.cancel&&(e.splitterObject.paneSettings[0].size=null,e.splitterObject.paneSettings[0].size=e.getSpliterPositionInPercentage(e.splitterPreviousPositionGrid),e.splitterObject.paneSettings[1].size=null,e.splitterObject.paneSettings[1].size=e.getSpliterPositionInPercentage(e.splitterPreviousPositionChart)),i.i(r.isNullOrUndefined)(e.parent.projectEndDate)&&e.parent.timelineModule.updateTimelineAfterZooming(e.parent.timelineModule.timelineEndDate,!0),n.resolve(t)}),n}}),this.parent.element.appendChild(this.parent.splitterElement),this.splitterObject.appendTo(this.parent.splitterElement)},e.prototype.calculateSplitterPosition=function(e){return!i.i(r.isNullOrUndefined)(this.splitterObject)&&this.parent.enablePersistence?this.splitterObject.paneSettings[0].size:"Grid"===e.view?"100%":"Chart"===e.view?"0%":i.i(r.isNullOrUndefined)(e.position)||""===e.position?!i.i(r.isNullOrUndefined)(e.columnIndex)&&e.columnIndex>=0?150*e.columnIndex<this.parent.ganttWidth||!this.parent.element.classList.contains("e-device")?this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(e.columnIndex).toString()+"px"):this.getSpliterPositionInPercentage(130*e.columnIndex+"px"):this.getSpliterPositionInPercentage("250px"):this.getSpliterPositionInPercentage(e.position)},e.prototype.getSpliterPositionInPercentage=function(e){var t=i.i(r.isNullOrUndefined)(e)||""===e?null:e;if(!i.i(r.isNullOrUndefined)(t))if(-1!==e.indexOf("px")){var n=parseInt(e,10);t=n/this.parent.ganttWidth*100<=100?n/this.parent.ganttWidth*100+"%":"25%"}else t=-1===e.indexOf("%")?e+"%":e;return t},e.prototype.getTotalColumnWidthByIndex=function(e){var t=0,i=this.parent.ganttColumns;e=i.length>e?e:i.length;for(var r=0;r<e;r++)t+=parseInt(i[r].width);return t},e.prototype.updateSplitterPosition=function(){this.splitterObject.separatorSize=this.parent.splitterSettings.separatorSize>=4?this.parent.splitterSettings.separatorSize:4;var e=this.calculateSplitterPosition(this.parent.splitterSettings);this.splitterObject.paneSettings[0].min=this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum),this.splitterObject.dataBind(),this.splitterObject.paneSettings[0].size=e},e.prototype.triggerCustomResizedEvent=function(){var e=this.splitterObject.element.querySelectorAll(".e-pane")[0],t=this.splitterObject.element.querySelectorAll(".e-pane")[1],i={event:null,element:this.splitterObject.element,pane:[e,t],index:[0,1],separator:this.splitterObject.element.querySelector(".e-split-bar"),paneSize:[e.offsetWidth,t.offsetWidth]};this.parent.trigger("splitterResized",i),!0===i.cancel&&(this.splitterObject.paneSettings[0].size=this.getSpliterPositionInPercentage(this.splitterPreviousPositionGrid),this.splitterObject.paneSettings[1].size=this.getSpliterPositionInPercentage(this.splitterPreviousPositionChart))},e.prototype.destroy=function(){this.splitterObject.destroy(),this.parent.off("destroy",this.destroy)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(5)),a=(i.n(n),i(4)),s=(i.n(a),i(2)),o=i(10),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d=function(e){function t(t){var i=e.call(this,t)||this;return i.recordIndex=0,i.taskIds=[],i.hierarchyData=[],i.addEventListener(),i}return l(t,e),t.prototype.addEventListener=function(){this.parent.on("beforeDataManipulate",this.checkDataBinding.bind(this))},t.prototype.checkDataBinding=function(e){if(e&&(this.parent.flatData=[],this.parent.currentViewData=[],this.parent.updatedRecords=[],this.dataArray=[],this.taskIds=[],this.parent.ids=[],this.recordIndex=0,this.hierarchyData=[],this.parent.predecessorsCollection=[],this.parent.treeGrid.parentData=[],this.parent.taskIds=[]),i.i(r.isNullOrUndefined)(this.parent.dataSource))this.parent.dataSource=[],this.parent.processTimeline(),this.parent.renderGantt(e);else if(this.parent.dataSource instanceof a.DataManager)this.initDataSource(e);else{if(this.parent.dataSource instanceof Object&&i.i(s.i)(this.parent)){var t=i.i(r.getValue)("result",this.parent.dataSource);this.dataArray=t}else this.dataArray=this.parent.dataSource;this.processTimeline(),this.cloneDataSource(),this.parent.renderGantt(e)}},t.prototype.processTimeline=function(){this.parent.processTimeline(),this.parent.enableValidation||(this.parent.dataOperation.calculateProjectDatesForValidatedTasks(),this.parent.timelineModule.validateTimelineProp())},t.prototype.initDataSource=function(e){var t=this,i=this.parent.query instanceof a.Query?this.parent.query:new a.Query;i.requiresCount(),this.parent.dataSource.executeQuery(i).then(function(i){t.dataArray=i.result,t.processTimeline(),t.cloneDataSource(),t.parent.renderGantt(e)}).catch(function(i){t.parent.processTimeline(),t.parent.renderGantt(e),t.parent.trigger("actionFailure",{error:i})})},t.prototype.constructDataSource=function(e){for(var t,n=new a.DataManager(e).executeLocal((new a.Query).group(this.parent.taskFields.parentID)),s=[],o=0;o<n.length;o++){var l=n[o];!i.i(r.isNullOrUndefined)(l.key)&&(t=this.taskIds.indexOf(l.key.toString()))>-1&&!i.i(r.isNullOrUndefined)(l.key)?e[t][this.parent.taskFields.child]=l.items:-1!==t&&s.push.apply(s,l.items)}this.hierarchyData=this.dataReorder(e,s)},t.prototype.cloneDataSource=function(){var e=this.parent.taskFields.id,t=this.parent.taskFields.parentID,n=[];if(i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(t))n=this.dataArray;else{for(var s=[],o=0;o<this.dataArray.length;o++){var l=this.dataArray[o];s.push(i.i(r.extend)({},{},l,!0)),i.i(r.isNullOrUndefined)(l[e])||this.taskIds.push(l[e].toString())}this.parent.taskFields.child||(this.parent.taskFields.child="Children"),this.constructDataSource(s),n=this.hierarchyData}if(this.parent.taskFields.segmentId&&(this.segmentCollection=new a.DataManager(this.parent.segmentData).executeLocal((new a.Query).group(this.parent.taskFields.segmentId)),this.parent.taskFields.segments||(this.parent.taskFields.segments="Segments")),"ProjectView"!==this.parent.viewType){var d=i.i(r.extend)([],[],this.parent.resources,!0),p=[];if(this.constructResourceViewDataSource(d,n,p),p.length>0){var h={};h[this.parent.resourceFields.id]=0,h[this.parent.resourceFields.name]=this.parent.localeObj.getConstant("unassignedTask"),h[this.parent.taskFields.child]=p,d.push(h)}n=d}this.prepareDataSource(n)},t.prototype.constructResourceViewDataSource=function(e,t,i){for(var r=this,n=0;n<t.length;n++)!function(n){var a=t[n],s=r.parent.taskFields.child,o=a&&a[r.parent.taskFields.resourceInfo],l=r.parent.resourceFields.id;a[s]&&0!==a[s].length||!o||!o.length?a[s]||i.push(a):o.forEach(function(t){for(var i="object"==typeof t?t[l]:t,r=0;r<e.length;r++)if(e[r][l].toString()===i.toString()){e[r][s]?e[r][s].push(a):e[r][s]=[a];break}}),a[r.parent.taskFields.child]&&a[r.parent.taskFields.child].length&&r.constructResourceViewDataSource(e,a[r.parent.taskFields.child],i)}(n)},t.prototype.prepareDataSource=function(e){this.prepareRecordCollection(e,0),"ResourceView"===this.parent.viewType&&this.calculateSharedTaskUniqueIds(),this.parent.taskFields.dependency&&this.parent.predecessorModule&&this.parent.predecessorModule.ensurePredecessorCollection()},t.prototype.calculateSharedTaskUniqueIds=function(){for(var e=this,t=0;t<this.parent.getTaskIds().length;t++)!function(t){var i=[];if(i[0]=e.parent.getTaskIds()[t][0],i[1]=e.parent.getTaskIds()[t].slice(1),"R"!==i[0]){var r=[],n=[];e.parent.flatData.filter(function(e){e.ganttProperties.taskId.toString()===i[1]&&0!==e.level&&(n.push(e.ganttProperties.rowUniqueID),r.push(e))});for(var a=0;a<r.length;a++)r[a].ganttProperties.sharedTaskUniqueIds=n}}(t)},t.prototype.prepareRecordCollection=function(e,t,n){for(var a=this,s=e.length,o=this,l=0;l<s;l++)!function(s){var l=e[s];if(!i.i(r.isNullOrUndefined)(o.parent.taskFields.segmentId)){var d=o.segmentCollection.filter(function(e){return e.key===l[a.parent.taskFields.id]});d.length>0&&(l[o.parent.taskFields.segments]=d[0].items)}var p=o.createRecord(l,t,n,!0);o.parent.enableValidation||o.updateTaskLeftWidth(p),p.index=o.recordIndex++,o.parent.ids[p.index]=p.ganttProperties.rowUniqueID,o.parent.flatData.push(p),o.parent.setTaskIds(p);var h=l[o.parent.taskFields.child];if("ResourceView"===o.parent.viewType&&i.i(r.isNullOrUndefined)(h)&&i.i(r.isNullOrUndefined)(p.parentItem)&&0===p.level){var u=p.ganttProperties,c=p;o.parent.setRecordValue(u.isAutoSchedule?"startDate":"autoStartDate",null,c.ganttProperties,!0),o.parent.setRecordValue(u.isAutoSchedule?"endDate":"autoEndDate",null,c.ganttProperties,!0);var g=c.ganttProperties;o.parent.setRecordValue("isMilestone",!1,g,!0),g.isAutoSchedule&&o.calculateDuration(c),o.updateWorkWithDuration(c);var f=g.work;o.parent.setRecordValue("work",f,g,!0),o.parent.setRecordValue("taskType","FixedDuration",g,!0),i.i(r.isNullOrUndefined)(o.parent.taskFields.type)||o.updateMappingData(c,"type"),o.parent.setRecordValue("progress",Math.floor(0),g,!0),o.parent.setRecordValue("totalProgress",0,g,!0),o.parent.setRecordValue("totalDuration",0,g,!0),g.isAutoSchedule||(o.parent.setRecordValue("autoDuration",o.calculateAutoDuration(g),g,!0),o.updateAutoWidthLeft(c)),o.updateWidthLeft(c),o.updateTaskData(c)}!i.i(r.isNullOrUndefined)(h)&&h.length>0&&o.prepareRecordCollection(h,p.level+1,p)}(l)},t.prototype.addCustomFieldValue=function(e,t){var i=this.parent.ganttColumns,r=i.length;if(r)for(var n=0;n<r;n++){var a=t[i[n].field];void 0===a&&this.parent.setRecordValue(i[n].field,e[i[n].field],t)}},t.prototype.createRecord=function(e,t,a,o){var l=this.parent.taskFields,d=this.parent.resourceFields,p=e[l.progress],h=null,u=null,c=e[l.notes];p=p&&parseFloat(p.toString())?parseFloat(p.toString()):0;var g=e[l.dependency],f=this.getDateFromFormat(e[l.baselineStartDate],!0),m=this.getDateFromFormat(e[l.baselineEndDate],!0),y={},v={},D="Auto"===this.parent.taskMode||"Manual"!==this.parent.taskMode&&!0!==e[l.manual];this.parent.setRecordValue("ganttProperties",v,y),i.i(r.isNullOrUndefined)(e[l.id])?i.i(r.isNullOrUndefined)(e[d.id])||(h=e[d.id],u=e[d.name],this.addTaskData(y,e,!1)):(h=e[l.id],u=e[l.name],this.addTaskData(y,e,o)),this.parent.setRecordValue("taskId",h,v,!0),this.parent.setRecordValue("taskName",u,v,!0),l.parentID&&this.parent.setRecordValue("parentId",e[l.parentID],v,!0),this.addCustomFieldValue(e,y),y.checkboxState="uncheck",this.parent.setRecordValue("isAutoSchedule",D,v,!0),this.parent.setRecordValue("resourceInfo",this.setResourceInfo(e),v,!0),this.parent.setRecordValue("isMilestone",!1,v,!0),this.parent.setRecordValue("indicators",e[l.indicators],v,!0),this.updateResourceName(y),this.calculateScheduledValues(y,e,o),this.parent.setRecordValue("baselineStartDate",this.checkBaselineStartDate(f),v,!0),m&&0===m.getHours()&&86400!==this.parent.defaultEndTime&&this.setTime(this.parent.defaultEndTime,m),(v.baselineStartDate&&m&&v.baselineStartDate.getTime()>m.getTime()||!i.i(r.isNullOrUndefined)(v.baselineStartDate)&&!i.i(r.isNullOrUndefined)(v.startDate)&&v.baselineStartDate.getTime()===v.startDate.getTime()&&!i.i(r.isNullOrUndefined)(m)&&!i.i(r.isNullOrUndefined)(v.endDate)&&m.toLocaleDateString()===v.endDate.toLocaleDateString()&&v.isMilestone)&&(m=v.baselineStartDate),this.parent.setRecordValue("baselineEndDate",this.checkBaselineEndDate(m,v),v,!0),this.parent.setRecordValue("progress",p,v,!0),this.parent.setRecordValue("totalProgress",p,v,!0),this.parent.setRecordValue("predecessorsName",g,v,!0),this.parent.setRecordValue("notes",c,v,!0),this.parent.setRecordValue("cssClass",e[l.cssClass],v,!0),this.parent.setRecordValue("parentItem",this.getCloneParent(a),y);var w=y.parentItem?y.parentItem.uniqueID:null;if(this.parent.setRecordValue("parentUniqueID",w,y),"ResourceView"!==this.parent.viewType||i.i(r.isNullOrUndefined)(l.parentID)||i.i(r.isNullOrUndefined)(y.parentItem)||this.parent.setRecordValue("parentId",y.parentItem.taskId,v,!0),this.parent.setRecordValue("level",t,y),this.parent.setRecordValue("uniqueID",i.i(n.getUid)(this.parent.element.id+"_data_"),y),this.parent.setRecordValue("uniqueID",y.uniqueID,v,!0),this.parent.setRecordValue("childRecords",[],y),this.parent.dataSource instanceof Object&&i.i(s.i)(this.parent)&&!i.i(r.isNullOrUndefined)(l.child)&&this.parent.setRecordValue(l.child,[],y),!i.i(r.isNullOrUndefined)(e[l.child])&&e[l.child].length>0?(this.parent.setRecordValue("hasChildRecords",!0,y),this.parent.setRecordValue("isMilestone",!1,v,!0)):this.parent.setRecordValue("hasChildRecords",!1,y),y.hasChildRecords&&(this.parent.setRecordValue("autoStartDate",y.ganttProperties.startDate,v),this.parent.setRecordValue("autoEndDate",y.ganttProperties.endDate,v),this.parent.setRecordValue("autoDuration",y.ganttProperties.duration,v)),this.parent.setRecordValue("expanded",!y.hasChildRecords||!this.parent.collapseAllParentTasks,y),this.updateExpandStateMappingValue(y,e),o||(this.parent.setRecordValue("width",this.calculateWidth(y),v,!0),this.parent.setRecordValue("left",this.calculateLeft(v),v,!0),this.parent.setRecordValue("progressWidth",this.getProgressWidth(v.width,p),v,!0),v.baselineEndDate&&v.baselineStartDate&&(this.parent.setRecordValue("baselineLeft",this.calculateBaselineLeft(v),v,!0),this.parent.setRecordValue("baselineWidth",this.calculateBaselineWidth(v),v,!0))),i.i(r.isNullOrUndefined)(l.work)&&this.updateWorkWithDuration(y),i.i(r.isNullOrUndefined)(l.manual)||this.parent.dataOperation.updateMappingData(y,"manual"),this.updateTaskData(y),g&&this.parent.predecessorsCollection.push(y),i.i(r.isNullOrUndefined)(a)||(a.childRecords.push(y),this.parent.dataSource instanceof Object&&i.i(s.i)(this.parent)&&!i.i(r.isNullOrUndefined)(this.parent.taskFields.child)&&a[this.parent.taskFields.child].push(y.taskData)),"ProjectView"===this.parent.viewType)this.parent.setRecordValue("rowUniqueID",v.taskId.toString(),v,!0);else{var k=y.uniqueID.replace(this.parent.element.id+"_data_","");"ResourceView"===this.parent.viewType&&"string"==typeof y.ganttProperties.taskId&&(k=v.taskId.toString()),this.parent.setRecordValue("rowUniqueID",k,y),this.parent.setRecordValue("rowUniqueID",k,v,!0),this.parent.setRecordValue("sharedTaskUniqueIds",[],v,!0)}return this.parent.allowUnscheduledTasks&&y.ganttProperties.startDate&&(y.ganttProperties.endDate||y.ganttProperties.duration)&&(this.parent.setRecordValue("segments",this.setSegmentsInfo(y,!0),v,!0),this.parent.dataOperation.updateMappingData(y,"segments"),o||this.updateWidthLeft(y)),y},t.prototype.sortSegmentsData=function(e,t,i){var r=this;return t?e.sort(function(e,t){var i=r.parent.taskFields.startDate;return r.getDateFromFormat(e[i]).getTime()-r.getDateFromFormat(t[i]).getTime()}):e.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()}),e},t.prototype.setSegmentsInfo=function(e,t){var n,a=this.parent.taskFields,s=[],o=0,l=0,d=[];if(!i.i(r.isNullOrUndefined)(this.parent.taskFields.segments)&&(n=t?e.taskData[this.parent.taskFields.segments]:e.ganttProperties.segments,!i.i(r.isNullOrUndefined)(n)&&n.length>1)){this.sortSegmentsData(n,t,e.ganttProperties);for(var p=0;p<n.length;p++){var h=n[p],u=t?h[a.startDate]:h.startDate,c=t?h[a.endDate]:h.endDate,g=t?h[a.duration]:h.duration;if(u=this.getDateFromFormat(u),u=this.checkStartDate(u,e.ganttProperties,!1),i.i(r.isNullOrUndefined)(g)?(c=this.getDateFromFormat(c),c=this.checkEndDate(c,e.ganttProperties,!1),g=this.getDuration(u,c,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone)):c=this.getEndDate(u,g,e.ganttProperties.durationUnit,e.ganttProperties,!1),a.duration){if((l=e.ganttProperties.duration-o)<=0)continue;g=p===n.length-1?l:l>0&&g>l?l:g,c=this.getEndDate(u,g,e.ganttProperties.durationUnit,e.ganttProperties,!1)}else if(!a.duration&&a.endDate&&(c=!i.i(r.isNullOrUndefined)(e.ganttProperties.endDate)&&c.getTime()>e.ganttProperties.endDate.getTime()&&p!==n.length-1?c:e.ganttProperties.endDate,g=this.getDuration(u,c,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone),s.length>0&&c.getTime()<u.getTime()&&c.getTime()<=e.ganttProperties.endDate.getTime())){s[p-1].duration=this.getDuration(s[p-1].startDate,e.ganttProperties.endDate,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone);continue}if(h={},!(u&&c&&u&&g))break;if(o+=g,h.startDate=u,h.endDate=c,h.duration=g,h.width=0,h.left=0,h.segmentIndex=p,s.push(h),i.i(r.isNullOrUndefined)(s[p-1]))h.offsetDuration=0;else{var f=this.getDuration(s[p-1].endDate,s[p].startDate,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone);h.offsetDuration=f,f<1&&(h.startDate=this.getEndDate(s[p-1].endDate,1,e.ganttProperties.durationUnit,e.ganttProperties,!1),h.startDate=this.checkStartDate(h.startDate,e.ganttProperties,!1),h.endDate=this.getEndDate(h.startDate,h.duration,e.ganttProperties.durationUnit,e.ganttProperties,!1),h.endDate=!a.duration&&a.endDate&&h.endDate>e.ganttProperties.endDate?e.ganttProperties.endDate:h.endDate,h.offsetDuration=1)}d.push(this.setSegmentTaskData(h,n[p]))}this.parent.setRecordValue("duration",o,e.ganttProperties,!0),this.parent.setRecordValue("endDate",s[s.length-1].endDate,e.ganttProperties,!0),i.i(r.isNullOrUndefined)(a.endDate)||this.parent.setRecordValue(this.parent.taskFields.endDate,s[s.length-1].endDate,e,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.segments,d,e)}return s.length>1?this.parent.setRecordValue("segments",s,e.ganttProperties,!0):s=null,s},t.prototype.setSegmentTaskData=function(e,t){var n=this.parent.taskFields,a=i.i(r.extend)({},{},t,!0);return i.i(r.isNullOrUndefined)(n.startDate)||(a[this.parent.taskFields.startDate]=e.startDate),i.i(r.isNullOrUndefined)(n.endDate)||(a[this.parent.taskFields.endDate]=e.endDate),i.i(r.isNullOrUndefined)(n.duration)||(a[this.parent.taskFields.duration]=Number(e.duration)),a},t.prototype.updateWorkWithDuration=function(e){var t=e.ganttProperties.resourceInfo,n=0;if(!i.i(r.isNullOrUndefined)(t)){var a=t.length,s=void 0,o=void 0,l=void 0,d=this.parent.secondsPerDay/3600,p=this.getDurationInDay(e.ganttProperties.duration,e.ganttProperties.durationUnit);for(s=0;s<a;s++)o=t[s][this.parent.resourceFields.unit],l=o>0?d*o/100:d,n+=l*p;"minute"===e.ganttProperties.workUnit&&(n*=60),"day"===e.ganttProperties.workUnit&&(n/=d),n%1!=0&&(n=parseFloat(n.toFixed(2)))}if(e.childRecords.length>0&&this.parent.isOnEdit){for(var h=0,u=0;u<e.childRecords.length;u++)h+=e.childRecords[u].ganttProperties.work;n+=h}this.parent.setRecordValue("work",n,e.ganttProperties,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.work)||this.parent.dataOperation.updateMappingData(e,"work")},t.prototype.getCloneParent=function(e){if(i.i(r.isNullOrUndefined)(e))return null;var t={};return t.uniqueID=e.uniqueID,t.expanded=e.expanded,t.level=e.level,t.index=e.index,t.taskId=e.ganttProperties.rowUniqueID,t},t.prototype.reUpdateResources=function(){if(this.parent.flatData.length>0)for(var e=void 0,t=void 0,i=void 0,r=0;r<this.parent.flatData.length;r++)e=this.parent.flatData[r].taskData,t=this.parent.flatData[r].ganttProperties,i=this.parent.flatData[r],this.parent.setRecordValue("resourceInfo",this.setResourceInfo(e),t,!0),this.updateResourceName(i)},t.prototype.addTaskData=function(e,t,n){var s=this,o=this.parent.taskFields,l=this.parent.dataSource;if(n)if(o.parentID||l instanceof a.DataManager&&l.dataSource.json&&l.dataSource.offline)if(o.parentID){var d=t[o.id],p=this.taskIds.indexOf(d.toString()),h=p>-1?this.dataArray[p]:{};if(!i.i(r.isNullOrUndefined)(this.parent.taskFields.segmentId)){var u=this.segmentCollection.filter(function(e){return e.key===h[s.parent.taskFields.id]});u.length>0&&(h[this.parent.taskFields.segments]=u[0].items)}this.parent.setRecordValue("taskData",h,e)}else this.parent.setRecordValue("taskData",t,e);else this.parent.setRecordValue("taskData",t,e);else this.parent.setRecordValue("taskData",t,e)},t.prototype.updateExpandStateMappingValue=function(e,t){var n,a=this.parent.taskFields.expandState,s=t[a];a&&e.hasChildRecords&&(i.i(r.isNullOrUndefined)(s)?i.i(r.isNullOrUndefined)(s)&&!this.parent.collapseAllParentTasks?n=!0:i.i(r.isNullOrUndefined)(s)&&this.parent.collapseAllParentTasks&&(n=!1):n="true"===s.toString(),this.parent.setRecordValue("taskData."+a,n,e),this.parent.setRecordValue(a,n,e),this.parent.setRecordValue("expanded",n,e))},t.prototype.setValidatedDates=function(e,t){var n=e.ganttProperties,a=this.parent.taskFields,s=t[a.duration],o=this.getDateFromFormat(t[a.startDate],!0),l=this.getDateFromFormat(t[a.endDate],!0);s=i.i(r.isNullOrUndefined)(s)||""===s?null:s,this.parent.setRecordValue("startDate",new Date(o.getTime()),n,!0),i.i(r.isNullOrUndefined)(s)||""===s?this.calculateDuration(e):this.updateDurationValue(s,n),this.parent.setRecordValue("endDate",new Date(l.getTime()),n,!0)},t.prototype.calculateScheduledValues=function(e,t,n){var a=this.parent.taskFields,s=e.ganttProperties,o=t[a.duration];o=i.i(r.isNullOrUndefined)(o)||""===o?null:o;var l,d;s.startDate&&s.endDate?(l=this.getDateFromFormat(s.startDate,!0),d=this.getDateFromFormat(s.endDate,!0)):(l=this.getDateFromFormat(t[a.startDate],!0),d=this.getDateFromFormat(t[a.endDate],!0));var p=a.segments?t[a.segments]||e.taskData[a.segments]:null,h=!!a.milestone&&!!t[a.milestone],u=t[a.durationUnit]?t[a.durationUnit]:"";this.parent.setRecordValue("durationUnit",this.validateDurationUnitMapping(u),s,!0);var c=i.i(r.isNullOrUndefined)(t[a.work])?0:parseFloat(t[a.work]);this.parent.setRecordValue("workUnit",this.validateWorkUnitMapping(this.parent.workUnit),s,!0);var g=t[a.type]?t[a.type]:"",f=this.validateTaskTypeMapping(g);if(this.parent.setRecordValue("taskType",f,s,!0),n&&!this.parent.enableValidation&&l&&d)this.setValidatedDates(e,t);else if(d||l||!i.i(r.isNullOrUndefined)(o)&&""!==o)l?this.calculateDateFromStartDate(l,d,o,e,n):d?this.calculateDateFromEndDate(d,o,e):i.i(r.isNullOrUndefined)(o)||""===o||(this.updateDurationValue(o,s),this.parent.allowUnscheduledTasks?(this.parent.setRecordValue("startDate",null,s,!0),this.parent.setRecordValue("endDate",null,s,!0)):(this.parent.setRecordValue("startDate",this.getProjectStartDate(s,n),s,!0),this.calculateEndDate(e)));else{if(this.parent.allowUnscheduledTasks)return;this.parent.setRecordValue("duration",1,s,!0),this.parent.setRecordValue("startDate",this.getProjectStartDate(s,n),s,!0),this.calculateEndDate(e)}if(i.i(r.isNullOrUndefined)(p)||this.parent.setRecordValue("segments",this.setSegmentsInfo(e,!0),s,!0),0===s.duration&&(this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0)),!i.i(r.isNullOrUndefined)(h)&&h&&(this.parent.setRecordValue("duration",0,s,!0),this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0)),i.i(r.isNullOrUndefined)(a.work))a.type&&s.taskType&&this.parent.dataOperation.updateMappingData(e,"type");else{if(this.parent.setRecordValue("durationUnit",this.parent.durationUnit,s,!0),isNaN(c)||i.i(r.isNullOrUndefined)(c))this.parent.setRecordValue("work",0,s,!0),this.parent.setRecordValue("duration",0,s,!0),this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0);else{switch(this.parent.setRecordValue("work",c,s,!0),f){case"FixedDuration":case"FixedWork":this.updateUnitWithWork(e);break;case"FixedUnit":this.updateDurationWithWork(e)}i.i(r.isNullOrUndefined)(a.type)||this.parent.dataOperation.updateMappingData(e,"type"),0===s.duration?(this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0)):i.i(r.isNullOrUndefined)(s.startDate)||i.i(r.isNullOrUndefined)(s.duration)||(this.parent.setRecordValue("isMilestone",!1,s,!0),this.calculateEndDate(e))}this.parent.dataOperation.updateMappingData(e,"work")}},t.prototype.updateDurationWithWork=function(e){var t=e.ganttProperties,n=t.resourceInfo;if(!i.i(r.isNullOrUndefined)(n)){var a=i.i(r.isNullOrUndefined)(n)?0:n.length,s=0,o=this.parent.secondsPerDay/3600,l=0,d=void 0,p=void 0;for(p=0;p<a;p++)d=n[p][this.parent.resourceFields.unit],s+=d>0?o*d/100:o;var h=this.getWorkInHour(t.work,t.workUnit);a>0&&(l+=h/s),"minute"===t.durationUnit&&(l=l*o*60),"hour"===t.durationUnit&&(l*=o),l%1!=0&&(l=parseFloat(l.toFixed(2))),i.i(r.isNullOrUndefined)(t.duration)||this.parent.setRecordValue("duration",l,t,!0),this.parent.dataOperation.updateMappingData(e,"duration")}},t.prototype.updateUnitWithWork=function(e){var t=e.ganttProperties,n=t.resourceInfo,a=i.i(r.isNullOrUndefined)(n)?0:n.length,s=this.parent.secondsPerDay/3600;if(0!==a){var o=this.getDurationInDay(e.ganttProperties.duration,e.ganttProperties.durationUnit),l=this.getWorkInHour(t.work,t.workUnit),d=o>0?l/(o*s)*100:0,p=d>0?d/a:100;p%1!=0&&(p=parseFloat(p.toFixed(2)));for(var h=0;h<a;h++)n[h][this.parent.resourceFields.unit]=p;this.updateResourceName(e)}},t.prototype.calculateDateFromEndDate=function(e,t,n){var a=n.ganttProperties;0===e.getHours()&&86400!==this.parent.defaultEndTime&&this.setTime(this.parent.defaultEndTime,e);var s=0===parseInt(t,10)||null;this.parent.setRecordValue("endDate",this.checkEndDate(e,n.ganttProperties,s),a,!0),i.i(r.isNullOrUndefined)(t)||""===t?this.parent.allowUnscheduledTasks?(this.parent.setRecordValue("startDate",null,a,!0),this.parent.setRecordValue("duration",null,a,!0)):(this.parent.setRecordValue("duration",1,a,!0),this.parent.setRecordValue("startDate",this.getStartDate(a.endDate,a.duration,a.durationUnit,a),a,!0)):i.i(r.isNullOrUndefined)(t)||""===t||(this.updateDurationValue(t,a),this.parent.setRecordValue("startDate",this.getStartDate(a.endDate,a.duration,a.durationUnit,a),a,!0))},t.prototype.calculateDateFromStartDate=function(e,t,n,a,s){var o=a.ganttProperties,l=!!(0===parseInt(n,10)||e&&t&&new Date(e.getTime())===new Date(t.getTime()))||null;this.parent.setRecordValue("startDate",this.checkStartDate(e,o,l,s),o,!0),this.parent.isTreeGridRendered&&a&&this.updateTaskData(a),t||!i.i(r.isNullOrUndefined)(n)&&""!==n?(i.i(r.isNullOrUndefined)(n)||t)&&t&&(i.i(r.isNullOrUndefined)(n)||""===n)?(0===t.getHours()&&86400!==this.parent.defaultEndTime&&this.setTime(this.parent.defaultEndTime,t),this.parent.setRecordValue("endDate",this.checkEndDate(t,a.ganttProperties),o,!0),1===this.compareDates(o.startDate,o.endDate)?(this.parent.setRecordValue("endDate",o.startDate,o,!0),this.parent.setRecordValue("isMilestone",!0,o,!0),this.parent.setRecordValue("duration",0,o,!0)):this.calculateDuration(a)):(this.updateDurationValue(n,o),this.calculateEndDate(a)):this.parent.allowUnscheduledTasks?(this.parent.setRecordValue("endDate",null,o,!0),this.parent.setRecordValue("duration",null,o,!0)):(this.parent.setRecordValue("duration",1,o,!0),this.calculateEndDate(a))},t.prototype.getProgressWidth=function(e,t){return e*t/100},t.prototype.calculateWidth=function(e,t){var n=e.ganttProperties,a=t?n.autoStartDate:n.startDate,s=t?n.autoEndDate:n.endDate;return i.i(r.isNullOrUndefined)(a)&&i.i(r.isNullOrUndefined)(s)&&(a=this.getValidStartDate(n,t),s=this.getValidEndDate(n,t)),i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(s)?3:!n.isMilestone||e.hasChildRecords&&!n.isAutoSchedule?this.getTaskWidth(a,s):0},t.prototype.getTaskbarHeight=function(){var e=this.parent.rowHeight,t=this.parent.taskbarHeight;return t<e?t:e},t.prototype.calculateLeft=function(e,t){var n=null,a=-300,s=t?e.autoStartDate:e.startDate,o=t?e.autoEndDate:e.endDate,l=(t?e.autoDuration:e.duration,e.isMilestone);return s?n=new Date(s.getTime()):o?(n=new Date(o.getTime()),l=!0):n=this.getValidStartDate(e),i.i(r.isNullOrUndefined)(n)||(a=this.getTaskLeft(n,l)),a},t.prototype.calculateAutoLeft=function(e){return this.getTaskLeft(e.autoStartDate,e.isMilestone)},t.prototype.calculateAutoDuration=function(e){return this.getDuration(e.autoStartDate,e.autoEndDate,e.durationUnit,!1,e.isMilestone)},t.prototype.calculateAutoWidth=function(e){return this.getTaskWidth(e.autoStartDate,e.autoEndDate)},t.prototype.calculateBaselineLeft=function(e){var t=this.getDateFromFormat(e.baselineStartDate),i=this.getDateFromFormat(e.baselineEndDate);return t&&i?this.getTaskLeft(t,e.isMilestone):0},t.prototype.calculateBaselineWidth=function(e){var t=this.getDateFromFormat(e.baselineStartDate),i=this.getDateFromFormat(e.baselineEndDate);return t&&i&&t.getTime()!==i.getTime()?this.getTaskWidth(t,i):0},t.prototype.getTaskWidth=function(e,t){var i=new Date(e.getTime()),r=new Date(t.getTime());return"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(i)===this.parent.defaultStartTime&&i.setHours(0,0,0,0),this.getSecondsInDecimal(r)===this.parent.defaultEndTime&&r.setHours(24),this.getSecondsInDecimal(r)===this.parent.defaultStartTime&&r.setHours(0,0,0,0)),i.getTime()===r.getTime()?this.parent.perDayWidth:this.getTimeDifference(i,r)/864e5*this.parent.perDayWidth},t.prototype.getTaskLeft=function(e,t){var i=new Date(e.getTime());"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(i)===this.parent.defaultStartTime?i.setHours(0,0,0,0):t&&this.getSecondsInDecimal(i)===this.parent.defaultEndTime&&i.setHours(24));var r=this.parent.timelineModule.timelineStartDate;return r?(i.getTime()-r.getTime())/864e5*this.parent.perDayWidth:0},t.prototype.getSplitTaskWidth=function(e,t,i){var r=new Date(e.getTime()),n=new Date(this.getEndDate(r,t,i.ganttProperties.durationUnit,i.ganttProperties,!1).getTime());return"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(r)===this.parent.defaultStartTime&&r.setHours(0,0,0,0),this.getSecondsInDecimal(n)===this.parent.defaultEndTime&&n.setHours(24),this.getSecondsInDecimal(n)===this.parent.defaultStartTime&&n.setHours(0,0,0,0)),this.getTimeDifference(r,n)/864e5*this.parent.perDayWidth},t.prototype.getSplitTaskLeft=function(e,t){var i=new Date(e.getTime());return"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(i)===this.parent.defaultStartTime&&i.setHours(0,0,0,0),this.getSecondsInDecimal(t)===this.parent.defaultStartTime&&t.setHours(0,0,0,0)),t?(i.getTime()-t.getTime())/864e5*this.parent.perDayWidth:0},t.prototype.updateMappingData=function(e,t){var n=this.parent.columnMapping,a=e.ganttProperties;if(!i.i(r.isNullOrUndefined)(n[t])||"taskType"===t||"segments"===t)if("predecessorName"===t);else if("resourceInfo"===t){var s=a.resourceInfo,o=this.parent.resourceFields,l=[],d=[];if(!i.i(r.isNullOrUndefined)(s))for(var p=0;p<s.length;p++){l.push(s[p][o.id]);var h=s[p][o.name],u=s[p][o.unit];100!==u&&(h+="["+u+"%]"),d.push(h)}this.parent.setRecordValue("resourceNames",d.join(","),a,!0),this.updateTaskDataResource(e),this.parent.setRecordValue(n[t],d.join(","),e)}else"startDate"===t||"endDate"===t?this.setRecordDate(e,a[t],n[t]):"duration"===t?this.setRecordDuration(e,n[t]):"work"===t?(this.parent.setRecordValue("taskData."+n[t],this.getWorkString(a.work,a.workUnit),e),this.parent.setRecordValue(n[t],a[t],e)):"type"===t?(this.parent.setRecordValue("taskData."+n[t],a[t],e),this.parent.setRecordValue(n[t],a[t],e)):"manual"===t?(this.parent.setRecordValue("taskData."+n[t],!a.isAutoSchedule,e),this.parent.setRecordValue(n[t],!a.isAutoSchedule,e)):"segments"===t?this.parent.setRecordValue("taskData."+this.parent.taskFields.segments,this.segmentTaskData(e),e):(this.parent.setRecordValue("taskData."+n[t],a[t],e),this.parent.setRecordValue(n[t],a[t],e))},t.prototype.segmentTaskData=function(e){var t=e.ganttProperties.segments,n=this.parent.taskFields;if(i.i(r.isNullOrUndefined)(t))return null;for(var a=i.i(r.extend)([],[],e.taskData[n.segments],!0),s=0;s<t.length;s++)(this.parent.isEdit||this.parent.editModule&&this.parent.editModule.dialogModule&&i.i(r.getValue)("isEdit",this.parent.editModule.dialogModule)||this.parent.contextMenuModule&&i.i(r.getValue)("isEdit",this.parent.contextMenuModule))&&(a[s]={}),i.i(r.isNullOrUndefined)(n.startDate)||(a[s][this.parent.taskFields.startDate]=t[s].startDate),i.i(r.isNullOrUndefined)(n.endDate)||(a[s][this.parent.taskFields.endDate]=t[s].endDate),i.i(r.isNullOrUndefined)(n.duration)||(a[s][this.parent.taskFields.duration]=Number(t[s].duration));return a},t.prototype.updateTaskDataResource=function(e){var t=e.ganttProperties.resourceInfo,n=e.taskData[this.parent.taskFields.resourceInfo],a=this.parent.resourceFields;if(i.i(r.isNullOrUndefined)(n))e.taskData[this.parent.taskFields.resourceInfo]=t;else if(t.length){for(var s=0;s<t.length;s++){for(var o=!1,l=0;l<n.length;l++)if("number"==typeof n[l]||"string"==typeof n[l]){if(parseInt(n[l],10)===parseInt(t[s][a.id],10)){n[l]=t[s],o=!0;break}}else if(n[l][a.id]===t[s][a.id]&&"number"!=typeof n[l]){n[l]=i.i(r.extend)({},n[l],t[s],!0),o=!0;break}o||n.push(t[s])}for(var d=[],p=0;p<n.length;p++)!function(e){t.filter(function(t){t[a.id]===n[e][a.id]&&d.push(n[e])})}(p);this.parent.setRecordValue("taskData."+this.parent.taskFields.resourceInfo,d,e)}else this.parent.setRecordValue("taskData."+this.parent.taskFields.resourceInfo,[],e)},t.prototype.setRecordDate=function(e,t,n){var a="string"==typeof t?new Date(t):t;i.i(r.isNullOrUndefined)(t)||(t=new Date(a.getTime())),this.parent.setRecordValue(n,t,e),i.i(r.isNullOrUndefined)(t)||(t=new Date(a.getTime())),this.parent.isLoad||this.parent.isDynamicData||this.parent.setRecordValue("taskData."+n,t,e),this.parent.isDynamicData=!1},t.prototype.getDurationInDay=function(e,t){return"day"===t?e:"hour"===t?e/(this.parent.secondsPerDay/3600):e/(this.parent.secondsPerDay/60)},t.prototype.setRecordDuration=function(e,t){var n=e.ganttProperties.duration,a=e.ganttProperties.durationUnit;if(i.i(r.isNullOrUndefined)(n))this.parent.setRecordValue(t,n,e),this.parent.setRecordValue("taskData."+t,n,e);else{this.parent.setRecordValue(t,e.ganttProperties.duration,e);var s=i.i(r.getValue)(t,e.taskData);isNaN(s)&&i.i(r.isNullOrUndefined)(this.parent.taskFields.durationUnit)&&!i.i(r.isNullOrUndefined)(s)?this.parent.setRecordValue("taskData."+t,this.getDurationString(n,a),e):"string"==typeof s?this.parent.setRecordValue("taskData."+t,n.toString(),e):this.parent.setRecordValue("taskData."+t,n,e)}this.parent.taskFields.durationUnit&&(e.taskData[this.parent.taskFields.durationUnit]=e.ganttProperties.durationUnit)},t.prototype.getWorkInHour=function(e,t){return"day"===t?e*(this.parent.secondsPerDay/3600):"minute"===t?e/60:e},t.prototype.updateTaskData=function(e){var t=this.parent.taskFields,n=e.ganttProperties;if(!i.i(r.isNullOrUndefined)(e.taskData)){var a=e.taskData;if(t.id&&(this.parent.setRecordValue("taskData."+t.id,n.taskId,e),this.parent.setRecordValue(t.id,n.taskId,e)),t.name&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.name,n.taskName,e),this.parent.setRecordValue(t.name,n.taskName,e)),t.startDate&&this.setRecordDate(e,n.startDate,t.startDate),t.endDate&&this.setRecordDate(e,n.endDate,t.endDate),t.duration&&this.setRecordDuration(e,t.duration),t.durationUnit&&(a[t.durationUnit]=n.durationUnit),t.progress&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.progress,n.progress,e),this.parent.setRecordValue(t.progress,n.progress,e)),t.baselineStartDate&&this.setRecordDate(e,n.baselineStartDate,t.baselineStartDate),t.baselineEndDate&&this.setRecordDate(e,n.baselineEndDate,t.baselineEndDate),t.notes&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.notes,n.notes,e),this.parent.setRecordValue(t.notes,n.notes,e)),t.cssClass&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.cssClass,n.cssClass,e),this.parent.setRecordValue(t.cssClass,n.cssClass,e)),t.indicators&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.indicators,n.indicators,e),this.parent.setRecordValue(t.indicators,n.indicators,e)),t.parentID){var s="ProjectView"===this.parent.viewType?n.parentId:a[t.parentID];this.parent.setRecordValue("taskData."+t.parentID,s,e),this.parent.setRecordValue(t.parentID,n.parentId,e)}t.work&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.work,this.getWorkString(n.work,n.workUnit),e),this.parent.setRecordValue(t.work,n.work,e)),t.type&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.type,n.taskType,e),this.parent.setRecordValue(t.type,n.taskType,e))}},t.prototype.setResourceInfo=function(e){var t;if(i.i(r.isNullOrUndefined)(e[this.parent.taskFields.resourceInfo]))return t;t=e[this.parent.taskFields.resourceInfo];var n;n=i.i(r.isNullOrUndefined)(this.parent.editModule)||i.i(r.isNullOrUndefined)(this.parent.editModule.dialogModule)||!this.parent.editModule.dialogModule.isAddNewResource?this.parent.resources:this.parent.editModule.dialogModule.ganttResources;for(var a=this.parent.resourceFields.id,s=this.parent.resourceFields.unit,o=this.parent.resourceFields.group,l=[],d=0;d<t.length;d++)!function(e){var d=n.filter(function(i){return"object"==typeof t[e]&&t[e][a]===i[a]||t[e]===i[a]}),p=i.i(r.extend)({},d[0]);l.push(p),i.i(r.isNullOrUndefined)(s)||i.i(r.isNullOrUndefined)(t[e][s])||(p[s]=t[e][s]),i.i(r.isNullOrUndefined)(o)||i.i(r.isNullOrUndefined)(t[e][o])||(p[o]=t[e][o])}(d);return this.updateResourceUnit(l),l},t.prototype.updateResourceUnit=function(e){var t=this.parent.resourceFields.unit;if(!i.i(r.isNullOrUndefined)(t)){var n=e.length,a=void 0;for(a=0;a<n;a++)i.i(r.isNullOrUndefined)(e[a][t])&&(e[a][t]=100)}},t.prototype.updateResourceName=function(e){var t=e.ganttProperties.resourceInfo,n=[],a=this.parent.taskFields;if(t){var s=t.length,o=i.i(r.extend)([],[],e.taskData[this.parent.taskFields.resourceInfo],!0);this.parent.setRecordValue("taskData."+this.parent.taskFields.resourceInfo,[],e);for(var l=0;l<s;l++){var d=t[l],p=d[this.parent.resourceFields.name],h=d[this.parent.resourceFields.unit];if(100!==h&&(p+="["+h+"%]"),n.push(p),e.taskData){var u=a.resourceInfo;o[l],e.taskData[u].push(o[l])}}this.parent.setRecordValue("resourceNames",n.join(","),e.ganttProperties,!0),this.parent.setRecordValue(this.parent.taskFields.resourceInfo,n.join(","),e,!0),this.updateTaskDataResource(e)}},t.prototype.dataReorder=function(e,t){for(var i=[];e.length>0&&t.length>0;){var r=t.indexOf(e[0]);-1===r?e.shift():(i.push(e.shift()),t.splice(r,1))}return i},t.prototype.validateDurationUnitMapping=function(e){var t=e;return t="minute"===t||"minutes"===t||"m"===t||"min"===t?"minute":"hour"===t||"hours"===t||"h"===t||"hr"===t?"hour":"day"===t||"days"===t||"d"===t?"day":this.parent.durationUnit.toLocaleLowerCase()},t.prototype.validateTaskTypeMapping=function(e){var t=e;return t="FixedDuration"===t?"FixedDuration":"FixedUnit"===t?"FixedUnit":"FixedWork"===t?"FixedWork":this.parent.taskType},t.prototype.validateWorkUnitMapping=function(e){var t=e;return t="minute"===t?"minute":"hour"===t?"hour":"day"===t?"day":this.parent.workUnit.toLocaleLowerCase()},t.prototype.updateDurationValue=function(e,t){var n=this.getDurationValue(e);isNaN(i.i(r.getValue)("duration",n))||this.parent.setRecordValue("duration",i.i(r.getValue)("duration",n),t,!0),i.i(r.isNullOrUndefined)(i.i(r.getValue)("durationUnit",n))||this.parent.setRecordValue("durationUnit",i.i(r.getValue)("durationUnit",n),t,!0)},t.prototype.reUpdateGanttData=function(){if(this.parent.flatData.length>0){var e=void 0,t=void 0;this.parent.secondsPerDay=this.getSecondsPerDay();for(var n=0;n<this.parent.flatData.length;n++)e=this.parent.flatData[n].taskData,t=this.parent.flatData[n],i.i(r.isNullOrUndefined)(this.parent.taskFields.duration)||this.setRecordDuration(t,this.parent.taskFields.duration),this.calculateScheduledValues(t,e,!1);this.updateGanttData()}},t.prototype._isInStartDateRange=function(e,t,i){var r=!1;return e.getTime()>=t.getTime()&&e.getTime()<i.getTime()&&(r=!0),r},t.prototype._isInEndDateRange=function(e,t,i){var r=!1;return e.getTime()>t.getTime()&&e.getTime()<=i.getTime()&&(r=!0),r},t.prototype.updateOverlappingValues=function(e){var t,i=e.childRecords,r=[];if(i.length<=1)return void(e.ganttProperties.workTimelineRanges=[]);i=this.setSortedChildTasks(e),this.updateOverlappingIndex(i);for(var n=1;n<i.length;n++){t=i[n];for(var a=new Date(t.ganttProperties.startDate.getTime()),s=new Date(t.ganttProperties.endDate.getTime()),o=[],l=0;l<n;l++){var d=i[l].ganttProperties.startDate,p=i[l].ganttProperties.endDate,h={};(this._isInStartDateRange(a,d,p)||this._isInEndDateRange(s,d,p))&&(d.getTime()>a.getTime()&&d.getTime()<s.getTime()&&p.getTime()>a.getTime()&&p.getTime()>s.getTime()||a.getTime()===d.getTime()&&s.getTime()<=p.getTime()?(h.from=d,h.to=s):a.getTime()===d.getTime()&&s.getTime()>p.getTime()?(h.from=d,h.to=p):a.getTime()>d.getTime()&&s.getTime()>=p.getTime()?(h.from=a,h.to=p):a.getTime()>d.getTime()&&s.getTime()<p.getTime()&&(h.from=a,h.to=s),o.push(h))}r.push.apply(r,this.mergeRangeCollections(o))}this.parent.setRecordValue("workTimelineRanges",this.mergeRangeCollections(r,!0),e.ganttProperties,!0),this.calculateRangeLeftWidth(e.ganttProperties.workTimelineRanges)},t.prototype.updateOverlappingIndex=function(e){for(var t=0;t<e.length;t++)e[t].ganttProperties.eOverlapIndex=t},t.prototype.calculateRangeLeftWidth=function(e){for(var t=0;t<e.length;t++)e[t].left=this.getTaskLeft(e[t].from,!1),e[t].width=this.getTaskWidth(e[t].from,e[t].to)},t.prototype.mergeRangeCollections=function(e,t){for(var i,r,n,s,o=[],l={},d={},p=new a.DataManager(e).executeLocal((new a.Query).sortBy(this.parent.taskFields.startDate,"Ascending")),h=0;h<p.length;h++)0!==o.length||0!==h?(l=o[o.length-1],i=l.from,r=l.to,d=p[h],n=d.from,s=d.to,i.getTime()===n.getTime()&&r.getTime()>=s.getTime()||i.getTime()<n.getTime()&&r.getTime()>=s.getTime()||(i.getTime()<=n.getTime()&&r.getTime()>=n.getTime()&&r.getTime()<s.getTime()||r.getTime()<n.getTime()&&this.checkStartDate(r).getTime()===n.getTime()?l.to=s:r.getTime()<n.getTime()&&this.checkStartDate(r).getTime()!==n.getTime()&&o.push(p[h]))):o.push(p[h]);return t&&(o=this.splitRangeCollection(o)),o},t.prototype.setSortedChildTasks=function(e){return new a.DataManager(e.childRecords).executeLocal((new a.Query).sortBy(this.parent.taskFields.startDate,"Ascending"))},t.prototype.splitRangeCollection=function(e,t,i){var r;return r=this.parent.timelineModule.isSingleTier?"None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier:this.parent.timelineModule.bottomTier,"Week"===r||"Month"===r||"Year"===r?e:"Day"===r?this.getRangeWithWeek(e,t,i):0===this.parent.workingTimeRanges[0].from&&86400===this.parent.workingTimeRanges[0].to?this.getRangeWithWeek(e,t,i):this.getRangeWithDay(e,t,i)},t.prototype.getRangeWithDay=function(e,t,i){for(var r=[],n=0;n<e.length;n++)r.push.apply(r,this.splitRangeForDayMode(e[n],t,i));return r},t.prototype.splitRangeForDayMode=function(e,t,n){var a=t||"from",s=n||"to",o=new Date(e[a]),l=new Date(e[s]),d=[],p={};if(o.getTime()<l.getTime())do{for(var h=new Date(o.getTime()),u=new Date(o.getTime()),c=0,g=this.parent.dataOperation.getSecondsInDecimal(o),f=-1,m=0;m<this.parent.workingTimeRanges.length;m++){var y=this.parent.workingTimeRanges[m];if(g>=y.from&&g<=y.to){f=m;break}}-1!==f&&(c=Math.round(this.parent.workingTimeRanges[f].to-g),u.setSeconds(u.getSeconds()+c));u.getTime()<l.getTime()?(p={},e.task&&(p.task=i.i(r.extend)([],e.task)),p[a]=h,p[s]=u,p.isSplit=!0,d.push(p)):(p={},e.task&&(p.task=i.i(r.extend)([],e.task)),p[a]=h,p[s]=l,p.isSplit=!0,d.push(p)),o=this.checkStartDate(u)}while(o.getTime()<l.getTime());else d.push(e);return d},t.prototype.getRangeWithWeek=function(e,t,i){for(var r=[],n=0;n<e.length;n++)r.push.apply(r,this.splitRangeForWeekMode(e[n],t,i));return r},t.prototype.splitRangeForWeekMode=function(e,t,n){var a=t||"from",s=n||"to",o=new Date(e[a]),l=new Date(e[a]),d=new Date(e[s]),p=!1,h=[],u={};if(l.setDate(l.getDate()+1),l.getTime()<d.getTime()){do{if(this.parent.dataOperation.isOnHolidayOrWeekEnd(l,null)){var c=new Date(l.getTime());c.setDate(l.getDate()-1),this.setTime(this.parent.defaultEndTime,c),u={},u[a]=o,u.isSplit=!0,u[s]=c,e.task&&(u.task=i.i(r.extend)([],e.task,!0)),o.getTime()!==c.getTime()&&h.push(u),o=this.checkStartDate(c),l=new Date(o.getTime()),p=!0}else l.setDate(l.getDate()+1)}while(l.getTime()<d.getTime());p?o.getTime()!==d.getTime()&&(u={},e.task&&(u.task=i.i(r.extend)([],e.task,!0)),u[a]=o,u[s]=d,u.isSplit=!0,h.push(u)):h.push(e)}else h.push(e);return h},t.prototype.updateGanttData=function(){for(var e=this.parent.flatData,t=e.length,i=0;i<t;i++){var r=e[i];this.updateTaskLeftWidth(r)}},t.prototype.updateTaskLeftWidth=function(e){var t=e.ganttProperties;e.hasChildRecords||this.updateWidthLeft(e),this.parent.setRecordValue("baselineLeft",this.calculateBaselineLeft(t),t,!0),this.parent.setRecordValue("baselineWidth",this.calculateBaselineWidth(t),t,!0);var i,r=[];e.parentItem&&(i=this.parent.getParentTask(e.parentItem),r=i.childRecords),i&&r.indexOf(e)===r.length-1&&!e.hasChildRecords&&this.parent.enableValidation?this.updateParentItems(i):i&&!this.parent.enableValidation&&this.updateWidthLeft(i)},t.prototype.reUpdateGanttDataPosition=function(){for(var e=this.parent.flatData,t=e.length,i=0;i<t;i++){var r=e[i],n=r.ganttProperties;this.updateWidthLeft(r),"Auto"!==this.parent.taskMode&&r.hasChildRecords&&this.updateAutoWidthLeft(r),this.parent.setRecordValue("baselineLeft",this.calculateBaselineLeft(n),n,!0),this.parent.setRecordValue("baselineWidth",this.calculateBaselineWidth(n),n,!0),this.parent.dataOperation.updateTaskData(r)}},t.prototype.updateWidthLeft=function(e){var t=e.ganttProperties;if(!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0){for(var n=t.segments,a=!0,s=this.splitTasksDuration(n)*this.parent.perDayWidth,o=this.parent.dataOperation.getProgressWidth(s,t.progress),l=0;l<n.length;l++){var d=n[l];if(0===l&&!i.i(r.isNullOrUndefined)(t.startDate)&&d.startDate.getTime()!==t.startDate.getTime()){d.startDate=t.startDate;var p=this.parent.dataOperation.getEndDate(d.startDate,d.duration,t.durationUnit,t,!1);d.endDate=this.parent.dataOperation.checkEndDate(p,t,!1),this.parent.chartRowsModule.incrementSegments(n,0,e)}if(d.width=this.getSplitTaskWidth(d.startDate,d.duration,e),d.showProgress=!1,d.progressWidth=-1,0!==l){var h=new Date(t.startDate.getTime());d.left=this.getSplitTaskLeft(d.startDate,h)}o>0&&o>d.width?(o-=d.width,d.progressWidth=d.width,d.showProgress=!1):a&&(d.progressWidth=o,d.showProgress=!0,o-=d.width,a=!1)}this.parent.setRecordValue("segments",t.segments,t,!0),this.parent.dataOperation.updateMappingData(e,"segments")}this.parent.setRecordValue("width",this.parent.dataOperation.calculateWidth(e),t,!0),this.parent.setRecordValue("left",this.parent.dataOperation.calculateLeft(t),t,!0),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(t.isAutoSchedule||!e.hasChildRecords?t.width:t.autoWidth,t.progress),t,!0)},t.prototype.updateAutoWidthLeft=function(e){var t=e.ganttProperties;this.parent.setRecordValue("autoWidth",this.calculateWidth(e,!0),t,!0),this.parent.setRecordValue("autoLeft",this.calculateLeft(t,!0),t,!0)},t.prototype.getParentProgress=function(e){var t=0,n={};switch(e.ganttProperties.durationUnit){case"hour":t=e.ganttProperties.duration/(this.parent.secondsPerDay/3600);break;case"minute":t=e.ganttProperties.duration/(this.parent.secondsPerDay/60);break;default:t=e.ganttProperties.duration}return e.hasChildRecords?(i.i(r.setValue)("totalProgress",e.ganttProperties.totalProgress,n),i.i(r.setValue)("totalDuration",e.ganttProperties.totalDuration,n)):(i.i(r.setValue)("totalProgress",e.ganttProperties.progress*t,n),i.i(r.setValue)("totalDuration",t,n)),n},t.prototype.resetDependency=function(e){var t=this.parent.taskFields.dependency;if(!i.i(r.isNullOrUndefined)(t)){var n=e.ganttProperties;this.parent.setRecordValue("predecessor",[],n,!0),this.parent.setRecordValue("predecessorsName",null,n,!0),this.parent.setRecordValue("taskData."+t,null,e),this.parent.setRecordValue(t,null,e)}},t.prototype.updateParentItems=function(e,t){var n=t?e:this.parent.getParentTask(e),a=!1,o=n.ganttProperties;if(n.childRecords.length>0){for(var l=o.isAutoSchedule?o.startDate:o.autoStartDate,d=o.isAutoSchedule?o.endDate:o.autoEndDate,p=n.childRecords,h=p.length,u=0,c={},g=null,f=null,m=0,y=0,v=0,D=void 0,w=0;w<h;w++)if(D=p[w],this.parent.isOnDelete&&D.isDelete)1===h&&"ProjectView"===this.parent.viewType&&(a=!0);else{var k=this.getValidStartDate(D.ganttProperties);!n.hasChildRecords||o.isAutoSchedule||i.i(r.isNullOrUndefined)(D.ganttProperties.autoStartDate)||(k=D.ganttProperties.autoStartDate);var S=this.getValidEndDate(D.ganttProperties);!n.hasChildRecords||o.isAutoSchedule||i.i(r.isNullOrUndefined)(D.ganttProperties.autoEndDate)||(S=D.ganttProperties.autoEndDate),i.i(r.isNullOrUndefined)(g)&&(g=this.getDateFromFormat(k)),i.i(r.isNullOrUndefined)(f)&&(f=this.getDateFromFormat(S)),i.i(r.isNullOrUndefined)(S)||1!==this.compareDates(S,f)||(f=this.getDateFromFormat(S)),i.i(r.isNullOrUndefined)(k)||-1!==this.compareDates(k,g)||(g=this.getDateFromFormat(k)),!D.ganttProperties.isMilestone&&i.i(s.c)(D.ganttProperties)?(c=this.getParentProgress(D),y+=i.i(r.getValue)("totalProgress",c),u+=i.i(r.getValue)("totalDuration",c)):m++,v+=D.ganttProperties.work}if(!a){0!==this.compareDates(l,g)&&this.parent.setRecordValue(o.isAutoSchedule?"startDate":"autoStartDate",g,n.ganttProperties,!0),0!==this.compareDates(d,f)&&this.parent.setRecordValue(o.isAutoSchedule?"endDate":"autoEndDate",f,n.ganttProperties,!0);var T=void 0;T=this.parent.isOnDelete&&D.isDelete?h-m-1:h-m;var b=T>0&&u>0?y/u:0,P=n.ganttProperties,C=!(0!==T||!g||!f||g.getTime()!==f.getTime());this.parent.setRecordValue("isMilestone",C,P,!0),P.isAutoSchedule&&this.calculateDuration(n),this.updateWorkWithDuration(n);var M=P.work;M=this.parent.isOnEdit?M:M+v,this.parent.setRecordValue("work",M,P,!0),this.parent.setRecordValue("taskType","FixedDuration",P,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.type)||this.updateMappingData(n,"type"),this.parent.setRecordValue("progress",Math.floor(b),P,!0),this.parent.setRecordValue("totalProgress",y,P,!0),this.parent.setRecordValue("totalDuration",u,P,!0),P.isAutoSchedule||(this.parent.setRecordValue("autoDuration",this.calculateAutoDuration(P),P,!0),this.updateAutoWidthLeft(n)),this.updateWidthLeft(n),this.updateTaskData(n)}}a&&1===n.childRecords.length&&0===n.ganttProperties.duration&&(this.parent.setRecordValue("isMilestone",!0,n.ganttProperties,!0),this.updateWidthLeft(n),this.updateTaskData(n));var R=this.parent.getParentTask(n.parentItem);R&&this.updateParentItems(R),a=!1},t}(o.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(6),n=(i.n(r),i(0)),a=(i.n(n),i(4)),s=(i.n(a),i(19)),o=i(2),l=function(){function e(e){var t=this;this.previousScroll={top:0,left:0},this.queryCellInfo=function(e){t.parent.trigger("queryCellInfo",e)},this.headerCellInfo=function(e){t.parent.trigger("headerCellInfo",e)},this.rowDataBound=function(e){t.parent.trigger("rowDataBound",e)},this.columnMenuOpen=function(e){t.parent.notify("columnMenuOpen",e),t.parent.trigger("columnMenuOpen",e)},this.columnMenuClick=function(e){t.parent.trigger("columnMenuClick",e)},this.objectEqualityChecker=function(e,i){if(e){for(var r=Object.keys(e),n=!0,a=["Children","childRecords","taskData","uniqueID","parentItem","parentUniqueID","ganttProperties"],s=0;s<r.length;s++){if((e[r[s]]instanceof Date?new Date(e[r[s]]).getTime():e[r[s]])!==(i[r[s]]instanceof Date?new Date(i[r[s]]).getTime():i[r[s]])&&-1===a.indexOf(r[s])){t.parent.modifiedRecords.push(i),n=!1;break}}return n}return!1},this.parent=e,this.parent.treeGrid=new r.TreeGrid,this.parent.treeGrid.allowSelection=!1,this.parent.treeGrid.allowKeyboard=this.parent.allowKeyboard,this.parent.treeGrid.enableImmutableMode=this.parent.enableImmutableMode,this.treeGridColumns=[],this.validateGanttColumns(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("renderPanels",this.createContainer,this),this.parent.on("chartScroll",this.updateScrollTop,this),this.parent.on("destroy",this.destroy,this),this.parent.treeGrid.on("renderReactTemplate",this.renderReactTemplate,this)},e.prototype.renderReactTemplate=function(e){this.parent.portals=e,this.parent.renderTemplates()},e.prototype.createContainer=function(){this.treeGridElement=i.i(n.createElement)("div",{id:"treeGrid"+this.parent.element.id,className:"e-gantt-tree-grid"});var e=i.i(n.createElement)("div",{className:"e-gantt-temp-header"});this.parent.treeGridPane.appendChild(this.treeGridElement),this.treeGridElement.appendChild(e),this.parent.treeGridPane.classList.add("e-temp-content")},e.prototype.renderTreeGrid=function(){this.composeProperties(),this.bindEvents();this.parent.treeGrid.root=this.parent.root?this.parent.root:this.parent,this.parent.treeGrid.appendTo(this.treeGridElement),this.wireEvents()},e.prototype.composeProperties=function(){if(this.parent.treeGrid.showColumnMenu=this.parent.showColumnMenu,this.parent.treeGrid.enableCollapseAll=this.parent.collapseAllParentTasks,this.parent.treeGrid.columnMenuItems=this.parent.columnMenuItems,this.parent.treeGrid.childMapping=i.i(n.isNullOrUndefined)(this.parent.taskFields.child)?"":this.parent.taskFields.child,this.parent.treeGrid.treeColumnIndex=this.parent.treeColumnIndex,this.parent.treeGrid.columns=this.treeGridColumns,this.parent.dataSource instanceof Object&&i.i(o.i)(this.parent)){this.parent.treeGrid.hasChildMapping="isParent";var e=i.i(n.getValue)("count",this.parent.dataSource);this.parent.treeGrid.dataSource={result:this.parent.flatData,count:e}}else this.parent.treeGrid.hasChildMapping=null,this.parent.treeGrid.dataSource=this.parent.flatData;this.parent.treeGrid.expandStateMapping=this.parent.taskFields.expandState;this.parent.treeGrid.isGantt=!0,this.parent.treeGrid.rowHeight=this.parent.rowHeight,this.parent.treeGrid.gridLines=this.parent.gridLines,0===this.parent.searchSettings.fields.length&&""===this.parent.searchSettings.key||(this.parent.treeGrid.searchSettings=this.parent.searchSettings);this.parent.treeGrid.isJsComponent=!0;var t=0;i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||i.i(n.isNullOrUndefined)(this.parent.toolbarModule.element)||(t=this.parent.toolbarModule.element.offsetHeight),this.parent.treeGrid.height=this.parent.ganttHeight-t-46},e.prototype.getContentDiv=function(){return this.treeGridElement.querySelector(".e-content")},e.prototype.getHeaderDiv=function(){return this.treeGridElement.querySelector(".e-headercontent")},e.prototype.getScrollbarWidth=function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar";var t=document.createElement("div");e.appendChild(t),this.parent.element.appendChild(e);var i=e.offsetWidth-t.offsetWidth;return e.parentNode.removeChild(e),i},e.prototype.ensureScrollBar=function(){var e=this.getContentDiv(),t=this.getHeaderDiv(),i=this.getScrollbarWidth(),r=/Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);0!==i?e.style.cssText+="width: calc(100% + "+(i+1)+"px);":e.classList.add("e-gantt-scroll-padding"),0===i&&r&&(t.style.cssText+="width: calc(100% + 17px);")},e.prototype.bindEvents=function(){this.parent.treeGrid.dataBound=this.dataBound.bind(this),this.parent.treeGrid.collapsing=this.collapsing.bind(this),this.parent.treeGrid.collapsed=this.collapsed.bind(this),this.parent.treeGrid.expanding=this.expanding.bind(this),this.parent.treeGrid.expanded=this.expanded.bind(this),this.parent.treeGrid.actionBegin=this.actionBegin.bind(this),this.parent.treeGrid.actionComplete=this.treeActionComplete.bind(this),this.parent.treeGrid.created=this.created.bind(this),this.parent.treeGrid.actionFailure=this.actionFailure.bind(this),this.parent.treeGrid.queryCellInfo=this.queryCellInfo.bind(this),this.parent.treeGrid.headerCellInfo=this.headerCellInfo.bind(this),this.parent.treeGrid.rowDataBound=this.rowDataBound.bind(this),this.parent.treeGrid.columnMenuOpen=this.columnMenuOpen.bind(this),this.parent.treeGrid.columnMenuClick=this.columnMenuClick.bind(this),this.parent.treeGrid.beforeDataBound=this.beforeDataBound.bind(this),this.parent.treeGrid.dataStateChange=this.dataStateChange.bind(this)},e.prototype.beforeDataBound=function(e){this.parent.updatedRecords=this.parent.virtualScrollModule&&this.parent.enableVirtualization?i.i(n.getValue)("virtualScrollModule.visualData",this.parent.treeGrid):i.i(n.getValue)("result",e),this.parent.virtualScrollModule&&this.parent.enableVirtualization&&this.parent.updateContentHeight(e),i.i(n.setValue)("contentModule.objectEqualityChecker",this.objectEqualityChecker,this.parent.treeGrid.grid)},e.prototype.dataBound=function(e){this.ensureScrollBar(),this.parent.treeDataBound(e),this.prevCurrentView=i.i(n.extend)([],[],this.parent.currentViewData,!0)},e.prototype.dataStateChange=function(e){e.action&&"refresh"===e.action.requestType&&(this.parent.treeGrid.dataSource={result:i.i(n.getValue)("result",this.parent.treeGrid.dataSource),count:i.i(n.getValue)("count",this.parent.treeGrid.dataSource)}),this.parent.trigger("dataStateChange",e)},e.prototype.collapsing=function(e){new a.Deferred;if(!this.parent.ganttChartModule.isExpandCollapseFromChart){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.collapseGanttRow(t),i.i(n.setValue)("cancel",i.i(n.getValue)("cancel",t),e)}},e.prototype.expanding=function(e){new a.Deferred;if(!this.parent.ganttChartModule.isExpandCollapseFromChart){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.expandGanttRow(t),i.i(n.setValue)("cancel",i.i(n.getValue)("cancel",t),e)}},e.prototype.collapsed=function(e){if(!this.parent.ganttChartModule.isExpandCollapseFromChart&&!this.parent.isExpandCollapseLevelMethod){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.collapsedGanttRow(t)}},e.prototype.expanded=function(e){if(!this.parent.ganttChartModule.isExpandCollapseFromChart&&!this.parent.isExpandCollapseLevelMethod&&!e.data.length){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.expandedGanttRow(t)}},e.prototype.actionBegin=function(e){this.parent.notify("actionBegin",e),null!==i.i(n.getValue)("doubleClickTarget",this.parent.treeGrid.editModule)&&i.i(n.setValue)("doubleClickTarget",null,this.parent.treeGrid.editModule),this.parent.trigger("actionBegin",e)},e.prototype.created=function(e){this.updateKeyConfigSettings()},e.prototype.actionFailure=function(e){this.parent.trigger("actionFailure",e)},e.prototype.createExpandCollapseArgs=function(e){var t,r=i.i(n.getValue)("data",e),a=i.i(n.getValue)("row",e);return t=this.parent.ganttChartModule.getChartRows()[this.parent.currentViewData.indexOf(r)],{data:r,gridRow:a,chartRow:t,cancel:!1}},e.prototype.treeActionComplete=function(e){var t=i.i(n.extend)({},e);if("sorting"===i.i(n.getValue)("requestType",e))this.parent.notify("updateModel",{}),i.i(n.deleteObject)(t,"isFrozen");else if("filtering"===i.i(n.getValue)("requestType",e)){this.parent.notify("updateModel",{});var r=this.parent.element.querySelector(".e-treegrid");r.focus()}else if("save"===i.i(n.getValue)("type",e)&&this.parent.editModule&&this.parent.editModule.cellEditModule){var a=i.i(n.getValue)("data",e);i.i(n.isNullOrUndefined)(a)||i.i(n.isNullOrUndefined)(this.parent.getTaskByUniqueID(a.uniqueID))||(this.parent.getTaskByUniqueID(a.uniqueID).taskData[this.parent.taskFields.duration]=a.taskData[this.parent.taskFields.duration],i.i(n.isNullOrUndefined)(a.taskData[this.parent.taskFields.resourceInfo])||(this.parent.getTaskByUniqueID(a.uniqueID).taskData[this.parent.taskFields.resourceInfo]=a.taskData[this.parent.taskFields.resourceInfo])),this.parent.editModule.cellEditModule.initiateCellEdit(e,this.currentEditRow),this.currentEditRow={}}"filterafteropen"===i.i(n.getValue)("requestType",e)&&this.parent.notify("actionComplete",e),"searching"===i.i(n.getValue)("requestType",e)&&this.parent.notify("actionComplete",e),i.i(n.isNullOrUndefined)(i.i(n.getValue)("batchChanges",e))||i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(),this.parent.isCancelled&&(i.i(n.setValue)("requestType","cancel",t),i.i(n.setValue)("action","CellEditing",t),this.parent.isCancelled=!1),"refresh"===i.i(n.getValue)("requestType",e)&&i.i(n.isNullOrUndefined)(i.i(n.getValue)("type",e))&&this.parent.addDeleteRecord&&(-1!=this.parent.selectedRowIndex?(this.parent.selectRow(this.parent.selectedRowIndex),this.parent.selectedRowIndex>this.parent.currentViewData.length-1&&(this.parent.selectedRowIndex=-1)):this.parent.selectRow(0),this.parent.addDeleteRecord=!1),this.parent.trigger("actionComplete",t)},e.prototype.updateKeyConfigSettings=function(){delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.delete,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.insert,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.upArrow,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.downArrow,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.ctrlHome,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.ctrlEnd,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.enter,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.tab,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.shiftTab,delete this.parent.treeGrid.keyboardModule.keyConfigs.enter,delete this.parent.treeGrid.keyboardModule.keyConfigs.upArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.downArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlShiftUpArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlShiftDownArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlUpArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlDownArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.tab,delete this.parent.treeGrid.keyboardModule.keyConfigs.shiftTab},e.prototype.wireEvents=function(){var e=this.parent.treeGrid.element.querySelector(".e-content");e&&n.EventHandler.add(e,"scroll",this.scrollHandler,this),this.parent.isAdaptive&&n.EventHandler.add(this.parent.treeGridPane,"click",this.treeGridClickHandler,this)},e.prototype.unWireEvents=function(){var e=this.parent.treeGrid.element&&this.parent.treeGrid.element.querySelector(".e-content");e&&n.EventHandler.remove(e,"scroll",this.scrollHandler),this.parent.isAdaptive&&n.EventHandler.remove(this.parent.treeGridPane,"click",this.treeGridClickHandler)},e.prototype.scrollHandler=function(e){var t=this.parent.treeGrid.element.querySelector(".e-content");t.scrollTop!==this.previousScroll.top&&this.parent.notify("grid-scroll",{top:t.scrollTop}),this.previousScroll.top=t.scrollTop,this.parent.contextMenuModule&&this.parent.contextMenuModule.isOpen&&this.parent.contextMenuModule.contextMenu.close()},e.prototype.validateGanttColumns=function(){var e=this.parent,t=e.columns.length,r=this.parent.taskFields;this.parent.columnMapping={},this.parent.columnByField={},this.parent.customColumns=[];for(var a=["id","name","startDate","endDate","duration","dependency","progress","baselineStartDate","baselineEndDate","resourceInfo","notes","work","manual","type"],s=this,o=0;o<t;o++)!function(t){var i={};"string"==typeof e.columns[t]?i.field=e.columns[t]:i=e.columns[t];var n=[];if(a.length>0&&(n=a.filter(function(e){return i.field===r[e]})),0===n.length)return i.field===s.parent.resourceFields.group?"continue":(s.parent.customColumns.push(i.field),i.headerText=i.headerText?i.headerText:i.field,i.width=i.width?i.width:150,i.editType=i.editType?i.editType:"stringedit",i.type=i.type?i.type:"string",s.bindTreeGridColumnProperties(i,!0),"continue");var o=a.indexOf(n[0]);a.splice(o,1),s.createTreeGridColumn(i,!0),s.parent.columnMapping[n[0]]=i.field}(o);for(var l=0;l<a.length;l++){var d={};i.i(n.isNullOrUndefined)(r[a[l]])||(d.field=r[a[l]],this.createTreeGridColumn(d,0===t),this.parent.columnMapping[a[l]]=d.field)}if("ProjectView"!==this.parent.viewType){var d={};this.composeUniqueIDColumn(d),this.createTreeGridColumn(d,!0)}},e.prototype.createTreeGridColumn=function(e,t){var r=this.parent.taskFields;if(e.disableHtmlEncode=i.i(n.isNullOrUndefined)(e.disableHtmlEncode)?this.parent.disableHtmlEncode:e.disableHtmlEncode,r.id!==e.field&&(e.clipMode=e.clipMode?e.clipMode:"EllipsisWithTooltip"),r.id===e.field)this.composeIDColumn(e);else if(r.name===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("name"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"stringedit",e.type=e.type?e.type:"string";else if(r.startDate===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("startDate"),e.editType=e.editType?e.editType:-1!==this.parent.getDateFormat().toLowerCase().indexOf("hh")?"datetimepickeredit":"datepickeredit",e.format=e.format?e.format:{type:"date",format:this.parent.getDateFormat()},e.width=e.width?e.width:150,e.edit={params:{renderDayCell:this.parent.renderWorkingDayCell.bind(this.parent)}};else if(r.endDate===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("endDate"),e.format=e.format?e.format:{type:"date",format:this.parent.getDateFormat()},e.editType=e.editType?e.editType:-1!==this.parent.getDateFormat().toLowerCase().indexOf("hh")?"datetimepickeredit":"datepickeredit",e.width=e.width?e.width:150,e.edit={params:{renderDayCell:this.parent.renderWorkingDayCell.bind(this.parent)}};else if(r.duration===e.field)e.width=e.width?e.width:150,e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("duration"),e.valueAccessor=e.valueAccessor?e.valueAccessor:i.i(n.isNullOrUndefined)(e.edit)?this.durationValueAccessor.bind(this):null,e.editType=e.editType?e.editType:"stringedit",e.type="string";else if(r.progress===e.field)this.composeProgressColumn(e);else if(r.dependency===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("dependency"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"stringedit",e.type="string",e.allowFiltering=!1!==e.allowFiltering;else if(r.resourceInfo===e.field)this.composeResourceColumn(e);else if(r.notes===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("notes"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"stringedit",this.parent.showInlineNotes||e.template||(e.template='<div class="e-ganttnotes-info"><span class="e-icons e-notes-info"></span></div>');else if(r.baselineStartDate===e.field||r.baselineEndDate===e.field){var s=r.baselineEndDate===e.field?"baselineEndDate":"baselineStartDate";e.width=e.width?e.width:150,e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant(s),e.format=e.format?e.format:{type:"date",format:this.parent.getDateFormat()},e.editType=e.editType?e.editType:-1!==this.parent.getDateFormat().toLowerCase().indexOf("hh")?"datetimepickeredit":"datepickeredit"}else r.work===e.field?(e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("work"),e.width=e.width?e.width:150,e.valueAccessor=e.valueAccessor?e.valueAccessor:this.workValueAccessor.bind(this),e.editType=e.editType?e.editType:"numericedit"):r.type===e.field?(e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("taskType"),e.width=e.width?e.width:150,e.editType="dropdownedit",e.valueAccessor=e.valueAccessor?e.valueAccessor:this.taskTypeValueAccessor.bind(this)):r.manual===e.field&&"Custom"===this.parent.taskMode&&(e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("taskMode"),e.width=e.width?e.width:120,e.editType=e.editType?e.editType:"dropdownedit",e.valueAccessor=e.valueAccessor?e.valueAccessor:this.modeValueAccessor.bind(this),e.edit={params:{query:new a.Query,dataSource:[{id:1,text:this.parent.localeObj.getConstant("manual"),value:!0},{id:2,text:this.parent.localeObj.getConstant("auto"),value:!1}],fields:{text:"text",value:"value"}}});this.bindTreeGridColumnProperties(e,t)},e.prototype.composeResourceColumn=function(e){e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("resourceName"),e.width=e.width?e.width:150,e.type="string",e.valueAccessor=e.valueAccessor?e.valueAccessor:this.resourceValueAccessor.bind(this),e.allowFiltering=!1!==e.allowFiltering},e.prototype.getResourceIds=function(e){var t=i.i(n.getValue)(this.parent.taskFields.resourceInfo,e.taskData),r=[];if(i.i(n.isNullOrUndefined)(t))return t;for(var a=0;a<t.length;a++)r.push("object"==typeof t[a]?t[a][this.parent.resourceFields.id]:t[a]);return r},e.prototype.composeIDColumn=function(e){var t,r="ProjectView"===this.parent.viewType,a=this.parent.dataSource.length;e.isPrimaryKey=!!r,e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("id"),e.width=e.width?e.width:100;for(var s=0;s<a;s++)if(!i.i(n.isNullOrUndefined)(this.parent.dataSource[s][this.parent.taskFields.id])){t=this.parent.dataSource[s][this.parent.taskFields.id];break}"string"==typeof t?("ResourceView"===this.parent.viewType?e.allowEditing=!!e.allowEditing&&e.allowEditing:e.allowEditing=!e.allowEditing||e.allowEditing,e.editType=e.editType?e.editType:"stringedit"):(e.allowEditing=!!e.allowEditing&&e.allowEditing,e.editType=e.editType?e.editType:"numericedit"),e.valueAccessor=r?null:this.idValueAccessor.bind(this)},e.prototype.composeUniqueIDColumn=function(e){e.field="rowUniqueID",e.isPrimaryKey=!0,e.headerText="UniqueID",e.allowEditing=!1,e.visible=!1},e.prototype.composeProgressColumn=function(e){e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("progress"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"numericedit"},e.prototype.bindTreeGridColumnProperties=function(e,t){for(var i={},r={},n=0,a=Object.keys(e);n<a.length;n++){var o=a[n];i[o]=r[o]=e[o]}this.parent.columnByField[r.field]=r,this.parent.ganttColumns.push(new s.a(r)),t&&this.treeGridColumns.push(i)},e.prototype.durationValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":this.parent.dataOperation.getDurationString(a.duration,a.durationUnit)},e.prototype.resourceValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":a.resourceNames},e.prototype.workValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":this.parent.dataOperation.getWorkString(a.work,a.workUnit)},e.prototype.taskTypeValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":a.taskType},e.prototype.modeValueAccessor=function(e,t,i){return t[e]?"Manual":"Auto"},e.prototype.idValueAccessor=function(e,t,i){return 0===t.level?"R-"+t.ganttProperties.taskId:"T-"+t.ganttProperties.taskId},e.prototype.updateScrollTop=function(e){var t;t=i.i(n.getValue)("top",e)>this.parent.flatData.length*this.parent.rowHeight?i.i(n.getValue)("top",e)-document.getElementsByClassName("e-chart-scroll-container e-content")[0].offsetHeight:i.i(n.getValue)("top",e),this.treeGridElement.querySelector(".e-content").scrollTop=t,this.previousScroll.top=this.treeGridElement.querySelector(".e-content").scrollTop},e.prototype.treeGridClickHandler=function(e){this.parent.notify("treeGridClick",e)},e.prototype.removeEventListener=function(){this.parent.off("renderPanels",this.createContainer),this.parent.off("chartScroll",this.updateScrollTop),this.parent.off("destroy",this.destroy),this.parent.treeGrid.off("reactTemplateRender",this.renderReactTemplate)},e.prototype.destroy=function(){this.removeEventListener(),this.unWireEvents(),this.parent.treeGrid.element&&this.parent.treeGrid.destroy()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(1),n=(i.n(r),i(7)),a=i(0),s=(i.n(a),i(5)),o=(i.n(s),i(2)),l=function(){function e(e){this.parent=e}return e.prototype.processGridExport=function(e,t,r){this.flatData=e,this.gantt=t,this.exportValueFormatter=new d(this.parent.locale),this.exportProps=r,this.rowIndex=0,this.colIndex=0,this.columns=this.parent.treeGrid.columns,this.gantt.treeColumnIndex=this.parent.treeColumnIndex,this.gantt.rowHeight=i.i(o.a)(this.parent.rowHeight),this.gantt.style.cellPadding.left=0,this.gantt.style.cellPadding.right=0,this.ganttStyle=this.gantt.ganttStyle,this.gantt.borderColor=this.ganttStyle.chartGridLineColor,this.processHeaderContent(),this.processGanttContent(),this.processTimeline(),this.processTaskbar(),this.processPredecessor()},e.prototype.processHeaderContent=function(){var e=this;this.rowIndex++,this.row=this.gantt.rows.addRow();var t=0;this.columns.forEach(function(i){e.isColumnVisible(i)&&(e.processColumnHeader(i,t),t++)})},e.prototype.processColumnHeader=function(e,t){this.gantt.columns.add(1);var n=this.gantt.columns.getColumn(t);this.parent.treeColumnIndex===t&&(n.isTreeColumn=!0);var a=parseInt(e.width,10);n.width=i.i(o.a)(a),this.totalColumnWidth+=n.width,n.headerText=e.headerText,n.field=e.field;var s=this.row.cells.getCell(t);s.value=e.headerText,s.isHeaderCell=!0;var l=this.parent.timelineModule.isSingleTier?45:60;this.copyStyles(this.ganttStyle.columnHeader,s,!1),this.row.height=i.i(o.a)(l),e.headerTextAlign&&(s.style.format.alignment=r.PdfTextAlignment[e.headerTextAlign]);var d={cell:s,style:s.style,value:s.value,column:e};this.parent.pdfColumnHeaderQueryCellInfo&&this.parent.trigger("pdfColumnHeaderQueryCellInfo",d),s.value=d.value},e.prototype.isColumnVisible=function(e){var t=e.visible||this.exportProps.includeHiddenColumn,r=!!i.i(a.isNullOrUndefined)(e.template);return t&&r},e.prototype.processGanttContent=function(){var e=this;0===this.flatData.length?this.renderEmptyGantt():this.flatData.forEach(function(t){e.row=e.gantt.rows.addRow(),t.hasChildRecords?(e.gantt.rows.getRow(e.rowIndex).isParentRow=!0,e.processRecordRow(t)):e.processRecordRow(t),e.rowIndex++})},e.prototype.processTimeline=function(){var e=this.parent.timelineModule;this.gantt.chartHeader.topTierHeight=this.gantt.chartHeader.bottomTierHeight=this.parent.timelineModule.isSingleTier?45:30,this.gantt.chartHeader.topTierCellWidth=e.topTierCellWidth,this.gantt.chartHeader.bottomTierCellWidth=e.bottomTierCellWidth,this.gantt.chartHeader.topTier=i.i(a.extend)([],[],e.topTierCollection,!0),this.gantt.chartHeader.bottomTier=i.i(a.extend)([],[],e.bottomTierCollection,!0),this.gantt.chartHeader.width=e.totalTimelineWidth,this.gantt.chartHeader.height=this.gantt.rows.getRow(0).height,this.gantt.timelineStartDate=new Date(e.timelineStartDate.getTime())},e.prototype.processPredecessor=function(){var e=this;(i.i(a.isNullOrUndefined)(this.exportProps.showPredecessorLines)||this.exportProps.showPredecessorLines)&&(this.parent.pdfExportModule.isPdfExport=!0,this.parent.predecessorModule.createConnectorLinesCollection(),this.parent.updatedConnectorLineCollection.forEach(function(t){var r=e.gantt.predecessor.add();r.parentLeft=t.parentLeft,r.childLeft=t.childLeft,r.parentWidth=t.parentWidth,r.childWidth=t.childWidth,r.parentIndex=t.parentIndex,r.childIndex=t.childIndex,r.rowHeight=t.rowHeight,r.type=t.type,r.milestoneParent=t.milestoneParent,r.milestoneChild=t.milestoneChild,r.lineWidth=e.parent.connectorLineWidth>5?i.i(o.a)(5):i.i(o.a)(e.parent.connectorLineWidth),t.isCritical?r.connectorLineColor=e.ganttStyle.criticalConnectorLineColor:r.connectorLineColor=e.ganttStyle.connectorLineColor,r.connectorLineColor=e.ganttStyle.connectorLineColor,e.gantt.predecessorCollection.push(r)}),this.parent.pdfExportModule.isPdfExport=!1)},e.prototype.processRecordRow=function(e){var t=this;this.colIndex=0,this.row.level=e.level,this.columns.forEach(function(i){t.isColumnVisible(i)&&(t.processRecordCell(e,i,t.row),t.colIndex++)})},e.prototype.processRecordCell=function(e,t,s){var o=s.cells.getCell(this.colIndex),l=this.parent.taskFields,d=e.ganttProperties;"datepickeredit"===t.editType||"datetimepickeredit"===t.editType?o.value=e[t.field]:t.field===l.duration?o.value=this.parent.getDurationString(d.duration,d.durationUnit):t.field===l.resourceInfo?o.value=d.resourceNames:t.field===l.work?o.value=this.parent.getWorkString(d.work,d.workUnit):o.value=i.i(a.isNullOrUndefined)(e[t.field])?"":e[t.field].toString(),o.isHeaderCell=!1,o.style.padding=new n.i,this.copyStyles(this.ganttStyle.cell,o,s.isParentRow),this.colIndex!==this.parent.treeColumnIndex?o.style.format.alignment=r.PdfTextAlignment[t.textAlign]:o.style.format.paragraphIndent=10*o.row.level;var p={data:e,value:o.value,column:t,style:o.style,cell:o};p.value=this.exportValueFormatter.formatCellValue(p),this.parent.pdfQueryCellInfo&&this.parent.trigger("pdfQueryCellInfo",p),o.value=p.value},e.prototype.processTaskbar=function(){var e=this;this.flatData.forEach(function(t){var n=e.gantt.taskbar.add(),s=t.ganttProperties;n.left=s.left,n.width=s.width,n.left<0&&(n.width=n.width+n.left,n.left=0),n.progress=s.progress,n.isScheduledTask=i.i(o.c)(s),o.c?i.i(a.isNullOrUndefined)(s.endDate)&&i.i(a.isNullOrUndefined)(s.duration)?n.unscheduledTaskBy="startDate":i.i(a.isNullOrUndefined)(s.startDate)&&i.i(a.isNullOrUndefined)(s.duration)?n.unscheduledTaskBy="endDate":(n.unscheduledTaskBy="duration",n.unscheduleStarteDate=e.parent.dateValidationModule.getValidStartDate(t.ganttProperties),n.unscheduleEndDate=e.parent.dateValidationModule.getValidEndDate(t.ganttProperties)):(n.unscheduleStarteDate=null,n.unscheduleEndDate=null),n.startDate=s.startDate,n.endDate=s.endDate,n.height=e.parent.chartRowsModule.taskBarHeight,n.isMilestone=s.isMilestone,n.milestoneColor=new r.PdfColor(e.ganttStyle.taskbar.milestoneColor),n.isParentTask=t.hasChildRecords,s.isMilestone&&(n.height=s.width),t[e.parent.labelSettings.leftLabel]&&(n.leftTaskLabel.value=t[e.parent.labelSettings.leftLabel].toString()),t[e.parent.labelSettings.rightLabel]&&(n.rightTaskLabel.value=t[e.parent.labelSettings.rightLabel].toString()),t[e.parent.labelSettings.taskLabel]&&(n.taskLabel=t[e.parent.labelSettings.taskLabel].toString());var l=s.isMilestone?Math.floor(e.parent.chartRowsModule.taskBarHeight/2)+33:33;n.rightTaskLabel.left=s.left+s.width+l,n.fontFamily=e.ganttStyle.fontFamily,n.progressWidth=s.progressWidth,n.labelColor=new r.PdfColor(e.ganttStyle.label.fontColor),n.progressFontColor=new r.PdfColor(e.ganttStyle.taskbar.progressFontColor),n.isParentTask?(n.taskColor=new r.PdfColor(e.ganttStyle.taskbar.parentTaskColor),n.taskBorderColor=new r.PdfColor(e.ganttStyle.taskbar.parentTaskBorderColor),n.progressColor=new r.PdfColor(e.ganttStyle.taskbar.parentProgressColor)):t.isCritical?(n.taskColor=new r.PdfColor(e.ganttStyle.taskbar.criticalTaskColor),n.progressColor=new r.PdfColor(e.ganttStyle.taskbar.criticalProgressColor),n.taskBorderColor=new r.PdfColor(e.ganttStyle.taskbar.criticalTaskBorderColor)):(n.taskColor=new r.PdfColor(e.ganttStyle.taskbar.taskColor),n.progressColor=new r.PdfColor(e.ganttStyle.taskbar.progressColor),n.taskBorderColor=new r.PdfColor(e.ganttStyle.taskbar.taskBorderColor)),n.gridLineColor=new r.PdfColor(e.ganttStyle.chartGridLineColor),e.gantt.taskbarCollection.push(n);var d={};d.progressFontColor=n.progressFontColor,d.taskColor=n.taskColor,d.taskBorderColor=n.taskBorderColor,d.progressColor=n.progressColor,d.milestoneColor=n.milestoneColor;var p={taskbar:d,data:t};e.parent.pdfQueryTaskbarInfo&&(e.parent.trigger("pdfQueryTaskbarInfo",p),n.progressFontColor=p.taskbar.progressFontColor,n.taskColor=p.taskbar.taskColor,n.taskBorderColor=p.taskbar.taskBorderColor,n.progressColor=p.taskbar.progressColor,n.milestoneColor=p.taskbar.milestoneColor)})},e.prototype.getHorizontalAlignment=function(e,t){switch(void 0===t&&(t=new r.PdfStringFormat),e){case"Right":t.alignment=r.PdfTextAlignment.Right;break;case"Center":t.alignment=r.PdfTextAlignment.Center;break;case"Justify":t.alignment=r.PdfTextAlignment.Justify;break;case"Left":t.alignment=r.PdfTextAlignment.Left}return t},e.prototype.getVerticalAlignment=function(e,t,i){switch(void 0===t&&(t=new r.PdfStringFormat,t=this.getHorizontalAlignment(i,t)),e){case"Bottom":t.lineAlignment=r.PdfVerticalAlignment.Bottom;break;case"Middle":t.lineAlignment=r.PdfVerticalAlignment.Middle;break;case"Top":t.lineAlignment=r.PdfVerticalAlignment.Top}return t},e.prototype.getFontFamily=function(e){switch(e){case"TimesRoman":return 2;case"Courier":return 1;case"Symbol":return 3;case"ZapfDingbats":return 4;default:return 0}},e.prototype.getFont=function(e){if(e.font)return e.font;var t=i.i(a.isNullOrUndefined)(e.style.fontSize)?9.75:.75*e.style.fontSize,n=i.i(a.isNullOrUndefined)(e.style.fontFamily)?r.PdfFontFamily.TimesRoman:this.getFontFamily(e.style.fontFamily),s=r.PdfFontStyle.Regular;return!i.i(a.isNullOrUndefined)(e.style.bold)&&e.style.bold&&(s|=r.PdfFontStyle.Bold),!i.i(a.isNullOrUndefined)(e.style.italic)&&e.style.italic&&(s|=r.PdfFontStyle.Italic),!i.i(a.isNullOrUndefined)(e.style.underline)&&e.style.underline&&(s|=r.PdfFontStyle.Underline),!i.i(a.isNullOrUndefined)(e.style.strikeout)&&e.style.strikeout&&(s|=r.PdfFontStyle.Strikeout),new r.PdfStandardFont(n,t,s)},e.prototype.renderEmptyGantt=function(){var e=this.gantt.rows.addRow();e.cells.getCell(0).isHeaderCell=!1,e.height=i.i(o.a)(this.parent.rowHeight),this.copyStyles(this.ganttStyle.columnHeader,e.cells.getCell(0),e.isParentRow);var t=this.columns.length;this.mergeCells(0,0,t)},e.prototype.mergeCells=function(e,t,i){this.gantt.rows.getRow(e).cells.getCell(t).columnSpan=i},e.prototype.copyStyles=function(e,t,i){t.style.fontColor=new r.PdfColor(e.fontColor),t.style.backgroundColor=new r.PdfColor(e.backgroundColor),t.style.borderColor=new r.PdfColor(e.borderColor),t.style.fontSize=e.fontSize,t.style.fontStyle=e.fontStyle,t.style.format=Object.assign(new r.PdfStringFormat,e.format),t.style.borders=new n.f,t.style.borders.all=new r.PdfPen(t.style.borderColor),t.style.padding=new n.i;var a=0;a=t.isHeaderCell?this.parent.timelineModule.isSingleTier?22.5:30:this.parent.rowHeight/2,t.style.padding.top=a-e.fontSize,t.style.padding.bottom=a-e.fontSize,t.style.padding.left=10,t.style.padding.right=10},e.prototype.initializePdf=function(e){this.pdfDoc=e;var t=[],n=this.pdfDoc.pageSettings.width-82;if(this.totalColumnWidth>this.pdfDoc.pageSettings.width-82?this.gantt.style.allowHorizontalOverflow=!0:n/this.columns.length<t[0]&&(this.gantt.columns.getColumn(0).width=t[0]),this.exportProps.enableFooter||i.i(a.isNullOrUndefined)(this.exportProps.enableFooter)){var s=new r.RectangleF(0,0,e.pageSettings.width,35),o=new r.PdfPen(this.ganttStyle.chartGridLineColor),l=new r.PdfPageTemplateElement(s),d=new r.PdfSolidBrush(this.ganttStyle.footer.backgroundColor);l.graphics.drawRectangle(o,d,0,0,e.pageSettings.width,35);var p=new r.PdfStandardFont(this.ganttStyle.fontFamily,this.ganttStyle.footer.fontSize,this.ganttStyle.footer.fontStyle),h=new r.PdfSolidBrush(this.ganttStyle.footer.fontColor),u=new r.PdfPageNumberField(p),c=new r.PdfPageCountField(p,h),g=new r.PdfCompositeField(p,h,"Page {0}",u,c);g.stringFormat=this.ganttStyle.footer.format,g.bounds=s,g.draw(l.graphics,new r.PointF(0,0)),e.template.bottom=l}},e}(),d=function(){function e(e){this.valueFormatter=new s.ValueFormatter(e),this.internationalization=new a.Internationalization(e)}return e.prototype.returnFormattedValue=function(e,t){return!i.i(a.isNullOrUndefined)(e.value)&&e.value?this.valueFormatter.getFormatFunction(t)(e.value):""},e.prototype.formatCellValue=function(e){if(e.isForeignKey&&(e.value=i.i(a.getValue)(e.column.foreignKeyValue,i.i(s.getForeignData)(e.column,{},e.value)[0])),"number"===e.column.type&&void 0!==e.column.format&&""!==e.column.format)return e.value?this.internationalization.getNumberFormat({format:e.column.format})(e.value):"";if("boolean"===e.column.type)return e.value?"true":"false";if("date"!==e.column.type&&"datetime"!==e.column.type&&"time"!==e.column.type||void 0===e.column.format)return(i.i(a.isNullOrUndefined)(e.column.type)||i.i(a.isNullOrUndefined)(e.value))&&i.i(a.isNullOrUndefined)(e.value)?"":e.value.toString();if("string"==typeof e.value&&(e.value=new Date(e.value)),"string"==typeof e.column.format){var t=void 0;return t="date"===e.column.type?{type:"date",format:e.column.format}:"time"===e.column.type?{type:"time",format:e.column.format}:{type:"dateTime",format:e.column.format},this.returnFormattedValue(e,t)}if(e.column.format instanceof Object&&void 0===e.column.format.type)return e.value.toString();var r=void 0;return r="date"===e.column.type?{type:e.column.format.type,format:e.column.format.format,skeleton:e.column.format.skeleton}:"time"===e.column.type?{type:"time",format:e.column.format.format,skeleton:e.column.format.skeleton}:{type:"dateTime",format:e.column.format.format,skeleton:e.column.format.skeleton},this.returnFormattedValue(e,r)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var r=function(){function e(){this.mKeys=[],this.mValues=[]}return e.prototype.size=function(){return this.mKeys.length},e.prototype.add=function(e,t){if(void 0===e||null===e||void 0===t||null===t)throw new ReferenceError("Provided key or value is not valid.");if(this.mKeys.indexOf(e)<0)return this.mKeys.push(e),this.mValues.push(t),1;throw new RangeError("An item with the same key has already been added.")},e.prototype.keys=function(){return this.mKeys},e.prototype.values=function(){return this.mValues},e.prototype.getValue=function(e){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");var t=this.mKeys.indexOf(e);if(t<0)throw new RangeError("No item with the specified key has been added.");return this.mValues[t]},e.prototype.setValue=function(e,t){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");var i=this.mKeys.indexOf(e);i<0?(this.mKeys.push(e),this.mValues.push(t)):this.mValues[i]=t},e.prototype.remove=function(e){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");var t=this.mKeys.indexOf(e);if(t<0)throw new RangeError("No item with the specified key has been added.");return this.mKeys.splice(t,1),this.mValues.splice(t,1),!0},e.prototype.containsKey=function(e){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");return!(this.mKeys.indexOf(e)<0)},e.prototype.clear=function(){this.mKeys=[],this.mValues=[]},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return a});var r=i(1),n=(i.n(r),function(){function e(){var e=new r.PdfPen(new r.PdfColor(0,0,0));e.dashStyle=r.PdfDashStyle.Solid;var t=new r.PdfPen(new r.PdfColor(0,0,0));t.dashStyle=r.PdfDashStyle.Solid;var i=new r.PdfPen(new r.PdfColor(0,0,0));i.dashStyle=r.PdfDashStyle.Solid;var n=new r.PdfPen(new r.PdfColor(0,0,0));n.dashStyle=r.PdfDashStyle.Solid,this.leftPen=e,this.rightPen=t,this.topPen=i,this.bottomPen=n}return Object.defineProperty(e.prototype,"left",{get:function(){return this.leftPen},set:function(e){this.leftPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.rightPen},set:function(e){this.rightPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.topPen},set:function(e){this.topPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.bottomPen},set:function(e){this.bottomPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"all",{set:function(e){this.leftPen=this.rightPen=this.topPen=this.bottomPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAll",{get:function(){return this.leftPen===this.rightPen&&this.leftPen===this.topPen&&this.leftPen===this.bottomPen},enumerable:!0,configurable:!0}),Object.defineProperty(e,"default",{get:function(){return new e},enumerable:!0,configurable:!0}),e}()),a=function(){function e(e,t,i,r){this.hasLeftPad=!1,this.hasRightPad=!1,this.hasTopPad=!1,this.hasBottomPad=!1,void 0===e?(this.leftPad=this.rightPad=5.76,this.bottomPad=this.topPad=.5):(this.leftPad=e,this.rightPad=t,this.topPad=i,this.bottomPad=r,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0)}return Object.defineProperty(e.prototype,"left",{get:function(){return this.leftPad},set:function(e){this.leftPad=e,this.hasLeftPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.rightPad},set:function(e){this.rightPad=e,this.hasRightPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.topPad},set:function(e){this.topPad=e,this.hasTopPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.bottomPad},set:function(e){this.bottomPad=e,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"all",{set:function(e){this.leftPad=this.rightPad=this.topPad=this.bottomPad=e,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),e}()},function(e,t,i){"use strict";i.d(t,"b",function(){return d}),i.d(t,"c",function(){return p}),i.d(t,"a",function(){return u});var r=i(18),n=i(0),a=(i.n(n),i(1)),s=(i.n(a),function(){function e(e){this.cellWidth=0,this.cellHeight=0,this.finishedDrawingCell=!0,i.i(n.isNullOrUndefined)(e)?(this.rowSpan=1,this.columnSpan=1):this.row=e,this.style={}}return Object.defineProperty(e.prototype,"height",{get:function(){return 0===this.cellHeight&&(this.cellHeight=this.measureHeight()),this.cellHeight},set:function(e){this.cellHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 0===this.cellWidth&&(this.cellWidth=this.measureWidth()),Math.round(this.cellWidth)},set:function(e){this.cellWidth=e},enumerable:!0,configurable:!0}),e.prototype.measureWidth=function(){var e=0,t=new a.PdfStringLayouter;if("string"==typeof this.value){var i=new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,this.style.fontStyle);this.row.treegrid.ganttStyle.font&&(i=this.row.treegrid.ganttStyle.font);e+=t.layout(this.value,i,this.style.format,new a.SizeF(Number.MAX_VALUE,Number.MAX_VALUE),!1,new a.SizeF(0,0)).actualSize.width,e+=2*(this.style.borders.left.width+this.style.borders.right.width)}return void 0!==this.row.treegrid.style.cellPadding.left&&this.row.treegrid.style.cellPadding.hasLeftPad&&(e+=this.row.treegrid.style.cellPadding.left),void 0!==this.row.treegrid.style.cellPadding.right&&this.row.treegrid.style.cellPadding.hasRightPad&&(e+=this.row.treegrid.style.cellPadding.right),e+=this.row.treegrid.style.cellSpacing},e.prototype.measureHeight=function(){var e=this.row.treegrid.rowHeight,t=0,r=this.calculateWidth();r-=this.row.treegrid.style.cellPadding.right+this.row.treegrid.style.cellPadding.left,r-=this.style.borders.left.width+this.style.borders.right.width;var s=new a.PdfStringLayouter;if("string"==typeof this.value||"string"==typeof this.remainingString){var o=this.value;this.finishedDrawingCell||(o=i.i(n.isNullOrUndefined)(this.remainingString)||""===this.remainingString?this.value:this.remainingString);var l=new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,this.style.fontStyle);this.row.treegrid.ganttStyle.font&&(l=this.row.treegrid.ganttStyle.font);t+=s.layout(o,l,this.style.format,new a.SizeF(r,0),!1,new a.SizeF(0,0)).actualSize.height,t+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}return t+=this.row.treegrid.style.cellPadding.top+this.row.treegrid.style.cellPadding.bottom,t+=this.row.treegrid.style.cellSpacing,t>e?t:e},e.prototype.calculateWidth=function(){for(var e=this.row.cells.indexOf(this),t=this.columnSpan,i=0,r=0;r<t;r++)i+=this.row.treegrid.columns.getColumn(e+r).width;return this.row.treegrid.columns.getColumn(e).isTreeColumn&&(i-=10*this.row.level),i},e.prototype.draw=function(e,t,i,r){var n=null;if(i){for(var s=this.row.cells.indexOf(this),o=s+1;o<=s+this.columnSpan;o++)this.row.cells.getCell(o).isCellMergeContinue=!1,this.row.cells.getCell(o).isRowMergeContinue=!1;this.columnSpan=1}if((this.isCellMergeContinue||this.isRowMergeContinue)&&this.isCellMergeContinue&&this.row.treegrid.style.allowHorizontalOverflow)return this.row.rowOverflowIndex>0&&this.row.cells.indexOf(this)!==this.row.rowOverflowIndex+1||0===this.row.rowOverflowIndex&&this.isCellMergeContinue,n;this.drawCellBackground(e,t);var l=new a.PdfSolidBrush(this.style.fontColor),d=null;d=this.row.isParentRow?new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,a.PdfFontStyle.Bold):new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,this.style.fontStyle),this.row.treegrid.ganttStyle.font&&(d=this.row.treegrid.ganttStyle.font);var p=t;if(this.isHeaderCell||(p.x=p.x,p.width=p.width),p.height>=e.clientSize.height&&(this.row.treegrid.allowRowBreakAcrossPages?(p.height-=p.y,t.height-=t.y):(p.height=e.clientSize.height,t.height=e.clientSize.height)),p=this.adjustContentLayoutArea(p),"string"==typeof this.value||"string"==typeof this.remainingString){var h=null;this.finishedDrawingCell?(h=""===this.remainingString?this.remainingString:this.value,e.drawString(h,d,null,l,p.x+r,p.y,p.width-r-10,p.height-10,this.style.format)):e.drawString(this.remainingString,d,null,l,p.x+r,p.y,this.style.format),n=e.stringLayoutResult}return null!=this.style.borders&&this.drawCellBorder(e,t),n},e.prototype.drawCellBackground=function(e,t){var i=new a.PdfSolidBrush(this.style.backgroundColor);null!=i&&(e.save(),e.drawRectangle(i,t.x,t.y,t.width,t.height),e.restore())},e.prototype.adjustContentLayoutArea=function(e){var t=new a.RectangleF(new a.PointF(e.x,e.y),new a.SizeF(e.width,e.height)),i=this.style.padding;if(this.value instanceof r.a){var n=this.value.size;this.style.format.alignment===a.PdfTextAlignment.Center?(t.x+=i.left+(t.width-n.width)/2,t.y+=i.top+(t.height-n.height)/2):this.style.format.alignment===a.PdfTextAlignment.Left?(t.x+=i.left,t.y+=i.top):this.style.format.alignment===a.PdfTextAlignment.Right&&(t.x+=i.left+(t.width-n.width),t.y+=i.top)}else t.x+=i.left,t.y+=i.top;return t},e.prototype.drawCellBorder=function(e,t){if(this.row.treegrid.style.borderOverlapStyle===a.PdfBorderOverlapStyle.Inside&&(t.x+=this.style.borders.left.width,t.y+=this.style.borders.top.width,t.width-=this.style.borders.right.width,t.height-=this.style.borders.bottom.width),this.style.borders.isAll&&this.isHeaderCell)return e.drawRectangle(this.style.borders.left,t.x,t.y,t.width,t.height),void e.restore();var i=new a.PointF(t.x,t.y+t.height),r=new a.PointF(t.x,t.y),n=this.style.borders.left;this.style.borders.left.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore(),i=new a.PointF(t.x+t.width,t.y),r=new a.PointF(t.x+t.width,t.y+t.height),n=this.style.borders.right,t.x+t.width>e.clientSize.width-n.width/2&&(i=new a.PointF(e.clientSize.width-n.width/2,t.y),r=new a.PointF(e.clientSize.width-n.width/2,t.y+t.height)),this.style.borders.right.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore(),i=new a.PointF(t.x,t.y),r=new a.PointF(t.x+t.width,t.y),n=this.style.borders.top,this.style.borders.top.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore(),i=new a.PointF(t.x+t.width,t.y+t.height),r=new a.PointF(t.x,t.y+t.height),n=this.style.borders.bottom,t.y+t.height>e.clientSize.height-n.width/2&&(i=new a.PointF(t.x+t.width,e.clientSize.height-n.width/2),r=new a.PointF(t.x,e.clientSize.height-n.width/2)),this.style.borders.bottom.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore()},e}()),o=function(){function e(e){this.treegridRow=e,this.cells=[]}return e.prototype.getCell=function(e){if(e<0||e>=this.count)throw new Error("IndexOutOfRangeException");return this.cells[e]},Object.defineProperty(e.prototype,"count",{get:function(){return this.cells.length},enumerable:!0,configurable:!0}),e.prototype.add=function(e){if(void 0===e){var t=new s;return this.add(t),e}e.row=this.treegridRow,this.cells.push(e)},e.prototype.indexOf=function(e){return this.cells.indexOf(e)},e}(),l=function(){function e(e){this.treegridRowOverflowIndex=0,this.rowHeight=0,this.rowWidth=0,this._isParentRow=!1,this.intendLevel=0,this.pdfTreeGrid=e}return Object.defineProperty(e.prototype,"cells",{get:function(){return i.i(n.isNullOrUndefined)(this.treegridCells)&&(this.treegridCells=new o(this)),this.treegridCells},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isParentRow",{get:function(){return this._isParentRow},set:function(e){this._isParentRow=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treegrid",{get:function(){return this.pdfTreeGrid},set:function(e){this.pdfTreeGrid=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowBreakHeight",{get:function(){return void 0===this.treegridRowBreakHeight&&(this.treegridRowBreakHeight=0),this.treegridRowBreakHeight},set:function(e){this.treegridRowBreakHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowOverflowIndex",{get:function(){return this.treegridRowOverflowIndex},set:function(e){this.treegridRowOverflowIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this.intendLevel},set:function(e){this.intendLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return 0===this.rowHeight&&(this.rowHeight=this.measureHeight()),this.rowHeight},set:function(e){this.rowHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 0===this.rowWidth&&(this.rowWidth=this.measureWidth()),this.rowWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowIndex",{get:function(){return this.treegrid.rows.rowCollection.indexOf(this)},enumerable:!0,configurable:!0}),e.prototype.measureWidth=function(){for(var e=this.treegrid.columns.columns,t=0,i=0;i<e.length;i++){t+=e[i].width}return t},e.prototype.measureHeight=function(){for(var e=this.cells.getCell(0).height,t=0;t<this.cells.count;t++){var i=this.cells.getCell(t);e=1===i.columnSpan||1===i.rowSpan?Math.max(e,i.height):Math.min(e,i.height),i.height=e}return e},e}(),d=function(){function e(e){this.rows=[],this.treegrid=e}return Object.defineProperty(e.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowCollection",{get:function(){return this.rows},enumerable:!0,configurable:!0}),e.prototype.addRow=function(e){if(void 0===e){var t=new l(this.treegrid);return this.addRow(t),t}if(0===e.cells.count)for(var i=0;i<this.treegrid.columns.count;i++)e.cells.add(new s);this.rows.push(e)},e.prototype.getRow=function(e){return this.rows[e]},e}(),p=function(){function e(e){this.rows=[],this.treegrid=e,this.rows=[]}return e.prototype.getHeader=function(e){return this.rows[e]},Object.defineProperty(e.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),e.prototype.add=function(e){this.rows.push(e)},e.prototype.indexOf=function(e){return this.rows.indexOf(e)},e}(),h=function(){function e(e){this.columnWidth=0,this.treeColumnIndex=!1,this._headerText="",this._field="",this.treegrid=e}return Object.defineProperty(e.prototype,"headerText",{get:function(){return this._headerText},set:function(e){this._headerText=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"field",{get:function(){return this._field},set:function(e){this._field=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.columnWidth},set:function(e){this.columnWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTreeColumn",{get:function(){return this.treeColumnIndex},set:function(e){this.treeColumnIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return null==this.stringFormat&&(this.stringFormat=new a.PdfStringFormat),this.stringFormat},set:function(e){this.stringFormat=e},enumerable:!0,configurable:!0}),e}(),u=function(){function e(e){this.internalColumns=[],this.columnWidth=0,this.treegrid=e,this.internalColumns=[]}return e.prototype.add=function(e){for(var t=0;t<e;t++){this.internalColumns.push(new h(this.treegrid));for(var i=0;i<this.treegrid.rows.count;i++){var r=this.treegrid.rows.getRow(i),n=new s;n.value="",r.cells.add(n)}}},Object.defineProperty(e.prototype,"count",{get:function(){return this.internalColumns.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 0===this.columnWidth&&(this.columnWidth=this.measureColumnsWidth()),this.columnWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this.internalColumns},enumerable:!0,configurable:!0}),e.prototype.getColumn=function(e){if(e>=0&&e<=this.columns.length)return this.columns[e];throw Error("can not get the column from the index: "+e)},e.prototype.measureColumnsWidth=function(){var e=0;this.treegrid.measureColumnsWidth();for(var t=0,i=this.internalColumns.length;t<i;t++)e+=this.internalColumns[t].width;return e},e.prototype.getDefaultWidths=function(e){for(var t=[],i=this.count,r=0;r<this.count;r++)t[r]=this.internalColumns[r].width,this.internalColumns[r].width>0?(e-=this.internalColumns[r].width,i--):t[r]=0;for(var r=0;r<this.count;r++){var n=e/i;t[r]<=0&&(t[r]=n)}return t},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(1),n=(i.n(r),i(7)),a=i(11),s=(function(){function e(){}}(),function(){function e(){this.cellSpacing=0,this.borderOverlapStyle=r.PdfBorderOverlapStyle.Overlap,this.allowHorizontalOverflow=!1,this.horizontalOverflowType=a.a.LastPage,this.cellPadding=new n.i}return e}())},function(e,t,i){"use strict";i.d(t,"b",function(){return l}),i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(7)),a=i(11),s=i(1),o=(i.n(s),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),l=function(e){function t(t){var i=e.call(this,t)||this;return i.columnRanges=[],i.repeatRowIndex=-1,i.currentBounds=new s.RectangleF(0,0,0,0),i}return o(t,e),Object.defineProperty(t.prototype,"treegrid",{get:function(){return this.elements},enumerable:!0,configurable:!0}),t.prototype.layoutInternal=function(e){if(i.i(r.isNullOrUndefined)(e))throw Error("Argument Null Expection");this.currentPage=e.page;var t=e.format;if(null!==this.currentPage&&(this.currentPageBounds=this.currentPage.getClientSize()),this.currentGraphics=this.currentPage.graphics,null!==t&&t.break===s.PdfLayoutBreakType.FitColumnsToPage?this.currentBounds=new s.RectangleF(new s.PointF(e.bounds.x,e.bounds.y),new s.SizeF(this.treegrid.columns.width,this.currentGraphics.clientSize.height)):this.currentBounds=new s.RectangleF(new s.PointF(e.bounds.x,e.bounds.y),this.currentGraphics.clientSize),0===this.treegrid.rows.count)throw Error("Please add row or header into grid");return this.currentBounds.width=e.bounds.width>0?e.bounds.width:this.currentBounds.width-this.treegrid.rows.getRow(0).cells.getCell(0).style.borders.left.width/2,this.startLocation=new s.PointF(e.bounds.x,e.bounds.y),e.bounds.height>0&&(this.currentBounds.height=e.bounds.height),this.treegrid.style.allowHorizontalOverflow||this.treegrid.isFitToWidth?(this.treegrid.measureColumnsWidth(this.currentBounds),this.columnRanges.push([0,this.treegrid.columns.count-1])):(this.treegrid.measureColumnsWidth(),this.determineColumnDrawRanges()),this.layoutOnPage(e)},t.prototype.determineColumnDrawRanges=function(){for(var e=0,t=0,i=0,r=this.currentGraphics.clientSize.width-this.currentBounds.x,n=0;n<this.treegrid.columns.count;n++)if((i+=this.treegrid.columns.getColumn(n).width)>=r){for(var a=0,s=e;s<=n&&!((a+=this.treegrid.columns.getColumn(s).width)>r);s++)t=s;this.columnRanges.push([e,t]),e=t+1,i=t<=n?this.treegrid.columns.getColumn(n).width:0}this.columnRanges.push([e,this.treegrid.columns.count-1])},t.prototype.getFormat=function(e){return e},t.prototype.layoutOnPage=function(e){for(var t=this.getFormat(e.format),i=null,r=new n.h,o=e.page,l=0;l<this.columnRanges.length;l++){var d=this.columnRanges[l];this.cellStartIndex=d[0],this.cellEndIndex=d[1];for(var p=this.treegrid.rows.count,h=0,u=!1,c=0;c<p;c++){var g=this.treegrid.rows.getRow(c);h++;var f=this.currentBounds.y;null===this.currentPage||r.containsKey(this.currentPage)||r.add(this.currentPage,d);var m=this.drawRow(g);for(f===this.currentBounds.y?(u=!0,this.repeatRowIndex=this.treegrid.rows.rowCollection.indexOf(g)):(u=!1,this.repeatRowIndex=-1);!m.isFinish&&null!==o;)if(this.treegrid.allowRowBreakAcrossPages)this.currentPage=this.getNextPageFormat(t),this.treegrid.enableHeader&&this.drawHeader(),this.checkBounds(t),m=this.drawRow(g);else{if(!this.treegrid.allowRowBreakAcrossPages&&h<length){this.currentPage=this.getNextPageFormat(t),this.treegrid.enableHeader&&this.drawHeader();break}if(h>=length)break}!m.isFinish&&null!==o&&t.layout!==s.PdfLayoutType.OnePage&&u&&(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageFormat(t),this.treegrid.enableHeader&&this.drawHeader(),this.startLocation.y=this.currentBounds.y,t.paginateBounds===new s.RectangleF(0,0,0,0)&&(this.currentBounds.x+=this.startLocation.x),this.currentBounds.x===n.f.default.left.width/2&&(this.currentBounds.y+=this.startLocation.x),this.drawRow(g),null===this.currentPage||r.containsKey(this.currentPage)||r.add(this.currentPage,d))}this.columnRanges.indexOf(d)<this.columnRanges.length-1&&null!==o&&t.layout!==s.PdfLayoutType.OnePage&&(this.currentPage=this.getNextPageFormat(t),this.checkBounds(t))}return i=this.getLayoutResult(),this.treegrid.style.allowHorizontalOverflow&&this.treegrid.style.horizontalOverflowType===a.a.NextPage&&this.reArrangePages(r),i},t.prototype.checkBounds=function(e){var t=new s.PointF(n.f.default.right.width/2,n.f.default.top.width/2);e.paginateBounds===new s.RectangleF(0,0,0,0)&&this.startLocation===t&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y)},t.prototype.drawHeader=function(){this.drawRow(this.treegrid.rows.getRow(0))},t.prototype.reArrangePages=function(e){for(var t=this.currentPage.document,i=[],r=e.keys(),n=0;n<r.length;n++){var a=r[n];a.section=null,i.push(a),t.pages.remove(a)}for(var n=0;n<e.size();n++)for(var s=e.size()/this.columnRanges.length,o=n;o<e.size();o+=s){var a=i[o];-1===t.pages.indexOf(a)&&t.pages.add(a)}},t.prototype.getNextPageFormat=function(e){var t=this.currentPage.section,i=null,r=t.indexOf(this.currentPage);return i=r===t.count-1?t.add():t.getPages()[r+1],this.currentGraphics=i.graphics,this.currentBounds=new s.RectangleF(new s.PointF(0,0),i.getClientSize()),i},t.prototype.getLayoutResult=function(){var e=new s.RectangleF(this.startLocation,new s.SizeF(this.currentBounds.width,this.currentBounds.y-this.startLocation.y));return new d(this.currentPage,e)},t.prototype.checkIfDefaultFormat=function(e){var t=new s.PdfStringFormat;return e.alignment===t.alignment&&e.characterSpacing===t.characterSpacing&&e.clipPath===t.clipPath&&e.firstLineIndent===t.firstLineIndent&&e.horizontalScalingFactor===t.horizontalScalingFactor&&e.lineAlignment===t.lineAlignment&&e.lineLimit===t.lineLimit&&e.lineSpacing===t.lineSpacing&&e.measureTrailingSpaces===t.measureTrailingSpaces&&e.noClip===t.noClip&&e.paragraphIndent===t.paragraphIndent&&e.rightToLeft===t.rightToLeft&&e.subSuperScript===t.subSuperScript&&e.wordSpacing===t.wordSpacing&&e.wordWrap===t.wordWrap},t.prototype.drawRow=function(e,t,n){if(i.i(r.isNullOrUndefined)(t)){var a=new s.RowLayoutResult;return n=e.rowBreakHeight>0?e.rowBreakHeight:e.height,n>this.currentPageBounds.height?this.treegrid.allowRowBreakAcrossPages?(a.isFinish=!0,this.drawRowWithBreak(a,e,n)):(a.isFinish=!1,this.drawRow(e,a,n)):this.currentBounds.y+n>this.currentPageBounds.height||this.currentBounds.y+n>this.currentBounds.height?this.repeatRowIndex>-1&&this.repeatRowIndex===e.rowIndex?this.treegrid.allowRowBreakAcrossPages?(a.isFinish=!0,this.drawRowWithBreak(a,e,n)):(a.isFinish=!1,this.drawRow(e,a,n)):a.isFinish=!1:(a.isFinish=!0,this.drawRow(e,a,n)),a}var o=new s.PointF(this.currentBounds.x,this.currentBounds.y);t.bounds=new s.RectangleF(o,new s.SizeF(0,0));var l=0;n=this.reCalculateHeight(e,n);for(var d=this.cellStartIndex;d<=this.cellEndIndex;d++){var p=e.cells.getCell(d),h=this.treegrid.columns.getColumn(d);h.isTreeColumn&&(l=10*e.level);var u=d>this.cellEndIndex+1&&p.columnSpan>1;if(!u)for(var c=1;c<p.columnSpan;c++)e.cells.getCell(d+c).isCellMergeContinue=!0;var g=new s.SizeF(h.width,n);!this.checkIfDefaultFormat(h.format)&&this.checkIfDefaultFormat(p.style.format)&&(p.style.format=h.format),p.draw(this.currentGraphics,new s.RectangleF(o,g),u,l),e.treegrid.style.allowHorizontalOverflow&&(p.columnSpan>this.cellEndIndex||d+p.columnSpan>this.cellEndIndex+1)&&this.cellEndIndex<e.cells.count-1&&(e.rowOverflowIndex=this.cellEndIndex),o.x+=h.width,l=0}return this.currentBounds.y+=n,t.bounds=new s.RectangleF(new s.PointF(t.bounds.x,t.bounds.y),new s.SizeF(o.x,o.y)),null},t.prototype.drawRowWithBreak=function(e,t,i){var r=new s.PointF(this.currentBounds.x,this.currentBounds.y);e.bounds=new s.RectangleF(r,new s.SizeF(0,0));var n=0;this.treegridHeight=this.currentBounds.height,t.rowBreakHeight=this.currentBounds.y+i-this.currentBounds.height;for(var a=0;a<t.cells.count;a++){var o=t.cells.getCell(a);o.measureHeight()===i&&null===o.value&&(t.rowBreakHeight=this.currentBounds.y+i-this.currentBounds.height)}for(var l=this.cellStartIndex;l<=this.cellEndIndex;l++){var d=this.treegrid.columns.getColumn(l);d.isTreeColumn&&(n=10*t.level);var o=t.cells.getCell(l),p=o.columnSpan+l>this.cellEndIndex+1&&o.columnSpan>1;if(!p)for(var h=1;h<o.columnSpan;h++)t.cells.getCell(l+h).isCellMergeContinue=!0;var u=this.treegridHeight>0?this.treegridHeight:this.currentBounds.height,c=new s.SizeF(d.width,u);!this.checkIfDefaultFormat(d.format)&&this.checkIfDefaultFormat(o.style.format)&&(o.style.format=d.format),o.draw(this.currentGraphics,new s.RectangleF(r,c),p,n),e.isFinish=e.isFinish?o.finishedDrawingCell:e.isFinish,r.x+=d.width,n=0,this.currentBounds.y+=this.treegridHeight>0?this.treegridHeight:i,e.bounds=new s.RectangleF(new s.PointF(e.bounds.x,e.bounds.y),new s.SizeF(r.x,r.y))}},t.prototype.reCalculateHeight=function(e,t){for(var n=0,a=this.cellStartIndex;a<=this.cellEndIndex;a++)i.i(r.isNullOrUndefined)(e.cells.getCell(a).remainingString)&&""!==e.cells.getCell(a).remainingString||(n=Math.max(n,e.cells.getCell(a).measureHeight()));return Math.max(t,n)},t}(s.ElementLayouter),d=function(e){function t(t,i){return e.call(this,t,i)||this}return o(t,e),t}(s.PdfLayoutResult),p=function(e){function t(t){return void 0===t?e.call(this)||this:e.call(this,t)||this}return o(t,e),t}(s.PdfLayoutFormat)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(1),n=(i.n(r),i(2)),a=i(0),s=(i.n(a),this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}),o=function(){function e(e,t){this.parent=e,this.pdfGantt=t}return e.prototype.add=function(){return new e(this.parent)},e.prototype.drawPredecessor=function(e){this.pdfGantt=e;var t,a,o=e.result.page.section.getPages(),l=e.taskbarCollection[this.parentIndex],d=e.taskbarCollection[this.childIndex],p=new r.PdfPage,h=new r.PdfPage,u="",c=0,g=0;if(d&&l){switch(this.type){case"FS":if(!(d.startPage>-1&&l.endPage>-1))return;p=o[l.endPage],h=o[d.startPage],t=e.pdfPageDetail[l.endPage-e.chartPageIndex],a=e.pdfPageDetail[d.startPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.parentLeft<this.childLeft&&this.childLeft>this.parentLeft+this.parentWidth+25?"FSType1":"FSType2":this.parentLeft<this.childLeft&&this.childLeft>this.parentLeft+this.parentWidth+25?"FSType3":"FSType4";break;case"SF":if(!(d.endPage>-1&&l.startPage>-1))return;p=o[l.startPage],h=o[d.endPage],t=e.pdfPageDetail[l.endPage-e.chartPageIndex],a=e.pdfPageDetail[d.startPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.parentLeft>this.childLeft+this.childWidth?"SFType1":"SFType2":this.parentLeft>this.childLeft+this.childWidth?"SFType3":"SFType4";break;case"FF":if(!(d.endPage>-1&&l.endPage>-1))return;p=o[l.endPage],h=o[d.endPage],t=e.pdfPageDetail[l.endPage-e.chartPageIndex],a=e.pdfPageDetail[d.endPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.childLeft+this.childWidth>=this.parentLeft+this.parentWidth?"FFType1":"FFType2":this.childLeft+this.childWidth>=this.parentLeft+this.parentWidth?"FFType3":"FFType4";break;case"SS":if(!(d.startPage>-1&&l.startPage>-1))return;p=o[l.startPage],h=o[d.startPage],t=e.pdfPageDetail[l.startPage-e.chartPageIndex],a=e.pdfPageDetail[d.startPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.parentLeft>=this.childLeft?"SSType1":"SSType2":this.parentLeft>=this.childLeft?"SSType3":"SSType4"}var f=Math.round((this.parent.rowHeight-1)/2);f=i.i(n.a)(f);var m=void 0,y=void 0,v=void 0,D=void 0,w=void 0,k=void 0;m=y=v=D=w=k=new r.PointF;var S=s({},l.taskStartPoint),T=s({},d.taskStartPoint);c=S.y+t.startPoint.y,g=T.y+a.startPoint.y;var b=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth),c+f),P=new r.PointF(i.i(n.a)(this.parentLeft)-1,c+f),C=new r.PointF(i.i(n.a)(this.childLeft-20),g+f),M=new r.PointF(i.i(n.a)(this.childLeft-6-this.lineWidth)-1,g+f),R=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+6+this.lineWidth)+1,g+f);switch(u){case"FSType1":case"FSType3":m=b,y=new r.PointF(i.i(n.a)(this.childLeft-20),c+f),v=C,D=M,this.connectLines(p,h,m,y,v,D,d,f);break;case"FSType2":m=b,y=new r.PointF(m.x+10,c+f),v=new r.PointF(m.x+10,g+2),D=new r.PointF(i.i(n.a)(this.childLeft-20),g+2),w=C,k=M,this.connectLines(p,h,m,y,v,D,d,f,w,k);break;case"FSType4":m=b,y=new r.PointF(m.x+10,c+f),v=new r.PointF(m.x+10,c+2),D=new r.PointF(i.i(n.a)(this.childLeft-20),c+2),w=C,k=M,this.connectLines(p,h,m,y,v,D,d,f,w,k);break;case"FFType1":case"FFType3":m=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth)+1,c+f),y=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),c+f),v=new r.PointF(y.x,g+f),D=R,this.connectLines(p,h,m,y,v,D,d,f);break;case"FFType2":case"FFType4":m=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth)+1,c+f),y=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth+20),c+f),v=new r.PointF(y.x,g+f),D=R,this.connectLines(p,h,m,y,v,D,d,f);break;case"SSType1":case"SSType3":m=P,y=new r.PointF(i.i(n.a)(this.childLeft-20),c+f),v=new r.PointF(y.x,g+f),D=M,this.connectLines(p,h,m,y,v,D,d,f);break;case"SSType2":case"SSType4":m=P,y=new r.PointF(i.i(n.a)(this.parentLeft-20),c+f),v=new r.PointF(y.x,g+f),D=M,this.connectLines(p,h,m,y,v,D,d,f);break;case"SFType1":case"SFType3":m=P,y=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),c+f),v=new r.PointF(y.x,g+f),D=R,this.connectLines(p,h,m,y,v,D,d,f);break;case"SFType2":m=P,y=new r.PointF(i.i(n.a)(this.parentLeft-20),c+f),v=new r.PointF(y.x,g+2),D=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),g+2),w=new r.PointF(D.x,g+f),k=R,this.connectLines(p,h,m,y,v,D,d,f,w,k);break;case"SFType4":m=P,y=new r.PointF(i.i(n.a)(this.parentLeft-20),c+f),v=new r.PointF(y.x,c+2),D=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),c+2),w=new r.PointF(D.x,g+f),k=R,this.connectLines(p,h,m,y,v,D,d,f,w,k)}}},e.prototype.connectLines=function(e,t,r,n,s,o,l,d,p,h){this.drawLine(e,r,n),this.drawLine(e,n,s),this.drawLine(e,s,o),i.i(a.isNullOrUndefined)(p)||i.i(a.isNullOrUndefined)(h)||(this.drawLine(e,o,p),this.drawLine(e,p,h)),this.drawArrow(t,l,d)},e.prototype.contains=function(e,t,i){return e.x<=t&&t<e.x+e.width&&e.y<=i&&i<e.y+e.height},e.prototype.findPageIndex=function(e){for(var t=-1,i=0;i<this.pdfGantt.pdfPageDetail.length;i++){var n=this.pdfGantt.pdfPageDetail[i],a=new r.RectangleF(n.startPoint.x,n.startPoint.y,n.width,n.height);if(this.contains(a,e.x,e.y)){t=i;break}}return t},e.prototype.drawLine=function(e,t,a){var o=this.pdfGantt.result.page.section.getPages(),l=e.graphics,d=s({},a),p=s({},a),h=s({},a),u=this.pdfGantt.pdfPageDetail[e.section.indexOf(e)-this.pdfGantt.chartPageIndex],c=new r.RectangleF(u.startPoint.x,u.startPoint.y,u.width,u.height),g=this.contains(c,t.x,t.y),f=this.contains(c,a.x,a.y),m=-1;if(t=new r.PointF(t.x,t.y),a=new r.PointF(a.x,a.y),!g&&!f||f&&!g)(m=this.findPageIndex(t))>-1&&(u=this.pdfGantt.pdfPageDetail[m],p=t,d=a,this.drawLine(o[m+this.pdfGantt.chartPageIndex],p,d));else if(!f&&g){var y=c.x,v=c.x+c.width,D=c.y+c.height,w=c.y;y>a.x?(h.x=a.x=y-1,p.x=y-1):v<a.x?(h.x=a.x=v,p.x=v,h.x+=1):D<a.y?(h.y=a.y=D,p.y=D,h.y+=1,this.pdfGantt.enableHeader&&(p.y+=this.parent.timelineModule.isSingleTier?i.i(n.a)(45):i.i(n.a)(62))):w>a.y&&(p.y=h.y=w-1,a.y=w,this.pdfGantt.enableHeader&&(h.y+=this.parent.timelineModule.isSingleTier?i.i(n.a)(45):i.i(n.a)(62),a.y+=this.parent.timelineModule.isSingleTier?i.i(n.a)(45):i.i(n.a)(62))),m=this.findPageIndex(h),-1!==m&&this.drawLine(o[m+this.pdfGantt.chartPageIndex],p,d)}if(g){t=new r.PointF(t.x,t.y),a=new r.PointF(a.x,a.y),t.x=t.x+u.pageStartX-u.startPoint.x,t.y=t.y-u.startPoint.y,a.x=a.x+u.pageStartX-u.startPoint.x,a.y=a.y-u.startPoint.y;var k=new r.PdfSolidBrush(this.connectorLineColor),S=new r.PdfPen(k,i.i(n.a)(this.lineWidth));l.drawLine(S,t,a)}},e.prototype.drawArrow=function(e,t,a){var s,o=this.pdfGantt.pdfPageDetail[e.section.indexOf(e)-this.pdfGantt.chartPageIndex],l=new r.RectangleF(new r.PointF(o.startPoint.x,o.startPoint.y),new r.SizeF(o.width,o.height)),d=new r.PointF,p=e.section.getPages(),h=6+this.lineWidth;if(d="FS"===this.type||"SS"===this.type?new r.PointF(i.i(n.a)(this.childLeft)-1,t.taskStartPoint.y+o.startPoint.y):new r.PointF(i.i(n.a)(this.childLeft+this.childWidth)+1,t.taskStartPoint.y+o.startPoint.y),!this.contains(l,d.x,d.y)){var u=this.findPageIndex(d);u>-1&&(o=this.pdfGantt.pdfPageDetail[u],e=p[u+this.pdfGantt.chartPageIndex])}var c=e.graphics;d.x=d.x-o.startPoint.x+o.pageStartX,d.y=d.y-o.startPoint.y;var g=new r.PointF(d.x,d.y+a);s="FS"===this.type||"SS"===this.type?new r.PointF(g.x-i.i(n.a)(h),g.y-i.i(n.a)(h)):new r.PointF(g.x+i.i(n.a)(h),g.y-i.i(n.a)(h));var f=new r.PointF(s.x,s.y+i.i(n.a)(2*h)),m=new r.PdfSolidBrush(this.connectorLineColor),y=new r.PdfPen(m,i.i(n.a)(this.lineWidth));c.drawLine(y,g,s),c.drawLine(y,s,f),c.drawLine(y,f,g)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return u});var r=i(58),n=i(0),a=(i.n(n),i(1)),s=(i.n(a),i(18)),o=i(59),l=i(2),d=i(56),p=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),h=this&&this.__assign||function(){return h=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},h.apply(this,arguments)},u=function(e){function t(t){var i=e.call(this)||this;return i.exportProps={},i.parent=t,i.chartHeader=new o.a(i),i.predecessor=new d.a(t,i),i.headerDetails=[],i.pdfPageDetail=[],i.taskbarCollection=[],i.predecessorCollection=[],i}return p(t,e),Object.defineProperty(t.prototype,"taskbar",{get:function(){return i.i(n.isNullOrUndefined)(this.taskbars)&&(this.taskbars=new r.a(this.parent)),this.taskbars},enumerable:!0,configurable:!0}),t.prototype.drawChart=function(e){this.result=e,this.totalPages=this.result.page.section.count,this.perColumnPages=this.totalPages/this.layouter.columnRanges.length,this.calculateRange(),this.drawGantttChart(),this.drawPageBorder()},t.prototype.calculateRange=function(){for(var e=this.layouter.columnRanges[this.layouter.columnRanges.length-1],t=0,r=!0,s=0,o=0,d=0,p=i.i(l.a)(this.chartHeader.width),h=this.parent.timelineModule,u=e[0];u<=e[1];u++)t+=this.layouter.treegrid.columns.getColumn(u).width;for(t+=.5,t+100<this.result.page.getClientSize().width?(o=this.result.page.getClientSize().width-t,this.chartPageIndex=this.startPageIndex=this.totalPages-this.perColumnPages,r=!1,this.startPoint=new a.PointF(t,0)):(this.result.page.section.add(),this.chartPageIndex=this.startPageIndex=this.totalPages,r=!0,this.startPoint=new a.PointF(d,0));Math.round(d)<Math.round(p);){r?s=this.result.page.getClientSize().width:(s=o,r=!0);var c={},g=[],f=i.i(l.a)(this.chartHeader.bottomTierCellWidth),m=0;0!==this.chartHeader.bottomTierCellWidth&&(m=Math.floor(s/f)*f),g[0]=d,p-d<=m?(g[1]=p,c.totalWidth=i.i(l.b)(p-d)):(g[1]=d+m,c.totalWidth=i.i(l.b)(m)),c.startPoint=g[0],c.endPoint=g[1],0===this.parent.cloneProjectStartDate.getHours()&&0===this.parent.cloneProjectStartDate.getMinutes()&&0===this.parent.cloneProjectStartDate.getSeconds()&&this.parent.cloneProjectStartDate.setHours(8);var y=this.parent.dataOperation.getDateFromFormat(this.parent.cloneProjectStartDate),v=i.i(n.isNullOrUndefined)(h.customTimelineSettings.bottomTier.count)?h.customTimelineSettings.topTier.count:h.customTimelineSettings.bottomTier.count;switch("None"===h.customTimelineSettings.bottomTier.unit?h.customTimelineSettings.topTier.unit:h.customTimelineSettings.bottomTier.unit){case"Minutes":c.startDate=new Date(y.getTime());var D=Math.floor(i.i(l.b)(c.startPoint)/this.chartHeader.bottomTierCellWidth);c.startDate.setMinutes(c.startDate.getMinutes()+D*v),c.startDate.setSeconds(c.startDate.getSeconds()+1),c.endDate=new Date(c.startDate.getTime());var w=Math.floor(i.i(l.b)(c.endPoint-c.startPoint)/this.chartHeader.bottomTierCellWidth);c.endDate.setMinutes(c.endDate.getMinutes()+w*v);break;case"Hour":c.startDate=new Date(y.getTime());var k=Math.floor(i.i(l.b)(c.startPoint)/this.chartHeader.bottomTierCellWidth);c.startDate.setHours(c.startDate.getHours()+k*v),c.startDate.setMinutes(c.startDate.getMinutes()+1),c.endDate=new Date(c.startDate.getTime());var S=Math.floor(i.i(l.b)(c.endPoint-c.startPoint)/this.chartHeader.bottomTierCellWidth);c.endDate.setHours(c.endDate.getHours()+S*v);break;case"Day":c.startDate=new Date(y.getTime());var T=Math.round(c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth));c.startDate.setDate(c.startDate.getDate()+T*v);var b=Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+b*v);break;case"Week":c.startDate=new Date(y.getTime());var P=c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth)*7;c.startDate.setDate(c.startDate.getDate()+P*v);var C=7*Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+C*v);break;case"Month":c.startDate=new Date(y.getTime());var M=c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth)*31;c.startDate.setDate(c.startDate.getDate()+M*v);var R=31*Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+R*v);break;case"Year":c.startDate=new Date(y.getTime());var x=c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth)*365;c.startDate.setDate(c.startDate.getDate()+x*v);var O=365*Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+O*v)}this.headerDetails.push(c),d+=m}},t.prototype.drawPageBorder=function(){for(var e=this.result.page.section.getPages(),t=0;t<e.length;t++){var i=e[t],r=i.graphics,n=i.getClientSize(),s=new a.PdfPen(new a.PdfColor(206,206,206));r.drawRectangle(s,0,0,n.width,n.height)}},t.prototype.drawGantttChart=function(){var e,t=this,r=this.startPoint,n=new a.PointF,s=0,o=0,d=0,p=0;this.headerDetails.forEach(function(u,c){var g=t.result.page.section.getPages()[t.startPageIndex];t.chartHeader.drawTimeline(g,t.startPoint,u),r.y=r.y+i.i(l.a)(t.parent.timelineModule.isSingleTier?45:60),s=r.x,d=i.i(l.a)(t.parent.timelineModule.isSingleTier?45:60),t.headerDetails[t.headerDetails.indexOf(u)].startIndex=t.startPageIndex,t.headerDetails[t.headerDetails.indexOf(u)].pageStartPoint=r;for(var f=0;f<t.taskbarCollection.length;f++){var m=t.taskbarCollection[f],y=t.rows.getRow(f+1).height,v=t.result.page.section.getPages()[t.startPageIndex];m.drawTaskbar(v,r,u,o,y,t.taskbarCollection[f])&&(t.enableHeader?r.y=i.i(l.a)(t.parent.timelineModule.isSingleTier?45:60):r.y=0,t.startPageIndex++,e={},e.height=d,e.pageStartX=s,e.startPoint=h({},n),e.width=i.i(l.a)(u.totalWidth),t.pdfPageDetail.push(e),n.y+=e.height,t.enableHeader?d=t.chartHeader.height:(r.y=0,d=0)),r.y+=y,d+=y,p+=y}t.headerDetails[c].endIndex=t.startPageIndex,o+=u.totalWidth,e={},e.height=d,e.pageStartX=s,e.startPoint=h({},n),e.width=i.i(l.a)(u.totalWidth),t.pdfPageDetail.push(e),n.x+=e.width,n.y=0,t.enableHeader?d=t.chartHeader.height:r.y=0,t.headerDetails.indexOf(u)!==t.headerDetails.length-1&&(t.result.page.section.add(),t.startPageIndex=t.result.page.section.count-1,r=t.startPoint=new a.PointF(0,0))});for(var u=0;u<this.predecessorCollection.length;u++){this.predecessorCollection[u].drawPredecessor(this)}},t}(s.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(1),n=(i.n(r),i(2)),a=i(0),s=(i.n(a),this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}),o=function(){function e(e){this.leftTaskLabel={},this.rightTaskLabel={},this.startPage=-1,this.endPage=-1,this.parent=e}return e.prototype.add=function(){return new e(this.parent)},e.prototype.GetNextPage=function(e){var t=e.section,i=t.indexOf(e);return i===t.count-1?t.add():t.getPages()[i+1]},e.prototype.drawTaskbar=function(e,t,o,l,d,p){var h=e.graphics,u=!1,c=e.getClientSize();t.y+d>c.height&&(e=this.GetNextPage(e),h=e.graphics,t.y=0,this.parent.pdfExportModule.gantt.enableHeader&&(this.parent.pdfExportModule.gantt.chartHeader.drawPageTimeline(e,t,o),t.y=i.i(n.a)(this.parent.timelineModule.isSingleTier?45:60)),u=!0),this.drawLeftLabel(e,t,o,l);var g=new r.PdfStandardFont(this.fontFamily,9,r.PdfFontStyle.Regular);this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(g=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var f=new r.PdfSolidBrush(this.progressFontColor),m=new r.PdfStringFormat;m.lineAlignment=r.PdfVerticalAlignment.Middle,m.alignment=r.PdfTextAlignment.Right;var y,v=!1;/^[a-zA-Z]/.test(this.taskLabel)&&(v=!0,m.alignment=r.PdfTextAlignment.Left);var D=-1;if(p.isMilestone)this.drawMilestone(e,t,o,l);else{var w=new r.PdfPen(p.taskBorderColor),k=new r.PdfSolidBrush(p.taskColor),S=new r.PdfPen(p.progressColor),T=new r.PdfSolidBrush(p.progressColor),b=i.i(n.a)((this.parent.rowHeight-this.height)/2);D=e.section.indexOf(e);var P=i.i(a.isNullOrUndefined)(this.unscheduleStarteDate)?this.startDate:this.unscheduleStarteDate,C=i.i(a.isNullOrUndefined)(this.unscheduleEndDate)?this.endDate:this.unscheduleEndDate;if(o.startDate<=P&&C<=o.endDate)this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0),this.isScheduledTask||"duration"===this.unscheduledTaskBy?(h.drawRectangle(w,k,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(p.width),i.i(n.a)(p.height)),this.isScheduledTask&&(h.drawRectangle(S,T,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(p.progressWidth),i.i(n.a)(p.height)),i.i(a.isNullOrUndefined)(this.parent.labelSettings.taskLabel)||i.i(a.isNullOrUndefined)(this.taskLabel)||(y=this.progressWidth,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left-l),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m)))):this.drawUnscheduledTask(h,t,l,b),this.isCompleted=!0,this.startPage=D,this.endPage=D;else if(o.startDate<=P&&o.endDate>=P&&C>=o.endDate){this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0);var M=0;if(v||(this.width=this.width-(o.totalWidth-(this.left-l))),M=o.totalWidth-(this.left-l),this.isScheduledTask||"duration"===this.unscheduledTaskBy){if(h.drawRectangle(w,k,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(M),i.i(n.a)(p.height)),this.isScheduledTask){var R=0;R=this.progressWidth<=M?this.progressWidth:M,h.drawRectangle(S,T,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(R),i.i(n.a)(p.height)),this.progressWidth-=R,this.parent.labelSettings.taskLabel&&!i.i(a.isNullOrUndefined)(this.taskLabel)&&(y=R,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left-l),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m))}}else this.drawUnscheduledTask(h,t,l,b);this.left=0,this.isCompleted=!1,this.startPage=D}else if(C<=o.endDate&&o.startDate<=C&&!this.isCompleted)this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0),h.drawRectangle(w,k,t.x+i.i(n.a)(p.left+.5),t.y+b,i.i(n.a)(p.width),i.i(n.a)(p.height)),this.isScheduledTask&&(h.drawRectangle(S,T,t.x+i.i(n.a)(p.left+.5),t.y+b,i.i(n.a)(p.progressWidth),i.i(n.a)(p.height)),i.i(a.isNullOrUndefined)(this.taskLabel)||(y=this.progressWidth,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m))),this.isCompleted=!0,this.endPage=D;else if(P<o.startDate&&C>o.endDate){if(this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0),h.drawRectangle(w,k,t.x+i.i(n.a)(p.left)+.5,t.y+b,i.i(n.a)(o.totalWidth),i.i(n.a)(p.height)),this.isScheduledTask){var R=0;R=this.progressWidth<=o.totalWidth?this.progressWidth:o.totalWidth,h.drawRectangle(S,T,t.x+i.i(n.a)(p.left)+.5,t.y+b,i.i(n.a)(R),i.i(n.a)(p.height)),this.progressWidth-=R,i.i(a.isNullOrUndefined)(this.taskLabel)||(y=R,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m))}this.isCompleted=!1,this.width-=o.totalWidth}}return this.drawRightLabel(e,t,o,l),u},e.prototype.drawRightLabel=function(e,t,s,o){var l,d=e.graphics;l=this.rightTaskLabel.isLeftCalculated?this.rightTaskLabel.left:i.i(n.a)(this.rightTaskLabel.left);var p=l-i.i(n.a)(o)+t.x;if(s.startPoint<=l&&l<s.endPoint&&!i.i(a.isNullOrUndefined)(this.rightTaskLabel.value)&&!this.rightTaskLabel.isCompleted){var h=this.getWidth(this.rightTaskLabel.value,s.endPoint-l,15),u=new r.PdfStandardFont(this.fontFamily,9);this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(u=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var c=(i.i(n.a)(this.parent.rowHeight)-h.actualSize.height)/2,g=new r.PointF(p,t.y+c),f=new r.SizeF(h.actualSize.width,h.actualSize.height),m=new r.RectangleF(g,f),y=new r.PdfStringFormat;if(y.alignment=r.PdfTextAlignment.Right,y.lineAlignment=r.PdfVerticalAlignment.Middle,h.actualSize.width>0){var v=new r.PdfSolidBrush(this.labelColor);d.drawString(h.lines[0].text,u,null,v,m.x,m.y,h.actualSize.width,h.actualSize.height,y),null!==h.remainder?(this.rightTaskLabel.value=h.remainder,this.rightTaskLabel.left=s.endPoint,this.rightTaskLabel.isLeftCalculated=!0):this.rightTaskLabel.isCompleted=!0}else this.rightTaskLabel.left=s.endPoint}},e.prototype.drawLeftLabel=function(e,t,s,o){var l,d=e.graphics;if(!i.i(a.isNullOrUndefined)(this.leftTaskLabel.value)){var p=0;if(p=this.left,this.leftTaskLabel.isLeftCalculated)l=this.leftTaskLabel.left;else{var h=this.getWidth(this.leftTaskLabel.value,Number.MAX_VALUE,15),u=this.isMilestone?Math.floor(this.parent.chartRowsModule.taskBarHeight/2)+33:33;l=i.i(n.a)(p-u)-h.actualSize.width,this.leftTaskLabel.left=l,this.leftTaskLabel.isLeftCalculated=!0}var c=l-i.i(n.a)(o)+t.x;if(s.startPoint<=l&&l<s.endPoint&&!i.i(a.isNullOrUndefined)(this.leftTaskLabel.value)&&!this.leftTaskLabel.isCompleted){var h=this.getWidth(this.leftTaskLabel.value,s.endPoint-l,15),g=new r.PdfStandardFont(this.fontFamily,9);this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(g=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var f=(i.i(n.a)(this.parent.rowHeight)-h.actualSize.height)/2,m=new r.PointF(c,t.y+f),y=new r.SizeF(h.actualSize.width,h.actualSize.height),v=new r.RectangleF(m,y),D=new r.PdfStringFormat;if(D.alignment=r.PdfTextAlignment.Right,D.lineAlignment=r.PdfVerticalAlignment.Middle,h.actualSize.width>0){var w=new r.PdfSolidBrush(this.labelColor);d.drawString(h.lines[0].text,g,null,w,v.x,v.y,h.actualSize.width,h.actualSize.height,D),null!==h.remainder?(this.leftTaskLabel.value=h.remainder,this.leftTaskLabel.left=s.endPoint):this.leftTaskLabel.isCompleted=!0}else this.leftTaskLabel.left=s.endPoint}}},e.prototype.getWidth=function(e,t,i){var n=new r.PdfStandardFont(this.fontFamily,9);this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(n=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var a=new r.PdfStringLayouter,s=new r.PdfStringFormat;return s.alignment=r.PdfTextAlignment.Left,s.wordWrap=r.PdfWordWrapType.Character,s.lineAlignment=r.PdfVerticalAlignment.Middle,a.layout(e,n,s,new r.SizeF(t,i),!1,new r.SizeF(t,i))},e.prototype.drawUnscheduledTask=function(e,t,a,s){var o=new r.PdfSolidBrush(this.taskColor);e.drawRectangle(o,t.x+i.i(n.a)(this.left-a),t.y+s,i.i(n.a)(3),i.i(n.a)(this.height))},e.prototype.drawMilestone=function(e,t,a,o){if(a.startDate<=this.startDate&&this.startDate<=a.endDate){var l=e.graphics,d=e.section.indexOf(e);this.taskStartPoint=s({},t);var p=new r.PdfPen(this.milestoneColor),h=i.i(n.a)((this.parent.rowHeight-this.height)/2),u=new r.PdfSolidBrush(this.milestoneColor);l.save();var c=Math.floor(.6*this.parent.chartRowsModule.taskBarHeight);l.translateTransform(t.x+i.i(n.a)(this.left-o),t.y+h-.7*this.parent.chartRowsModule.taskBarHeight/2),l.rotateTransform(45),l.drawRectangle(p,u,0,0,i.i(n.a)(c),i.i(n.a)(c)),l.restore(),this.endPage=this.startPage=d}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(1),n=(i.n(r),i(0)),a=(i.n(n),i(2)),s=function(){function e(e){this.width=0,this.gantt=e,this.parent=e.parent,this.topTierPoint=new r.PointF,this.bottomTierPoint=new r.PointF,this.topTierIndex=0,this.bottomTierIndex=0,this.prevTopTierIndex=0,this.prevBottomTierIndex=0}return e.prototype.drawTimeline=function(e,t,n){var s=Math.floor(n.totalWidth),o=0;for(this.topTierPoint.x=t.x,this.topTierPoint.y=t.y,this.prevTopTierIndex=this.topTierIndex,this.prevBottomTierIndex=this.bottomTierIndex;s>0;){var l=this.topTier[this.topTierIndex];if(this.topTier.length>this.topTierIndex){var d=!1;this.topTier[this.topTierIndex].isFinished||(s>=l.width?(o=l.width,l.isFinished=!0,l.completedWidth=o,d=!0):(o=s,d=!1,l.isFinished=!1,l.width=l.width-s,l.completedWidth=o)),this.triggerQueryTimelinecell(e,this.topTierPoint.x,this.topTierPoint.y,this.topTierHeight,o,l.value,!0),this.topTierPoint.x+=i.i(a.a)(o),s-=o,d&&this.topTierIndex++}else s=0}s=Math.floor(n.totalWidth);var p=this.parent.timelineModule.isSingleTier?0:this.topTierHeight;for(this.bottomTierPoint=new r.PointF(t.x,i.i(a.a)(t.y+p));s>0;){var h=this.bottomTier[this.bottomTierIndex];if(this.bottomTier.length>this.bottomTierIndex){var d=!0,u=h.width;s<u&&(u=s,d=!1,h.completedWidth=u),this.triggerQueryTimelinecell(e,this.bottomTierPoint.x,this.bottomTierPoint.y,this.bottomTierHeight,u,h.value,!1),this.bottomTierPoint.x=this.bottomTierPoint.x+i.i(a.a)(u),s-=u,h.completedWidth=u,d&&this.bottomTierIndex++}else s=0}},e.prototype.drawPageTimeline=function(e,t,r){this.topTierPoint=i.i(n.extend)({},{},t,!0);for(var s=this.prevTopTierIndex;s<=this.topTierIndex;s++)if(this.topTier.length>s){var o=this.topTier[s];o.completedWidth>0&&(this.triggerQueryTimelinecell(e,this.topTierPoint.x,this.topTierPoint.y,this.topTierHeight,o.completedWidth,o.value,!0),this.topTierPoint.x+=i.i(a.a)(o.completedWidth))}this.bottomTierPoint.x=t.x,this.bottomTierPoint.y=i.i(a.a)(t.y+this.topTierHeight);for(var s=this.prevBottomTierIndex;s<=this.bottomTierIndex;s++)if(this.bottomTier.length>s){var l=this.bottomTier[s];l.completedWidth>0&&(this.triggerQueryTimelinecell(e,this.bottomTierPoint.x,this.bottomTierPoint.y,this.bottomTierHeight,l.width,l.value,!1),this.bottomTierPoint.x=this.bottomTierPoint.x+i.i(a.a)(l.width))}},e.prototype.triggerQueryTimelinecell=function(e,t,s,o,l,d,p){var h=e.graphics,u={},c=this.gantt.ganttStyle;u.borderColor=new r.PdfColor(c.timeline.borderColor),u.fontColor=new r.PdfColor(c.timeline.fontColor),u.fontSize=c.timeline.fontSize,u.fontStyle=c.timeline.fontStyle,u.backgroundColor=new r.PdfColor(c.timeline.backgroundColor),c.timeline.padding&&(u.padding=c.timeline.padding);var g=new r.PdfStringFormat;i.i(n.isNullOrUndefined)(c.timeline.format)?p?(g.lineAlignment=r.PdfVerticalAlignment.Middle,g.alignment=r.PdfTextAlignment.Left):(g.lineAlignment=r.PdfVerticalAlignment.Middle,g.alignment=r.PdfTextAlignment.Center,g.wordWrap=r.PdfWordWrapType.Character):g=c.timeline.format,u.format=g;var f={timelineCell:u,value:d};this.parent.pdfQueryTimelineCellInfo&&this.parent.trigger("pdfQueryTimelineCellInfo",f);var m=f.timelineCell,y=new r.PdfPen(f.timelineCell.borderColor),v=new r.PdfSolidBrush(f.timelineCell.backgroundColor);h.drawRectangle(y,v,t,s,i.i(a.a)(l),i.i(a.a)(o));var D=new r.PdfStandardFont(c.fontFamily,m.fontSize,m.fontStyle);c.font&&(D=c.font);var w=new r.PdfSolidBrush(f.timelineCell.fontColor),k=c.timeline.padding?f.timelineCell.padding.left:0,S=c.timeline.padding?f.timelineCell.padding.top:0;h.drawString(f.value,D,null,w,t+k,s+S,i.i(a.a)(l),i.i(a.a)(o),m.format)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"type",void 0),a([i.i(r.Property)(null)],t.prototype,"headerText",void 0),a([i.i(r.Property)([])],t.prototype,"fields",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"from",void 0),a([i.i(r.Property)(null)],t.prototype,"to",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"type",void 0),a([i.i(r.Property)(null)],t.prototype,"headerText",void 0),a([i.i(r.Property)([])],t.prototype,"fields",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(!1)],t.prototype,"allowEditing",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowAdding",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowDeleting",void 0),a([i.i(r.Property)("Auto")],t.prototype,"mode",void 0),a([i.i(r.Property)("Top")],t.prototype,"newRowPosition",void 0),a([i.i(r.Property)(!1)],t.prototype,"showDeleteConfirmDialog",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowTaskbarEditing",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowNextRowEdit",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"day",void 0),a([i.i(r.Property)(null)],t.prototype,"label",void 0),a([i.i(r.Property)(null)],t.prototype,"cssClass",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(5)),a=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),s=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),s([i.i(r.Collection)([],n.Predicate)],t.prototype,"columns",void 0),s([i.i(r.Property)("Menu")],t.prototype,"type",void 0),s([i.i(r.Property)()],t.prototype,"operators",void 0),s([i.i(r.Property)(!1)],t.prototype,"ignoreAccent",void 0),s([i.i(r.Property)("Parent")],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"from",void 0),a([i.i(r.Property)(null)],t.prototype,"to",void 0),a([i.i(r.Property)(null)],t.prototype,"label",void 0),a([i.i(r.Property)(null)],t.prototype,"cssClass",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"rightLabel",void 0),a([i.i(r.Property)(null)],t.prototype,"leftLabel",void 0),a([i.i(r.Property)(null)],t.prototype,"taskLabel",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"id",void 0),a([i.i(r.Property)(null)],t.prototype,"name",void 0),a([i.i(r.Property)(null)],t.prototype,"unit",void 0),a([i.i(r.Property)(null)],t.prototype,"group",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)([])],t.prototype,"fields",void 0),a([i.i(r.Property)(!1)],t.prototype,"ignoreCase",void 0),a([i.i(r.Property)("contains")],t.prototype,"operator",void 0),a([i.i(r.Property)("")],t.prototype,"key",void 0),a([i.i(r.Property)("Parent")],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)("Row")],t.prototype,"mode",void 0),a([i.i(r.Property)("Flow")],t.prototype,"cellSelectionMode",void 0),a([i.i(r.Property)("Single")],t.prototype,"type",void 0),a([i.i(r.Property)(!1)],t.prototype,"persistSelection",void 0),a([i.i(r.Property)(!1)],t.prototype,"enableToggle",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return o});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)()],t.prototype,"field",void 0),a([i.i(r.Property)()],t.prototype,"direction",void 0),t}(r.ChildProperty),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Collection)([],s)],t.prototype,"columns",void 0),a([i.i(r.Property)(!0)],t.prototype,"allowUnsort",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"position",void 0),a([i.i(r.Property)(-1)],t.prototype,"columnIndex",void 0),a([i.i(r.Property)(4)],t.prototype,"separatorSize",void 0),a([i.i(r.Property)(null)],t.prototype,"minimum",void 0),a([i.i(r.Property)("Default")],t.prototype,"view",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"id",void 0),a([i.i(r.Property)(null)],t.prototype,"name",void 0),a([i.i(r.Property)(null)],t.prototype,"parentID",void 0),a([i.i(r.Property)(null)],t.prototype,"startDate",void 0),a([i.i(r.Property)(null)],t.prototype,"endDate",void 0),a([i.i(r.Property)(null)],t.prototype,"dependency",void 0),a([i.i(r.Property)(null)],t.prototype,"progress",void 0),a([i.i(r.Property)(null)],t.prototype,"child",void 0),a([i.i(r.Property)(null)],t.prototype,"milestone",void 0),a([i.i(r.Property)(null)],t.prototype,"duration",void 0),a([i.i(r.Property)(null)],t.prototype,"durationUnit",void 0),a([i.i(r.Property)(null)],t.prototype,"cssClass",void 0),a([i.i(r.Property)(null)],t.prototype,"baselineStartDate",void 0),a([i.i(r.Property)(null)],t.prototype,"baselineEndDate",void 0),a([i.i(r.Property)(null)],t.prototype,"resourceInfo",void 0),a([i.i(r.Property)(null)],t.prototype,"expandState",void 0),a([i.i(r.Property)(null)],t.prototype,"indicators",void 0),a([i.i(r.Property)(null)],t.prototype,"notes",void 0),a([i.i(r.Property)(null)],t.prototype,"work",void 0),a([i.i(r.Property)(null)],t.prototype,"manual",void 0),a([i.i(r.Property)(null)],t.prototype,"type",void 0),a([i.i(r.Property)(null)],t.prototype,"segments",void 0),a([i.i(r.Property)(null)],t.prototype,"segmentId",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return o});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)("")],t.prototype,"format",void 0),a([i.i(r.Property)("None")],t.prototype,"unit",void 0),a([i.i(r.Property)(1)],t.prototype,"count",void 0),a([i.i(r.Property)(null)],t.prototype,"formatter",void 0),t}(r.ChildProperty),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)("Week")],t.prototype,"timelineViewMode",void 0),a([i.i(r.Complex)({},s)],t.prototype,"topTier",void 0),a([i.i(r.Complex)({},s)],t.prototype,"bottomTier",void 0),a([i.i(r.Property)(33)],t.prototype,"timelineUnitSize",void 0),a([i.i(r.Property)(0)],t.prototype,"weekStartDay",void 0),a([i.i(r.Property)(null)],t.prototype,"weekendBackground",void 0),a([i.i(r.Property)(!0)],t.prototype,"showTooltip",void 0),a([i.i(r.Property)(!0)],t.prototype,"updateTimescaleView",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(!0)],t.prototype,"showTooltip",void 0),a([i.i(r.Property)()],t.prototype,"taskbar",void 0),a([i.i(r.Property)()],t.prototype,"baseline",void 0),a([i.i(r.Property)()],t.prototype,"connectorLine",void 0),a([i.i(r.Property)()],t.prototype,"editing",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(2)),a=i(4),s=(i.n(a),i(3)),o=i(10),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d=function(e){function t(t){var i=e.call(this,t)||this;return i.taskBarHeight=0,i.milestoneHeight=0,i.milesStoneRadius=0,i.baselineTop=0,i.baselineHeight=8,i.touchLeftConnectorpoint="",i.touchRightConnectorpoint="",i.dropSplit=!1,i.refreshedTr=[],i.refreshedData=[],i.isUpdated=!0,i.parent=t,i.initPublicProp(),i.addEventListener(),i}return l(t,e),t.prototype.initPublicProp=function(){this.ganttChartTableBody=null},t.prototype.addEventListener=function(){this.parent.on("renderPanels",this.createChartTable,this),this.parent.on("dataReady",this.initiateTemplates,this),this.parent.on("destroy",this.destroy,this)},t.prototype.refreshChartByTimeline=function(){this.taskTable.style.width=i.i(r.formatUnit)(this.parent.timelineModule.totalTimelineWidth);var e=i.i(r.getValue)("prevProjectStartDate",this.parent.dataOperation),t=!1;e&&(t=e.getTime()===this.parent.cloneProjectStartDate.getTime()),this.isUpdated=!!(this.parent.isFromOnPropertyChange&&t&&i.i(r.getValue)("mutableData",this.parent.treeGrid.grid.contentModule)),this.refreshGanttRows(),this.isUpdated=!0},t.prototype.createChartTable=function(){this.taskTable=i.i(r.createElement)("table",{className:s._35+" "+s._36,id:"GanttTaskTable"+this.parent.element.id,styles:"z-index: 2;position: absolute;width:"+this.parent.timelineModule.totalTimelineWidth+"px;",attrs:{cellspacing:"0.25px"}});var e=i.i(r.createElement)("colgroup"),t=i.i(r.createElement)("col",{styles:"width:"+this.parent.timelineModule.totalTimelineWidth+"px;"});e.appendChild(t),this.taskTable.appendChild(e),this.ganttChartTableBody=i.i(r.createElement)("tbody",{id:this.parent.element.id+"GanttTaskTableBody"}),this.taskTable.appendChild(this.ganttChartTableBody),this.parent.ganttChartModule.chartBodyContent.appendChild(this.taskTable)},t.prototype.initiateTemplates=function(){this.taskTable.style.width=i.i(r.formatUnit)(this.parent.timelineModule.totalTimelineWidth),this.initChartHelperPrivateVariable(),this.initializeChartTemplate()},t.prototype.renderChartRows=function(){this.createTaskbarTemplate(),this.parent.isGanttChartRendered=!0},t.prototype.getIndicatorNode=function(e){var t='<label class="'+s._37+" "+s._38+'"style="line-height:'+this.parent.rowHeight+"px;left:"+this.getIndicatorleft(e.date)+'px;"><i class="'+e.iconClass+'"></i> </label>';return this.createDivElement(t)},t.prototype.getIndicatorleft=function(e){return e=this.parent.dateValidationModule.getDateFromFormat(e),this.parent.dataOperation.getTaskLeft(e,!1)},t.prototype.getChildTaskbarNode=function(e,t){var n=null,a=this.templateData;if(this.childTaskbarTemplateFunction)n=this.childTaskbarTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"TaskbarTemplate",this.getTemplateID("TaskbarTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var o="",l="",d=void 0,p=void 0;a.ganttProperties.startDate&&a.ganttProperties.endDate&&a.ganttProperties.duration&&(d=this.createDivElement('<div class="'+s.T+" "+s._7+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="width:'+a.ganttProperties.width+"px;height:"+this.taskBarHeight+'px;"></div>'),p=this.createDivElement('<div class="'+s._40+" "+s._6+" "+(a.ganttProperties.isAutoSchedule?"":s._41)+'" style="border-style:'+(a.ganttProperties.progressWidth?"solid;":"none;")+"width:"+a.ganttProperties.progressWidth+"px;height:100%;border-top-right-radius:"+this.getBorderRadius(a.ganttProperties)+"px;border-bottom-right-radius:"+this.getBorderRadius(a.ganttProperties)+'px;"></div>'));var h=i.i(r.createElement)("div");if(this.taskLabelTemplateFunction&&!i.i(r.isNullOrUndefined)(p)&&p.length>0){var u=this.taskLabelTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"TaskLabelTemplate",this.getTemplateID("TaskLabelTemplate"),!1,void 0,p[0]);u&&u.length>0&&(h.appendChild(u[0]),o=h.innerHTML)}else o=this.getTaskLabel(this.parent.labelSettings.taskLabel),o="isCustomTemplate"===o?this.parent.labelSettings.taskLabel:o;-1===o.indexOf("null")&&("isCustomTemplate"!==this.getTaskLabel(this.parent.labelSettings.taskLabel)||this.isTemplate(this.parent.labelSettings.taskLabel)||(o=""),l=isNaN(parseInt(o))?'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px; text-align: left;display:inline-block;width:"+(a.ganttProperties.width-10)+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>":'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px;"+("ResourceView"===this.parent.viewType?"text-align: left;":"")+ +("ResourceView"===this.parent.viewType?"display:inline-flex;":"")+ +("ResourceView"===this.parent.viewType?a.ganttProperties.width-10:"")+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>");var c=!i.i(r.isNullOrUndefined)(a.ganttProperties.segments)&&a.ganttProperties.segments.length>0?this.splitTaskbar(a,o):a.ganttProperties.startDate&&a.ganttProperties.endDate&&a.ganttProperties.duration?l:!a.ganttProperties.startDate||a.ganttProperties.endDate||a.ganttProperties.duration?!a.ganttProperties.endDate||a.ganttProperties.startDate||a.ganttProperties.duration?!a.ganttProperties.duration||a.ganttProperties.startDate||a.ganttProperties.endDate?"":'<div class="'+s._40+" "+s._7+" "+s._45+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="left:'+a.ganttProperties.left+"px; width:"+a.ganttProperties.width+"px; height:"+this.taskBarHeight+'px;"></div>':'<div class="'+s._40+" "+s._7+" "+s._44+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="left:'+a.ganttProperties.left+"px; height:"+this.taskBarHeight+'px;"></div>':'<div class="'+s._40+" "+s._7+" "+s._43+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="left:'+a.ganttProperties.left+"px; height:"+this.taskBarHeight+'px;"></div>';if(a.ganttProperties.startDate&&a.ganttProperties.endDate&&a.ganttProperties.duration&&(i.i(r.isNullOrUndefined)(a.ganttProperties.segments)||!i.i(r.isNullOrUndefined)(a.ganttProperties.segments)&&0===a.ganttProperties.segments.length)){if(""!==c&&!i.i(r.isNullOrUndefined)(p)&&p.length>0){var g=this.createDivElement(c)[0],f=this.parent.labelSettings.taskLabel;f&&f.elementRef&&g.appendChild(h),p[0].appendChild(g),""!==p[0].querySelectorAll(".e-task-label")[0].textContent&&!this.isTemplate(f)&&p[0].querySelectorAll(".e-task-label")[0].children[0]&&p[0].querySelectorAll(".e-task-label")[0].children[0].remove(),""==p[0].querySelectorAll(".e-task-label")[0].textContent&&f&&!f.elementRef&&""!==h.innerHTML&&(p[0].querySelectorAll(".e-task-label")[0].textContent=f)}!i.i(r.isNullOrUndefined)(d)&&d.length>0&&d[0].appendChild([].slice.call(p)[0]),n=d}else n=this.createDivElement(c)}return n},t.prototype.splitTaskbar=function(e,t){for(var i="",r=0;r<e.ganttProperties.segments.length;r++){var n=e.ganttProperties.segments[r],a=void 0;a=n.showProgress?"initial":"hidden";var o=0===r?"e-segment-first":r===e.ganttProperties.segments.length-1?"e-segment-last":"e-segment-inprogress";i+='<div class="'+s.T+" "+o+" "+s._7+' e-segmented-taskbar"style="width:'+n.width+"px;position: absolute; left:"+n.left+"px;height:"+this.taskBarHeight+"px; overflow:"+a+';" data-segment-index = "'+r+'" aria-label = "'+this.generateSpiltTaskAriaLabel(n,e.ganttProperties)+'"> '+this.getSplitTaskbarLeftResizerNode()+'<div class="'+s._40+" "+s._6+' " style="border-style:'+(n.progressWidth?"solid;":"none;")+"display:"+(n.progressWidth>=0?"block;":"none;")+"width:"+n.progressWidth+"px;height:100%;border-top-right-radius:"+this.getSplitTaskBorderRadius(n)+"px;border-bottom-right-radius:"+this.getSplitTaskBorderRadius(n)+'px;"><span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px;display:"+(n.showProgress?"inline;":"none;")+"height:"+this.taskBarHeight+'px;">'+t+"</span></div>"+this.getSplitTaskbarRightResizerNode(n)+(n.showProgress?this.getSplitProgressResizerNode(n):"")+"</div></div>"}return i},t.prototype.getSplitTaskbarLeftResizerNode=function(){var e=-(this.parent.isAdaptive?12:2);return'<div class="'+s.U+" "+s._46+'" style="left:'+e+"px;height:"+this.taskBarHeight+'px;"></div>'},t.prototype.getSplitTaskbarRightResizerNode=function(e){var t=this.parent.isAdaptive?-2:-10;return'<div class="'+s.W+" "+s._46+'" style="left:'+(e.width+t)+"px;height:"+this.taskBarHeight+'px;"></div>'},t.prototype.getSplitProgressResizerNode=function(e){return'<div class="'+s.Y+'" style="left:'+(e.progressWidth-6)+"px;margin-top:"+(this.taskBarHeight-4)+'px;"><div class="'+s._47+'"><div class="'+s._48+'"></div><div class="'+s._49+'"></div></div>'},t.prototype.getSegmentIndex=function(e,t){var n=-1,a=t.ganttProperties,s=a.segments;if(!i.i(r.isNullOrUndefined)(s)){s.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()});for(var o=s.length,l=0;l<o;l++){var d=s[l];if(e.getTime()===a.startDate.getTime())this.dropSplit=!0,n=0;else if(e.getTime()===d.startDate.getTime()){this.dropSplit=!0;var p=d.startDate;p.setDate(p.getDate()+1),p=d.startDate=this.parent.dataOperation.checkStartDate(p,a,!1),d.startDate=p;var h=d.endDate;h=this.parent.dataOperation.getEndDate(p,d.duration,a.durationUnit,a,!1),d.endDate=h,l===s.length-1&&this.parent.setRecordValue("endDate",h,a,!0),this.incrementSegments(s,l,t),n=d.segmentIndex}else d.endDate=this.parent.dataOperation.getEndDate(d.startDate,d.duration,a.durationUnit,a,!1),e.getTime()>=d.startDate.getTime()&&e.getTime()<=d.endDate.getTime()&&(n=d.segmentIndex);this.parent.setRecordValue("segments",a.segments,a,!0)}}return-1===n&&(this.dropSplit=!0),n},t.prototype.mergeTask=function(e,t){var i=t.length,r=this.parent.taskFields,n=this.parent.flatData.filter(function(t){return t[r.id]===e?t:null})[0],a=n.ganttProperties.segments;t=t.sort(function(e,t){return t.firstSegmentIndex-e.firstSegmentIndex});for(var s=0;s<i;s++){var o=a[t[s].firstSegmentIndex],l=a[t[s].secondSegmentIndex],d=o.duration+l.duration,p=this.parent.dataOperation.getEndDate(o.startDate,d,n.ganttProperties.durationUnit,n.ganttProperties,!1),h={startDate:o.startDate,endDate:p,duration:d},u=t[s].firstSegmentIndex;a.splice(u,2,h),this.parent.setRecordValue("segments",a,n.ganttProperties,!0),this.parent.dataOperation.updateMappingData(n,"segments"),1===a.length?(this.parent.setRecordValue("endDate",p,n.ganttProperties,!0),this.parent.setRecordValue("EndDate",p,n,!0),this.parent.setRecordValue("segments",null,n.ganttProperties,!0),this.parent.dataOperation.updateMappingData(n,"segments")):n.ganttProperties.endDate!==a[a.length-1].endDate&&this.parent.setRecordValue("endDate",a[a.length-1].endDate,n.ganttProperties,!0)}this.refreshChartAfterSegment(n,"mergeSegment")},t.prototype.refreshChartAfterSegment=function(e,t){this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(e,!1),e.ganttProperties,!0),this.parent.dataOperation.updateMappingData(e,"segments"),this.parent.dataOperation.updateWidthLeft(e),this.parent.predecessorModule&&this.parent.taskFields.dependency?(this.parent.predecessorModule.updatedRecordsDateByPredecessor(),this.parent.connectorLineModule.removePreviousConnectorLines(this.parent.flatData),this.parent.connectorLineEditModule.refreshEditedRecordConnectorLine(this.parent.flatData),e.parentItem&&this.parent.getParentTask(e.parentItem).ganttProperties.isAutoSchedule&&this.parent.isInPredecessorValidation&&this.parent.dataOperation.updateParentItems(e.parentItem),this.refreshRecords(this.parent.currentViewData)):this.refreshRow(this.parent.currentViewData.indexOf(e));var n=this.ganttChartTableBody.querySelectorAll("tr")[this.parent.currentViewData.indexOf(e)],a={requestType:t,rowData:e};this.triggerQueryTaskbarInfoByIndex(n,e),this.parent.selectionModule.clearSelection();var s=a.rowData.taskData[this.parent.taskFields.segments];if(this.parent.timezone&&null!=s)for(var o=0;o<s.length;o++)s[o][this.parent.taskFields.startDate]=this.parent.dateValidationModule.remove(a.rowData.ganttProperties.segments[o].startDate,this.parent.timezone),this.parent.taskFields.endDate&&(s[o][this.parent.taskFields.endDate]=this.parent.dateValidationModule.remove(a.rowData.ganttProperties.segments[o].endDate,this.parent.timezone));this.parent.trigger("actionComplete",a),i.i(r.setValue)("isEdit",!1,this.parent.contextMenuModule),i.i(r.setValue)("isEdit",!1,this.parent)},t.prototype.splitTask=function(e,t){var n=this.parent.taskFields,a=t,s=this.parent.flatData.filter(function(t){return t[n.id]===e?t:null})[0],o=s.ganttProperties;this.dropSplit=!1;var l=-1,d=o.segments;if(i.i(r.isNullOrUndefined)(t.length)||t.length<0){var p=this.parent.dataOperation.checkStartDate(a,o,!1);if(p.getTime()!==o.startDate.getTime()&&o.isAutoSchedule){if(i.i(r.isNullOrUndefined)(d)||(l=this.getSegmentIndex(p,s)),!1===this.dropSplit&&a.getTime()>o.startDate.getTime()&&a.getTime()<o.endDate.getTime()){d=-1!==l?d:[];var h=-1!==l?d[l].startDate:new Date(o.startDate.getTime()),u=-1!==l?d[l].endDate:new Date(o.endDate.getTime()),c=this.parent.dataOperation.getDuration(h,u,o.durationUnit,o.isAutoSchedule,o.isMilestone);this.parent.setRecordValue("segments",this.splitSegmentedTaskbar(h,u,a,l,d,s,c),o,!0),-1!==l&&this.incrementSegments(d,l+1,s),this.parent.setRecordValue("endDate",d[d.length-1].endDate,o,!0),this.parent.taskFields.endDate&&this.parent.dataOperation.updateMappingData(s,"endDate")}this.refreshChartAfterSegment(s,"splitTaskbar")}}else t.sort(function(e,t){return e.getTime()-t.getTime()}),this.parent.setRecordValue("segments",this.constructSegments(t,s.ganttProperties),s.ganttProperties,!0),this.refreshChartAfterSegment(s,"splitTask")},t.prototype.constructSegments=function(e,t){for(var i,r,n,a=[],s=new Date,o=0;o<e.length+1&&(s=0===o?t.startDate:s,s=this.parent.dataOperation.checkStartDate(s,t,!1),r=o!==e.length?new Date(e[o].getTime())>t.endDate?t.endDate:new Date(e[o].getTime()):t.endDate,r=this.parent.dataOperation.checkEndDate(r,t,!1),n=this.parent.dataOperation.getDuration(s,r,t.durationUnit,t.isAutoSchedule,t.isMilestone),r.getTime()>=s.getTime()&&(i={startDate:s,endDate:r,duration:n},a.push(i)),o!==e.length);o++)s=new Date(e[o].getTime()),s.setDate(e[o].getDate()+1);return a},t.prototype.splitSegmentedTaskbar=function(e,t,i,r,n,a,s){var o=a.ganttProperties,l=this.parent.nonWorkingDayIndex.indexOf(i.getDay()),d=-1===l?0:0===l?1:2;e=this.parent.dataOperation.checkStartDate(e,o,!1);var p=new Date(i.getTime());p=this.parent.dataOperation.checkEndDate(p,o,!1);for(var h=0;h<2;h++){var u={startDate:e,endDate:p,duration:this.parent.dataOperation.getDuration(e,p,o.durationUnit,o.isAutoSchedule,o.isMilestone),offsetDuration:1},c=this.parent.nonWorkingDayIndex.indexOf(p.getDay());-1!==r&&(n.splice(r,1),r=-1),n.push(u);var g=this.parent.timelineModule.customTimelineSettings.bottomTier.unit;if("Hour"===g||"Minutes"===g){e=new Date(i.getTime()),e=this.parent.dataOperation.checkStartDate(e,o,!1);var f=this.parent.timelineModule.customTimelineSettings.bottomTier.count,m=this.parent.timelineModule.customTimelineSettings.bottomTier.unit,y=this.parent.timelineModule.getIncrement(e,f,m),v=e.getTime()+y;e.setTime(v+d),p=new Date(t.getTime()),y=this.parent.timelineModule.getIncrement(p,f,m),v=p.getTime()+y,p.setTime(v+d)}else e=new Date(i.getTime()),e.setDate(e.getDate()+1+d),this.setTime(this.parent.defaultStartTime,e),e=this.parent.dataOperation.checkStartDate(e,o,!1),p=new Date(t.getTime()),p.setDate(p.getDate()+1);if(-1!==c){var D=s-u.duration;p=this.parent.dataOperation.getEndDate(e,D,o.durationUnit,o,!1)}else p=this.parent.dataOperation.checkEndDate(p,o,!1)}return n.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()}),n},t.prototype.incrementSegments=function(e,t,i){for(var r=i.ganttProperties,n=t+1;n<e.length;n++){var a=e[n],s=0!==n?new Date(e[n-1].endDate.getTime()):new Date(a.startDate.getTime());s=this.parent.dataOperation.getEndDate(s,a.offsetDuration,r.durationUnit,r,!1),s=this.parent.dataOperation.checkStartDate(s,r,!1),a.startDate=s;var o=a.endDate=this.parent.dataOperation.getEndDate(s,a.duration,r.durationUnit,r,!1);a.endDate=o,n===e.length-1&&(this.parent.setRecordValue("endDate",o,r,!0),this.parent.taskFields.endDate&&this.parent.dataOperation.updateMappingData(i,"endDate"))}e.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()}),this.parent.setRecordValue("segments",e,r,!0),this.parent.dataOperation.updateMappingData(i,"segments")},t.prototype.getMilestoneNode=function(e,t){var n=null,a=this.templateData;if(this.milestoneTemplateFunction)n=this.milestoneTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"MilestoneTemplate",this.getTemplateID("MilestoneTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var o='<div class="'+s._50+'" style="position:absolute;"><div class="'+s._51+" "+(a.ganttProperties.startDate||a.ganttProperties.endDate?"":s._52)+'" style="border-right-width:'+this.milesStoneRadius+"px;border-left-width:"+this.milesStoneRadius+"px;border-bottom-width:"+this.milesStoneRadius+'px;"></div><div class="'+s._53+" "+(a.ganttProperties.startDate||a.ganttProperties.endDate?"":s._54)+'" style="top:'+this.milesStoneRadius+"px;border-right-width:"+this.milesStoneRadius+"px; border-left-width:"+this.milesStoneRadius+"px; border-top-width:"+this.milesStoneRadius+'px;"></div></div>';n=this.createDivElement(o)}return n},t.prototype.getTaskBaselineNode=function(){var e=this.templateData,t='<div class="'+s._55+' " role="term" style="margin-top:'+this.baselineTop+"px;left:"+e.ganttProperties.baselineLeft+"px;width:"+e.ganttProperties.baselineWidth+"px;height:"+this.baselineHeight+"px;"+(this.baselineColor?"background-color: "+this.baselineColor+";":"")+'"></div>';return this.createDivElement(t)},t.prototype.getMilestoneBaselineNode=function(){var e=this.templateData,t=this.parent.renderBaseline?5:2,i='<div class="'+s._56+' " style="left:'+(e.ganttProperties.baselineLeft-this.milesStoneRadius)+"px;margin-top:"+(-Math.floor(this.parent.rowHeight-this.milestoneMarginTop)+t)+'px"><div class="'+s._57+'"><div class="'+s._57+" "+s._58+'" style="top:'+-this.milestoneHeight+"px;border-right:"+this.milesStoneRadius+"px solid transparent;border-left:"+this.milesStoneRadius+"px solid transparent;border-top:0pxsolid transparent;border-bottom-width:"+this.milesStoneRadius+"px;border-bottom-style: solid;"+(this.baselineColor?"border-bottom-color: "+this.baselineColor+";":"")+'"></div><div class="'+s._57+" "+s._59+'" style="top:'+(this.milesStoneRadius-this.milestoneHeight)+"px;border-right:"+this.milesStoneRadius+"px solid transparent;border-left:"+this.milesStoneRadius+"px solid transparent;border-bottom:0pxsolid transparent;border-top-width:"+this.milesStoneRadius+"px;border-top-style: solid;"+(this.baselineColor?"border-top-color: "+this.baselineColor+";":"")+'"></div></div></div>';return this.createDivElement(i)},t.prototype.getLeftLabelNode=function(e){var t=this.leftLabelContainer();""!==this.generateTaskLabelAriaLabel("left")&&t[0].setAttribute("aria-label",this.generateTaskLabelAriaLabel("left"));var n=null;if(this.leftTaskLabelTemplateFunction)n=this.leftTaskLabelTemplateFunction(i.i(r.extend)({index:e},this.templateData),this.parent,"LeftLabelTemplate",this.getTemplateID("LeftLabelTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var a=this.parent.labelSettings.leftLabel,o=this.getTaskLabel(a);o&&(o="isCustomTemplate"===o?a:o,n=this.getLableText(o,s._60))}return n&&n.length>0&&("null"===n[0].data&&(n[0].data=""),t[0].appendChild([].slice.call(n)[0])),t},t.prototype.getLableText=function(e,t){var n=this.parent.renderBaseline?(this.parent.rowHeight-this.taskBarHeight)/2:this.taskBarMarginTop,a=i.i(r.createElement)("div",{className:t,styles:"height:"+this.taskBarHeight+"px;margin-top:"+n+"px;"}),o=i.i(r.createElement)("span",{className:s._37});o[this.parent.disableHtmlEncode?"textContent":"innerHTML"]=e,a.appendChild(o);var l=i.i(r.createElement)("div");return l.appendChild(a),l.childNodes},t.prototype.getRightLabelNode=function(e){var t=this.rightLabelContainer();""!==this.generateTaskLabelAriaLabel("right")&&t[0].setAttribute("aria-label",this.generateTaskLabelAriaLabel("right"));var n=null;if(this.rightTaskLabelTemplateFunction)n=this.rightTaskLabelTemplateFunction(i.i(r.extend)({index:e},this.templateData),this.parent,"RightLabelTemplate",this.getTemplateID("RightLabelTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var a=this.parent.labelSettings.rightLabel,o=this.getTaskLabel(a);o&&(o="isCustomTemplate"===o?a:o,n=this.getLableText(o,s._61))}return n&&n.length>0&&("null"===n[0].data&&(n[0].data=""),t[0].appendChild([].slice.call(n)[0])),t},t.prototype.getManualTaskbar=function(){var e=this.templateData,t=this.taskBarHeight/2-1,i=e.ganttProperties.startDate&&e.ganttProperties.endDate&&e.ganttProperties.duration?'<div class="'+s.P+'" style="width:'+e.ganttProperties.width+"px;height:"+t/5+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div>':e.ganttProperties.startDate||e.ganttProperties.endDate||!e.ganttProperties.duration?'<div class="'+s.P+" "+(e.ganttProperties.startDate?s._43:s._44)+'" style="width:'+e.ganttProperties.width+"px;height:"+2*t+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div>':'<div class="'+s.P+" "+s._62+'" style="width:'+e.ganttProperties.width+"px;height:"+(t/5+1)+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div>',r='<div class="'+s.O+'"style=left:'+(e.ganttProperties.left-e.ganttProperties.autoLeft)+"px;width:"+e.ganttProperties.width+"px;height:"+t+"px;>"+i+(e.ganttProperties.startDate&&e.ganttProperties.endDate&&e.ganttProperties.duration||e.ganttProperties.duration?'<div class="e-gantt-manualparenttaskbar-left" style="height:'+t+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div><div class="e-gantt-manualparenttaskbar-right" style=left:'+(e.ganttProperties.width-t/5)+"px;height:"+t+"px;border-right-width:"+t/5+"px;border-bottom:"+t/5+"px solid transparent;></div></div>":""),n='<div class="'+s.S+'" style="position:absolute;left:'+(e.ganttProperties.left-e.ganttProperties.autoLeft-this.milestoneHeight/2)+"px;width:"+2*this.milesStoneRadius+'px;"><div class="'+s.Q+'" style="border-right-width:'+this.milesStoneRadius+"px;border-left-width:"+this.milesStoneRadius+"px;border-bottom-width:"+this.milesStoneRadius+'px;"></div><div class="'+s.R+'" style="top:'+this.milesStoneRadius+"px;border-right-width:"+this.milesStoneRadius+"px; border-left-width:"+this.milesStoneRadius+"px; border-top-width:"+this.milesStoneRadius+'px;"></div></div>';return this.createDivElement(0===e.ganttProperties.width?n:r)},t.prototype.getParentTaskbarNode=function(e,t){var n=null,a=this.templateData;if(this.parentTaskbarTemplateFunction)n=this.parentTaskbarTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"ParentTaskbarTemplate",this.getTemplateID("ParentTaskbarTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var o="",l=void 0,d=this.taskBarHeight/5,p=this.createDivElement('<div class="'+s._63+" "+this.getExpandClass(a)+" "+s._8+'" style="width:'+(a.ganttProperties.isAutoSchedule?a.ganttProperties.width:a.ganttProperties.autoWidth)+"px;height:"+(a.ganttProperties.isAutoSchedule?this.taskBarHeight:3*d)+"px;margin-top:"+(a.ganttProperties.isAutoSchedule?"":2*d)+'px;"></div>'),h=this.createDivElement('<div class="'+s._64+" "+this.getExpandClass(a)+" "+s._9+'" style="border-style:'+(a.ganttProperties.progressWidth?"solid;":"none;")+"width:"+a.ganttProperties.progressWidth+"px;border-top-right-radius:"+this.getBorderRadius(a)+"px;border-bottom-right-radius:"+this.getBorderRadius(a)+'px;height:100%;"></div>'),u=i.i(r.createElement)("div");if(this.taskLabelTemplateFunction){var c=this.taskLabelTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"TaskLabelTemplate",this.getTemplateID("TaskLabelTemplate"),!1,void 0,h[0]);c&&c.length>0&&(u.appendChild(c[0]),o=u.innerHTML)}else o=this.getTaskLabel(this.parent.labelSettings.taskLabel),o="isCustomTemplate"===o?this.parent.labelSettings.taskLabel:o;if(-1===o.indexOf("null")){"isCustomTemplate"!==this.getTaskLabel(this.parent.labelSettings.taskLabel)||this.isTemplate(this.parent.labelSettings.taskLabel)||(o=""),l=isNaN(parseInt(o))?'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px; text-align: left;display:inline-block;width:"+(a.ganttProperties.width-10)+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>":'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px;"+("ResourceView"===this.parent.viewType?"display:inline-flex;":"")+("ResourceView"===this.parent.viewType?"width:"+(a.ganttProperties.width-10):"")+"px; height:"+(this.taskBarHeight-1)+"px;"+("ResourceView"===this.parent.viewType?"display: inline-flex;":"")+("ResourceView"===this.parent.viewType?"width:"+(a.ganttProperties.width-10):"")+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>";var g=this.createDivElement(l)[0],f=this.parent.labelSettings.taskLabel;f&&f.elementRef&&g.appendChild(u),h[0].appendChild(g),""!==h[0].querySelectorAll(".e-task-label")[0].textContent&&!this.isTemplate(f)&&h[0].querySelectorAll(".e-task-label")[0].children[0]&&h[0].querySelectorAll(".e-task-label")[0].children[0].remove(),""==h[0].querySelectorAll(".e-task-label")[0].textContent&&f&&!f.elementRef&&""!==u.innerHTML&&(h[0].querySelectorAll(".e-task-label")[0].textContent=f)}var m='<div class="'+s._65+'" style="position:absolute;"><div class="'+s._66+'" style="border-right-width:'+this.milesStoneRadius+"px;border-left-width:"+this.milesStoneRadius+"px;border-bottom-width:"+this.milesStoneRadius+'px;"></div><div class="'+s._67+'" style="top:'+this.milesStoneRadius+"px;border-right-width:"+this.milesStoneRadius+"px; border-left-width:"+this.milesStoneRadius+"px; border-top-width:"+this.milesStoneRadius+'px;"></div></div>';p[0].appendChild([].slice.call(h)[0]),n=a.ganttProperties.isMilestone?this.createDivElement(a.ganttProperties.isAutoSchedule?m:""):p}return n},t.prototype.getTableTrNode=function(){var e=i.i(r.createElement)("table"),t="Horizontal"===this.parent.gridLines||"Both"===this.parent.gridLines?"e-chart-row-border":"";return e.innerHTML='<tr class="'+this.getRowClassName(this.templateData)+" "+s._3+'"style="display:'+this.getExpandDisplayProp(this.templateData)+";height:"+this.parent.rowHeight+'px;"><td class="'+s._30+" "+t+'"style="width:'+this.parent.timelineModule.totalTimelineWidth+'px;"></td></tr>',e.childNodes},t.prototype.initializeChartTemplate=function(){i.i(r.isNullOrUndefined)(this.parent.parentTaskbarTemplate)||(this.parentTaskbarTemplateFunction=this.templateCompiler(this.parent.parentTaskbarTemplate)),!i.i(r.isNullOrUndefined)(this.parent.labelSettings.leftLabel)&&this.isTemplate(this.parent.labelSettings.leftLabel)&&(this.leftTaskLabelTemplateFunction=this.templateCompiler(this.parent.labelSettings.leftLabel)),!i.i(r.isNullOrUndefined)(this.parent.labelSettings.rightLabel)&&this.isTemplate(this.parent.labelSettings.rightLabel)&&(this.rightTaskLabelTemplateFunction=this.templateCompiler(this.parent.labelSettings.rightLabel)),!i.i(r.isNullOrUndefined)(this.parent.labelSettings.taskLabel)&&this.isTemplate(this.parent.labelSettings.taskLabel)&&(this.taskLabelTemplateFunction=this.templateCompiler(this.parent.labelSettings.taskLabel)),i.i(r.isNullOrUndefined)(this.parent.taskbarTemplate)||(this.childTaskbarTemplateFunction=this.templateCompiler(this.parent.taskbarTemplate)),i.i(r.isNullOrUndefined)(this.parent.milestoneTemplate)||(this.milestoneTemplateFunction=this.templateCompiler(this.parent.milestoneTemplate))},t.prototype.createDivElement=function(e){var t=i.i(r.createElement)("div");return t.innerHTML=e,t.childNodes},t.prototype.isTemplate=function(e){for(var t=!1,i=0;i<this.parent.ganttColumns.length;i++)if(e===this.parent.ganttColumns[i].field){t=!0;break}return t="string"!=typeof e||0===e.indexOf("#")||e.indexOf("<")>-1||e.indexOf("$")>-1||!t},t.prototype.getTemplateID=function(e){return this.parent.element.id+e},t.prototype.leftLabelContainer=function(){var e='<div class="'+(this.leftTaskLabelTemplateFunction?s._68:s._4)+' " tabindex="-1" role="term" style="height:'+(this.parent.rowHeight-2)+"px;width:"+this.taskNameWidth(this.templateData)+'"></div>';return this.createDivElement(e)},t.prototype.taskbarContainer=function(){var e=this.templateData,t=!(!this.parent.editModule||!this.parent.editSettings.allowTaskbarEditing||"ParentResizing"!==this.parent.editModule.taskbarEditModule.taskBarEditAction),i='<div class="'+s.F+" "+this.parent.getUnscheduledTaskClass(e.ganttProperties)+" "+(e.ganttProperties.cssClass?e.ganttProperties.cssClass:"")+'" tabindex="-1" role="term" style="'+(e.ganttProperties.isMilestone&&!t?"width:"+this.milestoneHeight+"px;height:"+this.milestoneHeight+"px;margin-top:"+this.milestoneMarginTop+"px;left:"+(e.ganttProperties.left-this.milestoneHeight/2)+"px;":"width:"+e.ganttProperties.width+"px;margin-top:"+this.taskBarMarginTop+"px;left:"+(!e.hasChildRecords||e.ganttProperties.isAutoSchedule?e.ganttProperties.left:e.ganttProperties.autoLeft)+"px;height:"+this.taskBarHeight+"px;cursor:"+(e.ganttProperties.isAutoSchedule?"move;":"auto;"))+'"></div>';return this.createDivElement(i)},t.prototype.rightLabelContainer=function(){var e='<div class="'+(this.rightTaskLabelTemplateFunction?s._69:s._5)+'" tabindex="-1" role="term" style="left:'+this.getRightLabelLeft(this.templateData)+"px; height:"+(this.parent.rowHeight-2)+'px;"></div>';return this.createDivElement(e)},t.prototype.childTaskbarLeftResizer=function(){var e=-(this.parent.isAdaptive?12:2),t='<div class="'+s.U+" "+s._46+'"style="left:'+e+"px;height:"+this.taskBarHeight+'px;"></div>';return this.createDivElement(t)},t.prototype.childTaskbarRightResizer=function(){var e=this.parent.isAdaptive?-2:-10,t='<div class="'+s.W+" "+s._46+'"style="left:'+(this.templateData.ganttProperties.width+e)+"px;height:"+this.taskBarHeight+'px;"></div>';return this.createDivElement(t)},t.prototype.childTaskbarProgressResizer=function(){var e='<div class="'+s.Y+'"style="left:'+(this.templateData.ganttProperties.progressWidth-6)+"px;margin-top:"+(this.taskBarHeight-4)+'px;"><div class="'+s._47+'"><div class="'+s._48+'"></div><div class="'+s._49+'"></div></div>';return this.createDivElement(e)},t.prototype.getLeftPointNode=function(){var e,t=this.templateData,i=-((this.parent.isAdaptive?14:2)+this.connectorPointWidth),r=-(this.connectorPointWidth+2),n=Math.floor(this.milesStoneRadius-this.connectorPointWidth/2);e=!this.templateData.ganttProperties.isAutoSchedule&&this.templateData.hasChildRecords?"":"margin-top:"+this.connectorPointMargin+"px";var a='<div class="'+s._70+'" style="'+(t.ganttProperties.isMilestone?"margin-top:"+n+"px;left:"+r+"px;":e+";left:"+i+"px;")+'"><div class="'+s.G+" "+this.parent.getUnscheduledTaskClass(t.ganttProperties)+'" style="width: '+this.connectorPointWidth+"px;height: "+this.connectorPointWidth+'px;">'+this.touchLeftConnectorpoint+"</div></div>";return this.createDivElement(a)},t.prototype.getRightPointNode=function(){var e,t=this.templateData,i=this.parent.isAdaptive?10:-2,r=Math.floor(this.milesStoneRadius-this.connectorPointWidth/2);e=!this.templateData.ganttProperties.isAutoSchedule&&this.templateData.hasChildRecords?"":"margin-top:"+this.connectorPointMargin+"px";var n='<div class="'+s._10+'" style="'+(t.ganttProperties.isMilestone?"left:"+(this.milestoneHeight-2)+"px;margin-top:"+r+"px;":"left:"+(t.ganttProperties.width+i)+"px;"+e+";")+'"><div class="'+s.H+" "+this.parent.getUnscheduledTaskClass(t.ganttProperties)+'" style="width:'+this.connectorPointWidth+"px;height:"+this.connectorPointWidth+'px;">'+this.touchRightConnectorpoint+"</div></div>";return this.createDivElement(n)},t.prototype.getTaskLabel=function(e){var t=this.parent.ganttColumns.length,n=null;if(i.i(r.isNullOrUndefined)(e)||""===e)n="";else if(e===this.parent.taskFields.resourceInfo)n=this.getResourceName(this.templateData);else{for(var a=0;a<t;a++)if(e===this.parent.ganttColumns[a].field){n=this.getFieldValue(this.templateData[e]).toString();break}if(i.i(r.isNullOrUndefined)(n))return"isCustomTemplate"}return n},t.prototype.getExpandDisplayProp=function(e){return e=this.templateData,this.parent.getExpandStatus(e)?"table-row":"none"},t.prototype.getRowClassName=function(e){e=this.templateData;var t="gridrowtaskId",i=e.parentItem;return i&&(t+=i.taskId.toString()),t+="level",t+=e.level.toString()},t.prototype.getBorderRadius=function(e){e=this.templateData;var t=e.ganttProperties.width-e.ganttProperties.progressWidth;return t<=4?4-t:0},t.prototype.getSplitTaskBorderRadius=function(e){var t=e.width-e.progressWidth;return t<=4?4-t:0},t.prototype.taskNameWidth=function(e){e=this.templateData;var t,i=e.ganttProperties;return t=e.ganttProperties.isMilestone?e.ganttProperties.left-this.parent.getTaskbarHeight()/2:e.hasChildRecords&&!i.isAutoSchedule?this.parent.allowUnscheduledTasks?i.left<i.autoLeft?i.left:i.autoLeft:i.autoStartDate.getTime()<i.startDate.getTime()?i.autoLeft:i.left:e.ganttProperties.left,t<0&&(t=0),t+"px"},t.prototype.getRightLabelLeft=function(e){e=this.templateData;var t,i,r,n=e.ganttProperties;return e.ganttProperties.isMilestone?e.ganttProperties.left+this.parent.getTaskbarHeight()/2:e.hasChildRecords&&!n.isAutoSchedule?(this.parent.allowUnscheduledTasks?(t=n.left<n.autoLeft?n.left:n.autoLeft,r=n.autoWidth):(t=n.autoStartDate.getTime()<n.startDate.getTime()?n.autoLeft:n.left,i=n.autoEndDate.getTime()<n.endDate.getTime()?this.parent.dataOperation.getTaskLeft(n.endDate,n.isMilestone):this.parent.dataOperation.getTaskLeft(n.autoEndDate,n.isMilestone),r=i-t),t+r):e.ganttProperties.left+e.ganttProperties.width},t.prototype.getExpandClass=function(e){return e=this.templateData,e.expanded?s._71:!e.expanded&&e.hasChildRecords?s._72:""},t.prototype.getFieldValue=function(e){return i.i(r.isNullOrUndefined)(e)?"":e},t.prototype.getResourceName=function(e){e=this.templateData;var t=null;if(!i.i(r.isNullOrUndefined)(e.ganttProperties.resourceInfo)){var n=e.ganttProperties.resourceInfo.length;if(n>0){for(var a=0;a<n;a++){var s=e.ganttProperties.resourceInfo[a][this.parent.resourceFields.name],o=e.ganttProperties.resourceInfo[a][this.parent.resourceFields.unit];100!==o&&(s+="["+o+"%]"),i.i(r.isNullOrUndefined)(t)?t=s:t+=" , "+s}return t}return""}return""},t.prototype.initChartHelperPrivateVariable=function(){var e=this.parent.renderBaseline?.45:.62,t=this.parent.renderBaseline?4:2,n=this.parent.renderBaseline?1.13:.82;if(this.baselineColor=i.i(r.isNullOrUndefined)(this.parent.baselineColor)||""===this.parent.baselineColor?null:this.parent.baselineColor,this.taskBarHeight=i.i(r.isNullOrUndefined)(this.parent.taskbarHeight)||this.parent.taskbarHeight>=this.parent.rowHeight?Math.floor(this.parent.rowHeight*e):this.parent.taskbarHeight,this.parent.renderBaseline){var a=void 0;a=this.taskBarHeight+this.baselineHeight<=this.parent.rowHeight?this.taskBarHeight:this.taskBarHeight-(this.baselineHeight+1),this.taskBarHeight=a}this.milestoneHeight=Math.floor(this.taskBarHeight*n),this.taskBarMarginTop=Math.floor((this.parent.rowHeight-this.taskBarHeight)/t),this.milestoneMarginTop=Math.floor((this.parent.rowHeight-this.milestoneHeight)/2),this.milesStoneRadius=Math.floor(this.milestoneHeight/2),this.baselineTop=-(Math.floor(this.parent.rowHeight-(this.taskBarHeight+this.taskBarMarginTop))-4),this.connectorPointWidth=this.parent.isAdaptive?Math.round(this.taskBarHeight/2):8,this.connectorPointMargin=Math.floor(this.taskBarHeight/2-this.connectorPointWidth/2)},t.prototype.refreshGanttRows=function(){if(this.parent.currentViewData=this.parent.treeGrid.getCurrentViewRecords().slice(),this.createTaskbarTemplate(),"ResourceView"===this.parent.viewType&&this.parent.showOverAllocation){for(var e=0;e<this.parent.currentViewData.length;e++){var t=this.parent.currentViewData[e];t.childRecords.length>0&&(this.parent.setRecordValue("workTimelineRanges",this.parent.dataOperation.mergeRangeCollections(t.ganttProperties.workTimelineRanges,!0),t.ganttProperties,!0),this.parent.dataOperation.calculateRangeLeftWidth(t.ganttProperties.workTimelineRanges))}this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData)}},t.prototype.createTaskbarTemplate=function(){var e=[].slice.call(this.ganttChartTableBody.querySelectorAll("tr"));this.ganttChartTableBody.innerHTML="";var t=[],n=this.parent.treeGridModule.prevCurrentView;if(this.refreshedTr=[],this.refreshedData=[],this.parent.enableImmutableMode&&n&&n.length>0&&this.isUpdated){for(var a={},s=[],o=this.parent.treeGrid.getPrimaryKeyFieldNames()[0],l=0;l<n.length;l++)s[l]=e[l],a[n[l][o]]=l;for(var d=0;d<this.parent.currentViewData.length;d++){var p=a[this.parent.currentViewData[d][o]],h=this.parent.modifiedRecords.indexOf(this.parent.currentViewData[d]);if(i.i(r.isNullOrUndefined)(p)||-1!==h){var u=this.getGanttChartRow(d,this.parent.currentViewData[d]);this.ganttChartTableBody.appendChild(u),this.refreshedTr.push(this.ganttChartTableBody.querySelectorAll("tr")[d]),this.refreshedData.push(this.parent.currentViewData[d])}else this.ganttChartTableBody.appendChild(s[p]);this.ganttChartTableBody.querySelectorAll("tr")[d].setAttribute("aria-rowindex",d.toString())}}else for(var l=0;l<this.parent.currentViewData.length;l++){var c=this.parent.currentViewData[l];"ResourceView"===this.parent.viewType&&!c.expanded&&this.parent.enableMultiTaskbar&&t.push(c);var u=this.getGanttChartRow(l,c);this.ganttChartTableBody.appendChild(u),this.parent.enableImmutableMode&&(this.refreshedTr.push(this.ganttChartTableBody.querySelectorAll("tr")[l]),this.refreshedData.push(this.parent.currentViewData[l])),this.parent.selectionModule&&this.parent.allowSelection&&this.parent.selectionModule.maintainSelectedRecords(parseInt(u.getAttribute("aria-rowindex"),10))}if(this.parent.renderTemplates(),this.triggerQueryTaskbarInfo(),this.parent.modifiedRecords=[],t.length)for(var g=0;g<t.length;g++)t[g].hasChildRecords&&(this.parent.isGanttChartRendered=!0,this.parent.chartRowsModule.refreshRecords([t[g]]));this.parent.renderTemplates()},t.prototype.getGanttChartRow=function(e,t){this.templateData=t;var a=null,s=this.getTableTrNode(),o=this.getLeftLabelNode(e),l=this.taskbarContainer();l[0].setAttribute("aria-label",this.generateAriaLabel(this.templateData)),l[0].setAttribute("rowUniqueId",this.templateData.ganttProperties.rowUniqueID);var d=this.getLeftPointNode();if((this.templateData.ganttProperties.isAutoSchedule&&"ProjectView"==this.parent.viewType||!this.templateData.hasChildRecords)&&l[0].appendChild([].slice.call(d)[0]),this.templateData.hasChildRecords){var p=this.getParentTaskbarNode(e,l);if(!this.templateData.ganttProperties.isAutoSchedule){var h=this.getManualTaskbar();h[0].appendChild([].slice.call(d)[0]);var u=this.getRightPointNode();h[0].appendChild([].slice.call(u)[0]),l[0].appendChild([].slice.call(h)[0])}p&&p.length>0&&l[0].appendChild([].slice.call(p)[0]),this.parent.renderBaseline&&this.templateData.ganttProperties.baselineStartDate&&this.templateData.ganttProperties.baselineEndDate&&(a=i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineStartDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.startDate)||this.templateData.ganttProperties.baselineStartDate.getTime()!==this.templateData.ganttProperties.startDate.getTime()||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineEndDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.endDate)||this.templateData.ganttProperties.baselineEndDate.toLocaleDateString()!==this.templateData.ganttProperties.endDate.toLocaleDateString()||!this.templateData.ganttProperties.isMilestone?this.getTaskBaselineNode():this.getMilestoneBaselineNode())}else if(this.templateData.ganttProperties.isMilestone){var c=this.getMilestoneNode(e,l);c&&c.length>0&&l[0].appendChild([].slice.call(c)[0]),this.parent.renderBaseline&&this.templateData.ganttProperties.baselineStartDate&&this.templateData.ganttProperties.baselineEndDate&&(a=i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineStartDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.startDate)||this.templateData.ganttProperties.baselineStartDate.getTime()!==this.templateData.ganttProperties.startDate.getTime()||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineEndDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.endDate)||this.templateData.ganttProperties.baselineEndDate.toLocaleDateString()!==this.templateData.ganttProperties.endDate.toLocaleDateString()||!this.templateData.ganttProperties.isMilestone?this.getTaskBaselineNode():this.getMilestoneBaselineNode())}else{var g=i.i(n.c)(this.templateData.ganttProperties),f=null,m=null,y=null;if(!i.i(r.isNullOrUndefined)(g)){(g||this.templateData.ganttProperties.duration)&&g&&(i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.segments)||this.templateData.ganttProperties.segments.length<=0)&&(f=this.childTaskbarProgressResizer(),y=this.childTaskbarLeftResizer(),m=this.childTaskbarRightResizer());var v=this.getChildTaskbarNode(e,l);if(y&&l[0].appendChild([].slice.call(y)[0]),v&&v.length>0)if(this.templateData.ganttProperties.segments&&this.templateData.ganttProperties.segments.length>0){var D=this.templateData.ganttProperties.segments.length,w=null;w=this.createDivElement('<div class="e-gantt-split-container-line"></div>'),l[0].appendChild([].slice.call(w)[0]);for(var k=0;k<D;k++)l[0].appendChild([].slice.call(v)[0])}else l[0].appendChild([].slice.call(v)[0]);f&&l[0].appendChild([].slice.call(f)[0]),m&&l[0].appendChild([].slice.call(m)[0])}this.parent.renderBaseline&&this.templateData.ganttProperties.baselineStartDate&&this.templateData.ganttProperties.baselineEndDate&&(a=i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineStartDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.startDate)||this.templateData.ganttProperties.baselineStartDate.getTime()!==this.templateData.ganttProperties.startDate.getTime()||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineEndDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.endDate)||this.templateData.ganttProperties.baselineEndDate.toLocaleDateString()!==this.templateData.ganttProperties.endDate.toLocaleDateString()||!this.templateData.ganttProperties.isMilestone?this.getTaskBaselineNode():this.getMilestoneBaselineNode())}if(this.templateData.ganttProperties.isAutoSchedule&&"ProjectView"==this.parent.viewType||!this.templateData.hasChildRecords){var u=this.getRightPointNode();l[0].appendChild([].slice.call(u)[0])}var S=this.getRightLabelNode(e);if(s[0].childNodes[0].childNodes[0].appendChild([].slice.call(o)[0]),s[0].childNodes[0].childNodes[0].appendChild([].slice.call(l)[0]),this.templateData.ganttProperties.indicators&&this.templateData.ganttProperties.indicators.length>0)for(var T=void 0,b=void 0,P=void 0,C=this.templateData.ganttProperties.indicators,M=0;M<C.length;M++){if(T=this.getIndicatorNode(C[M]),T[0].setAttribute("aria-label",C[M].name),C[M].name.indexOf("$")>-1||C[M].name.indexOf("#")>-1)b=this.templateCompiler(C[M].name),P=b(i.i(r.extend)({index:e},this.templateData),this.parent,"indicatorLabelText");else{var R=i.i(r.createElement)("Text");R.innerHTML=C[M].name,P=R.childNodes}T[0].appendChild([].slice.call(P)[0]),T[0].title=i.i(r.isNullOrUndefined)(C[M].tooltip)?"":C[M].tooltip,s[0].childNodes[0].childNodes[0].appendChild([].slice.call(T)[0])}S&&S.length>0&&s[0].childNodes[0].childNodes[0].appendChild([].slice.call(S)[0]),i.i(r.isNullOrUndefined)(a)||s[0].childNodes[0].childNodes[0].appendChild([].slice.call(a)[0]);var x=s[0].childNodes[0];return this.setAriaRowIndex(t,x),x},t.prototype.setAriaRowIndex=function(e,t){var n=this.parent.treeGrid.getCurrentViewRecords(),a=this.parent.virtualScrollModule&&this.parent.enableVirtualization?i.i(r.getValue)("virtualScrollModule.visualData",this.parent.treeGrid):n,s=a.indexOf(e);t.setAttribute("aria-rowindex",s.toString())},t.prototype.triggerQueryTaskbarInfo=function(){if(this.parent.queryTaskbarInfo)for(var e,t,n=this.parent.enableImmutableMode?this.refreshedTr.length:this.ganttChartTableBody.querySelectorAll("tr").length,a=0;a<n;a++){e=this.parent.enableImmutableMode?this.refreshedTr[a]:this.ganttChartTableBody.querySelectorAll("tr")[a],t=this.refreshedData.length>0?this.refreshedData[a]:this.parent.currentViewData[a];var s=!i.i(r.isNullOrUndefined)(t.ganttProperties.segments)&&t.ganttProperties.segments.length;if(s>0)for(var o=0;o<s;o++){var l=e.getElementsByClassName("e-segmented-taskbar"),d=l[o];this.triggerQueryTaskbarInfoByIndex(d,t)}else e&&this.triggerQueryTaskbarInfoByIndex(e,t)}},t.prototype.triggerQueryTaskbarInfoByIndex=function(e,t){var n=this,a=!i.i(r.isNullOrUndefined)(t.ganttProperties.segments)&&t.ganttProperties.segments.length>0?e:e.querySelector("."+s.F),o={data:t,rowElement:e,taskbarElement:a,taskbarType:t.hasChildRecords?"ParentTask":t.ganttProperties.isMilestone?"Milestone":"ChildTask"},l=this.getClassName(o);if("Milestone"===o.taskbarType)o.milestoneColor=a.querySelector(l[0])?getComputedStyle(a.querySelector(l[0])).borderBottomColor:null,o.baselineColor=e.querySelector(l[1])?getComputedStyle(e.querySelector(l[1])).borderBottomColor:null;else{var d=a.querySelector(l[0]),p=a.querySelector(l[1]);o.taskbarBgColor=i.i(r.isNullOrUndefined)(d)?null:a.classList.contains(s._7)?getComputedStyle(a).backgroundColor:getComputedStyle(a.querySelector(l[0])).backgroundColor,o.taskbarBorderColor=i.i(r.isNullOrUndefined)(d)?null:a.classList.contains(s._7)?getComputedStyle(a).backgroundColor:getComputedStyle(a.querySelector(l[0])).borderColor,o.progressBarBgColor=i.i(r.isNullOrUndefined)(p)?null:a.classList.contains(s._6)?getComputedStyle(a).backgroundColor:getComputedStyle(a.querySelector(l[1])).backgroundColor,o.baselineColor=e.querySelector("."+s._55)?getComputedStyle(e.querySelector("."+s._55)).backgroundColor:null,o.taskLabelColor=a.querySelector("."+s._42)?getComputedStyle(a.querySelector("."+s._42)).color:null}o.rightLabelColor=e.querySelector("."+s._5)&&e.querySelector("."+s._5).querySelector("."+s._37)?getComputedStyle(e.querySelector("."+s._5).querySelector("."+s._37)).color:null,o.leftLabelColor=e.querySelector("."+s._4)&&e.querySelector("."+s._4).querySelector("."+s._37)?getComputedStyle(e.querySelector("."+s._4).querySelector("."+s._37)).color:null,this.parent.trigger("queryTaskbarInfo",o,function(e){n.updateQueryTaskbarInfoArgs(e,void 0,void 0)})},t.prototype.updateQueryTaskbarInfoArgs=function(e,t,i){var r=e.rowElement,n=e.taskbarElement,a=this.getClassName(e);"Milestone"===e.taskbarType?(n.querySelector(a[0])&&getComputedStyle(n.querySelector(a[0])).borderBottomColor!==e.milestoneColor&&(n.querySelector(a[0]).style.borderBottomColor=e.milestoneColor,n.querySelector("."+s._53).style.borderTopColor=e.milestoneColor),r.querySelector(a[1])&&getComputedStyle(r.querySelector(a[1])).borderTopColor!==e.baselineColor&&(r.querySelector(a[1]).style.borderBottomColor=e.baselineColor,r.querySelector("."+s._59).style.borderTopColor=e.baselineColor)):(n.querySelector(a[0])&&getComputedStyle(n.querySelector(a[0])).backgroundColor!==e.taskbarBgColor&&(n.querySelector(a[0]).style.backgroundColor=e.taskbarBgColor),n.querySelector(a[0])&&getComputedStyle(n.querySelector(a[0])).borderColor!==e.taskbarBorderColor&&(n.querySelector(a[0]).style.borderColor=e.taskbarBorderColor),n.querySelector(a[1])&&getComputedStyle(n.querySelector(a[1])).backgroundColor!==e.progressBarBgColor&&(n.querySelector(a[1]).style.backgroundColor=e.progressBarBgColor),n.classList.contains(s._7)&&getComputedStyle(n).backgroundColor!==e.taskbarBgColor&&(n.style.backgroundColor=e.taskbarBgColor),n.classList.contains(s._7)&&getComputedStyle(n).borderColor!==e.taskbarBorderColor&&(n.style.borderColor=e.taskbarBorderColor),n.classList.contains(s._6)&&getComputedStyle(n).backgroundColor!==e.progressBarBgColor&&(n.style.backgroundColor=e.progressBarBgColor),n.querySelector("."+s._42)&&getComputedStyle(n.querySelector("."+s._42)).color!==e.taskLabelColor&&(n.querySelector("."+s._42).style.color=e.taskLabelColor),r.querySelector("."+s._55)&&getComputedStyle(r.querySelector("."+s._55)).backgroundColor!==e.baselineColor&&(r.querySelector("."+s._55).style.backgroundColor=e.baselineColor)),r.querySelector("."+s._4)&&r.querySelector("."+s._4).querySelector("."+s._37)&&getComputedStyle(r.querySelector("."+s._4).querySelector("."+s._37)).color!==e.leftLabelColor&&(r.querySelector("."+s._4).querySelector("."+s._37).style.color=e.leftLabelColor),r.querySelector("."+s._5)&&r.querySelector("."+s._5).querySelector("."+s._37)&&getComputedStyle(r.querySelector("."+s._5).querySelector("."+s._37)).color!==e.rightLabelColor&&(r.querySelector("."+s._5).querySelector("."+s._37).style.color=e.rightLabelColor)},t.prototype.getClassName=function(e){var t=[];return t.push("."+("ParentTask"===e.taskbarType?s._8:"ChildTask"===e.taskbarType?s._7:s._51)),t.push("."+("ParentTask"===e.taskbarType?s._9:"ChildTask"===e.taskbarType?s._6:s._58)),t},t.prototype.templateCompiler=function(e){if(!i.i(r.isNullOrUndefined)(e)&&""!==e)try{return document.querySelectorAll(e).length?i.i(r.compile)(document.querySelector(e).innerHTML.trim(),this.parent):i.i(r.compile)(e,this.parent)}catch(t){return i.i(r.compile)(e,this.parent)}return null},t.prototype.refreshRow=function(e,t){var n=this.ganttChartTableBody.childNodes[e],a=this.parent.currentViewData[e];if(-1!==e&&a){var s=a;"ResourceView"===this.parent.viewType&&s.hasChildRecords&&!s.expanded&&this.parent.enableMultiTaskbar?n.replaceChild(this.getResourceParent(s).childNodes[0],n.childNodes[0]):n.replaceChild(this.getGanttChartRow(e,s).childNodes[0],n.childNodes[0]),this.parent.renderTemplates(),"ResourceView"===this.parent.viewType&&s.hasChildRecords&&this.parent.showOverAllocation&&(t?this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData):(this.parent.dataOperation.updateOverlappingValues(s),this.parent.ganttChartModule.renderRangeContainer([s])));var o=!i.i(r.isNullOrUndefined)(s.ganttProperties.segments)&&s.ganttProperties.segments.length;if(o>0)for(var l=0;l<o;l++){var d=n.getElementsByClassName("e-segmented-taskbar"),p=d[l];this.triggerQueryTaskbarInfoByIndex(p,s)}else this.triggerQueryTaskbarInfoByIndex(n,s);var h="ProjectView"===this.parent.viewType?s.ganttProperties.taskId:s.ganttProperties.rowUniqueID;this.parent.treeGrid.grid.setRowData(h,s);var u=this.parent.ganttChartModule.tempNextElement;this.parent.ganttChartModule.isEditableElement&&u&&(this.parent.treeGrid.grid.focusModule.focus(),i.i(r.addClass)([this.parent.treeGrid.getRows()[n.ariaRowIndex].children[this.parent.ganttChartModule.childrenIndex]],"e-focused"),this.parent.ganttChartModule.tempNextElement=null);this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[e].getAttribute("data-uid")).data=s}},t.prototype.getResourceParent=function(e){var t=this.parent.ganttChartModule.getChartRows();if(this.parent.initialChartRowElements)for(var n=0;n<this.parent.initialChartRowElements.length;n++)i.i(r.isNullOrUndefined)(t[n])||i.i(r.isNullOrUndefined)(t[n].childNodes[0].childNodes[1].childNodes[2])||i.i(r.isNullOrUndefined)(this.parent.initialChartRowElements[n].childNodes[0].childNodes[1].childNodes[2])||(t[n].childNodes[0].childNodes[1].childNodes[2].innerHTML=this.parent.initialChartRowElements[n].childNodes[0].childNodes[1].childNodes[2].innerHTML);this.templateData=e;var a=this.getTableTrNode(),o=this.leftLabelContainer(),l=i.i(r.createElement)("div",{className:"e-collapse-parent"});a[0].childNodes[0].childNodes[0].appendChild(l);var d=this.parent.dataOperation.setSortedChildTasks(e);this.parent.dataOperation.updateOverlappingIndex(d);for(var p=0;p<t.length;p++)if(t[p].classList.contains("gridrowtaskId"+e.ganttProperties.rowUniqueID+"level"+(e.level+1))){var h=t[p].querySelector(".e-taskbar-main-container");i.i(r.addClass)([h],"collpse-parent-border");var u=t[p].querySelector("."+s.F).getAttribute("rowUniqueId"),c=this.parent.getRecordByID(u),g=c.ganttProperties.eOverlapIndex.toString(),f=h.cloneNode(!0);f.style.zIndex=g,a[0].childNodes[0].childNodes[0].childNodes[0].appendChild(f)}return a[0].childNodes[0].childNodes[0].appendChild([].slice.call(o)[0]),a[0].childNodes[0]},t.prototype.refreshRecords=function(e,t){if(this.parent.isGanttChartRendered){if(this.parent.renderTemplates(),"ResourceView"===this.parent.viewType&&this.parent.enableMultiTaskbar){var i=[];i=new a.DataManager(e).executeLocal((new a.Query).sortBy("expanded","Descending")),e=i}for(var r=0;r<e.length;r++){var n=this.parent.currentViewData.indexOf(e[r]);this.refreshRow(n,t)}this.parent.ganttChartModule.updateLastRowBottomWidth()}},t.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("renderPanels",this.createChartTable),this.parent.off("dataReady",this.initiateTemplates),this.parent.off("destroy",this.destroy))},t.prototype.destroy=function(){this.removeEventListener()},t.prototype.generateAriaLabel=function(e){e=this.templateData;var t="",i=this.parent.localeObj.getConstant("name"),r=this.parent.localeObj.getConstant("startDate"),n=this.parent.localeObj.getConstant("endDate"),a=this.parent.localeObj.getConstant("duration"),s=e.ganttProperties.taskName,o=e.ganttProperties.startDate,l=e.ganttProperties.endDate,d=e.ganttProperties.duration;return e.ganttProperties.isMilestone?t=i+" "+s+" "+r+" "+this.parent.getFormatedDate(o):(s&&(t+=i+" "+s+" "),o&&(t+=r+" "+this.parent.getFormatedDate(o)+" "),l&&(t+=n+" "+this.parent.getFormatedDate(l)+" "),d&&(t+=a+" "+this.parent.getDurationString(d,e.ganttProperties.durationUnit))),t},t.prototype.generateBaselineAriaLabel=function(e){e=this.templateData;var t="",i=this.parent.localeObj.getConstant("name"),r=this.parent.localeObj.getConstant("startDate"),n=this.parent.localeObj.getConstant("endDate"),a=e.ganttProperties.taskName,s=e.ganttProperties.baselineStartDate,o=e.ganttProperties.baselineEndDate;return t+="Baseline ",t+=i+" "+a+" ",t+=r+" "+this.parent.getFormatedDate(s)+" ",t+=n+" "+this.parent.getFormatedDate(o)+" "},t.prototype.generateSpiltTaskAriaLabel=function(e,t){var i="",r=this.parent.localeObj.getConstant("startDate"),n=this.parent.localeObj.getConstant("endDate"),a=this.parent.localeObj.getConstant("duration"),s=e.startDate,o=e.endDate,l=e.duration;return s&&(i+=r+" "+this.parent.getFormatedDate(s)+" "),o&&(i+=n+" "+this.parent.getFormatedDate(o)+" "),l&&(i+=a+" "+this.parent.getDurationString(l,t.durationUnit)),i},t.prototype.generateTaskLabelAriaLabel=function(e){var t="";return"left"===e&&this.parent.labelSettings.leftLabel&&!this.leftTaskLabelTemplateFunction?t+=this.parent.localeObj.getConstant("leftTaskLabel")+" "+this.getTaskLabel(this.parent.labelSettings.leftLabel):"right"===e&&this.parent.labelSettings.rightLabel&&!this.rightTaskLabelTemplateFunction&&(t+=this.parent.localeObj.getConstant("rightTaskLabel")+" "+this.getTaskLabel(this.parent.labelSettings.rightLabel)),t},t}(o.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(3)),a=i(2),s=function(){function e(e){this.expandedRecords=[],this.parent=e,this.dependencyViewContainer=i.i(r.createElement)("div",{className:n._34}),this.initPublicProp()}return e.prototype.getconnectorLineGap=function(e){return e.milestoneChild?this.parent.chartRowsModule.milestoneMarginTop/2+this.parent.chartRowsModule.milestoneHeight/2:this.parent.chartRowsModule.taskBarMarginTop/2+this.parent.chartRowsModule.taskBarHeight/2},e.prototype.initPublicProp=function(){this.lineColor=this.parent.connectorLineBackground,this.lineStroke=this.parent.connectorLineWidth>4?4:this.parent.connectorLineWidth,this.createConnectorLineTooltipTable()},e.prototype.getTaskbarMidpoint=function(e){return Math.floor(e?this.parent.chartRowsModule.milestoneMarginTop+this.parent.chartRowsModule.milestoneHeight/2:this.parent.chartRowsModule.taskBarMarginTop+this.parent.chartRowsModule.taskBarHeight/2)+1},e.prototype.createConnectorLineObject=function(e,t,n){var s,o={};s=this.parent.pdfExportModule&&this.parent.pdfExportModule.isPdfExport?this.parent.pdfExportModule.helper.exportProps.exportType&&"CurrentViewData"===this.parent.pdfExportModule.helper.exportProps.exportType?this.expandedRecords:this.parent.flatData:this.expandedRecords;var l=s.indexOf(e),d=s.indexOf(t),p=e.ganttProperties,h=t.ganttProperties,u=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.currentViewData:this.parent.getExpandedRecords(this.parent.currentViewData);if(o.parentIndexInCurrentView=u.indexOf(e),o.childIndexInCurrentView=u.indexOf(t),!(this.parent.virtualScrollModule&&this.parent.enableVirtualization)&&(-1===o.parentIndexInCurrentView||-1===o.childIndexInCurrentView)||-1===o.parentIndexInCurrentView&&-1===o.childIndexInCurrentView)return null;o.parentLeft=p.isMilestone?p.left-this.parent.chartRowsModule.milestoneHeight/2:p.left,o.childLeft=h.isMilestone?h.left-this.parent.chartRowsModule.milestoneHeight/2:h.left,o.parentWidth=0===p.width||p.isMilestone?Math.floor(this.parent.chartRowsModule.milestoneHeight):p.width,o.childWidth=0===h.width||h.isMilestone?Math.floor(this.parent.chartRowsModule.milestoneHeight):h.width,o.parentIndex=l,o.childIndex=d;var c=!i.i(r.isNullOrUndefined)(this.parent.ganttChartModule.getChartRows())&&this.parent.ganttChartModule.getChartRows()[0]&&this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;o.rowHeight=c&&!isNaN(c)?c:this.parent.rowHeight,o.type=n.type;var g="ResourceView"===this.parent.viewType?p.taskId:p.rowUniqueID,f="ResourceView"===this.parent.viewType?h.taskId:h.rowUniqueID;return o.connectorLineId="parent"+g+"child"+f,o.milestoneParent=!!p.isMilestone,o.milestoneChild=!!h.isMilestone,i.i(r.isNullOrUndefined)(i.i(a.c)(p))||i.i(r.isNullOrUndefined)(i.i(a.c)(h))?null:o},e.prototype.renderConnectorLines=function(e){for(var t="",i=[],r=0;r<e.length;r++)t+=this.getConnectorLineTemplate(e[r]),i.push(e[r]);this.dependencyViewContainer.innerHTML=t;for(var n=this.parent.connectorLineModule.dependencyViewContainer.childNodes,a=0;a<n.length;a++)for(var s=n[a].childNodes,o=0;o<s.length;o++){var l="Connector Line "+this.parent.connectorLineModule.generateAriaLabel(i[a]);s[o].setAttribute("aria-label",l)}this.parent.ganttChartModule.chartBodyContent.appendChild(this.dependencyViewContainer)},e.prototype.getParentPosition=function(e){if(e.parentIndex<e.childIndex){if("FF"===e.type)return e.childLeft+e.childWidth>=e.parentLeft+e.parentWidth?"FFType2":"FFType1";if(e.parentLeft<e.childLeft&&e.childLeft>e.parentLeft+e.parentWidth+25){if("FS"===e.type)return"FSType1";if("SF"===e.type)return"SFType1";if("SS"===e.type)return"SSType2";if("FF"===e.type)return"FFType2"}else if(e.parentLeft<e.childLeft&&e.childLeft<e.parentLeft+e.parentWidth||e.parentLeft===e.childLeft||e.parentLeft>e.childLeft){if(e.parentLeft>e.childLeft+e.childWidth+25&&"SF"===e.type)return"SFType2";if(e.parentLeft>e.childLeft){if("SS"===e.type)return"SSType1";if("SF"===e.type)return"SFType1";if("FF"===e.type)return"FFType1"}else if(e.childLeft+e.childWidth>e.parentLeft+e.parentWidth&&"FF"===e.type)return"FFType2";if("FS"===e.type)return"FSType2";if("SS"===e.type)return"SSType2";if("FF"===e.type)return"FFType1";if("SF"===e.type)return"SFType1"}else if(e.parentLeft<e.childLeft){if("FS"===e.type)return"FSType2";if("FF"===e.type)return"FFType2";if("SS"===e.type)return"SSType2";if("SF"===e.type)return"SFType1"}}else if(e.parentIndex>e.childIndex)if(e.parentLeft<e.childLeft&&e.childLeft>e.parentLeft+e.parentWidth){if("FS"===e.type)return 30>=e.childLeft-(e.milestoneParent?e.parentLeft+e.parentWidth+4:e.parentLeft+e.parentWidth)?"FSType3":"FSType4";if(e.parentLeft<e.childLeft||e.childLeft+e.childWidth>e.parentLeft+e.parentWidth){if("SS"===e.type)return"SSType4";if("FF"===e.type)return"FFType4";if("SF"===e.type)return"SFType4"}else if(e.childLeft+e.childWidth>e.parentLeft+e.parentWidth&&"FF"===e.type)return"FFType4"}else if(e.parentLeft<e.childLeft&&e.childLeft<e.parentLeft+e.parentWidth||e.parentLeft===e.childLeft||e.parentLeft>e.childLeft){if(e.childLeft+e.childWidth<=e.parentLeft+e.parentWidth){if("FF"===e.type)return"FFType3";if("SF"===e.type)return e.childLeft+e.childWidth+25<e.parentLeft?"SFType3":"SFType4";if("SS"===e.type)return e.childLeft<=e.parentLeft?"SSType3":"SSType4"}else if(e.childLeft+e.childWidth>e.parentLeft+e.parentWidth){if("FF"===e.type)return"FFType4";if("SF"===e.type)return"SFType4";if("SS"===e.type)return e.childLeft<=e.parentLeft?"SSType3":"SSType4"}if("FS"===e.type)return"FSType3"}else if(e.parentLeft<e.childLeft){if("FS"===e.type)return"FSType3";if("SS"===e.type)return"SSType4";if("FF"===e.type)return"FFType4";if("SF"===e.type)return"SFType4"}return null},e.prototype.getHeightValue=function(e){return e.parentIndex*e.rowHeight>e.childIndex*e.rowHeight?e.parentIndex*e.rowHeight-e.childIndex*e.rowHeight:e.childIndex*e.rowHeight-e.parentIndex*e.rowHeight},e.prototype.getInnerElementWidthSSType2=function(e){return e.parentLeft===e.childLeft?10:e.childLeft-e.parentLeft},e.prototype.getInnerElementLeftSSType2=function(e){return e.parentLeft===e.childLeft?e.parentLeft-20:e.parentLeft-10},e.prototype.getInnerChildWidthSSType2=function(e){return e.parentLeft+e.parentWidth<e.childLeft?10:e.parentLeft===e.childLeft?20:e.parentLeft+e.parentWidth>=e.childLeft?10:e.childLeft-e.parentLeft},e.prototype.getBorderStyles=function(e,t){return"border-"+e+"-width:"+t+"px;border-"+e+"-style:solid;"+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"border-"+e+"-color:"+this.lineColor+";")},e.prototype.getConnectorLineTemplate=function(e){var t=this.getInnerChildWidthSSType2(e),a=this.getInnerElementWidthSSType2(e),s=this.getInnerElementLeftSSType2(e),o=this.getHeightValue(e),l=!!e.milestoneParent,d=!!e.milestoneChild,p="",h=this.parent.virtualScrollModule&&this.parent.enableVirtualization,u=this.getPosition(e,this.getParentPosition(e),o),c=0;this.parent.renderBaseline&&(c=e.milestoneParent&&e.milestoneChild?0:e.milestoneParent?-5:e.milestoneChild?5:0);var g=h?u.height:o+c,f=0,m=0;if(this.parent.currentViewData[e.parentIndex]&&this.parent.currentViewData[e.childIndex]){var y=this.parent.currentViewData[e.parentIndex].hasChildRecords,v=this.parent.currentViewData[e.childIndex].hasChildRecords,D=this.parent.currentViewData[e.parentIndex].ganttProperties.isAutoSchedule,w=this.parent.currentViewData[e.childIndex].ganttProperties.isAutoSchedule,k=!0;(y&&D&&!v||v&&w&&!y||y&&D&&w&&v||!y&&!v)&&(k=!1),k&&(y&&!D&&v&&!w?m=-11:y&&!D&&v&&!w||(e.childIndex>e.parentIndex?!y&&v?f=-11:(f=11,m=-11):y&&!v?f=-11:(f=11,m=-11)),this.parent.currentViewData[e.parentIndex].ganttProperties.isMilestone?e.parentIndex>e.childIndex?(m=-5,f=10):"SS"!==e.type&&"FF"!==e.type||(m=-5):this.parent.currentViewData[e.childIndex].ganttProperties.isMilestone&&(e.parentIndex>e.childIndex?(m=5,f=-10):"SS"!==e.type&&"FF"!==e.type||(m=5)))}if(this.getParentPosition(e)){p='<div id="ConnectorLine'+e.connectorLineId+'" style="background-color:black">';var S='<div class="'+n._1+'" tabindex="-1" style="',T='<div class="'+n._15+'" style="'+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"outline-color:"+this.lineColor+";"),b='<div class="'+n._16+'" style="'+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"outline-color:"+this.lineColor+";"),P='<div class="'+n._17+'" style="'+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"outline-color:"+this.lineColor+";"),C=P+(d?"left:0px;":"")+this.getBorderStyles("right",10)+"top:"+(-5-this.lineStroke+(this.lineStroke-1))+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',M=this.getBorderStyles("left",10)+"top:"+-6+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',R=this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>'+T+"top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-(this.lineStroke-1))+'position:relative;"></div>',x=P+"left:"+(e.childLeft+e.childWidth-e.parentLeft+10)+"px;"+this.getBorderStyles("right",10),O="top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>';"FSType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType1">',S+=T,S=S+"left:"+(l?-1:0)+"px;width:"+(l?e.childLeft-(e.parentLeft+e.parentWidth+10)+this.lineStroke-10+1:e.childLeft-(e.parentLeft+e.parentWidth+10)+this.lineStroke-10)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10)-10)+"px;width:0px;"+this.getBorderStyles("right",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10)-10)+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10))+"px;"+this.getBorderStyles("left",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FSType2"===this.getParentPosition(e)&&(S=S+"left:"+e.parentLeft+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType2">',S+=T,S=S+"left:"+(l?e.parentWidth-1:e.parentWidth)+"px;width:"+(l?11:10)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth+10-this.lineStroke)+"px;"+this.getBorderStyles("left",this.lineStroke)+"width:0px;"+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+20))+"px;width:"+(e.parentLeft+e.parentWidth-e.childLeft+30)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+20))+"px;width:0px;"+this.getBorderStyles("top",this.getconnectorLineGap(e)-this.lineStroke)+this.getBorderStyles("left",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+20))+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+10))+"px;"+this.getBorderStyles("left",10)+"border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+"px;top:"+(-6-this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FSType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft-20)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType3">',S+=b,S=S+"left:10px;"+this.getBorderStyles("left",10)+"border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+"px;top:"+-6+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+"width:10px;"+this.getBorderStyles("top",this.lineStroke)+"position:relative;top:"+-(6+(5+this.lineStroke)+Math.round(this.lineStroke/2))+'px;"></div>',S+=T,S=S+"width:"+this.lineStroke+"px;"+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-this.lineStroke+1)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div>',S+=T,S=S+"width:"+(e.parentLeft+e.parentWidth-e.childLeft+30)+"px;"+this.getBorderStyles("top",this.lineStroke)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div>',S+=T,S=S+"left:"+(e.parentLeft+e.parentWidth-e.childLeft+(30-this.lineStroke))+"px;width:0px;height:"+(this.getconnectorLineGap(e)-this.lineStroke)+"px;"+this.getBorderStyles("left",this.lineStroke)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div>',S+=T,S=S+(l?"left:"+(e.parentLeft+e.parentWidth-e.childLeft+(18-this.lineStroke))+"px;width:"+(12+this.lineStroke)+"px;":"left:"+(e.parentLeft+e.parentWidth-e.childLeft+20)+"px;width:10px;")+this.getBorderStyles("top",this.lineStroke)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div></div>'),"FSType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType4">',S+=b,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10))+"px;"+this.getBorderStyles("left",10)+"top:"+-6+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth)-20)+"px;top:"+-(6+(5+this.lineStroke)+Math.round(this.lineStroke/2))+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;left:"+(e.childLeft-(e.parentLeft+e.parentWidth)-20)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke+1)+'position:relative;"></div>',S+=T,S=S+(l?"left:-1px;":"")+"top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(l?e.childLeft-(e.parentLeft+e.parentWidth+20)+1+this.lineStroke:e.childLeft-(e.parentLeft+e.parentWidth+20)+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SSType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft-10)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType4">',S+=b,S=S+"left:"+(e.childLeft-e.parentLeft)+"px;"+M,S+=T,S=S+"top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;width:"+(e.childLeft-e.parentLeft)+"px;"+R,S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SSType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft-20)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType3">',S+=b,S=S+"left:10px;"+M,S+=T,S=S+"top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;width:10px;"+R,S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(e.parentLeft-e.childLeft+21)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SSType2"===this.getParentPosition(e)&&(S=S+"left:"+s+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType2">',S+=T,S=S+"width:"+(t+1)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:"+a+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:"+a+"px;"+this.getBorderStyles("left",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"SSType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft-20)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType1">',S+=T,S=S+"width:"+(e.parentLeft-e.childLeft+21)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:10px;"+this.getBorderStyles("left",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FFType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType1">',S+=T,S=S+"left:"+(l?e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)-1:e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth))+"px;width:"+(l?21+this.lineStroke:20+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+20)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(d?4:10)+"px;width:"+(d?e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+(16+this.lineStroke):e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+(10+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=P,S=S+(d?"left:0px;":"")+this.getBorderStyles("right",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FFType2"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType2">',S+=T,S=S+(l?"left:-1px;":"")+"width:"+(l?e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(21+this.lineStroke):e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(20+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+20)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(d?e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+4:e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+10)+"px;width:"+(d?16+this.lineStroke:10+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=P,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth))+"px;"+this.getBorderStyles("right",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FFType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType3">',S+=C,S+=T,S=S+(d?"left:4px;width:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+16):"left:10px;width:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+10))+"px;top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+20)+"px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke+1)+'position:relative;"></div>',S+=T,S=S+(l?"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)-1)+"px;width:21":"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth))+"px;width:20")+"px;top:"+-(13+2*(this.lineStroke-1))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"FFType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType4">',S+=P,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth))+"px;"+this.getBorderStyles("right",10)+"top:"+(-5-this.lineStroke+(this.lineStroke-1))+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+(d?"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+4)+"px;width:"+(16+this.lineStroke):"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+10)+"px;width:"+(10+this.lineStroke))+"px;"+O,S+=T,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+20)+"px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke+1)+'position:relative;"></div>',S+=T,S=S+(l?"left:-1px;width:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(21+this.lineStroke)):"width:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(20+this.lineStroke)))+"px;top:"+-(13+2*(this.lineStroke-1))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SFType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft-10)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType4">',S=S+x+"top:"+(-5-this.lineStroke+(this.lineStroke-1))+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+"left:"+(d?e.childLeft+e.childWidth-e.parentLeft+(14+this.lineStroke)+"px;width:16":e.childLeft+e.childWidth-e.parentLeft+20+"px;width:"+(10+this.lineStroke))+"px;"+O,S+=T,S=S+"left:"+(e.childLeft+e.childWidth-e.parentLeft+30)+"px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-(this.lineStroke-1))+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(e.childLeft+e.childWidth-e.parentLeft+(30+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:11px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SFType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType3">',S+=C,S+=T,S=S+(d?"left:4px;width:"+(16+this.lineStroke):"left:10px;width:"+(10+this.lineStroke))+"px;top:"+-(13+2*(this.lineStroke-1)-1)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:20px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-(this.lineStroke-1))+'position:relative;"></div>',S+=T,S=S+"left:20px;top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(e.parentLeft-(e.childLeft+e.childWidth+20)+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SFType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft-10)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType1">',S+=T,S=S+"width:11px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:"+(e.childLeft+e.childWidth-e.parentLeft+(30+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft+e.childWidth-e.parentLeft+30)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+(d?"left:"+(e.childLeft+e.childWidth-e.parentLeft+15)+"px;width:"+(15+this.lineStroke):"left:"+(e.childLeft+e.childWidth-e.parentLeft+20)+"px;width:"+(10+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S=S+x+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;position:relative;"></div></div>'),"SFType2"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType2">',S+=T,S=S+"left:"+(e.parentLeft-(e.childLeft+e.childWidth)-10)+"px;width:11px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentLeft-(e.childLeft+e.childWidth)-10)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+(d?"left:4px;width:"+(e.parentLeft-(e.childLeft+e.childWidth)-(14-this.lineStroke)):"left:10px;width:"+(e.parentLeft-(e.childLeft+e.childWidth)-(20-this.lineStroke)))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=P,S=S+"left:0px;"+this.getBorderStyles("right",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),p+=S,p+="</div>"}return p},e.prototype.getPosition=function(e,t,i){var r=0,n=0;if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){var a=!!e.milestoneParent,s=!!e.milestoneChild,o=this.getTaskbarMidpoint(a)-(this.lineStroke-1),l=this.getTaskbarMidpoint(s)-(this.lineStroke-1),d=-1!==e.parentIndexInCurrentView,p=-1!==e.childIndexInCurrentView,h=this.parent.currentViewData.length-1;"SSType1"===t||"SSType2"===t||"FFType1"===t||"FFType2"===t||"SFType2"===t?(r=d?e.parentIndexInCurrentView*e.rowHeight+o:0,n=d&&p?i:p?e.childIndexInCurrentView*e.rowHeight+o:h*e.rowHeight+o):"SSType3"===t||"SSType4"===t||"FSType4"===t||"FFType3"===t||"FFType4"===t||"SFType4"===t||"SFType3"===t?(r=p?e.childIndexInCurrentView*e.rowHeight+l:0,n=d&&p?i:d?e.parentIndexInCurrentView*e.rowHeight+l:h*e.rowHeight+l):"FSType3"===t?(r=p?e.childIndexInCurrentView*e.rowHeight+o:0,n=d&&p?i:d?e.parentIndexInCurrentView*e.rowHeight+l:h*e.rowHeight+o):"SFType1"!==t&&"FSType1"!==t&&"FSType2"!==t||(r=d?e.parentIndexInCurrentView*e.rowHeight+l:0,n=d&&p?i:p?e.childIndexInCurrentView*e.rowHeight+l:h*e.rowHeight+l)}return{top:r,height:n}},e.prototype.createConnectorLineTooltipTable=function(){this.tooltipTable=i.i(r.createElement)("table",{className:".e-tooltiptable",styles:"margin-top:0px",attrs:{cellspacing:"2px",cellpadding:"2px"}});var e=i.i(r.createElement)("tbody");e.innerHTML="",this.tooltipTable.appendChild(e)},e.prototype.getConnectorLineTooltipInnerTd=function(e,t,i,r){var n='<tr id="fromPredecessor"><td >'+this.parent.localeObj.getConstant("from")+"</td><td> ";return n=n+e+" </td><td> "+this.parent.localeObj.getConstant(t)+" </td> </tr>",n=n+'<tr id="toPredecessor"><td>'+this.parent.localeObj.getConstant("to")+"</td><td> "+i,n=n+" </td><td> "+this.parent.localeObj.getConstant(r)+" </td></tr></tbody><table>"},e.prototype.generateAriaLabel=function(e){var t=e.type,i=this.expandedRecords,r=i[e.parentIndex].ganttProperties.taskName,n=i[e.childIndex].ganttProperties.taskName,a=this.parent.localeObj.getConstant("start"),s=this.parent.localeObj.getConstant("finish");return"FS"===t?r+" "+s+" to "+n+" "+a:"FF"===t?r+" "+s+" to "+n+" "+s:"SS"===t?r+" "+a+" to "+n+" "+a:r+" "+a+" to "+n+" "+s},e.prototype.getRecordByID=function(e){return i.i(r.isNullOrUndefined)(e)?null:"ResourceView"===this.parent.viewType?this.parent.flatData[this.parent.getTaskIds().indexOf("T"+e.toString())]:this.parent.flatData[this.parent.ids.indexOf(e.toString())]},e.prototype.removePreviousConnectorLines=function(e){var t;t=!0===i.i(r.isObject)(e);for(var n=t?Object.keys(e).length:e.length,a=Object.keys(e),s=0;s<n;s++){var o=void 0;if(t){o=e[a[s]]}else o=e[s];var l=o.ganttProperties&&o.ganttProperties.predecessor;if(l&&l.length>0)for(var d=0;d<l.length;d++){var p="parent"+l[d].from+"child"+l[d].to;this.removeConnectorLineById(p)}}},e.prototype.removeConnectorLineById=function(e){var t=this.parent.connectorLineModule.dependencyViewContainer.querySelector("#ConnectorLine"+e);i.i(r.isNullOrUndefined)(t)||i.i(r.remove)(t)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(8)),a=(i.n(n),i(3)),s=function(){function e(e,t){this.parent=e,this.taskbarEdit=t}return e.prototype.createTooltip=function(e,t,i){var r=this;this.toolTipObj=new n.Tooltip({opensOn:e,position:"TopRight",mouseTrail:t,cssClass:a._14,target:i||null,animation:{open:{effect:"None"},close:{effect:"None"}}}),this.toolTipObj.beforeRender=function(e){var t={data:r.taskbarEdit.taskBarEditRecord,args:e,content:r.toolTipObj.content};r.parent.trigger("beforeTooltipRender",t)},this.toolTipObj.afterOpen=function(e){r.updateTooltipPosition(e)},this.toolTipObj.isStringTemplate=!0,this.toolTipObj.appendTo(this.parent.chartPane)},e.prototype.updateTooltipPosition=function(e){var t=this.parent.getOffsetRect(this.parent.chartPane),i=t.left+this.parent.chartPane.offsetWidth,r=e.element.offsetLeft;i<r+e.element.offsetWidth&&(r+=i-(r+e.element.offsetWidth)),e.element.style.left=r+"px",e.element.style.visibility="visible"},e.prototype.showHideTaskbarEditTooltip=function(e,t){e&&this.parent.tooltipSettings.showTooltip?(this.createTooltip("Custom",!1),this.parent.tooltipModule.toolTipObj.close(),this.updateTooltip(t),"ConnectorPointLeftDrag"===this.taskbarEdit.connectorSecondAction?this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector("."+a.G)):"ConnectorPointRightDrag"===this.taskbarEdit.connectorSecondAction?this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector("."+a.H)):this.toolTipObj.open(this.taskbarEdit.taskBarEditElement)):i.i(r.isNullOrUndefined)(this.toolTipObj)||(this.toolTipObj.destroy(),this.toolTipObj=null)},e.prototype.updateTooltip=function(e){var t=this.taskbarEdit.taskBarEditRecord.ganttProperties,n=-1===e?t.width:t.segments[e].width,a=-1===e?t.progressWidth:t.segments[e].progressWidth,s=-1===e?t.left:t.left+t.segments[e].left;i.i(r.isNullOrUndefined)(this.toolTipObj)||("ConnectorPointLeftDrag"===this.taskbarEdit.taskBarEditAction||"ConnectorPointRightDrag"===this.taskbarEdit.taskBarEditAction?(this.toolTipObj.content=this.getTooltipText(e),this.toolTipObj.offsetY=-3):(this.toolTipObj.content=this.getTooltipText(e),this.toolTipObj.refresh(this.taskbarEdit.taskBarEditElement),"LeftResizing"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=-n:"RightResizing"===this.taskbarEdit.taskBarEditAction||"ParentResizing"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=0:"ProgressResizing"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=-(n-a):"MilestoneDrag"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=-this.parent.chartRowsModule.milestoneHeight/2:n>5&&(this.toolTipObj.offsetX=-(n+s-this.taskbarEdit.tooltipPositionX))))},e.prototype.getTooltipText=function(e){var t="",n=this.parent.globalize,a=this.taskbarEdit.taskBarEditRecord.ganttProperties;if(!i.i(r.isNullOrUndefined)(a.segments)&&a.segments.length>0&&-1!==e&&"ProgressResizing"!==this.taskbarEdit.taskBarEditAction&&(a=a.segments[e]),this.parent.tooltipSettings.editing){var s=this.parent.tooltipModule.templateCompiler(this.parent.tooltipSettings.editing,this.parent,this.taskbarEdit.taskBarEditRecord,"TooltipEditingTemplate");i.i(r.getValue)("tooltipEle",this.toolTipObj)&&this.parent.renderTemplates(),t=s[0]}else{var o=void 0,l=void 0,d=void 0;switch(i.i(r.isNullOrUndefined)(a.startDate)||(o='<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("startDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+n.formatDate(a.startDate,{format:this.parent.getDateFormat()})+"</td></tr>"),i.i(r.isNullOrUndefined)(a.endDate)||(l='<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("endDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+n.formatDate(a.endDate,{format:this.parent.getDateFormat()})+"</td></tr>"),i.i(r.isNullOrUndefined)(a.duration)||(d='<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("duration")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getDurationString(a.duration,a.durationUnit)+"</td></tr>"),this.taskbarEdit.taskBarEditAction){case"ProgressResizing":t='<table class = "e-gantt-tooltiptable"><tbody>'+('<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("progress")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+a.progress+"</td></tr>")+"</tbody></table>";break;case"LeftResizing":t='<table class = "e-gantt-tooltiptable"><tbody>'+o+d+"</tbody></table>";break;case"RightResizing":case"ParentResizing":t='<table class = "e-gantt-tooltiptable"><tbody>'+l+d+"</tbody></table>";break;case"ChildDrag":case"ParentDrag":case"MilestoneDrag":case"ManualParentDrag":var p="",h="";i.i(r.isNullOrUndefined)(this.taskbarEdit.taskBarEditRecord.ganttProperties.startDate)||(p=o),i.i(r.isNullOrUndefined)(this.taskbarEdit.taskBarEditRecord.ganttProperties.endDate)||(h=l),t='<table class = "e-gantt-tooltiptable"><tbody>'+p+h+"</tbody></table>";break;case"ConnectorPointLeftDrag":case"ConnectorPointRightDrag":t=this.parent.connectorLineModule.tooltipTable,i.i(r.isNullOrUndefined)(this.toolTipObj)&&(this.parent.connectorLineModule.tooltipTable.innerHTML=this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.parent.editModule.taskbarEditModule.taskBarEditRecord.ganttProperties.taskName,this.parent.editModule.taskbarEditModule.fromPredecessorText,"",""))}}return t},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(3)),a=function(){function e(e){this.parent=e,this.eventMarkersContainer=null}return e.prototype.renderEventMarkers=function(){this.parent.eventMarkers&&this.parent.eventMarkers.length>0?(this.parent.ganttChartModule.chartBodyContent.contains(this.eventMarkersContainer)||(this.eventMarkersContainer=i.i(r.createElement)("div",{className:n.v}),this.eventMarkersContainer.setAttribute("role","term"),this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer)),this.eventMarkersContainer.innerHTML="",this.getEventMarkersElements(this.eventMarkersContainer)):this.removeContainer()},e.prototype.removeContainer=function(){this.eventMarkersContainer&&(i.i(r.remove)(this.eventMarkersContainer),this.eventMarkersContainer=null)},e.prototype.getEventMarkersElements=function(e){for(var t,a,s,o,l=0;l<this.parent.eventMarkers.length;l++){if(t=this.parent.dataOperation.getTaskLeft(this.parent.dateValidationModule.getDateFromFormat(this.parent.eventMarkers[l].day,!0),!1),a=i.i(r.createElement)("div",{className:n.w,styles:"left:"+t+"px; height:100%;",id:"stripline"+l}),this.parent.eventMarkers[l].label){s=i.i(r.createElement)("div",{className:n.x});s[this.parent.disableHtmlEncode?"textContent":"innerHTML"]=this.parent.eventMarkers[l].label,a.appendChild(s),o=i.i(r.createElement)("div",{className:"e-gantt-right-arrow"}),a.appendChild(o)}this.parent.eventMarkers[l].cssClass&&a.classList.add(this.parent.eventMarkers[l].cssClass),a.setAttribute("tabindex","-1"),i.i(r.isNullOrUndefined)(this.parent.eventMarkers[l].day)||a.setAttribute("aria-label",this.parent.localeObj.getConstant("eventMarkers")+" "+("string"==typeof this.parent.eventMarkers[l].day?this.parent.eventMarkers[l].day:this.parent.getFormatedDate(this.parent.eventMarkers[l].day))+" "+this.parent.eventMarkers[l].label),e.appendChild(a)}},e.prototype.updateContainerHeight=function(){this.eventMarkersContainer&&(this.eventMarkersContainer.style.height=i.i(r.formatUnit)(this.parent.getContentHeight()))},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(3)),a=function(){function e(e){this.weekendWidthUpdated=!1,this.parent=e,this.nonworkingContainer=null,this.holidayContainer=null,this.weekendContainer=null}return e.prototype.createNonworkingContainer=function(){this.parent.ganttChartModule.chartBodyContent.contains(this.nonworkingContainer)||(this.nonworkingContainer=i.i(r.createElement)("div",{className:n.y}),this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer))},e.prototype.renderHolidays=function(){this.parent.holidays&&this.parent.holidays.length>0?(this.createNonworkingContainer(),this.nonworkingContainer.contains(this.holidayContainer)||(this.holidayContainer=i.i(r.createElement)("div",{className:n.z}),this.nonworkingContainer.appendChild(this.holidayContainer)),this.holidayContainer.innerHTML=this.getHolidaysElement().innerHTML):this.holidayContainer&&this.holidayContainer.parentNode&&(i.i(r.remove)(this.holidayContainer),this.nonworkingContainer&&0===this.nonworkingContainer.childNodes.length&&i.i(r.remove)(this.nonworkingContainer))},e.prototype.getHolidaysElement=function(){var e,t,a=i.i(r.createElement)("div"),s=this.parent.contentHeight,o=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(o=this.parent.toolbarModule.element.offsetHeight);for(var l=this.parent.ganttHeight-o-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight,d=0;d<this.parent.holidays.length;d++){this.parent.holidays[d].from&&this.parent.holidays[d].to?(e=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].from),t=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].to),t.setDate(t.getDate()+1),e.setHours(0,0,0,0),t.setHours(0,0,0,0)):this.parent.holidays[d].from?(e=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].from),e.setHours(0,0,0,0)):this.parent.holidays[d].to&&(e=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].to),e.setHours(0,0,0,0));var p=this.parent.holidays[d].from&&this.parent.holidays[d].to?this.parent.dataOperation.getTaskWidth(e,t):this.parent.perDayWidth,h=this.parent.dataOperation.getTaskLeft(e,!1),u=i.i(r.createElement)("div",{className:n.A,styles:"left:"+h+"px; width:"+p+"px; height:100%;"}),c=l<s?l/2:s/2,g=i.i(r.createElement)("span",{className:n.B,styles:"top:"+c+"px;left:"+p/2+"px;"});g[this.parent.disableHtmlEncode?"textContent":"innerHTML"]=this.parent.holidays[d].label?this.parent.holidays[d].label:"",u.appendChild(g),this.parent.holidays[d].cssClass&&u.classList.add(this.parent.holidays[d].cssClass),a.appendChild(u)}return a},e.prototype.renderWeekends=function(){this.parent.highlightWeekends?(this.createNonworkingContainer(),this.nonworkingContainer.contains(this.weekendContainer)||(this.weekendContainer=i.i(r.createElement)("div",{className:n.C}),this.nonworkingContainer.appendChild(this.weekendContainer)),this.weekendContainer.innerHTML=this.getWeekendElements().innerHTML):this.weekendContainer&&(i.i(r.remove)(this.weekendContainer),this.nonworkingContainer&&0===this.nonworkingContainer.childNodes.length&&i.i(r.remove)(this.nonworkingContainer))},e.prototype.getWeekendElements=function(){var e=i.i(r.createElement)("div"),t=new Date(this.parent.timelineModule.timelineStartDate.getTime()),a=new Date(this.parent.timelineModule.timelineEndDate.getTime()),s=this.parent.nonWorkingDayIndex,o=!0;do{if(-1!==s.indexOf(t.getDay())){var l=this.parent.dataOperation.getTaskLeft(t,!1),d=this.parent.perDayWidth;if(o){var p=new Date(t.getTime()),h=new Date(p.getTime());h.setDate(h.getDate()+1),h.setHours(0,0,0,0),d=this.parent.dataOperation.getTaskWidth(p,h),o=!1}var u=new Date(t);u.setDate(u.getDate()+1),u.getTimezoneOffset()==this.parent.timelineModule.timelineStartDate.getTimezoneOffset()||this.weekendWidthUpdated||"Hour"==this.parent.timelineModule.bottomTier&&1===this.parent.timelineSettings.bottomTier.count&&(d-=this.parent.timelineSettings.timelineUnitSize,this.weekendWidthUpdated=!0);var c=i.i(r.createElement)("div",{className:n.D,styles:"left:"+l+"px;width:"+d+"px;height:100%;"});e.appendChild(c)}t.setDate(t.getDate()+1),t.setHours(0,0,0,0)}while(t<a);return e},e.prototype.updateHolidayLabelHeight=function(){var e=this.parent.getContentHeight(),t=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(t=this.parent.toolbarModule.element.offsetHeight);for(var a=this.parent.ganttHeight-t-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight,s=a<e?a/2:e/2,o=this.holidayContainer.querySelectorAll("."+n.B),l=0;l<o.length;l++)o[l].style.top=i.i(r.formatUnit)(s)},e.prototype.updateContainerHeight=function(){var e=this.parent.getContentHeight();this.holidayContainer&&(this.holidayContainer.style.height=i.i(r.formatUnit)(e),this.updateHolidayLabelHeight()),this.weekendContainer&&(this.weekendContainer.style.height=i.i(r.formatUnit)(e))},e.prototype.removeContainers=function(){this.holidayContainer&&i.i(r.remove)(this.holidayContainer),this.weekendContainer&&i.i(r.remove)(this.weekendContainer),this.nonworkingContainer&&i.i(r.remove)(this.nonworkingContainer)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(3)),a=i(4),s=(i.n(a),this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}),o=function(){function e(e){this.isZoomIn=!1,this.isZooming=!1,this.isZoomToFit=!1,this.topTierCollection=[],this.bottomTierCollection=[],this.parent=e,this.initProperties()}return e.prototype.initProperties=function(){this.timelineStartDate=null,this.timelineEndDate=null,this.totalTimelineWidth=0,this.customTimelineSettings=null,this.parent.isTimelineRoundOff=!this.isZoomToFit&&!!i.i(r.isNullOrUndefined)(this.parent.projectStartDate),this.parent.enablePersistence&&(this.parent.timelineSettings=this.parent.currentZoomingLevel)},e.prototype.validateTimelineProp=function(){this.roundOffDays(),this.processTimelineProperty(),this.timelineWidthCalculation()},e.prototype.refreshTimeline=function(){this.initProperties(),this.processTimelineUnit(),this.parent.dataOperation.calculateProjectDates(),this.parent.isFromOnPropertyChange||this.parent.updateProjectDates(this.parent.cloneProjectStartDate,this.parent.cloneProjectEndDate,this.parent.isTimelineRoundOff)},e.prototype.refreshTimelineByTimeSpan=function(){this.validateTimelineProp(),this.parent.ganttChartModule.chartTimelineContainer.innerHTML="",this.createTimelineSeries()},e.prototype.updateChartByNewTimeline=function(){this.parent.chartRowsModule.refreshChartByTimeline(),this.parent.notify("refreshDayMarkers",{})},e.prototype.processZooming=function(e){this.isZoomToFit=!1,i.i(r.isNullOrUndefined)(this.parent.zoomingProjectStartDate)||(this.parent.cloneProjectStartDate=this.parent.cloneProjectStartDate.getTime()<this.parent.zoomingProjectStartDate.getTime()?this.parent.cloneProjectStartDate:this.parent.zoomingProjectStartDate,this.parent.cloneProjectEndDate=this.parent.cloneProjectEndDate.getTime()>this.parent.zoomingProjectEndDate.getTime()?this.parent.cloneProjectEndDate:this.parent.zoomingProjectEndDate),this.parent.zoomingProjectStartDate=null,this.parent.zoomingProjectEndDate=null;var t=this.checkCurrentZoomingLevel();this.isZoomIn=e,this.isZooming=!0;var n=e?t+1:t-1;this.parent.toolbarModule&&(e?n===this.parent.zoomingLevels[this.parent.zoomingLevels.length-1].level?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!1):this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!0):n===this.parent.zoomingLevels[0].level?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!1):this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!0)),n=this.parent.zoomingLevels.findIndex(function(e){return e.level===n});var a=this.parent.zoomingLevels[n],s={requestType:e?"beforeZoomIn":"beforeZoomOut",timeline:a,cancel:!1};this.parent.trigger("actionBegin",s),s.cancel||(a=s.timeline,this.changeTimelineSettings(a))},e.prototype.changeTimelineSettings=function(e){var t=this,n=this.isSingleTier?"None"===this.customTimelineSettings.topTier.unit?"topTier":"bottomTier":null;Object.keys(this.customTimelineSettings).forEach(function(a){if(a!==n)t.customTimelineSettings[a]="object"!=typeof e[a]||i.i(r.isNullOrUndefined)(e[a])?e[a]:s({},e[a]);else{var o="topTier"===a?"bottomTier":"topTier";t.customTimelineSettings[o]=s({},e.bottomTier)}}),this.parent.isTimelineRoundOff=!this.isZoomToFit&&!!i.i(r.isNullOrUndefined)(this.parent.projectStartDate),this.processTimelineUnit(),this.parent.updateProjectDates(this.parent.cloneProjectStartDate,this.parent.cloneProjectEndDate,this.parent.isTimelineRoundOff);var a=this.parent.criticalPathModule;if(this.parent.enableCriticalPath&&a&&a.criticalConnectorLine(a.criticalPathCollection,a.detailPredecessorCollection,!0,a.predecessorCollectionTaskIds),this.isZooming||this.isZoomToFit){var o={requestType:this.isZoomIn?"AfterZoomIn":this.isZoomToFit?"AfterZoomToProject":"AfterZoomOut",timeline:this.parent.currentZoomingLevel};this.parent.trigger("actionComplete",o)}},e.prototype.processZoomToFit=function(){this.isZoomToFit=!0,this.isZooming=!1,this.parent.zoomingProjectStartDate||(this.parent.zoomingProjectStartDate=this.parent.cloneProjectStartDate,this.parent.zoomingProjectEndDate=this.parent.cloneProjectEndDate),this.parent.dataOperation.calculateProjectDates(),this.parent.zoomingProjectStartDate>this.parent.cloneProjectStartDate&&(this.parent.cloneProjectStartDate=new Date(this.parent.allowUnscheduledTasks?this.parent.zoomingProjectStartDate:this.parent.cloneProjectStartDate));var e,t,n,a=this.parent.cloneProjectEndDate.getTime()-this.parent.cloneProjectStartDate.getTime(),s=a/864e5,o=this.parent.ganttChartModule.chartElement.offsetWidth,l=o/s,d=this.parent.zoomingLevels.slice(),p=d.sort(function(e,t){return e.perDayWidth<t.perDayWidth?1:-1});if(0!==l){for(var h=0;h<p.length;h++){if(t=p[h],h===p.length-1){e=p[h];break}if(n=p[h+1],l>=t.perDayWidth){e=p[h];break}if(l<t.perDayWidth&&l>n.perDayWidth){e=p[h+1];break}}var u=i.i(r.extend)({},{},e,!0);this.roundOffDateToZoom(this.parent.cloneProjectStartDate,!0,l,u.bottomTier.unit,e),this.roundOffDateToZoom(this.parent.cloneProjectEndDate,!1,l,u.bottomTier.unit,e);var c=this.calculateNumberOfTimelineCells(u),g=this.parent.ganttChartModule.scrollElement.offsetHeight-17,f=this.parent.ganttChartModule.chartBodyContent.offsetHeight,m=f<=g?0:17;u.timelineUnitSize=Math.abs(o-m)/c;var y={requestType:"beforeZoomToProject",timeline:u};this.parent.toolbarModule&&this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin",this.parent.controlId+"_zoomout"],!0),this.parent.trigger("actionBegin",y),this.changeTimelineSettings(u)}},e.prototype.bottomTierCellWidthCalc=function(e,t,i){var r;switch(e){case"Minutes":r=6e4*t.bottomTier.count;break;case"Hour":r=36e5*t.bottomTier.count;break;case"Week":r=6048e5*t.bottomTier.count;break;case"Day":r=864e5*t.bottomTier.count;break;case"Month":var n=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();r=t.bottomTier.count*(86400*n*1e3);break;case"Year":var a=i.getFullYear()%400==0||i.getFullYear()%100!=0&&i.getFullYear()%4==0?366:365;r=t.bottomTier.count*(86400*a*1e3)}return r},e.prototype.roundOffDateToZoom=function(e,t,i,r,n){var a=this.bottomTierCellWidthCalc(r,n,e);t?e.setTime(e.getTime()-a):e.setTime(e.getTime()+a)},e.prototype.calculateNumberOfTimelineCells=function(e){var t=Math.abs((this.parent.cloneProjectEndDate.getTime()-this.parent.cloneProjectStartDate.getTime())/864e5),i=e.bottomTier.count,r=e.bottomTier.unit;return"Day"===r?t/i:"Week"===r?t/i/7:"Month"===r?t/i/28:"Year"===r?t/i/336:"Hour"===r?t*(24/i):t*(1440/i)},e.prototype.processTimelineUnit=function(){var e=["timelineViewMode","timelineUnitSize","weekStartDay","weekendBackground"],t={topTier:["unit","format","count","formatter"],bottomTier:["unit","format","count","formatter"]},i=["Year","Month","Week","Day","Hour","Minutes"];this.customTimelineSettings=this.customTimelineSettings?this.customTimelineSettings:this.extendFunction(this.parent.timelineSettings,e,t),-1===i.indexOf(this.customTimelineSettings.topTier.unit)&&-1===i.indexOf(this.customTimelineSettings.bottomTier.unit)?(this.customTimelineSettings.topTier.unit=-1!==i.indexOf(this.customTimelineSettings.timelineViewMode)?this.customTimelineSettings.timelineViewMode:"Week",this.customTimelineSettings.bottomTier.unit=5!==i.indexOf(this.customTimelineSettings.topTier.unit)?i[i.indexOf(this.customTimelineSettings.topTier.unit)+1]:"None"):-1!==i.indexOf(this.customTimelineSettings.topTier.unit)&&-1!==i.indexOf(this.customTimelineSettings.bottomTier.unit)&&i.indexOf(this.customTimelineSettings.topTier.unit)>i.indexOf(this.customTimelineSettings.bottomTier.unit)?this.customTimelineSettings.bottomTier.unit=this.customTimelineSettings.topTier.unit:(this.customTimelineSettings.topTier.unit=-1===i.indexOf(this.customTimelineSettings.topTier.unit)?"None":this.customTimelineSettings.topTier.unit,this.customTimelineSettings.bottomTier.unit=-1===i.indexOf(this.customTimelineSettings.bottomTier.unit)?"None":this.customTimelineSettings.bottomTier.unit),this.topTier=this.customTimelineSettings.topTier.unit,this.bottomTier=this.customTimelineSettings.bottomTier.unit,this.previousIsSingleTier=this.isSingleTier,this.isSingleTier="None"===this.topTier||"None"===this.bottomTier},e.prototype.processTimelineProperty=function(){this.customTimelineSettings.topTier.count="None"===this.topTier?1:this.validateCount(this.customTimelineSettings.topTier.unit,this.customTimelineSettings.topTier.count,"topTier"),this.customTimelineSettings.bottomTier.count="None"===this.customTimelineSettings.bottomTier.unit?1:this.validateCount(this.customTimelineSettings.bottomTier.unit,this.customTimelineSettings.bottomTier.count,"bottomTier"),this.customTimelineSettings.bottomTier.format=this.validateFormat(this.customTimelineSettings.bottomTier.unit,this.customTimelineSettings.bottomTier.format),this.customTimelineSettings.topTier.format=this.validateFormat(this.topTier,this.customTimelineSettings.topTier.format),this.customTimelineSettings.weekStartDay=this.customTimelineSettings.weekStartDay>=0&&this.customTimelineSettings.weekStartDay<=6?this.customTimelineSettings.weekStartDay:0,this.checkCurrentZoomingLevel()},e.prototype.calculateZoomingLevelsPerDayWidth=function(){for(var e=this.parent.zoomingLevels,t=0;t<e.length;t++){var i=this.getPerDayWidth(e[t].timelineUnitSize,e[t].bottomTier.count,e[t].bottomTier.unit);e[t].perDayWidth=i}},e.prototype.checkCurrentZoomingLevel=function(){var e="None"!==this.customTimelineSettings.bottomTier.unit?this.customTimelineSettings.bottomTier.count:this.customTimelineSettings.topTier.count,t="None"!==this.customTimelineSettings.bottomTier.unit?this.customTimelineSettings.bottomTier.unit:this.customTimelineSettings.topTier.unit,i=this.getCurrentZoomingLevel(t,e);return this.parent.toolbarModule&&(i===this.parent.zoomingLevels[this.parent.zoomingLevels.length-1].level?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!1):i===this.parent.zoomingLevels[0].level&&this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!1)),this.parent.currentZoomingLevel=this.parent.zoomingLevels[i],i},e.prototype.getCurrentZoomingLevel=function(e,t){var i,r,n,a,s;this.parent.zoomingLevels.length||(this.parent.zoomingLevels=this.parent.getZoomingLevels());var o=this.parent.zoomingLevels.filter(function(t){return t.bottomTier.unit===e});if(0===o.length){var l=this.getClosestUnit(e,"",!1);o=this.parent.zoomingLevels.filter(function(e){return e.bottomTier.unit===l})}for(var d=o.sort(function(e,t){return e.bottomTier.count<t.bottomTier.count?1:-1}),p=0;p<d.length;p++){if(s=d[p],p===d.length-1){i=d[p].level;break}if(a=d[p+1],t>=s.bottomTier.count){r=d[p],n=d.filter(function(e){return e.bottomTier.count===r.bottomTier.count}),i=n.length>1?this.checkCollectionsWidth(n):n[0].level;break}if(t<s.bottomTier.count&&t>a.bottomTier.count){r=d[p+1],n=d.filter(function(e){return e.bottomTier.count===r.bottomTier.count}),i=n.length>1?this.checkCollectionsWidth(n):n[0].level;break}}return i},e.prototype.getClosestUnit=function(e,t,i){var r=["Year","Month","Week","Day","Hour","Minutes"],n=r.indexOf(e);return 0===n&&(i=!0),e=this.isZoomIn||i?r[n+1]:r[n-1],0===this.parent.zoomingLevels.filter(function(t){return t.bottomTier.unit===e}).length?("Year"===e&&(i=!0),t=e,this.getClosestUnit(e,t,i)):e},e.prototype.checkCollectionsWidth=function(e){for(var t,i,r,n=e,a=this.customTimelineSettings.timelineUnitSize,s=n.sort(function(e,t){return e.timelineUnitSize<t.timelineUnitSize?1:-1}),o=0;o<s.length;o++){if(r=s[o],o===s.length-1){t=s[o].level;break}if(i=s[o+1],a>=r.timelineUnitSize){t=s[o].level;break}if(a<r.timelineUnitSize&&a>i.timelineUnitSize){t=s[o+1].level;break}}return t},e.prototype.updateTimelineHeaderHeight=function(){if(this.parent.timelineModule.isSingleTier?(i.i(r.addClass)([this.parent.ganttChartModule.chartTimelineContainer],n._27),this.parent.treeGrid.element&&(i.i(r.addClass)(this.parent.treeGrid.element.querySelectorAll(".e-headercell"),n._27),i.i(r.addClass)(this.parent.treeGrid.element.querySelectorAll(".e-columnheader"),n._27))):(i.i(r.removeClass)([this.parent.ganttChartModule.chartTimelineContainer],n._27),this.parent.treeGrid.element&&(i.i(r.removeClass)(this.parent.treeGrid.element.querySelectorAll(".e-headercell"),n._27),i.i(r.removeClass)(this.parent.treeGrid.element.querySelectorAll(".e-columnheader"),n._27))),this.previousIsSingleTier!==this.isSingleTier){var e=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(e=this.parent.toolbarModule.element.offsetHeight),this.parent.ganttChartModule.scrollObject.setHeight(this.parent.ganttHeight-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight-e),this.parent.treeGrid.height=this.parent.ganttHeight-e-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight}},e.prototype.createTimelineSeries=function(){var e,t,a,s,o,l=this.isSingleTier?1:2,d="None"===this.topTier?"bottomTier":"topTier";this.updateTimelineHeaderHeight(),this.topTierCollection=[],this.bottomTierCollection=[];for(var p=0;p<l;p++)s=i.i(r.createElement)("table",{className:n._73,styles:"display: block;"}),o=i.i(r.createElement)("thead",{className:n._74,styles:"display:block; border-collapse:collapse"}),e=i.i(r.createElement)("tr",{innerHTML:this.createTimelineTemplate(d)}),t=i.i(r.createElement)("th"),a=i.i(r.createElement)("div",{styles:"width: 20px"}),t.appendChild(a),e.appendChild(t),o.appendChild(e),s.appendChild(o),this.parent.ganttChartModule.chartTimelineContainer.appendChild(s),d="bottomTier",e=null},e.prototype.validateCount=function(e,t,n){var a,s=!i.i(r.isNullOrUndefined)(t)&&parseInt(t.toString(),10)>0?parseInt(t.toString(),10):1,o=Math.abs(this.timelineRoundOffEndDate.getTime()-this.timelineStartDate.getTime());switch(e){case"Year":a=Math.round(o/864e5/336),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Month":a=Math.round(o/864e5/28),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Week":a=Math.round(o/864e5/7),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Day":a=Math.round(o/864e5),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Hour":a=Math.round(o/36e5),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Minutes":a=Math.round(o/6e4),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s))}return t!==s&&this.isZooming&&this.parent.toolbarModule&&("bottomTier"===n||this.isSingleTier)&&(this.isZoomIn?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!1):this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!1)),s},e.prototype.validateBottomTierCount=function(e,t){var i;switch(e){case"Year":i=t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Month":i="Year"===this.topTier?t<=12*this.customTimelineSettings.topTier.count?t:12*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Week":i="Year"===this.topTier?t<=48*this.customTimelineSettings.topTier.count?t:48*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=4*this.customTimelineSettings.topTier.count?t:4*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Day":i="Year"===this.topTier?t<=336*this.customTimelineSettings.topTier.count?t:336*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=28*this.customTimelineSettings.topTier.count?t:28*this.customTimelineSettings.topTier.count:"Week"===this.topTier?t<=7*this.customTimelineSettings.topTier.count?t:7*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Hour":i="Year"===this.topTier?t<=8064*this.customTimelineSettings.topTier.count?t:8064*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=672*this.customTimelineSettings.topTier.count?t:672*this.customTimelineSettings.topTier.count:"Week"===this.topTier?t<=7*this.customTimelineSettings.topTier.count*24?t:7*this.customTimelineSettings.topTier.count*24:"Day"===this.topTier?t<=24*this.customTimelineSettings.topTier.count?t:24*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Minutes":i="Year"===this.topTier?t<=483840*this.customTimelineSettings.topTier.count?t:483840*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=40320*this.customTimelineSettings.topTier.count?t:40320*this.customTimelineSettings.topTier.count:"Week"===this.topTier?t<=7*this.customTimelineSettings.topTier.count*24*60?t:7*this.customTimelineSettings.topTier.count*24*60:"Day"===this.topTier?t<=24*this.customTimelineSettings.topTier.count*60?t:24*this.customTimelineSettings.topTier.count*60:"Hour"===this.topTier?t<=60*this.customTimelineSettings.topTier.count?t:60*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count}return i},e.prototype.validateFormat=function(e,t){var i;switch(e){case"Week":i=t||"MMM dd, yyyy";break;case"Day":case"None":i=t||"";break;case"Hour":i=t||"H";break;case"Month":i=t||"MMM yyyy";break;case"Year":i=t||"yyyy";break;case"Minutes":i=t||"m"}return i},e.prototype.extendFunction=function(e,t,i){for(var r=this,n={},a=0;a<t.length;a++)n[t[a]]=e[t[a]];return i&&Object.keys(i).forEach(function(t){n[t]=r.extendFunction(e[t],i[t],null)}),n},e.prototype.formatDateHeader=function(e,t){var i,r=new Date(t.getTime());return""===e?(i=this.parent.globalize.formatDate(r,{format:"E"}),i="zh"===this.parent.locale?i.slice(1):i.slice(0,1)):i=this.parent.globalize.formatDate(r,{format:e}),i},e.prototype.customFormat=function(e,t,n,a,s){return(s="string"==typeof s?i.i(r.getValue)(s,window):s)(e,t,n,a)},e.prototype.createTimelineTemplate=function(e){var t,i,r=!1,n=this.parent,a="",s="",o="topTier"===e?n.timelineModule.customTimelineSettings.topTier.unit:n.timelineModule.customTimelineSettings.bottomTier.unit,l="topTier"===e?n.timelineModule.customTimelineSettings.topTier.count:n.timelineModule.customTimelineSettings.bottomTier.count,d=new Date(this.parent.timelineModule.timelineStartDate.toString()),p=new Date(this.timelineRoundOffEndDate.toString()),h=[];do{var u={};u.startDate=new Date(d.getTime()),"Month"===o&&"bottomTier"===e&&1!=l&&0===h.length&&(r=!0),s=this.getHeaterTemplateString(new Date(d.toString()),o,e,!1,l,u,r),h.push(new Date(d.toString())),r?i=this.calculateQuarterEndDate(d,l).getTime():(t=this.getIncrement(d,l,o),i=d.getTime()+t),r=!1,d.setTime(i),5===d.getHours()&&2===l&&"bottomTier"===e&&"Hour"===this.parent.timelineSettings.bottomTier.unit&&d.setTime(d.getTime()-36e5),d>=p&&(s=this.getHeaterTemplateString(h[h.length-1],o,e,!0,l,u)),a+=s;var c="topTier"===e?this.topTierCollection:this.bottomTierCollection;u.endDate=new Date(d.getTime()),c.push(u)}while(d<p);return a},e.prototype.updateTimelineAfterZooming=function(e,t){var n,a,s,o=document.getElementsByClassName("e-chart-scroll-container e-content")[0];if(!i.i(r.isNullOrUndefined)(o)){var l=o.offsetWidth,d=o.offsetHeight,p=document.getElementsByClassName("e-chart-rows-container")[0].offsetHeight;if(n=Math.abs(this.timelineStartDate.getTime()-e.getTime()),n/=864e5,a="None"===this.bottomTier?this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize,this.customTimelineSettings.topTier.count,this.topTier):this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize,this.customTimelineSettings.bottomTier.count,this.bottomTier),s=d<p?a*n+17:a*n,l>=s){var h=l-s;h=Math.round(h/a),e.setDate(e.getDate()+h),this.parent.timelineModule.timelineEndDate=e,t&&this.parent.updateProjectDates(this.timelineStartDate,this.timelineEndDate,this.parent.isTimelineRoundOff)}}},e.prototype.getTimelineRoundOffEndDate=function(e){var t="None"===this.topTier?this.bottomTier:this.topTier,n=new Date(e.toString());return this.parent.isTimelineRoundOff&&("Hour"===t?n.setMinutes(60):"Minutes"===t?n.setSeconds(60):n.setHours(24,0,0,0)),(this.isZooming||this.parent.isLoad||this.parent.isFromOnPropertyChange)&&i.i(r.isNullOrUndefined)(this.parent.projectEndDate)&&this.updateTimelineAfterZooming(n,!1),n},e.prototype.getIncrement=function(e,t,i){var r,n=new Date(e.getTime()),a=new Date(e.getTime());switch(i){case"Year":n=e,a=new Date(e.getFullYear()+(t-1),11,31),r=a.getTime()-n.getTime()+864e5;break;case"Month":n=e,a=new Date(e.getFullYear(),e.getMonth()+t,1),r=a.getTime()-n.getTime();break;case"Week":var s=this.parent.timelineModule.customTimelineSettings.weekStartDay,o=e.getDay()<s?s-e.getDay():6-e.getDay()+s;t=o>0?t-1:0,a.setHours(24,0,0,0),o=e.getDay()<s&&o>0?o-1:o,a.setDate(a.getDate()+(o+7*t)),r=a.getTime()-n.getTime();break;case"Day":a.setHours(24,0,0,0),r=a.getTime()-n.getTime()+864e5*(t-1);break;case"Hour":a.setMinutes(60),a.setSeconds(0),r=a.getTime()-n.getTime()+36e5*(t-1),r=this.checkDate(n,a,r,t);break;case"Minutes":a.setSeconds(60),r=a.getTime()-n.getTime()+6e4*(t-1)}return r},e.prototype.checkDate=function(e,t,i,r){var n=new Date(e.getTime());if(n.setTime(n.getTime()+i),1!==r&&(n.getTime()-t.getTime())/36e5!=r&&e.getTimezoneOffset()!==n.getTimezoneOffset()){var a=r-(n.getTime()-t.getTime())/36e5;this.parent.isInDst(n)?this.parent.isInDst(n)&&2!==r&&(i-=36e5*a):i+=36e5*a}return i},e.prototype.isWeekendHeaderCell=function(e,t,i){return!("Day"!==e&&"Hour"!==e&&"Minutes"!==e||1!==this.customTimelineSettings[t].count&&"Hour"!==e&&"Minutes"!==e||-1===this.parent.nonWorkingDayIndex.indexOf(i.getDay()))},e.prototype.calculateQuarterEndDate=function(e,t){var i=e.getMonth();return 3===t?i>=0&&i<=2?new Date(e.getFullYear(),3,1):i>=3&&i<=5?new Date(e.getFullYear(),6,1):i>=6&&i<=8?new Date(e.getFullYear(),9,1):new Date(e.getFullYear()+1,0,1):i>=0&&i<=5?new Date(e.getFullYear(),6,1):new Date(e.getFullYear()+1,0,1)},e.prototype.getHeaterTemplateString=function(e,t,a,s,o,l,d){var p,h="",u="",c="topTier"===a?this.parent.timelineModule.customTimelineSettings.topTier.format:this.parent.timelineModule.customTimelineSettings.bottomTier.format,g="topTier"===a?this.parent.timelineModule.customTimelineSettings.topTier.formatter:this.parent.timelineModule.customTimelineSettings.bottomTier.formatter,f=i.i(r.isNullOrUndefined)(g)?this.parent.globalize.formatDate(e,{format:this.parent.getDateFormat()}):this.customFormat(e,c,a,t,g);p=this.getIncrement(e,o,t)/864e5*this.parent.perDayWidth;var m=p;p=s||d?s?this.calculateWidthBetweenTwoDate(t,e,this.timelineRoundOffEndDate):this.calculateWidthBetweenTwoDate(t,e,this.calculateQuarterEndDate(e,o)):p;var y=this.isWeekendHeaderCell(t,a,e),v="topTier"===a?" e-gantt-top-cell-text":"",D=i.i(r.isNullOrUndefined)(g)?this.formatDateHeader(c,e):this.customFormat(e,c,a,t,g);return u+=this.parent.timelineModule.isSingleTier?'<th class="'+n._75+" ":'<th class="'+n._76,u+=y?" "+n._77:"",u+='" tabindex="-1" aria-label= "'+this.parent.localeObj.getConstant("timelineCell")+" "+f,u+='" style="width:'+p+"px;",u+=y&&this.customTimelineSettings.weekendBackground?"background-color:"+this.customTimelineSettings.weekendBackground+";":"",u+='"><div class="'+n._78+v+'" style="width:'+(p-1)+"px;"+(this.parent.timelineSettings.showTooltip?'"title="'+f:""),u+='">'+D+"</div>",h+=u,h+="</th>",!this.isSingleTier&&"topTier"!==a||s?(this.isSingleTier||"topTier"===a)&&s&&(this.totalTimelineWidth=this.totalTimelineWidth-m+p):this.totalTimelineWidth=this.totalTimelineWidth+p,l.value=D,l.isWeekend=y,l.width=m,h},e.prototype.calculateWidthBetweenTwoDate=function(e,t,i){return(i.getTime()-t.getTime())/864e5*this.parent.perDayWidth},e.prototype.timelineWidthCalculation=function(){var e=this.customTimelineSettings.timelineUnitSize,t=this.customTimelineSettings.bottomTier.count,i=this.customTimelineSettings.topTier.count;this.bottomTierCellWidth=e,"None"===this.bottomTier?this.parent.perDayWidth=this.getPerDayWidth(e,i,this.topTier):this.parent.perDayWidth=this.getPerDayWidth(e,t,this.bottomTier),this.topTierCellWidth="None"!==this.bottomTier?"Week"===this.topTier?7*this.parent.perDayWidth:"Hour"===this.topTier?this.parent.perDayWidth/24:"Minutes"===this.topTier?this.parent.perDayWidth/1440:this.parent.perDayWidth:e,this.topTierCellWidth=this.isSingleTier?this.topTierCellWidth:this.topTierCellWidth*i},e.prototype.getPerDayWidth=function(e,t,i){var r;switch(i){case"Year":r=e/t/336;break;case"Month":r=e/t/28;break;case"Week":r=e/t/7;break;case"Day":r=e/t;break;case"Hour":r=24/t*e;break;case"Minutes":r=1440/t*e}return r},e.prototype.roundOffDays=function(){var e=this.parent.cloneProjectStartDate,t=this.parent.cloneProjectEndDate,i="None"===this.topTier?this.bottomTier:this.topTier;if(this.parent.isTimelineRoundOff){if("Year"===i)e=new Date(e.getFullYear(),0,1),t=new Date(t.getFullYear(),11,31);else if("Month"===i)e=new Date(e.getFullYear(),e.getMonth(),1),t=new Date(t.getFullYear(),t.getMonth()+1,0);else if("Week"===i){var r=this.parent.timelineModule.customTimelineSettings.weekStartDay,n=e.getDay()<r?e.getDate()-(7-r+e.getDay()):e.getDate()-e.getDay()+r;e.setDate(n);var a=t.getDate()-t.getDay(),s=a+6+r;t.setDate(s)}"Hour"===i?e.setMinutes(0):"Minutes"===i?e.setSeconds(0):e.setHours(0,0,0,0)}this.timelineStartDate=e,this.timelineEndDate=t,this.timelineRoundOffEndDate=this.getTimelineRoundOffEndDate(this.timelineEndDate)},e.prototype.updateScheduleDatesByToolBar=function(e,t,i,r){if("Year"===e&&("prevTimeSpan"===t?i=0===i.getMonth()?new Date(i.getFullYear()-1,0,1):new Date(i.getFullYear(),0,1):r=11===r.getMonth()?new Date(r.getFullYear()+1,0,1):new Date(r.getFullYear(),12,1)),"Month"===e&&("prevTimeSpan"===t?i=1===i.getDate()?new Date(i.getFullYear(),i.getMonth()-1,1):new Date(i.getFullYear(),i.getMonth(),1):r=new Date(r.getFullYear(),r.getMonth()+1,1)),"Week"===e){var n=this.parent.timelineModule.customTimelineSettings.weekStartDay,a=void 0;"prevTimeSpan"===t?(a=i.getDay()<n?7-(n-i.getDay()):i.getDay()-n,i.setHours(0,0,0,0),0===a?i.setDate(i.getDate()-7):i.setDate(i.getDate()-a)):(a=r.getDay()<n?n-r.getDay():7-r.getDay()+n,r.setHours(0,0,0,0),0===a?r.setDate(r.getDate()+6):r.setDate(r.getDate()+a))}"Day"===e&&("prevTimeSpan"===t?0===i.getHours()?i.setTime(i.getTime()-864e5):i.setHours(0):0===r.getHours()?r.setTime(r.getTime()+864e5):r.setHours(24)),"Hour"===e&&("prevTimeSpan"===t?0===i.getMinutes()?i.setTime(i.getTime()-36e5):i.setMinutes(0):0===r.getMinutes()?r.setTime(r.getTime()+36e5):r.setMinutes(60)),"Minutes"===e&&("prevTimeSpan"===t?0===i.getSeconds()?i.setTime(i.getTime()-6e4):i.setSeconds(0):0===r.getSeconds()?r.setTime(r.getTime()+6e4):r.setSeconds(60)),this.parent.cloneProjectStartDate=i,this.parent.cloneProjectEndDate=r},e.prototype.updateTimeLineOnEditing=function(e,t){if(e[0].length>=1)for(var n=0;n<e.length;n++){var s=e[n],o=s.filter(function(e){return!i.i(r.isNullOrUndefined)(e.ganttProperties.startDate)}),l=s.filter(function(e){return!i.i(r.isNullOrUndefined)(e.ganttProperties.endDate)}),d=o.length>0?new Date(a.DataUtil.aggregates.min(o,"ganttProperties.startDate")):null,p=l.length>0?new Date(a.DataUtil.aggregates.max(l,"ganttProperties.endDate")):null,h=new Date(this.parent.dataOperation.checkStartDate(this.timelineStartDate).getTime()),u=new Date(this.parent.dataOperation.checkEndDate(this.timelineEndDate).getTime()),c=i.i(r.isNullOrUndefined)(d)?null:this.parent.dataOperation.getTaskLeft(d,!1),g=i.i(r.isNullOrUndefined)(p)?null:this.parent.dataOperation.getTaskLeft(p,!1),f=this.parent.dataOperation.getTaskLeft(h,!1),m=this.parent.dataOperation.getTaskLeft(u,!1),y=void 0;!i.i(r.isNullOrUndefined)(c)&&(c<this.bottomTierCellWidth||c<=f)?(y="prevTimeSpan",d=d>this.timelineStartDate?this.timelineStartDate:d):d=this.timelineStartDate,!i.i(r.isNullOrUndefined)(g)&&(g>=this.totalTimelineWidth-this.bottomTierCellWidth||g>=m)?(y="prevTimeSpan"===y?"both":"nextTimeSpan",p=p<this.timelineEndDate?this.timelineEndDate:p):p=this.timelineEndDate,y?this.performTimeSpanAction(y,t,d,p):i.i(r.isNullOrUndefined)(s[0].ganttProperties.segments)||this.parent.dataOperation.updateWidthLeft(s[0]);break}},e.prototype.performTimeSpanAction=function(e,t,n,a,s){s=i.i(r.isNullOrUndefined)(s)?"None"===this.parent.timelineModule.topTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier:s;var o=new Date(this.parent.cloneProjectStartDate.getTime()),l=new Date(this.parent.cloneProjectEndDate.getTime());"publicMethod"!==t&&"both"===e?(this.updateScheduleDatesByToolBar(s,"prevTimeSpan",n,a),this.updateScheduleDatesByToolBar(s,"nextTimeSpan",new Date(this.parent.cloneProjectStartDate.getTime()),a)):this.updateScheduleDatesByToolBar(s,e,n,a);var d=this.timeSpanActionEvent("actionBegin",e,t);if(d.cancel)this.parent.cloneProjectStartDate=o,this.parent.cloneProjectEndDate=l;else{if(this.parent.updateProjectDates(d.projectStartDate,d.ProjectEndDate,d.isTimelineRoundOff,t),"prevTimeSpan"===e&&"publicMethod"===t)this.parent.ganttChartModule.updateScrollLeft(0);else if("nextTimeSpan"===e&&"publicMethod"===t)this.parent.ganttChartModule.updateScrollLeft(this.parent.timelineModule.totalTimelineWidth);else if("nextTimeSpan"===e&&"TaskbarEditing"===t){var p=document.getElementsByClassName("e-chart-scroll-container e-content")[0].scrollLeft;this.parent.element.querySelector(".e-timeline-header-container").scrollLeft=p}this.parent.timelineModule.timeSpanActionEvent("actionComplete",e,t)}},e.prototype.timeSpanActionEvent=function(e,t,i){var r={};return r.projectStartDate=new Date(this.parent.cloneProjectStartDate.getTime()),r.ProjectEndDate=new Date(this.parent.cloneProjectEndDate.getTime()),r.requestType="publicMethod"===i?t:"beforeAdd"===i?"TimelineRefreshOnAdd":"TaskbarEditing"===i?"TimelineRefreshOnEdit":t,"actionBegin"===e&&(r.isTimelineRoundOff=this.parent.isTimelineRoundOff,r.cancel=!1),r.action="TimescaleUpdate",this.parent.trigger(e,r),r},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(8),n=(i.n(r),i(2)),a=i(3),s=i(0),o=(i.n(s),i(4)),l=(i.n(o),function(){function e(e){this.parent=e,this.createTooltip(),this.parent.on("destroy",this.destroy,this)}return e.prototype.createTooltip=function(){this.toolTipObj=new r.Tooltip,this.toolTipObj.target=".e-header-cell-label, .e-gantt-child-taskbar,.e-gantt-parent-taskbar, .e-gantt-milestone, .e-gantt-unscheduled-taskbar.e-event-markers, .e-baseline-bar, .e-event-markers,.e-connector-line-container, .e-indicator-span, .e-notes-info, .e-gantt-manualparent-milestone,.e-taskbar-left-resizer, .e-taskbar-right-resizer, .e-baseline-gantt-milestone, .e-gantt-manualparenttaskbar",this.toolTipObj.position="BottomCenter",this.toolTipObj.openDelay=700,this.toolTipObj.enableHtmlSanitizer=!1,this.toolTipObj.cssClass=a._14,this.toolTipObj.animation={open:{effect:"None",delay:0},close:{effect:"None",delay:0}},this.toolTipObj.afterOpen=this.updateTooltipPosition.bind(this),this.toolTipObj.showTipPointer=!1,this.toolTipObj.beforeRender=this.tooltipBeforeRender.bind(this),this.toolTipObj.afterClose=this.tooltipCloseHandler.bind(this),this.toolTipObj.isStringTemplate=!0,this.toolTipObj.appendTo(this.parent.element)},e.prototype.tooltipBeforeRender=function(e){var t=this.parent;if(t.isOnEdit)return void(e.cancel=!0);var r,l=i.i(s.closest)(e.target,"div."+a.F);r=i.i(s.isNullOrUndefined)(l)?i.i(n.j)(e.target,a._30):e.target;var d,p={data:{},args:e,cancel:!1,content:""};if(e.target.classList.contains("e-header-cell-label"))t.timelineSettings.showTooltip?p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("timeline",d,t,e):e.cancel=!0;else if(t.tooltipSettings.showTooltip)if(r&&(p.data=t.ganttChartModule.getRecordByTaskBar(r),d=p.data),e.target.classList.contains("e-gantt-child-taskbar")||e.target.classList.contains("e-gantt-parent-taskbar")||e.target.classList.contains("e-gantt-milestone")||e.target.classList.contains("e-gantt-unscheduled-taskbar")||e.target.classList.contains("e-taskbar-left-resizer")||e.target.classList.contains("e-taskbar-right-resizer")||e.target.classList.contains("e-gantt-manualparenttaskbar")&&t.tooltipSettings.taskbar){var h=void 0;t.tooltipSettings.taskbar&&(h=t.tooltipModule.templateCompiler(t.tooltipSettings.taskbar,t,d,"TooltipTaskbarTemplate")),p.content=this.toolTipObj.content=h?h[0]:t.tooltipModule.getTooltipContent(d.ganttProperties.isMilestone?"milestone":"taskbar",d,t,e)}else if(e.target.classList.contains("e-baseline-bar")||e.target.classList.contains("e-baseline-gantt-milestone")){var u=void 0;t.tooltipSettings.baseline&&(u=t.tooltipModule.templateCompiler(t.tooltipSettings.baseline,t,d,"TooltipBaselineTemplate")),p.content=this.toolTipObj.content=u?u[0]:t.tooltipModule.getTooltipContent(d.ganttProperties.isMilestone?"milestone":"baseline",d,t,e)}else if(e.target.classList.contains("e-event-markers"))p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("marker",d,t,e);else if(e.target.classList.contains("e-connector-line-container")){var c=void 0;t.tooltipModule.predecessorTooltipData=t.tooltipModule.getPredecessorTooltipData(e),p.data=this.predecessorTooltipData,t.tooltipSettings.connectorLine&&(c=t.tooltipModule.templateCompiler(t.tooltipSettings.connectorLine,t,t.tooltipModule.predecessorTooltipData,"TooltipConnectorLineTemplate")),p.content=this.toolTipObj.content=c?c[0]:t.tooltipModule.getTooltipContent("connectorLine",d,t,e)}else if(e.target.classList.contains("e-indicator-span"))p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("indicator",d,t,e),i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0);else if(e.target.classList.contains("e-notes-info")){var g=this.parent.ganttChartModule.getRecordByTarget(e.event);p.content=this.toolTipObj.content=g.ganttProperties.notes,i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0)}else e.target.classList.contains("e-gantt-manualparenttaskbar")?(p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("manualtaskbar",d,t,e),i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0)):e.target.classList.contains("e-gantt-manualparent-milestone")&&(p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("manualmilestone",d,t,e),i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0));else e.cancel=!0;if(!1===e.cancel){var f=new o.Deferred;return t.trigger("beforeTooltipRender",p,function(t){f.resolve(t),t.cancel&&(e.cancel=!0)}),this.toolTipObj.content=p.content,this.parent.isAdaptive||"mouseover"!==e.event.type||(this.currentTarget=e.target,s.EventHandler.add(this.currentTarget,"mousemove",this.mouseMoveHandler.bind(this))),this.parent.renderTemplates(),f}},e.prototype.tooltipCloseHandler=function(e){this.tooltipMouseEvent=null,this.parent.isAdaptive||s.EventHandler.remove(this.currentTarget,"mousemove",this.mouseMoveHandler),this.currentTarget=null},e.prototype.mouseMoveHandler=function(e){this.tooltipMouseEvent=e},e.prototype.updateTooltipPosition=function(e){if(e.element.style.visibility="visible",!i.i(s.isNullOrUndefined)(this.tooltipMouseEvent)&&!e.target.classList.contains("e-notes-info")){var t=this.getPointorPosition(this.tooltipMouseEvent),r=this.parent.getOffsetRect(this.parent.chartPane),n=r.top+this.parent.chartPane.offsetHeight,a=r.left+this.parent.chartPane.offsetWidth,o=t.x,l=t.y;if(a<o+e.element.offsetWidth+10)for(;a<o+e.element.offsetWidth+10;)o=a-e.element.offsetWidth-10,e.element.style.left=o+"px";else o+=10,e.element.style.left=o+"px";window.innerHeight<e.element.offsetHeight+l&&(l=l-e.element.offsetHeight-10),n<l+e.element.offsetHeight+20?l=l-e.element.offsetHeight-10:l+=10,e.element.style.top=l+"px"}},e.prototype.getPointorPosition=function(e){var t,r;return i.i(s.isNullOrUndefined)(i.i(s.getValue)("pageX",e))&&i.i(s.isNullOrUndefined)(i.i(s.getValue)("pageY",e))?i.i(s.isNullOrUndefined)(i.i(s.getValue)("clientX",e))&&i.i(s.isNullOrUndefined)(i.i(s.getValue)("clientY",e))||(t=i.i(s.getValue)("clientX",e)+document.body.scrollLeft+document.documentElement.scrollLeft,r=i.i(s.getValue)("clientY",e)+document.body.scrollTop+document.documentElement.scrollTop):(t=i.i(s.getValue)("pageX",e),r=i.i(s.getValue)("pageY",e)),{x:t,y:r}},e.prototype.getTooltipContent=function(e,t,r,n){var a,o,l;switch(t&&(o=t.ganttProperties,l=i.i(s.isNullOrUndefined)(o.taskName)?"":'<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">'+(this.parent.disableHtmlEncode?o.taskName.replace(/</g,"&lt;").replace(/>/g,"&gt;"):o.taskName)+"</td></tr>"),e){case"milestone":var d=void 0;n.target.className.includes("e-baseline-gantt-milestone")&&!i.i(s.isNullOrUndefined)(o.baselineStartDate)?d=o.baselineStartDate:i.i(s.isNullOrUndefined)(o.startDate)||(d=o.startDate);a='<table class = "e-gantt-tooltiptable"><tbody>'+l+(i.i(s.isNullOrUndefined)(d)?"":'<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(d,this.parent.getDateFormat())+"</td></tr>")+"</tbody></table>";break;case"taskbar":var p=!(t.hasChildRecords&&!o.isAutoSchedule);a='<table class = "e-gantt-tooltiptable"><tbody>'+l+(o.startDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant(p?"startDate":"subTasksStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(p?o.startDate:o.autoStartDate,this.parent.getDateFormat())+"</td></tr>":"")+(o.endDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant(p?"endDate":"subTasksEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(p?o.endDate:o.autoEndDate,this.parent.getDateFormat())+"</td></tr>":"")+(i.i(s.isNullOrUndefined)(o.duration)?"":'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("duration")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getDurationString(p?o.duration:o.autoDuration,o.durationUnit)+"</td></tr>")+(i.i(s.isNullOrUndefined)(o.progress)?"":'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("progress")+"</td><td>:</td><td>"+o.progress+"</td></tr>")+"</tbody></table>";break;case"baseline":a='<table class = "e-gantt-tooltiptable"><tbody>'+l+'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("baselineStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.baselineStartDate,this.parent.getDateFormat())+'</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("baselineEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.baselineEndDate,this.parent.getDateFormat())+"</td></tr></tbody></table>";break;case"marker":var h=r.tooltipModule.getMarkerTooltipData(n),u=h.label?h.label:"";a='<table class = "e-gantt-tooltiptable"><tbody><tr><td>'+this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(h.day),this.parent.getDateFormat())+"</td></tr><tr><td>"+u+"</td></tr></tbody></table>";break;case"connectorLine":a='<table class = "e-gantt-tooltiptable"><tbody><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("from")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+r.tooltipModule.predecessorTooltipData.fromName+" ("+r.tooltipModule.predecessorTooltipData.fromId+')</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("to")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+r.tooltipModule.predecessorTooltipData.toName+" ("+r.tooltipModule.predecessorTooltipData.toId+')</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("taskLink")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+r.tooltipModule.predecessorTooltipData.linkText+'</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("lag")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+r.tooltipModule.predecessorTooltipData.offsetString+"</td></tr></tbody></table>";break;case"indicator":n.target.title.length&&(a='<table class = "e-gantt-tooltiptable"><tbody><tr>'+n.target.title+"</tr></tbody></table>");break;case"timeline":a='<table class = "e-gantt-tooltiptable"><tbody><tr>'+n.target.title+"</tr></tbody></table>";break;case"manualtaskbar":var c=o.autoStartDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(o.autoStartDate,this.parent.getDateFormat())+"</td></tr>":"",g=o.autoEndDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.autoEndDate,this.parent.getDateFormat())+"</td></tr>":"",f=i.i(s.isNullOrUndefined)(o.duration)?"":'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("duration")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getDurationString(o.duration,o.durationUnit)+"</td></tr>";a='<table class = "e-gantt-tooltiptable"><tbody>'+l+(o.startDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("startDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(o.startDate,this.parent.getDateFormat())+"</td></tr>":"")+c+(o.endDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("endDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.endDate,this.parent.getDateFormat())+"</td></tr>":"")+g+f+"</tbody></table>";break;case"manualmilestone":var m=o.autoStartDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(o.autoStartDate,this.parent.getDateFormat())+"</td></tr>":"",y=o.autoEndDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.autoEndDate,this.parent.getDateFormat())+"</td></tr>":"";a='<table class = "e-gantt-tooltiptable"><tbody>'+l+('<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.startDate,this.parent.getDateFormat())+"</tr>")+m+y+"</tbody></table>"}return a},e.prototype.getMarkerTooltipData=function(e){var t=e.target.id.match(/\d+/g);return this.parent.eventMarkers[Number(t)]},e.prototype.getPredecessorTooltipData=function(e){var t=e.target.parentElement.id,i=t.match(/ConnectorLineparent(.*)child(.*)/);i.shift();var r,n;"ResourceView"===this.parent.viewType?(r=this.parent.flatData[this.parent.getTaskIds().indexOf("T"+i[0])],n=this.parent.flatData[this.parent.getTaskIds().indexOf("T"+i[1])]):(r=this.parent.flatData[this.parent.ids.indexOf(i[0])],n=this.parent.flatData[this.parent.ids.indexOf(i[1])]);var a=r.ganttProperties.predecessor.filter(function(e){return e.to===i[1]});return{fromId:"ResourceView"===this.parent.viewType?r.ganttProperties.taskId:r.ganttProperties.rowUniqueID,toId:"ResourceView"===this.parent.viewType?n.ganttProperties.taskId:n.ganttProperties.rowUniqueID,fromName:r.ganttProperties.taskName,toName:n.ganttProperties.taskName,linkType:a[0].type,linkText:this.parent.getPredecessorTextValue(a[0].type),offset:a[0].offset,offsetUnit:a[0].offsetUnit,offsetString:this.parent.getDurationString(a[0].offset,a[0].offsetUnit)}},e.prototype.templateCompiler=function(e,t,r,n){var a=t.chartRowsModule.templateCompiler(e),o=t.chartRowsModule.getTemplateID(n);return a(i.i(s.extend)({index:0},r),t,n,o,!0)},e.prototype.destroy=function(){this.toolTipObj.destroy()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.parent=e}return e.prototype.renderWrapper=function(){this.wrapper=i.i(r.createElement)("div",{className:"e-virtualtable",styles:"position: absolute; transform: translate(0px, 0px);"}),this.parent.ganttChartModule.scrollElement.appendChild(this.wrapper),this.virtualTrack=i.i(r.createElement)("div",{className:"e-virtualtrack",styles:"position: relative; pointer-events: none; width: 100%;"}),this.parent.ganttChartModule.scrollElement.appendChild(this.virtualTrack),this.wrapper.appendChild(this.parent.ganttChartModule.chartBodyContent)},e.prototype.appendChildElements=function(e){this.wrapper.appendChild(e)},e.prototype.adjustTable=function(){var e=this.parent.treeGrid.getContent().querySelector(".e-content").querySelector(".e-virtualtable");this.parent.ganttChartModule.virtualRender.wrapper.style.transform=e.style.transform},e}())},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(22);i.d(t,"Gantt",function(){return r.a}),i.d(t,"PdfHorizontalOverflowType",function(){return r.b}),i.d(t,"parentsUntil",function(){return r.c}),i.d(t,"isScheduledTask",function(){return r.d}),i.d(t,"isCountRequired",function(){return r.e}),i.d(t,"getSwapKey",function(){return r.f}),i.d(t,"isRemoteData",function(){return r.g}),i.d(t,"getTaskData",function(){return r.h}),i.d(t,"updateDates",function(){return r.i}),i.d(t,"formatString",function(){return r.j}),i.d(t,"getIndex",function(){return r.k}),i.d(t,"pixelToPoint",function(){return r.l}),i.d(t,"pointToPixel",function(){return r.m}),i.d(t,"getUid",function(){return r.n}),i.d(t,"load",function(){return r.o}),i.d(t,"rowDataBound",function(){return r.p}),i.d(t,"queryCellInfo",function(){return r.q}),i.d(t,"toolbarClick",function(){return r.r}),i.d(t,"keyPressed",function(){return r.s}),i.d(t,"Edit",function(){return r.t}),i.d(t,"Reorder",function(){return r.u}),i.d(t,"Resize",function(){return r.v}),i.d(t,"Filter",function(){return r.w}),i.d(t,"Sort",function(){return r.x}),i.d(t,"Dependency",function(){return r.y}),i.d(t,"Selection",function(){return r.z}),i.d(t,"Toolbar",function(){return r.A}),i.d(t,"DayMarkers",function(){return r.B}),i.d(t,"CriticalPath",function(){return r.C}),i.d(t,"ContextMenu",function(){return r.D}),i.d(t,"ExcelExport",function(){return r.E}),i.d(t,"ColumnMenu",function(){return r.F}),i.d(t,"RowDD",function(){return r.G}),i.d(t,"PdfExport",function(){return r.H}),i.d(t,"VirtualScroll",function(){return r.I}),i.d(t,"Column",function(){return r.J}),i.d(t,"DayWorkingTime",function(){return r.K}),i.d(t,"AddDialogFieldSettings",function(){return r.L}),i.d(t,"EditDialogFieldSettings",function(){return r.M}),i.d(t,"EditSettings",function(){return r.N}),i.d(t,"EventMarker",function(){return r.O}),i.d(t,"FilterSettings",function(){return r.P}),i.d(t,"SearchSettings",function(){return r.Q}),i.d(t,"Holiday",function(){return r.R}),i.d(t,"LabelSettings",function(){return r.S}),i.d(t,"SelectionSettings",function(){return r.T}),i.d(t,"SplitterSettings",function(){return r.U}),i.d(t,"TaskFields",function(){return r.V}),i.d(t,"TimelineTierSettings",function(){return r.W}),i.d(t,"TimelineSettings",function(){return r.X}),i.d(t,"TooltipSettings",function(){return r.Y}),i.d(t,"SortDescriptor",function(){return r.Z}),i.d(t,"SortSettings",function(){return r._0}),i.d(t,"ResourceFields",function(){return r._1})},function(e,t){e.exports=p},function(e,t){e.exports=h},function(e,t){e.exports=u}])});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPdfExport"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionTreegrid"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionNavigations"),require("SyncfusionCalendars"),require("SyncfusionDropdowns"),require("SyncfusionButtons"),require("SyncfusionLayouts"),require("SyncfusionRichtexteditor")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPdfExport","SyncfusionData","SyncfusionGrids","SyncfusionTreegrid","SyncfusionPopups","SyncfusionInputs","SyncfusionNavigations","SyncfusionCalendars","SyncfusionDropdowns","SyncfusionButtons","SyncfusionLayouts","SyncfusionRichtexteditor"],t):"object"==typeof exports?exports.SyncfusionGantt=t(require("SyncfusionBase"),require("SyncfusionPdfExport"),require("SyncfusionData"),require("SyncfusionGrids"),require("SyncfusionTreegrid"),require("SyncfusionPopups"),require("SyncfusionInputs"),require("SyncfusionNavigations"),require("SyncfusionCalendars"),require("SyncfusionDropdowns"),require("SyncfusionButtons"),require("SyncfusionLayouts"),require("SyncfusionRichtexteditor")):e.SyncfusionGantt=t(e.SyncfusionBase,e.SyncfusionPdfExport,e.SyncfusionData,e.SyncfusionGrids,e.SyncfusionTreegrid,e.SyncfusionPopups,e.SyncfusionInputs,e.SyncfusionNavigations,e.SyncfusionCalendars,e.SyncfusionDropdowns,e.SyncfusionButtons,e.SyncfusionLayouts,e.SyncfusionRichtexteditor)}(this,function(e,t,i,r,n,a,s,o,l,d,p,h,u){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=84)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){"use strict";function r(e,t,i){for(var r=e;r&&(i?r.id!==t:!r.classList.contains(t));)r=r.parentElement;return r}function n(e){return i.i(f.isNullOrUndefined)(e.startDate)&&i.i(f.isNullOrUndefined)(e.endDate)&&i.i(f.isNullOrUndefined)(e.duration)?null:!(i.i(f.isNullOrUndefined)(e.startDate)||i.i(f.isNullOrUndefined)(e.endDate)||i.i(f.isNullOrUndefined)(e.duration))}function a(e){return!(!e.dataSource||e.dataSource instanceof m.DataManager||!("result"in e.dataSource))}function s(e){for(var t={},i=0,r=Object.keys(e);i<r.length;i++){var n=r[i];t[e[n]]=n}return t}function o(e){if(e instanceof m.DataManager){var t=e.adaptor;return t instanceof m.ODataAdaptor||t instanceof m.ODataV4Adaptor||t instanceof m.WebApiAdaptor||t instanceof m.WebMethodAdaptor||t instanceof m.CacheAdaptor||t instanceof m.RemoteSaveAdaptor||t instanceof m.UrlAdaptor}return!1}function l(e,t,r,n){if(r){for(var a=void 0,s=0;s<e.length;s++){var o=void 0;o=t?e[s].taskData:i.i(f.extend)({},e[s].taskData,{},!0),a=o}return a}for(var a=[],s=0;s<e.length;s++){var o=void 0;!i.i(f.isNullOrUndefined)(n)&&n.timezone&&d(e[s],n),o=t?e[s].taskData:i.i(f.extend)({},e[s].taskData,{},!0),a.push(o)}return a}function d(e,t){return e.taskData[t.taskFields.startDate]=t.dateValidationModule.remove(e.ganttProperties.startDate,t.timezone),null!=t.taskFields.endDate&&(e.taskData[t.taskFields.endDate]=t.dateValidationModule.remove(e.ganttProperties.endDate,t.timezone)),(t.taskFields.baselineEndDate||t.taskFields.baselineStartDate)&&(e.taskData[t.taskFields.baselineStartDate]=t.dateValidationModule.remove(e.ganttProperties.baselineStartDate,t.timezone),e.taskData[t.taskFields.baselineEndDate]=t.dateValidationModule.remove(e.ganttProperties.baselineEndDate,t.timezone)),null}function p(e,t){for(var i,r=0;r<t.length;r++)i=new RegExp("\\{"+r+"\\}","gm"),e=e.replace(i,t[r].toString());return e}function h(e,t,r,n){for(var a=-1,s=0;s<r.length;s++)if(i.i(f.getValue)(t,r[s])===i.i(f.getValue)(t,e)&&i.i(f.isNullOrUndefined)(n)||!i.i(f.isNullOrUndefined)(n)&&i.i(f.getValue)(t,r[s])===i.i(f.getValue)(t,e)&&i.i(f.getValue)(n,r[s])===i.i(f.getValue)(n,e)){a=s;break}return a}function u(e){return 76*e/92}function c(e){return 92*e/76}function g(){return y++}t.j=r,t.c=n,t.i=a,t.d=s,t.f=o,t.e=l,t.g=d,t.l=p,t.h=h,t.a=u,t.b=c,t.k=g;var f=i(0),m=(i.n(f),i(4)),y=(i.n(m),0)},function(e,t,i){"use strict";i.d(t,"_25",function(){return r}),i.d(t,"_33",function(){return n}),i.d(t,"_32",function(){return a}),i.d(t,"_31",function(){return s}),i.d(t,"_79",function(){return o}),i.d(t,"_82",function(){return l}),i.d(t,"E",function(){return d}),i.d(t,"_83",function(){return p}),i.d(t,"_85",function(){return h}),i.d(t,"_84",function(){return u}),i.d(t,"_26",function(){return c}),i.d(t,"a",function(){return g}),i.d(t,"_35",function(){return f}),i.d(t,"_36",function(){return m}),i.d(t,"_81",function(){return y}),i.d(t,"_73",function(){return v}),i.d(t,"_74",function(){return D}),i.d(t,"_76",function(){return w}),i.d(t,"_78",function(){return k}),i.d(t,"_77",function(){return S}),i.d(t,"_75",function(){return T}),i.d(t,"_27",function(){return b}),i.d(t,"_4",function(){return P}),i.d(t,"_68",function(){return C}),i.d(t,"_60",function(){return M}),i.d(t,"_5",function(){return R}),i.d(t,"_69",function(){return x}),i.d(t,"_61",function(){return O}),i.d(t,"F",function(){return I}),i.d(t,"_63",function(){return E}),i.d(t,"_64",function(){return F}),i.d(t,"_42",function(){return U}),i.d(t,"T",function(){return V}),i.d(t,"_40",function(){return N}),i.d(t,"n",function(){return L}),i.d(t,"p",function(){return B}),i.d(t,"_51",function(){return A}),i.d(t,"_53",function(){return H}),i.d(t,"q",function(){return _}),i.d(t,"r",function(){return W}),i.d(t,"_55",function(){return j}),i.d(t,"_56",function(){return q}),i.d(t,"_57",function(){return G}),i.d(t,"_58",function(){return z}),i.d(t,"_59",function(){return X}),i.d(t,"_30",function(){return Y}),i.d(t,"_3",function(){return Z}),i.d(t,"_71",function(){return Q}),i.d(t,"_72",function(){return K}),i.d(t,"U",function(){return J}),i.d(t,"W",function(){return $}),i.d(t,"Y",function(){return ee}),i.d(t,"_47",function(){return te}),i.d(t,"_48",function(){return ie}),i.d(t,"_49",function(){return re}),i.d(t,"_46",function(){return ne}),i.d(t,"_50",function(){return ae}),i.d(t,"_65",function(){return se}),i.d(t,"_66",function(){return oe}),i.d(t,"_67",function(){return le}),i.d(t,"_7",function(){return de}),i.d(t,"_6",function(){return pe}),i.d(t,"O",function(){return he}),i.d(t,"P",function(){return ue}),i.d(t,"S",function(){return ce}),i.d(t,"Q",function(){return ge}),i.d(t,"R",function(){return fe}),i.d(t,"_39",function(){return me}),i.d(t,"_41",function(){return ye}),i.d(t,"N",function(){return ve}),i.d(t,"_11",function(){return De}),i.d(t,"_62",function(){return we}),i.d(t,"_8",function(){return ke}),i.d(t,"_9",function(){return Se}),i.d(t,"_29",function(){return Te}),i.d(t,"o",function(){return be}),i.d(t,"_38",function(){return Pe}),i.d(t,"V",function(){return Ce}),i.d(t,"X",function(){return Me}),i.d(t,"Z",function(){return Re}),i.d(t,"_37",function(){return xe}),i.d(t,"v",function(){return Oe}),i.d(t,"w",function(){return Ie}),i.d(t,"x",function(){return Ee}),i.d(t,"y",function(){return Fe}),i.d(t,"z",function(){return Ue}),i.d(t,"A",function(){return Ve}),i.d(t,"B",function(){return Ne}),i.d(t,"C",function(){return Le}),i.d(t,"D",function(){return Be}),i.d(t,"_43",function(){return Ae}),i.d(t,"_44",function(){return He}),i.d(t,"_45",function(){return _e}),i.d(t,"_52",function(){return We}),i.d(t,"_54",function(){return je}),i.d(t,"_34",function(){return qe}),i.d(t,"_1",function(){return Ge}),i.d(t,"_15",function(){return ze}),i.d(t,"s",function(){return Xe}),i.d(t,"t",function(){return Ye}),i.d(t,"u",function(){return Ze}),i.d(t,"_16",function(){return Qe}),i.d(t,"_17",function(){return Ke}),i.d(t,"_2",function(){return Je}),i.d(t,"_22",function(){return $e}),i.d(t,"_19",function(){return et}),i.d(t,"_18",function(){return tt}),i.d(t,"_23",function(){return it}),i.d(t,"_24",function(){return rt}),i.d(t,"_20",function(){return nt}),i.d(t,"_21",function(){return at}),i.d(t,"G",function(){return st}),i.d(t,"H",function(){return ot}),i.d(t,"I",function(){return lt}),i.d(t,"J",function(){return dt}),i.d(t,"_12",function(){return pt}),i.d(t,"_10",function(){return ht}),i.d(t,"_70",function(){return ut}),i.d(t,"_13",function(){return ct}),i.d(t,"_14",function(){return gt}),i.d(t,"d",function(){return ft}),i.d(t,"c",function(){return mt}),i.d(t,"b",function(){return yt}),i.d(t,"m",function(){return vt}),i.d(t,"h",function(){return Dt}),i.d(t,"i",function(){return wt}),i.d(t,"e",function(){return kt}),i.d(t,"f",function(){return St}),i.d(t,"g",function(){return Tt}),i.d(t,"j",function(){return bt}),i.d(t,"k",function(){return Pt}),i.d(t,"l",function(){return Ct}),i.d(t,"_0",function(){return Mt}),i.d(t,"K",function(){return Rt}),i.d(t,"M",function(){return xt}),i.d(t,"L",function(){return Ot}),i.d(t,"_28",function(){return It}),i.d(t,"_80",function(){return Et});var r="e-gantt",n="e-gantt-chart-pane",a="e-gantt-tree-grid-pane",s="e-gantt-splitter",o="e-gantt-chart",l="e-chart-root-container",d="e-gantt-toolbar",p="e-chart-scroll-container",h="e-chart-rows-container",u="e-content",c="e-device",g="e-grid",f="e-task-table",m="e-zero-spacing",y="e-timeline-header-container",v="e-timeline-header-table-container",D="e-timeline-header-table-body",w="e-timeline-top-header-cell",k="e-header-cell-label",S="e-weekend-header-cell",T="e-timeline-single-header-cell",b="e-timeline-single-header-outer-div",P="e-left-label-container",C="e-left-label-container e-left-label-temp-container",M="e-left-label-inner-div",R="e-right-label-container",x="e-right-label-container e-right-label-temp-container",O="e-right-label-inner-div",I="e-taskbar-main-container",E="e-gantt-parent-taskbar-inner-div",F="e-gantt-parent-progressbar-inner-div",U="e-task-label",V="e-gantt-child-taskbar-inner-div",N="e-gantt-child-progressbar-inner-div",L="e-gantt-child-critical-taskbar-inner-div",B="e-gantt-child-critical-progressbar-inner-div",A="e-milestone-top",H="e-milestone-bottom",_="e-critical-milestone-top",W="e-critical-milestone-bottom",j="e-baseline-bar",q="e-baseline-gantt-milestone-container",G="e-baseline-gantt-milestone",z="e-baseline-milestone-top",X="e-baseline-milestone-bottom",Y="e-chart-row-cell",Z="e-chart-row",Q="e-row-expand",K="e-row-collapse",J="e-taskbar-left-resizer",$="e-taskbar-right-resizer",ee="e-child-progress-resizer",te="e-progressbar-handler",ie="e-progressbar-handler-element",re="e-progressbar-handler-after",ne="e-icon",ae="e-gantt-milestone",se="e-gantt-parent-milestone",oe="e-parent-milestone-top",le="e-parent-milestone-bottom",de="e-gantt-child-taskbar",pe="e-gantt-child-progressbar",he="e-manualparent-main-container",ue="e-gantt-manualparenttaskbar",ce="e-gantt-manualparent-milestone",ge="e-manualparent-milestone-top",fe="e-manualparent-milestone-bottom",me="e-gantt-child-manualtaskbar",ye="e-gantt-child-manualprogressbar",ve="e-gantt-manualparenttaskbar-right",De="e-gantt-manualparenttaskbar-left",we="e-gantt-unscheduled-manualtask",ke="e-gantt-parent-taskbar",Se="e-gantt-parent-progressbar",Te="e-gantt-unscheduled-task",be="e-gantt-critical-unscheduled-taskbar",Pe="e-indicator-span",Ce="e-left-resize-gripper",Me="e-right-resize-gripper",Re="e-progress-resize-gripper",xe="e-label",Oe="e-event-markers-container",Ie="e-event-markers",Ee="e-span-label",Fe="e-nonworking-day-container",Ue="e-holiday-container",Ve="e-holiday",Ne="e-span",Le="e-weekend-container",Be="e-weekend",Ae="e-gantt-unscheduled-taskbar-left",He="e-gantt-unscheduled-taskbar-right",_e="e-gantt-unscheduled-taskbar",We="e-unscheduled-milestone-top",je="e-unscheduled-milestone-bottom",qe="e-gantt-dependency-view-container",Ge="e-connector-line-container",ze="e-line",Xe="e-criticalconnector-line",Ye="e-criticalconnector-line-right-arrow",Ze="e-criticalconnector-line-left-arrow",Qe="e-connector-line-right-arrow",Ke="e-connector-line-left-arrow",Je="e-connector-line-z-index",$e="e-connector-line-hover",et="e-critical-connector-line-hover",tt="e-connector-line-hover-z-index",it="e-connector-line-right-arrow-hover",rt="e-connector-line-left-arrow-hover",nt="e-critical-connector-line-right-arrow-hover",at="e-critical-connector-line-left-arrow-hover",st="e-connectorpoint-left",ot="e-connectorpoint-right",lt="e-connectorpoint-left-hover",dt="e-connectorpoint-right-hover",pt="e-gantt-false-line",ht="e-right-connectorpoint-outer-div",ut="e-left-connectorpoint-outer-div",ct="e-connectorpoint-allow-block",gt="e-gantt-tooltip",ft=".e-gridheader",mt=".e-content",yt=".e-gridform",vt="e-delete",Dt="e-save",wt="e-cancel",kt="e-edit",St="e-indent",Tt="e-outdent",bt="e-add",Pt="e-add-above",Ct="e-add-below",Mt="e-active-parent-task",Rt="e-active-child-task",xt="e-active-connected-task",Ot="e-predecessor-touch-mode",It="e-rangecontainer",Et="e-rg-rangdiv"},function(e,t){e.exports=i},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t,i){"use strict";var r=i(51);i.d(t,"h",function(){return r.a});var n=i(52);i.d(t,"f",function(){return n.a}),i.d(t,"i",function(){return n.b});var a=i(54);i.d(t,"e",function(){return a.a});var s=(i(17),i(55));i.d(t,"a",function(){return s.a}),i.d(t,"g",function(){return s.b});var o=i(53);i.d(t,"b",function(){return o.a}),i.d(t,"c",function(){return o.b}),i.d(t,"d",function(){return o.c})},function(e,t){e.exports=a},function(e,t,i){"use strict";var r=i(19);i.d(t,"a",function(){return r.a});var n=i(61);i.d(t,"b",function(){return n.a});var a=i(60);i.d(t,"c",function(){return a.a});var s=i(62);i.d(t,"d",function(){return s.a});var o=i(63);i.d(t,"e",function(){return o.a});var l=i(64);i.d(t,"f",function(){return l.a});var d=i(65);i.d(t,"g",function(){return d.a});var p=i(69);i.d(t,"h",function(){return p.a});var h=i(66);i.d(t,"i",function(){return h.a});var u=i(67);i.d(t,"j",function(){return u.a});var c=i(70);i.d(t,"k",function(){return c.a});var g=i(72);i.d(t,"l",function(){return g.a});var f=i(73);i.d(t,"m",function(){return f.a});var m=i(74);i.d(t,"n",function(){return m.a}),i.d(t,"o",function(){return m.b});var y=i(75);i.d(t,"p",function(){return y.a});var v=i(71);i.d(t,"q",function(){return v.a}),i.d(t,"r",function(){return v.b});var D=i(68);i.d(t,"s",function(){return D.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.parent=e}return e.prototype.isValidateNonWorkDays=function(e){return!i.i(r.isNullOrUndefined)(e)&&e.isAutoSchedule&&(!this.parent.includeWeekend||this.parent.totalHolidayDates.length>0)||i.i(r.isNullOrUndefined)(e)&&(!this.parent.includeWeekend||this.parent.totalHolidayDates.length>0)},e.prototype.checkStartDate=function(e,t,n,a){if(i.i(r.isNullOrUndefined)(e))return null;var s=new Date(e.getTime()),o=this.getSecondsInDecimal(s);if(n=i.i(r.isNullOrUndefined)(n)?!i.i(r.isNullOrUndefined)(t)&&t.isMilestone:n,o<this.parent.defaultStartTime&&(!n||a))this.setTime(this.parent.defaultStartTime,s);else if(o<this.parent.defaultStartTime&&n)this.setTime(this.parent.defaultStartTime,s);else if(o===this.parent.defaultEndTime&&(!t||!n)||o>this.parent.defaultEndTime)s.setDate(s.getDate()+1),this.setTime(this.parent.defaultStartTime,s);else if(o>this.parent.defaultStartTime&&o<this.parent.defaultEndTime)for(var l=0;l<this.parent.workingTimeRanges.length;l++){var d=this.parent.workingTimeRanges[l];if(o>=d.to&&this.parent.workingTimeRanges[l+1]&&o<this.parent.workingTimeRanges[l+1].from){(o!==d.to||t&&n)&&o===d.to||this.setTime(this.parent.workingTimeRanges[l+1].from,s);break}}var p;do{p=new Date(s.getTime());var h=this.parent.totalHolidayDates.length;if(this.isValidateNonWorkDays(t)){var u=!n||a?this.parent.defaultStartTime:this.parent.defaultEndTime;if(!this.parent.includeWeekend){var c=new Date(s.getTime());s=this.getNextWorkingDay(s),c.getTime()!==s.getTime()&&this.setTime(u,s)}for(var g=0;g<h;g++){var f=this.getDateFromFormat(new Date(this.parent.totalHolidayDates[g])),m=new Date(f.getTime());f.setHours(0,0,0,0),m.setHours(23,59,59,59),s.getTime()>=f.getTime()&&s.getTime()<m.getTime()&&(s.setDate(s.getDate()+1),this.setTime(u,s))}}}while(p.getTime()!==s.getTime());return new Date(s.getTime())},e.prototype.checkEndDate=function(e,t,n){if(i.i(r.isNullOrUndefined)(e))return null;var a=new Date(e.getTime()),s=this.getSecondsInDecimal(a);if(s>this.parent.defaultEndTime)this.setTime(this.parent.defaultEndTime,a);else if(s<=this.parent.defaultStartTime&&!n)a.setDate(a.getDate()-1),this.setTime(this.parent.defaultEndTime,a);else if(s>this.parent.defaultStartTime&&s<this.parent.defaultEndTime)for(var o=0;o<this.parent.workingTimeRanges.length;o++){var l=this.parent.workingTimeRanges[o];if(s>l.to&&this.parent.workingTimeRanges[o+1]&&s<=this.parent.workingTimeRanges[o+1].from){this.setTime(this.parent.workingTimeRanges[o].to,a);break}}var d;do{d=new Date(a.getTime());var p=this.parent.totalHolidayDates.length;if(this.isValidateNonWorkDays(t)){if(!this.parent.includeWeekend){var h=new Date(a.getTime());a=this.getPreviousWorkingDay(a),h.getTime()!==a.getTime()&&this.setTime(this.parent.defaultEndTime,a)}for(var u=0;u<p;u++){var c=this.getDateFromFormat(new Date(this.parent.totalHolidayDates[u])),g=new Date(c.getTime()),f=new Date(a.getTime());f.setMinutes(a.getMilliseconds()-2),c.setHours(0,0,0,0),g.setHours(23,59,59,59),(a.getTime()>=c.getTime()&&a.getTime()<g.getTime()||f.getTime()>=c.getTime()&&f.getTime()<g.getTime())&&(a.setDate(a.getDate()-1),a.getTime()===c.getTime()&&86400===this.parent.defaultEndTime&&0===this.getSecondsInDecimal(a)||this.setTime(this.parent.defaultEndTime,a))}}}while(d.getTime()!==a.getTime());return new Date(a.getTime())},e.prototype.checkBaselineStartDate=function(e){if(i.i(r.isNullOrUndefined)(e))return null;var t=new Date(e.getTime()),n=this.getSecondsInDecimal(t);if(n<this.parent.defaultStartTime)this.setTime(this.parent.defaultStartTime,t);else if(n>this.parent.defaultEndTime)t.setDate(t.getDate()+1),this.setTime(this.parent.defaultStartTime,t);else if(n>this.parent.defaultStartTime&&n<this.parent.defaultEndTime)for(var a=0;a<this.parent.workingTimeRanges.length;a++){var s=this.parent.workingTimeRanges[a];if(n>=s.to&&this.parent.workingTimeRanges[a+1]&&n<this.parent.workingTimeRanges[a+1].from){this.setTime(this.parent.workingTimeRanges[a+1].from,t);break}}return t},e.prototype.checkBaselineEndDate=function(e,t){if(i.i(r.isNullOrUndefined)(e))return null;var n=new Date(e.getTime()),a=this.getSecondsInDecimal(n);if(a>this.parent.defaultEndTime)this.setTime(this.parent.defaultEndTime,n);else if(a<=this.parent.defaultStartTime&&!i.i(r.isNullOrUndefined)(t)&&!t.isMilestone)n.setDate(n.getDate()-1),this.setTime(this.parent.defaultEndTime,n);else if(a>this.parent.defaultStartTime&&a<this.parent.defaultEndTime)for(var s=0;s<this.parent.workingTimeRanges.length;s++){var o=this.parent.workingTimeRanges[s];if(a>o.to&&this.parent.workingTimeRanges[s+1]&&a<=this.parent.workingTimeRanges[s+1].from){this.setTime(this.parent.workingTimeRanges[s].to,n);break}}return n},e.prototype.calculateStartDate=function(e){var t=e.ganttProperties,n=null;i.i(r.isNullOrUndefined)(t.endDate)||i.i(r.isNullOrUndefined)(t.duration)||(n=this.getStartDate(t.endDate,t.duration,t.durationUnit,t)),this.parent.setRecordValue("startDate",n,t,!0),this.parent.taskFields.startDate&&this.parent.dataOperation.updateMappingData(e,"startDate")},e.prototype.calculateEndDate=function(e){var t=e.ganttProperties,n=null;if(!i.i(r.isNullOrUndefined)(t.startDate)){if(!i.i(r.isNullOrUndefined)(t.endDate)&&i.i(r.isNullOrUndefined)(t.duration)&&(1===this.compareDates(t.startDate,t.endDate)&&(this.parent.setRecordValue("startDate",new Date(t.endDate.getTime()),t,!0),this.setTime(this.parent.defaultStartTime,t.startDate)),this.calculateDuration(e)),!i.i(r.isNullOrUndefined)(t.duration)){var a=!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0?this.totalDuration(t.segments):t.duration;n=this.getEndDate(t.startDate,a,t.durationUnit,t,!1)}this.parent.setRecordValue("endDate",n,t,!0)}this.parent.taskFields.endDate&&this.parent.dataOperation.updateMappingData(e,"endDate")},e.prototype.totalDuration=function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i].duration+e[i].offsetDuration;return t},e.prototype.calculateDuration=function(e){var t,n=e.ganttProperties;t=!i.i(r.isNullOrUndefined)(n.segments)&&n.segments.length>0&&!i.i(r.isNullOrUndefined)(this.parent.editModule.taskbarEditModule)?this.parent.editModule.taskbarEditModule.sumOfDuration(n.segments):i.i(r.isNullOrUndefined)(n.startDate)||i.i(r.isNullOrUndefined)(n.endDate)||n.startDate.getTime()!==n.endDate.getTime()||i.i(r.isNullOrUndefined)(e.taskData[this.parent.taskFields.milestone])?this.getDuration(n.startDate,n.endDate,n.durationUnit,n.isAutoSchedule,n.isMilestone):1,this.parent.setRecordValue("duration",t,n,!0);var a=this.parent.columnByField[this.parent.columnMapping.duration];if(!(i.i(r.isNullOrUndefined)(this.parent.editModule)||i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)||this.parent.editModule.cellEditModule.isCellEdit||i.i(r.isNullOrUndefined)(a))){if(!i.i(r.isNullOrUndefined)(a.edit)&&!i.i(r.isNullOrUndefined)(a.edit.read)){var s=this.parent.editModule.dialogModule.dialog;if(!i.i(r.isNullOrUndefined)(s)){var o=s.querySelector("#"+this.parent.element.id+"Duration").ej2_instances[0];i.i(r.isNullOrUndefined)(o)||o.value===t.toString()||(o.value=t.toString(),o.dataBind())}}this.parent.taskFields.duration&&(this.parent.dataOperation.updateMappingData(e,"duration"),this.parent.taskFields.durationUnit&&this.parent.dataOperation.updateMappingData(e,"durationUnit"))}},e.prototype.getNonworkingTime=function(e,t,n,a){a=!!i.i(r.isNullOrUndefined)(a)||a;var s=!this.parent.includeWeekend&&n?this.getWeekendCount(e,t):0,o=this.getNumberOfSeconds(e,t,a),l=n?this.getHolidaysCount(e,t):0,d=(o-86400*s-86400*l)/86400,p=this.getNonWorkingSecondsOnDate(e,t,n);return d*(86400-this.parent.secondsPerDay)+86400*s+86400*l+p},e.prototype.getDuration=function(e,t,n,a,s,o){if(i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(t))return null;o=!!i.i(r.isNullOrUndefined)(o)||o;var l=0,d=this.getTimeDifference(e,t,o)/1e3,p=this.getNonworkingTime(e,t,a,o),h=d-p;return l=s&&this.parent.getFormatedDate(e)===this.parent.getFormatedDate(t)?0:n&&"day"!==n?"minute"===n?h/60:h/3600:h/this.parent.secondsPerDay,parseFloat(l.toString())},e.prototype.getDurationAsSeconds=function(e,t){return t&&"day"!==t?"hour"===t?3600*e:60*e:this.parent.secondsPerDay*e},e.prototype.getEndDate=function(e,t,i,r,n){for(var a=new Date(e.getTime()),s=new Date(e.getTime()),o=this.getDurationAsSeconds(t,i),l=0,d=0;o>0;)s.setSeconds(s.getSeconds()+o),l=this.getNonworkingTime(a,s,r.isAutoSchedule,!0),d=o-l,o-=d,o>0&&(s=this.checkStartDate(s,r,n)),a=new Date(s.getTime());return s},e.prototype.getStartDate=function(e,t,i,r){for(var n=new Date(e.getTime()),a=new Date(e.getTime()),s=this.getDurationAsSeconds(t,i),o=0,l=0;s>0;)a.setSeconds(a.getSeconds()-s),o=this.getNonworkingTime(a,n,r.isAutoSchedule,!0),l=s-o,s-=l,s>0&&(n=this.checkEndDate(a,r)),n=new Date(a.getTime());return a},e.prototype.getProjectStartDate=function(e,t){if(!i.i(r.isNullOrUndefined)(this.parent.cloneProjectStartDate)){"string"==typeof this.parent.cloneProjectStartDate&&(this.parent.cloneProjectStartDate=this.getDateFromFormat(this.parent.cloneProjectStartDate));var n=this.checkStartDate(this.parent.cloneProjectStartDate);return this.parent.cloneProjectStartDate=n,new Date(n.getTime())}if(i.i(r.isNullOrUndefined)(this.parent.projectStartDate)){if(i.i(r.isNullOrUndefined)(t))return null;var a=this.parent.flatData,s=void 0;a.length>0?s=a[0].ganttProperties.startDate:(s=new Date,s.setHours(0,0,0,0));for(var o=1;o<a.length;o++){var l=a[o].ganttProperties.startDate;i.i(r.isNullOrUndefined)(l)||-1!==this.compareDates(l,s)||(s=l)}this.parent.cloneProjectStartDate=this.checkStartDate(s,e)}else{var n=this.getDateFromFormat(this.parent.projectStartDate);this.parent.cloneProjectStartDate=this.checkStartDate(n)}return new Date(this.parent.cloneProjectStartDate.getTime())},e.prototype.getValidStartDate=function(e,t){var n=null,a=t?e.autoStartDate:e.startDate,s=t?e.autoEndDate:e.endDate,o=!e.isAutoSchedule&&e.autoDuration?e.autoDuration:e.duration;return i.i(r.isNullOrUndefined)(a)?i.i(r.isNullOrUndefined)(s)?i.i(r.isNullOrUndefined)(o)||(n=this.getProjectStartDate(e)):(n=new Date(s.getTime()),this.setTime(this.parent.defaultStartTime,n)):n=new Date(a.getTime()),n},e.prototype.getValidEndDate=function(e,t){var n=null,a=t?e.autoStartDate:e.startDate,s=t?e.autoEndDate:e.endDate,o=t?e.autoDuration:e.duration;if(i.i(r.isNullOrUndefined)(s))if(i.i(r.isNullOrUndefined)(a)){if(!i.i(r.isNullOrUndefined)(o)){var l=this.getValidStartDate(e);l&&(n=this.getEndDate(l,o,e.durationUnit,e,!1))}}else e.isMilestone?n=this.checkStartDate(a):(n=new Date(a.getTime()),this.setTime(this.parent.defaultEndTime,n));else n=new Date(s.getTime());return n},e.prototype.getSecondsPerDay=function(){var e=this.parent.dayWorkingTime,t=e.length,n=0,a=new Date("10/11/2018");this.parent.nonWorkingHours=[];var s=this.parent.nonWorkingHours;this.parent.workingTimeRanges=[];var o=this.parent.workingTimeRanges;this.parent.nonWorkingTimeRanges=[];for(var l=this.parent.nonWorkingTimeRanges,d=0;d<t;d++){var p=e[d];if(!i.i(r.isNullOrUndefined)(p.from)&&!i.i(r.isNullOrUndefined)(p.to)){a.setHours(0,0,0,0);var h=new Date(a.getTime());a.setTime(a.getTime()+36e5*p.from);var u=new Date(a.getTime());h.setTime(h.getTime()+36e5*p.to);var c=new Date(h.getTime()),g=c.getTime()-u.getTime(),f=this.getSecondsInDecimal(u),m=this.getSecondsInDecimal(c);0===m&&(m=86400),n+=g/1e3,0===d&&(this.parent.defaultStartTime=f),d===t-1&&(this.parent.defaultEndTime=m),d>0?(s.push(s[s.length-1]+f-o[d-1].to),o[d-1].to<f&&l.push({from:o[d-1].to,to:f,isWorking:!1,interval:f-o[d-1].to})):(s.push(0),l.push({from:0,to:f,isWorking:!1,interval:f})),o.push({from:f,to:m}),l.push({from:f,to:m,isWorking:!0,interval:m-f})}}return this.parent.defaultEndTime/3600!=24&&l.push({from:this.parent.defaultEndTime,to:86400,isWorking:!1,interval:86400-this.parent.defaultEndTime}),n},e.prototype.getDurationValue=function(e,t){var n=null,a=null;if("string"==typeof e){var s=e.match(/(\d*\.*\d+|.+$)/g);if(s&&s.length<=2){a=parseFloat(s[0].toString().trim());var o=s[1]?s[1].toString().trim().toLowerCase():null;-1!==i.i(r.getValue)("minute",this.parent.durationUnitEditText).indexOf(o)?n="minute":-1!==i.i(r.getValue)("hour",this.parent.durationUnitEditText).indexOf(o)?n="hour":-1!==i.i(r.getValue)("day",this.parent.durationUnitEditText).indexOf(o)&&(n="day")}}else a=e,n=null;return{duration:a,durationUnit:n}},e.prototype.getNextWorkingDay=function(e){var t=e.getDay();return-1!==this.parent.nonWorkingDayIndex.indexOf(t)?(e.setDate(e.getDate()+1),e=this.getNextWorkingDay(e)):e},e.prototype.getWeekendCount=function(e,t){var i=0,r=new Date(e.getTime()),n=new Date(t.getTime());for(r.setHours(0,0,0,0),r.setDate(r.getDate()+1),n.setHours(0,0,0,0);r.getTime()<n.getTime();)-1!==this.parent.nonWorkingDayIndex.indexOf(r.getDay())&&(i+=1),r.setDate(r.getDate()+1);return i},e.prototype.getNumberOfSeconds=function(e,t,i){var r=new Date(e.getTime()),n=new Date(t.getTime()),a=0;return r.setDate(r.getDate()+1),r.setHours(0,0,0,0),n.setHours(0,0,0,0),r.getTime()<n.getTime()&&(a=this.getTimeDifference(r,n,i)/1e3),a%86400!=0&&(a=a-a%86400+86400),a},e.prototype.getHolidaysCount=function(e,t){var i=0,r=this.parent.totalHolidayDates,n=new Date(e.getTime()),a=new Date(t.getTime());if(n.setDate(n.getDate()+1),n.setHours(0,0,0,0),a.setHours(0,0,0,0),n.getTime()<a.getTime())for(var s=0;s<r.length;s++){var o=this.getDateFromFormat(new Date(r[s]));n.getTime()<=o.getTime()&&a.getTime()>o.getTime()&&(!this.parent.includeWeekend&&-1===this.parent.nonWorkingDayIndex.indexOf(o.getDay())||this.parent.includeWeekend)&&(i+=1)}return i},e.prototype.getHolidayDates=function(){for(var e=this.parent.holidays,t=[],n=0;n<e.length;n++){var a=this.getDateFromFormat(e[n].from),s=this.getDateFromFormat(e[n].to);if(!i.i(r.isNullOrUndefined)(a)||!i.i(r.isNullOrUndefined)(s))if(i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(s)){var o=a||s;o.setHours(0,0,0,0),-1===t.indexOf(o.getTime())&&t.push(o.getTime())}else for(;a<=s;)a.setHours(0,0,0,0),-1===t.indexOf(a.getTime())&&t.push(a.getTime()),a.setDate(a.getDate()+1)}return t},e.prototype.isOnHolidayOrWeekEnd=function(e,t){if(!(t=i.i(r.isNullOrUndefined)(t)?this.parent.includeWeekend:t)&&-1!==this.parent.nonWorkingDayIndex.indexOf(e.getDay()))return!0;for(var n=this.parent.totalHolidayDates,a=0;a<n.length;a++){var s=this.getDateFromFormat(new Date(n[a])),o=new Date(s.getTime());if(s.setHours(0,0,0,0),o.setHours(23,59,59,59),e.getTime()>=s.getTime()&&e.getTime()<o.getTime())return!0}return!1},e.prototype.getNonWorkingSecondsOnDate=function(e,t,i){for(var r=this.getSecondsInDecimal(e),n=this.getSecondsInDecimal(t),a=-1,s=-1,o=0,l=!!i&&this.isOnHolidayOrWeekEnd(e,null),d=!!i&&this.isOnHolidayOrWeekEnd(t,null),p=0;p<this.parent.nonWorkingTimeRanges.length;p++){var h=this.parent.nonWorkingTimeRanges[p];r>=h.from&&r<=h.to&&(a=p),n>=h.from&&n<=h.to&&(s=p)}if(e.getDate()!==t.getDate()||e.getMonth()!==t.getMonth()||e.getFullYear()!==t.getFullYear()){if(l)o+=86400-r;else for(var p=a;p<this.parent.nonWorkingTimeRanges.length;p++)this.parent.nonWorkingTimeRanges[p].isWorking||(o+=p===a?this.parent.nonWorkingTimeRanges[p].to-r:this.parent.nonWorkingTimeRanges[p].interval);if(d)o+=n;else for(var p=0;p<=s;p++)this.parent.nonWorkingTimeRanges[p].isWorking||(o+=p===s?n-this.parent.nonWorkingTimeRanges[p].from:this.parent.nonWorkingTimeRanges[p].interval)}else if(a!==s)if(d)o+=n-r;else for(var p=a;p<=s;p++)this.parent.nonWorkingTimeRanges[p].isWorking||(o+=p===a?this.parent.nonWorkingTimeRanges[p].to-r:p===s?n-this.parent.nonWorkingTimeRanges[p].from:this.parent.nonWorkingTimeRanges[p].interval);else if(d)o+=n-r;else{var u=this.parent.nonWorkingTimeRanges[a];u.isWorking||(o=n-r)}return o},e.prototype.getPreviousWorkingDay=function(e){var t=e.getDay(),i=0===t?6:t-1;return-1!==this.parent.nonWorkingDayIndex.indexOf(t)||-1!==this.parent.nonWorkingDayIndex.indexOf(i)&&86400===this.parent.defaultEndTime&&0===this.getSecondsInDecimal(e)?(e.setDate(e.getDate()-1),-1!==this.parent.nonWorkingDayIndex.indexOf(e.getDay())&&(e=this.getPreviousWorkingDay(e)),e):e},e.prototype.getNonWorkingDayIndex=function(){var e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],t=e.length;0===this.parent.workWeek.length&&(this.parent.workWeek=["Monday","Tuesday","Wednesday","Thursday","Friday"]);for(var i=this.parent.workWeek.slice(),r=i.length,n=0;n<r;n++)i[n]=i[n].toLowerCase();this.parent.nonWorkingDayIndex=[];for(var n=0;n<t;n++)-1===i.indexOf(e[n])&&this.parent.nonWorkingDayIndex.push(n)},e.prototype.setTime=function(e,t){var i=e/3600;i=parseInt(i,10);var r=(e-3600*i)/60;r=parseInt(r,10);var n=e-3600*i-60*r;t.setHours(i,r,n)},e.prototype.getTimeDifference=function(e,t,i){var r=new Date(e.getTime()),n=new Date(t.getTime());return i&&this.updateDateWithTimeZone(r,n),n.getTime()-r.getTime()},e.prototype.updateDateWithTimeZone=function(e,t){var i,r,n=e.getTimezoneOffset(),a=t.getTimezoneOffset();if(n!==a){var s=new Date((new Date).getFullYear(),0,1).getTimezoneOffset();if(s!==n?(r=e,i=n):s!==a&&(r=t,i=a),s<0){var o=s-i;r.setTime(r.getTime()+60*o*1e3)}else if(s>=0){var o=i-s;r.setTime(r.getTime()-60*o*1e3)}}},e.prototype.getSecondsInDecimal=function(e){return 60*e.getHours()*60+60*e.getMinutes()+e.getSeconds()+e.getMilliseconds()/1e3},e.prototype.offset=function(e,t){var i=e.getTimezoneOffset();try{var r=new Date(e.toLocaleString("en-US",{timeZone:t}));return isNaN(r.getTime())?0:(e.getTime()-r.getTime())/6e4+i}catch(e){return 0}},e.prototype.remove=function(e,t){return i.i(r.isNullOrUndefined)(e)||(e=this.reverse(e,t,e.getTimezoneOffset())),e},e.prototype.reverse=function(e,t,i){"string"==typeof t&&(t=this.offset(e,t)),"string"==typeof i&&(i=this.offset(e,i));var r=e.getTimezoneOffset();e=new Date(e.getTime()+6e4*(t-i));var n=e.getTimezoneOffset();return new Date(e.getTime()+6e4*(n-r))},e.prototype.convert=function(e,t){var i=e.getTimezoneOffset(),r=this.offset(e,t);e=new Date(e.getTime()+6e4*(i-r));var n=e.getTimezoneOffset();return new Date(e.getTime()+6e4*(n-i))},e.prototype.getDateFromFormat=function(e,t){var n;if(i.i(r.isNullOrUndefined)(e))return null;if(e instanceof Date)n=new Date(e.getTime());else{var a=this.parent.globalize.parseDate(e,{format:this.parent.getDateFormat(),type:"dateTime"});n=i.i(r.isNullOrUndefined)(a)&&!isNaN(new Date(e).getTime())?new Date(e):a}if(!i.i(r.isNullOrUndefined)(this.parent.timezone)&&t){return this.convert(n,this.parent.timezone)}return n},e.prototype.compareDates=function(e,t){return i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(t)?!i.i(r.isNullOrUndefined)(e)&&i.i(r.isNullOrUndefined)(t)?1:i.i(r.isNullOrUndefined)(e)&&!i.i(r.isNullOrUndefined)(t)?-1:null:e.getTime()>t.getTime()?1:e.getTime()<t.getTime()?-1:0},e.prototype.getDurationString=function(e,t){var n="";if(!i.i(r.isNullOrUndefined)(e)&&(n+=parseFloat(e.toFixed(2))+" ",!i.i(r.isNullOrUndefined)(t))){var a=1!==e;"day"===t?n+=a?this.parent.localeObj.getConstant("days"):this.parent.localeObj.getConstant("day"):"hour"===t?n+=a?this.parent.localeObj.getConstant("hours"):this.parent.localeObj.getConstant("hour"):"minute"===t&&(n+=a?this.parent.localeObj.getConstant("minutes"):this.parent.localeObj.getConstant("minute"))}return n},e.prototype.getWorkString=function(e,t){var n="";if(!i.i(r.isNullOrUndefined)(e)&&(n+=parseFloat(e).toFixed(2)+" ",!i.i(r.isNullOrUndefined)(t))){var a=1!==e;"day"===t?n+=a?this.parent.localeObj.getConstant("days"):this.parent.localeObj.getConstant("day"):"hour"===t?n+=a?this.parent.localeObj.getConstant("hours"):this.parent.localeObj.getConstant("hour"):"minute"===t&&(n+=a?this.parent.localeObj.getConstant("minutes"):this.parent.localeObj.getConstant("minute"))}return n},e.prototype.calculateProjectDatesForValidatedTasks=function(e){var t=this,n="string"==typeof this.parent.projectStartDate?new Date(this.parent.projectStartDate):this.parent.projectStartDate,a="string"==typeof this.parent.projectEndDate?new Date(this.parent.projectEndDate):this.parent.projectEndDate,s=null,o=null,l=i.i(r.getValue)("dataOperation.dataArray",this.parent);if(n&&a||!l||0!==l.length){if(l.length>0){var d=l.slice().sort(function(e,i){return new Date(e[t.parent.taskFields.startDate]).getTime()-new Date(i[t.parent.taskFields.startDate]).getTime()}),p=l.slice().sort(function(e,i){return new Date(i[t.parent.taskFields.endDate]).getTime()-new Date(e[t.parent.taskFields.endDate]).getTime()});s=d[0][this.parent.taskFields.startDate],o=p[p.length-1][this.parent.taskFields.endDate]}}else s=this.getDateFromFormat(new Date),o=this.getDateFromFormat(new Date(s.getTime()));this.parent.cloneProjectStartDate=n?new Date(n.getTime()):"string"==typeof s?new Date(s):s,this.parent.cloneProjectEndDate=a?new Date(a.getTime()):"string"==typeof o?new Date(o):o},e.prototype.calculateProjectDates=function(e){var t=this;if(this.parent.isLoad&&this.parent.enablePersistence&&this.parent.cloneProjectStartDate&&this.parent.cloneProjectEndDate)return this.parent.cloneProjectStartDate=this.getDateFromFormat(this.parent.cloneProjectStartDate),void(this.parent.cloneProjectEndDate=this.getDateFromFormat(this.parent.cloneProjectEndDate));var n="string"==typeof this.parent.projectStartDate?new Date(this.parent.projectStartDate):this.parent.projectStartDate,a="string"==typeof this.parent.projectEndDate?new Date(this.parent.projectEndDate):this.parent.projectEndDate,s=this.parent.timelineModule.isZooming&&this.parent.cloneProjectStartDate?this.getDateFromFormat(this.parent.cloneProjectStartDate):this.getDateFromFormat(n),o=this.parent.timelineModule.isZooming&&this.parent.cloneProjectEndDate?this.getDateFromFormat(this.parent.cloneProjectEndDate):this.getDateFromFormat(a),l=null,d=null,p=this.parent.flatData,h=this.parent.currentViewData,u=[],c=function(e){i.i(r.isNullOrUndefined)(e)||u.push(e)},g=function(e){e.length>0&&(e.sort(function(e,t){return e.getTime()-t.getTime()}),l=new Date(e[0].getTime()),d=e.length>1?new Date(e[e.length-1].getTime()):null)};if((!s||!o)&&p.length>0||e||this.parent.timelineModule.isZoomToFit){var f=void 0;if(f=h.length>0&&this.parent.timelineModule.isZoomToFit&&this.parent.treeGrid.filterModule&&this.parent.treeGrid.filterModule.filteredResult.length>0?h:p,f.forEach(function(e){u=[];var i=e.ganttProperties,r=t.getValidStartDate(i),n=t.getValidEndDate(i);c(l),c(d),c(r),c(n),t.parent.renderBaseline&&!t.parent.timelineModule.isZoomToFit&&(c(i.baselineStartDate),c(i.baselineEndDate)),i.indicators&&i.indicators.length>0&&!t.parent.timelineModule.isZoomToFit&&i.indicators.forEach(function(e){c(t.getDateFromFormat(e.date))}),g(u)}),u=[],c(l),c(d),this.parent.eventMarkers.length>0&&!this.parent.timelineModule.isZoomToFit){this.parent.eventMarkers.forEach(function(e,i){c(t.getDateFromFormat(e.day))})}if(this.parent.totalHolidayDates.length>0&&!this.parent.timelineModule.isZoomToFit){this.parent.totalHolidayDates.forEach(function(e,t){c(new Date(e))})}g(u),l&&d||(l?l=i.i(r.isNullOrUndefined)(l)?this.getDateFromFormat(new Date):l:(l=i.i(r.isNullOrUndefined)(l)?this.getDateFromFormat(new Date):l,l.setHours(0,0,0,0)),d=this.getDateFromFormat(new Date(l.getTime())),d.setDate(d.getDate()+20))}else s&&o||0!==p.length||(l=this.getDateFromFormat(new Date),d=this.getDateFromFormat(new Date(l.getTime())));e?(i.i(r.setValue)("minStartDate",l,e),i.i(r.setValue)("maxEndDate",d,e)):(this.prevProjectStartDate=this.parent.cloneProjectStartDate,this.parent.cloneProjectStartDate=l||new Date(s.getTime()),this.parent.cloneProjectEndDate=d||new Date(o.getTime()))},e.prototype.splitTasksDuration=function(e){for(var t=0,i=0;i<e.length;i++){var r=e[i],n=r.startDate,a=r.endDate;t+=Math.ceil(this.getTimeDifference(n,a)/864e5)}return t},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var r;!function(e){e[e.NextPage=0]="NextPage",e[e.LastPage=1]="LastPage"}(r||(r={}))},function(e,t){e.exports=s},function(e,t){e.exports=o},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(2),n=i(0),a=(i.n(n),function(){function e(e){this.parentRecord=[],this.parentIds=[],this.parentPredecessors=[],this.parent=e,this.dateValidateModule=this.parent.dateValidationModule}return e.prototype.ensurePredecessorCollection=function(){for(var e=this.parent.predecessorsCollection,t=e.length-1,i=t;i>=0;i--){var r=e[i],n=r.ganttProperties;this.ensurePredecessorCollectionHelper(r,n)}},e.prototype.ensurePredecessorCollectionHelper=function(e,t){var r=t.predecessorsName;if(!r||"string"!=typeof r&&"number"!=typeof r){if(r&&"object"==typeof r&&r.length){for(var a=[],s=0;s<r.length;s++){var o=r[s],l={};l.from=i.i(n.getValue)("from",o),l.to=i.i(n.getValue)("to",o)?i.i(n.getValue)("to",o):t.rowUniqueID,l.type=i.i(n.getValue)("type",o)?i.i(n.getValue)("type",o):"FS";var d=i.i(n.getValue)("offset",o);if(i.i(n.isNullOrUndefined)(d))l.offset=0,l.offsetUnit=this.parent.durationUnit.toLocaleLowerCase();else if("string"==typeof d){var p=this.getOffsetDurationUnit(i.i(n.getValue)("offset",o));l.offset=p.duration,l.offsetUnit=p.durationUnit}else l.offset=parseFloat(d.toString()),l.offsetUnit=this.parent.durationUnit.toLocaleLowerCase();var h=this.checkIsParent(l.from.toString());h||a.push(l)}this.parent.setRecordValue("predecessor",a,t,!0)}}else this.parent.setRecordValue("predecessor",this.calculatePredecessor(r,e),t,!0);this.parent.setRecordValue("predecessorsName",this.getPredecessorStringValue(e),t,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,t.predecessorsName,e),this.parent.setRecordValue(this.parent.taskFields.dependency,t.predecessorsName,e)},e.prototype.updateUnscheduledDependency=function(e){for(var t=this.parent.taskFields,r=i.i(n.isNullOrUndefined)(e[t.dependency])?[]:e[t.dependency].toString().split(","),a=0;a<r.length;a++){var s=parseInt(r[a],10);if(!isNaN(s)){var o=this.parent.getRecordByID(s.toString()),l=i.i(n.isNullOrUndefined)(o)?null:i.i(n.extend)({},{},o.taskData,!0);!i.i(n.isNullOrUndefined)(l)&&i.i(n.isNullOrUndefined)(l[t.startDate])&&i.i(n.isNullOrUndefined)(l[t.duration])&&i.i(n.isNullOrUndefined)(l[t.endDate])&&(l[t.duration]=1,l[t.startDate]=this.parent.projectStartDate,this.parent.updateRecordByID(l))}}},e.prototype.checkIsParent=function(e){var t=!1;return this.parent.connectorLineModule.getRecordByID(e).hasChildRecords&&(t=!0),t},e.prototype.calculatePredecessor=function(e,t){var i,r,n,a,s=this,o=e.toString(),l=[];return o.split(",").forEach(function(e){r=e.split("+"),n="+",e.indexOf("-")>=0&&(r=e.split("-"),n="-"),i=[];var o="ResourceView"===s.parent.viewType?s.parent.getTaskIds():s.parent.ids;-1!==("ResourceView"===s.parent.viewType?o.indexOf("T"+r[0]):o.indexOf(r[0]))?i[0]=r[0]:-1===o.indexOf(r[0])?(i=r[0].split(" "),1===i.length&&(-1!=i[0].indexOf(" ")?i=r[0].match(/(\d+|[A-z]+)/g):(i[0]=r[0].slice(0,-2),i[1]=r[0].slice(-2)))):i[0]=r[0];var d="ResourceView"===s.parent.viewType?o.indexOf("T"+i[0]):o.indexOf(i[0]);if(i[0]&&-1!==d){if(i.length>1){var p=i[1].toUpperCase();a="FS"===p||"FF"===p||"SF"===p||"SS"===p?p:"FS"}else a="FS";var h=r.length>1?n+""+r[1]:"0",u=s.getOffsetDurationUnit(h),c={from:i[0],type:a,isDrawn:!1,to:"ResourceView"===s.parent.viewType?t.ganttProperties.taskId.toString():t.ganttProperties.rowUniqueID.toString(),offsetUnit:u.durationUnit,offset:u.duration},g=s.parent.connectorLineModule.getRecordByID(c.to),f=s.parent.connectorLineModule.getRecordByID(c.from);s.parent.connectorLineEditModule&&f&&g?s.parent.connectorLineEditModule.validateParentPredecessor(f,g)&&l.push(c):l.push(c),i.splice(0)}}),l},e.prototype.getPredecessorStringValue=function(e){var t,r,a=e.ganttProperties.predecessor,s=this.parent.durationUnitTexts,o="";if(r=[],a)for(var l=a.length,d=0;d<l;d++){var p=a[d],h="",u="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(p.from!==u.toString()){if(h=p.from+p.type,"string"==typeof e.ganttProperties.taskId?(r[0]=h.slice(0,-2),r[1]=h.slice(-2),t=r[0]+" "+r[1]):t=h,h=t,0!==p.offset){h+=p.offset>0?"+"+p.offset+" ":p.offset+" ";var c=1!==p.offset;"day"===p.offsetUnit?h+=c?i.i(n.getValue)("days",s):i.i(n.getValue)("day",s):"hour"===p.offsetUnit?h+=c?i.i(n.getValue)("hours",s):i.i(n.getValue)("hour",s):h+=c?i.i(n.getValue)("minutes",s):i.i(n.getValue)("minute",s)}o=o.length>0?o+","+h:h}}return o},e.prototype.getOffsetDurationUnit=function(e){var t=0,r=this.parent.durationUnit.toLocaleLowerCase(),a=this.parent.durationUnitEditText;if("string"==typeof e){for(var s=e.match(/[^0-9]+|[0-9]+/g),o=0;o<s.length;o++)s[o]=s[o].trim();"-"===s[0]&&s[1]?(s[1]=s[0]+s[1],s.shift()):"+"===s[0]&&s.shift(),"."!==s[1]||isNaN(parseInt(s[2],10))||(s[0]+=s[1]+s[2],s.splice(1,2)),s&&s.length<=2&&(t=parseFloat(s[0]),r=s[1]?s[1].toLowerCase().trim():"",r=-1!==i.i(n.getValue)("minute",a).indexOf(r)?"minute":-1!==i.i(n.getValue)("hour",a).indexOf(r)?"hour":-1!==i.i(n.getValue)("day",a).indexOf(r)?"day":this.parent.durationUnit.toLocaleLowerCase())}else t=e,r=this.parent.durationUnit.toLocaleLowerCase();return isNaN(t)&&(t=0,r=this.parent.durationUnit.toLocaleLowerCase()),{duration:t,durationUnit:r}},e.prototype.updatePredecessors=function(){for(var e,t=this.parent.predecessorsCollection,i=t.length,r=0;r<i;r++)e=t[r],this.updatePredecessorHelper(e,t)},e.prototype.updatePredecessorHelper=function(e,t){var r,a=e.ganttProperties.predecessor,s=a.length;t=i.i(n.isNullOrUndefined)(t)?[]:t;for(var o=0;o<s;o++){var l=a[o];r=this.parent.connectorLineModule.getRecordByID(l.from);var d="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(l.from!==d.toString()&&r){var p=void 0;r.ganttProperties.predecessor?(p=i.i(n.extend)([],r.ganttProperties.predecessor,[],!0),p.push(l),this.parent.setRecordValue("predecessor",p,r.ganttProperties,!0)):(p=[],p.push(l),this.parent.setRecordValue("predecessor",p,r.ganttProperties,!0),t.push(r))}}},e.prototype.updatedRecordsDateByPredecessor=function(){for(var e=this.parent.flatData,t=this.parent.flatData.length,i=0;i<t;i++)e[i].ganttProperties.predecessor&&(this.validatePredecessorDates(e[i]),e[i].hasChildRecords&&this.parent.editModule&&this.parent.editModule.updateChildItems(e[i]))},e.prototype.updateParentPredecessor=function(){if(this.parent.enablePredecessorValidation)for(var e=this.parentPredecessors.length,t=e-1;t>=0;t--){var i=this.parentPredecessors[t];this.validatePredecessorDates(i)}},e.prototype.validatePredecessorDates=function(e){if(e.ganttProperties.predecessor){var t=e.ganttProperties.predecessor,i=void 0,r=void 0,n=null,a="ResourceView"===this.parent.viewType?e.ganttProperties.taskId.toString():e.ganttProperties.rowUniqueID.toString(),s=t.filter(function(e){return e.to===a?e:null});for(i=0;i<s.length;i++){var o=s[i];r=this.parent.connectorLineModule.getRecordByID(o.from),n=this.parent.connectorLineModule.getRecordByID(o.to),this.parent.isLoad&&-1==this.parentPredecessors.indexOf(e)&&(e.hasChildRecords||n.hasChildRecords)&&this.parentPredecessors.push(e),(n.ganttProperties.isAutoSchedule||this.parent.validateManualTasksOnLinking)&&this.validateChildGanttRecord(r,n)}}},e.prototype.validateChildGanttRecord=function(e,t){if(this.parent.editedTaskBarItem!==t&&!i.i(n.isNullOrUndefined)(i.i(r.c)(e.ganttProperties))&&!i.i(n.isNullOrUndefined)(i.i(r.c)(t.ganttProperties))&&this.parent.isInPredecessorValidation&&(t.ganttProperties.isAutoSchedule||this.parent.validateManualTasksOnLinking)){var a=t.ganttProperties,s="ResourceView"===this.parent.viewType?a.taskId.toString():a.rowUniqueID.toString(),o=a.predecessor,l=o.filter(function(e){return e.to===s?e:null}),d=this.getPredecessorDate(t,l);this.parent.setRecordValue("startDate",d,a,!0),this.parent.dataOperation.updateMappingData(t,"startDate");var p=t.ganttProperties.segments;i.i(n.isNullOrUndefined)(p)&&this.dateValidateModule.calculateEndDate(t),this.parent.dataOperation.updateWidthLeft(t),!this.parent.isLoad&&t.parentItem&&this.parent.isInPredecessorValidation&&this.parent.getParentTask(t.parentItem).ganttProperties.isAutoSchedule&&-1===this.parentIds.indexOf(t.parentItem.uniqueID)&&(this.parentIds.push(t.parentItem.uniqueID),this.parentRecord.push(t.parentItem))}},e.prototype.getPredecessorDate=function(e,t){var i,r,n,a,s=this,o=t.filter(function(t){var i="ResourceView"===s.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;return t.to===i.toString()?t:null});if(o)for(var l=o.length,d=0;d<l;d++){var p=o[d];n=this.parent.connectorLineModule.getRecordByID(p.from),a=this.parent.connectorLineModule.getRecordByID(p.to),r=this.getValidatedStartDate(a.ganttProperties,n.ganttProperties,p),null!=i&&1!==this.dateValidateModule.compareDates(r,i)||(i=r)}return i},e.prototype.getValidatedStartDate=function(e,t,i){var r,n,a=i.type,s=i.offset;switch(a){case"FS":r=this.dateValidateModule.getValidEndDate(t),e.isMilestone&&0===s||(r=this.dateValidateModule.checkStartDate(r,e)),0!==s&&(r=this.updateDateByOffset(r,i,e)),n=e.isMilestone?r:this.dateValidateModule.checkStartDate(r,e);break;case"FF":case"SF":r="FF"===a?this.dateValidateModule.getValidEndDate(t):this.dateValidateModule.getValidStartDate(t),0!==s&&(r=this.updateDateByOffset(r,i,e)),e.isMilestone||(r=this.dateValidateModule.checkEndDate(r,e)),n=this.dateValidateModule.getStartDate(r,e.duration,e.durationUnit,e);break;case"SS":r=this.dateValidateModule.getValidStartDate(t),0!==s&&(r=this.updateDateByOffset(r,i,e)),n=e.isMilestone?r:this.dateValidateModule.checkStartDate(r,e)}return n},e.prototype.updateDateByOffset=function(e,t,i){var r,n=t.offset,a=t.offsetUnit;return n<0?r=this.dateValidateModule.getStartDate(this.dateValidateModule.checkEndDate(e,i),-1*n,a,i):(r=this.dateValidateModule.getEndDate(e,n,a,i,!1),i.isMilestone||(r=this.dateValidateModule.checkStartDate(r,i))),r},e.prototype.createConnectorLinesCollection=function(e){var t,i,r,n=e||this.parent.currentViewData,a=n.length;for(this.parent.connectorLineModule.expandedRecords=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.updatedRecords:this.parent.getExpandedRecords(this.parent.updatedRecords),t=0;t<a;t++)i=n[t],(r=i.ganttProperties.predecessor)&&this.addPredecessorsCollection(r)},e.prototype.addPredecessorsCollection=function(e){var t,i,r,n,a;if(e)for(t=e.length,i=0;i<t;i++){r=e[i];n=this.parent.connectorLineModule.getRecordByID(r.from),a=this.parent.connectorLineModule.getRecordByID(r.to),this.parent.connectorLineModule.expandedRecords&&-1!==this.parent.connectorLineModule.expandedRecords.indexOf(n)&&-1!==this.parent.connectorLineModule.expandedRecords.indexOf(a)&&this.updateConnectorLineObject(n,a,r)}},e.prototype.updateConnectorLineObject=function(e,t,i){var r=this.parent.connectorLineModule.createConnectorLineObject(e,t,i);if(r){if(t.isCritical&&e.isCritical&&(r.isCritical=!0),this.parent.connectorLineIds.length>0&&-1===this.parent.connectorLineIds.indexOf(r.connectorLineId)||0===this.parent.connectorLineIds.length)this.parent.updatedConnectorLineCollection.push(r),this.parent.connectorLineIds.push(r.connectorLineId);else if(-1!==this.parent.connectorLineIds.indexOf(r.connectorLineId)){var n=this.parent.connectorLineIds.indexOf(r.connectorLineId);this.parent.updatedConnectorLineCollection[n]=r}i.isDrawn=!0}return r},e.prototype.validatePredecessor=function(e,t,i){if(this.parent.isInPredecessorValidation&&e.ganttProperties.predecessor){for(var r=e.ganttProperties.predecessor,n=void 0,a=null,s=void 0,o=void 0,l="ResourceView"===this.parent.viewType?e.ganttProperties.taskId.toString():e.ganttProperties.rowUniqueID.toString(),d=r.filter(function(e){return e.to===l?e:null}),p=r.filter(function(e){return e.from===l?e:null}),h=0;h<d.length;h++){s=d[h],n=this.parent.connectorLineModule.getRecordByID(s.from),a=this.parent.connectorLineModule.getRecordByID(s.to),this.parent.isInPredecessorValidation&&a.ganttProperties.isAutoSchedule?this.parent.isValidationEnabled=!0:this.parent.isValidationEnabled=!1;var u="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;u.toString()!==s.to&&u.toString()!==s.from||i&&"predecessor"!==i||this.validateChildGanttRecord(n,a)}for(var h=0;h<p.length;h++)o=p[h],n=this.parent.connectorLineModule.getRecordByID(o.from),a=this.parent.connectorLineModule.getRecordByID(o.to),this.parent.isInPredecessorValidation&&a.ganttProperties.isAutoSchedule?this.parent.isValidationEnabled=!0:this.parent.isValidationEnabled=!1,"predecessor"!==i&&this.parent.isValidationEnabled&&this.validateChildGanttRecord(n,a),!1!==n.expanded&&a.expanded,a&&this.validatePredecessor(a,void 0,"successor")}},e.prototype.getValidPredecessor=function(e){var t=this,r=[];if(!i.i(n.isNullOrUndefined)(e)){var a=e.ganttProperties.predecessor;a&&a.length>0&&(r=a.filter(function(i){var r="ResourceView"===t.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;return i.from!==r.toString()}))}return r},e}())},function(e,t,i){"use strict";var r=i(46);i.d(t,"a",function(){return r.a});var n=i(11);i.d(t,"b",function(){return n.a});var a=i(2);i.d(t,"c",function(){return a.j}),i.d(t,"d",function(){return a.c}),i.d(t,"e",function(){return a.i}),i.d(t,"f",function(){return a.d}),i.d(t,"g",function(){return a.f}),i.d(t,"h",function(){return a.e}),i.d(t,"i",function(){return a.g}),i.d(t,"j",function(){return a.l}),i.d(t,"k",function(){return a.h}),i.d(t,"l",function(){return a.a}),i.d(t,"m",function(){return a.b}),i.d(t,"n",function(){return a.k});var s=i(16);i.d(t,"o",function(){return s.b}),i.d(t,"p",function(){return s.c}),i.d(t,"q",function(){return s.d}),i.d(t,"r",function(){return s.a}),i.d(t,"s",function(){return s.e})},function(e,t,i){"use strict";i.d(t,"b",function(){return r}),i.d(t,"c",function(){return n}),i.d(t,"d",function(){return a}),i.d(t,"a",function(){return s}),i.d(t,"e",function(){return o});var r="load",n="rowDataBound",a="queryCellInfo",s="toolbarClick",o="key-pressed"},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(1),n=(i.n(r),function(){function e(e){this.theme=e,this.ganttStyle={},this.setTheme(this.ganttStyle,this.theme)}return Object.defineProperty(e.prototype,"style",{get:function(){return this.ganttStyle?this.ganttStyle:(this.setTheme(this.ganttStyle,"Material"),this.ganttStyle)},enumerable:!0,configurable:!0}),e.prototype.setTheme=function(e,t){switch(this.initStyles(e),e.columnHeader.fontSize=9.5,e.columnHeader.fontColor=new r.PdfColor(0,0,0),e.columnHeader.fontColor.gray=.2,e.columnHeader.backgroundColor=new r.PdfColor(255,255,255),e.columnHeader.borderColor=new r.PdfColor(234,234,234),e.columnHeader.format.lineAlignment=1,e.columnHeader.format.alignment=0,e.fontFamily=r.PdfFontFamily.Helvetica,e.cell.fontSize=9.5,e.cell.backgroundColor=new r.PdfColor(255,255,255),e.cell.borderColor=new r.PdfColor(234,234,234),e.cell.fontColor=new r.PdfColor(0,0,0),e.cell.fontColor.gray=.2,e.cell.format.lineAlignment=1,e.cell.format.alignment=0,e.footer.fontSize=9.5,e.footer.fontStyle=0,e.footer.format.alignment=1,e.footer.format.lineAlignment=1,e.timeline.fontSize=9.5,e.timeline.fontStyle=0,e.timeline.backgroundColor=new r.PdfColor(252,252,252),e.timeline.fontColor=new r.PdfColor(40,40,39),e.chartGridLineColor=new r.PdfColor(206,206,206),e.timeline.borderColor=new r.PdfColor(206,206,206),t){case"Bootstrap":e.taskbar.taskColor=new r.PdfColor(49,122,185),e.taskbar.progressColor=new r.PdfColor(33,82,125),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(119,119,119),e.taskbar.parentProgressColor=new r.PdfColor(85,85,85),e.taskbar.taskBorderColor=new r.PdfColor(33,82,125),e.taskbar.parentTaskBorderColor=new r.PdfColor(85,85,85),e.taskbar.milestoneColor=new r.PdfColor(85,85,85),e.footer.fontColor=new r.PdfColor(0,0,0),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(33,82,125),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(0,0,0);break;case"Bootstrap 4":e.taskbar.taskColor=new r.PdfColor(0,123,255),e.taskbar.progressColor=new r.PdfColor(0,86,179),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(108,117,125),e.taskbar.parentProgressColor=new r.PdfColor(73,80,87),e.taskbar.taskBorderColor=new r.PdfColor(0,86,179),e.taskbar.parentTaskBorderColor=new r.PdfColor(73,80,87),e.taskbar.milestoneColor=new r.PdfColor(73,80,87),e.footer.fontColor=new r.PdfColor(0,0,0),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(0,86,179),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(33,37,41);break;case"Fabric":e.columnHeader.fontColor=new r.PdfColor(102,102,102),e.cell.fontColor=new r.PdfColor(51,51,51),e.taskbar.taskColor=new r.PdfColor(0,120,214),e.taskbar.progressColor=new r.PdfColor(0,91,163),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(118,118,118),e.taskbar.parentProgressColor=new r.PdfColor(80,80,80),e.taskbar.taskBorderColor=new r.PdfColor(0,91,163),e.taskbar.parentTaskBorderColor=new r.PdfColor(80,80,80),e.taskbar.milestoneColor=new r.PdfColor(80,80,80),e.footer.fontColor=new r.PdfColor(51,51,51),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(0,69,122),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(51,51,51);break;default:e.taskbar.taskColor=new r.PdfColor(88,105,197),e.taskbar.progressColor=new r.PdfColor(63,81,181),e.taskbar.criticalTaskColor=new r.PdfColor(255,139,139),e.taskbar.criticalProgressColor=new r.PdfColor(255,85,85),e.criticalConnectorLineColor=new r.PdfColor(255,85,85),e.taskbar.criticalTaskBorderColor=new r.PdfColor(255,85,85),e.taskbar.parentTaskColor=new r.PdfColor(132,132,132),e.taskbar.parentProgressColor=new r.PdfColor(97,97,97),e.taskbar.taskBorderColor=new r.PdfColor(63,81,181),e.taskbar.parentTaskBorderColor=new r.PdfColor(51,51,51),e.taskbar.milestoneColor=new r.PdfColor(97,97,97),e.footer.fontColor=new r.PdfColor(0,0,0),e.footer.fontColor.gray=.2,e.connectorLineColor=new r.PdfColor(63,81,181),e.footer.backgroundColor=new r.PdfColor(255,255,255),e.taskbar.progressFontColor=new r.PdfColor(255,255,255),e.label.fontColor=new r.PdfColor(51,51,51)}},e.prototype.initStyles=function(e){e.columnHeader={},e.columnHeader.format=new r.PdfStringFormat,e.cell={},e.cell.format=new r.PdfStringFormat,e.timeline={},e.footer={},e.footer.format=new r.PdfStringFormat,e.label={},e.taskbar={}},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(7),n=i(1),a=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),s=function(e){function t(){var t=e.call(this)||this;return t.treeGridSize=new n.SizeF(0,0),t.treeColumnIndex=0,t.allowRowBreakAcrossPages=!0,t.enableHeader=!0,t.isFitToWidth=!1,t.columns=new r.b(t),t.rows=new r.c(t),t.headers=new r.d(t),t.style=new r.e,t.rowHeight=0,t}return a(t,e),Object.defineProperty(t.prototype,"raiseBeginCellDraw",{get:function(){return void 0!==this.beginCellDraw&&null!==typeof this.beginCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"raiseEndCellDraw",{get:function(){return void 0!==this.endCellDraw&&null!==typeof this.endCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return 0===this.treeGridSize.width&&0===this.treeGridSize.height&&(this.treeGridSize=this.calculateTreeGridSize()),this.treeGridSize},set:function(e){this.treeGridSize=e},enumerable:!0,configurable:!0}),t.prototype.draw=function(e,t,i,r){if(t instanceof n.PointF&&void 0===t.width&&void 0===i)return this.drawHelper(e,t.x,t.y);if("number"==typeof t&&"number"==typeof i&&void 0===r)return this.drawHelper(e,t,i,null);if(t instanceof n.RectangleF&&void 0!==t.width&&void 0===i)return this.drawHelper(e,t,null);if(t instanceof n.PointF&&void 0===t.width&&i instanceof n.PdfLayoutFormat)return this.drawHelper(e,t.x,t.y,i);if("number"==typeof t&&"number"==typeof i&&(r instanceof n.PdfLayoutFormat||null==r)){var a=e.graphics.clientSize.width-t,s=new n.RectangleF(t,i,a,0);return this.drawHelper(e,s,r)}return t instanceof n.RectangleF&&void 0!==t.width&&"boolean"==typeof i?this.drawHelper(e,t,null):this.drawHelper(e,t,i)},t.prototype.measureColumnsWidth=function(e){if(void 0!==e)for(var t=this.columns.getDefaultWidths(e.width-e.x),i=0;i<this.columns.count;i++)this.columns.getColumn(i).width<0&&(this.columns.getColumn(i).width=t[i]);else{for(var t=[],r=0,n=0,a=0,s=this.columns.count,i=0;i<s;i++){for(var o=this.rows.count,l=0;l<o;l++){var d=this.rows.getRow(l).cells.getCell(i).width,p=this.initialWidth>0?Math.min(this.initialWidth,d):d;r=Math.max(r,p),r=Math.max(this.columns.getColumn(i).width,r),this.columns.getColumn(i).isTreeColumn&&(a=Math.max(a,this.rows.getRow(l).level))}this.columns.getColumn(i).isTreeColumn?t.push(r+10*a):t.push(r),n+=r,r=0}for(var i=0;i<this.columns.count;i++)this.columns.getColumn(i).width<0&&(this.columns.getColumn(i).width=t[i])}},t.prototype.calculateTreeGridSize=function(){for(var e=0,t=this.columns.width,i=0;i<this.headers.count;i++){var r=this.headers.getHeader(i);e+=r.height}for(var i=0;i<this.rows.count;i++){var r=this.rows.getRow(i);e+=r.height}return new n.SizeF(t,e)},t.prototype.drawGrid=function(e,t,i,r){this.initialWidth=e.graphics.clientSize.width;var a=new n.RectangleF(0,0,e.getClientSize().height,0);return this.draw(e,a,r)},t.prototype.layout=function(e){if(0!==this.rows.count){var t=this.rows.getRow(0).cells.getCell(0).style;if(1!==t.borders.left.width){var i=t.borders.left.width/2,a=t.borders.top.width/2;if(e.bounds.x===r.f.default.right.width/2&&e.bounds.y===r.f.default.right.width/2){var s=new n.RectangleF(new n.PointF(i,a),new n.SizeF(this.size.width,this.size.height));e.bounds=s}}}return this.setSpan(),this.layouter=new r.g(this),this.layouter.layoutInternal(e)},t.prototype.onBeginCellDraw=function(e){this.raiseBeginCellDraw&&this.beginCellDraw(this,e)},t.prototype.onEndCellDraw=function(e){this.raiseEndCellDraw&&this.endCellDraw(this,e)},t.prototype.setSpan=function(){for(var e=1,t=1,i=0,r=0,n=0,a=this.headers.count,s=0;s<a;s++){var o=this.headers.getHeader(s);n=0;for(var l=o.cells.count,d=0;d<l;d++){var p=o.cells.getCell(d);if(n=Math.max(n,p.rowSpan),!p.isCellMergeContinue&&!p.isRowMergeContinue&&(p.columnSpan>1||p.rowSpan>1)){if(p.columnSpan+d>o.cells.count)throw new Error("Invalid span specified at row "+d.toString()+" column "+s.toString());if(p.rowSpan+s>this.headers.count)throw new Error("Invalid span specified at Header "+d.toString()+" column "+s.toString());if(p.columnSpan>1&&p.rowSpan>1){for(e=p.columnSpan,t=p.rowSpan,i=d,r=s,p.isCellMergeStart=!0,p.isRowMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,o.cells.getCell(i).isRowMergeContinue=!0,o.cells.getCell(i).rowSpan=t,e--;for(i=d,e=p.columnSpan;t>1;){for(r++,this.headers.getHeader(r).cells.getCell(d).isRowMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,t--;e>1;)i++,this.headers.getHeader(r).cells.getCell(i).isCellMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,e--;e=p.columnSpan,i=d}}else if(p.columnSpan>1&&1===p.rowSpan)for(e=p.columnSpan,i=d,p.isCellMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,e--;else if(1===p.columnSpan&&p.rowSpan>1)for(t=p.rowSpan,r=s;t>1;)r++,this.headers.getHeader(r).cells.getCell(d).isRowMergeContinue=!0,t--}}o.maximumRowSpan=n}e=t=1,i=r=0,a=this.rows.count;for(var s=0;s<a;s++)for(var o=this.rows.getRow(s),h=o.cells.count,d=0;d<h;d++){var p=o.cells.getCell(d);if(!p.isCellMergeContinue&&!p.isRowMergeContinue&&(p.columnSpan>1||p.rowSpan>1)){if(p.columnSpan+d>o.cells.count)throw new Error("Invalid span specified at row {0} column {1} "+d.toString());if(p.rowSpan+s>this.rows.count)throw new Error("Invalid span specified at row {0} column {1} "+d.toString());if(p.columnSpan>1&&p.rowSpan>1){for(e=p.columnSpan,t=p.rowSpan,i=d,r=s,p.isCellMergeStart=!0,p.isRowMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,e--;for(i=d,e=p.columnSpan;t>1;){for(r++,this.rows.getRow(r).cells.getCell(d).isRowMergeContinue=!0,t--;e>1;)i++,this.rows.getRow(r).cells.getCell(i).isCellMergeContinue=!0,e--;e=p.columnSpan,i=d}}else if(p.columnSpan>1&&1===p.rowSpan)for(e=p.columnSpan,i=d,p.isCellMergeStart=!0;e>1;)i++,o.cells.getCell(i).isCellMergeContinue=!0,e--;else if(1===p.columnSpan&&p.rowSpan>1)for(t=p.rowSpan,r=s;t>1;)r++,this.rows.getRow(r).cells.getCell(d).isRowMergeContinue=!0,t--}}},t}(n.PdfLayoutElement)},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.allowEditing=!0,this.allowReordering=!0,this.allowResizing=!0,this.allowSorting=!0,this.allowFiltering=!0,this.edit={},i.i(r.merge)(this,e)}return e}())},function(e,t){e.exports=l},function(e,t){e.exports=d},function(e,t,i){"use strict";var r=i(15);i.d(t,"a",function(){return r.a}),i.d(t,"b",function(){return r.b}),i.d(t,"c",function(){return r.c}),i.d(t,"d",function(){return r.d}),i.d(t,"e",function(){return r.e}),i.d(t,"f",function(){return r.f}),i.d(t,"g",function(){return r.g}),i.d(t,"h",function(){return r.h}),i.d(t,"i",function(){return r.i}),i.d(t,"j",function(){return r.j}),i.d(t,"k",function(){return r.k}),i.d(t,"l",function(){return r.l}),i.d(t,"m",function(){return r.m}),i.d(t,"n",function(){return r.n}),i.d(t,"o",function(){return r.o}),i.d(t,"p",function(){return r.p}),i.d(t,"q",function(){return r.q}),i.d(t,"r",function(){return r.r}),i.d(t,"s",function(){return r.s});var n=i(23);i.d(t,"t",function(){return n.a}),i.d(t,"u",function(){return n.b}),i.d(t,"v",function(){return n.c}),i.d(t,"w",function(){return n.d}),i.d(t,"x",function(){return n.e}),i.d(t,"y",function(){return n.f}),i.d(t,"z",function(){return n.g}),i.d(t,"A",function(){return n.h}),i.d(t,"B",function(){return n.i}),i.d(t,"C",function(){return n.j}),i.d(t,"D",function(){return n.k}),i.d(t,"E",function(){return n.l}),i.d(t,"F",function(){return n.m}),i.d(t,"G",function(){return n.n}),i.d(t,"H",function(){return n.o}),i.d(t,"I",function(){return n.p});var a=i(9);i.d(t,"J",function(){return a.a}),i.d(t,"K",function(){return a.b}),i.d(t,"L",function(){return a.c}),i.d(t,"M",function(){return a.d}),i.d(t,"N",function(){return a.e}),i.d(t,"O",function(){return a.f}),i.d(t,"P",function(){return a.g}),i.d(t,"Q",function(){return a.h}),i.d(t,"R",function(){return a.i}),i.d(t,"S",function(){return a.j}),i.d(t,"T",function(){return a.k}),i.d(t,"U",function(){return a.l}),i.d(t,"V",function(){return a.m}),i.d(t,"W",function(){return a.n}),i.d(t,"X",function(){return a.o}),i.d(t,"Y",function(){return a.p}),i.d(t,"Z",function(){return a.q}),i.d(t,"_0",function(){return a.r}),i.d(t,"_1",function(){return a.s})},function(e,t,i){"use strict";var r=i(34);i.d(t,"a",function(){return r.a});var n=i(27);i.d(t,"b",function(){return n.a});var a=i(28);i.d(t,"c",function(){return a.a});var s=i(36);i.d(t,"d",function(){return s.a});var o=i(41);i.d(t,"e",function(){return o.a});var l=i(14);i.d(t,"f",function(){return l.a});var d=i(40);i.d(t,"g",function(){return d.a});var p=i(43);i.d(t,"h",function(){return p.a});var h=i(32);i.d(t,"i",function(){return h.a});var u=i(31);i.d(t,"j",function(){return u.a});var c=i(30);i.d(t,"k",function(){return c.a});var g=i(35);i.d(t,"l",function(){return g.a});var f=i(26);i.d(t,"m",function(){return f.a});var m=i(39);i.d(t,"n",function(){return m.a});var y=i(38);i.d(t,"o",function(){return y.a});var v=i(44);i.d(t,"p",function(){return v.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(6)),a=(i.n(n),i(4)),s=(i.n(a),function(){function e(e){this.isCellEdit=!1,this.isResourceCellEdited=!1,this.parent=e,this.bindTreeGridProperties()}return e.prototype.bindTreeGridProperties=function(){this.parent.treeGrid.editSettings.allowEditing=this.parent.editSettings.allowEditing,this.parent.treeGrid.editSettings.allowNextRowEdit=this.parent.editSettings.allowNextRowEdit,this.parent.treeGrid.editSettings.mode="Cell",this.parent.treeGrid.cellEdit=this.ensureEditCell.bind(this),this.parent.editSettings.allowEditing&&n.TreeGrid.Inject(n.Edit)},e.prototype.ensureEditCell=function(e){var t=this,n=e.rowData,s=e.columnName;this.editedColumn=this.parent.getColumnByField(s,this.parent.ganttColumns);var o=this.parent.taskFields;if(this.parent.readOnly)return void(e.cancel=!0);if("Dialog"===this.parent.editSettings.mode)return void(e.cancel=!0);if(!n.hasChildRecords||(s!==o.endDate||(i.i(r.isNullOrUndefined)(n.isManual)||!1!==n.isManual)&&"Auto"!==this.parent.taskMode)&&s!==o.duration&&s!==o.progress&&s!==o.work&&"taskType"!==s){var l=new a.Deferred;return this.parent.trigger("cellEdit",e,function(e){0===n.level&&"ResourceView"===t.parent.viewType&&(e.cancel=!0),l.resolve(e),e.cancel||(e.columnName===t.parent.taskFields.notes?t.openNotesEditor(e):(t.isCellEdit=!0,i.i(r.isNullOrUndefined)(t.parent.toolbarModule)||t.parent.toolbarModule.refreshToolbarItems()))}),l}e.cancel=!0},e.prototype.openNotesEditor=function(e){var t=this.parent.taskFields,i=e.rowData,r=e.columnName;if(r===t.notes&&!this.parent.showInlineNotes){e.cancel=!0;var n=this.parent.editModule.dialogModule.updatedEditFields.map(function(e){return e.type}),a=n.indexOf("Notes");if(-1!==a){this.parent.editModule.dialogModule.openEditDialog(i.ganttProperties.rowUniqueID);document.getElementById(this.parent.element.id+"_Tab").ej2_instances[0].selectedItem=a}}r===t.notes&&!0===this.parent.showInlineNotes&&(this.isCellEdit=!0)},e.prototype.isValueChange=function(e,t){var n=i.i(r.getValue)("data",e),a=n[t],s=i.i(r.getValue)("previousData",e);if(i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(s)||!i.i(r.isNullOrUndefined)(a)&&i.i(r.isNullOrUndefined)(s))return!0;if(!i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(s)){if(a instanceof Date)return a.getTime()!==n.taskData[t].getTime();if(t===this.parent.taskFields.resourceInfo)return a!==s;if(a!==n.taskData[t])return!0}return!1},e.prototype.initiateCellEdit=function(e,t){var n=i.i(r.getValue)("column",e),a=i.i(r.getValue)("data",e),s={};s.action="CellEditing",s.data=this.parent.getTaskByUniqueID(a.uniqueID);var o=i.i(r.getValue)("previousData",e),l=this.parent.allowUnscheduledTasks?a[n.field]:!i.i(r.isNullOrUndefined)(a[n.field])&&""!==a[n.field]||this.parent.taskFields.duration!==n.field&&this.parent.taskFields.startDate!==n.field&&this.parent.taskFields.endDate!==n.field?a[n.field]:o;i.i(r.isNullOrUndefined)(a)?this.parent.editModule.endEditAction(e):(a[n.field]=o,s.data[n.field]=o,this.parent.initiateEditAction(!0),this.parent.setRecordValue(n.field,l,s.data),n.field===this.parent.taskFields.name?this.taskNameEdited(s):n.field===this.parent.taskFields.startDate?this.startDateEdited(s):n.field===this.parent.taskFields.endDate?this.endDateEdited(s):n.field===this.parent.taskFields.duration?this.durationEdited(s):n.field===this.parent.taskFields.resourceInfo?this.resourceEdited(s,t,a):n.field===this.parent.taskFields.progress?this.progressEdited(s):n.field===this.parent.taskFields.baselineStartDate||n.field===this.parent.taskFields.baselineEndDate?this.baselineEdited(s):n.field===this.parent.taskFields.dependency?this.dependencyEdited(s,o):n.field===this.parent.taskFields.notes?this.notedEdited(s):n.field===this.parent.taskFields.work?this.workEdited(s):"taskType"!==n.field||i.i(r.isNullOrUndefined)(this.parent.taskFields.work)?n.field===this.parent.taskFields.manual?this.taskmodeEdited(s):(this.parent.setRecordValue("taskData."+n.field,s.data[n.field],s.data),this.parent.editModule.initiateSaveAction(s)):this.typeEdited(s,t)),this.isCellEdit=!1,i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule.editedColumn)||(this.parent.editModule.cellEditModule.editedColumn=null),i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.taskNameEdited=function(e){this.parent.setRecordValue("taskData."+this.parent.taskFields.name,e.data[this.parent.taskFields.name],e.data),this.parent.setRecordValue("taskName",e.data[this.parent.taskFields.name],e.data.ganttProperties,!0),this.updateEditedRecord(e)},e.prototype.notedEdited=function(e){this.parent.setRecordValue("taskData."+this.parent.taskFields.notes,e.data[this.parent.taskFields.notes],e.data),this.parent.setRecordValue("notes",e.data[this.parent.taskFields.notes],e.data.ganttProperties,!0),this.updateEditedRecord(e)},e.prototype.taskmodeEdited=function(e){this.parent.setRecordValue("isAutoSchedule",!e.data[this.parent.taskFields.manual],e.data.ganttProperties,!0),this.parent.editModule.updateTaskScheduleModes(e.data),this.updateEditedRecord(e)},e.prototype.startDateEdited=function(e){var t=e.data,n=e.data.ganttProperties,a=e.data[this.parent.taskFields.startDate];a=a?new Date(a.getTime()):null,a=this.parent.dateValidationModule.checkStartDate(a,t.ganttProperties,t.ganttProperties.isMilestone),i.i(r.isNullOrUndefined)(a)?t.hasChildRecords||(this.parent.setRecordValue("startDate",null,n,!0),this.parent.setRecordValue("duration",null,n,!0),this.parent.setRecordValue("isMilestone",!1,n,!0),this.parent.allowUnscheduledTasks&&i.i(r.isNullOrUndefined)(this.parent.taskFields.endDate)&&this.parent.setRecordValue("endDate",null,n,!0)):n.endDate||!i.i(r.isNullOrUndefined)(n.duration)?(this.parent.setRecordValue("startDate",new Date(a.getTime()),n,!0),this.parent.dateValidationModule.calculateEndDate(t)):i.i(r.isNullOrUndefined)(n.endDate)&&i.i(r.isNullOrUndefined)(n.duration)&&this.parent.setRecordValue("startDate",new Date(a.getTime()),n,!0),this.parent.setRecordValue("isMilestone",0===n.duration,n,!0),this.parent.dataOperation.updateWidthLeft(e.data),this.parent.dataOperation.updateMappingData(t,"startDate"),this.parent.dataOperation.updateMappingData(t,"endDate"),this.parent.dataOperation.updateMappingData(t,"duration"),this.updateEditedRecord(e)},e.prototype.validateEndDateWithSegments=function(e){for(var t=[],n=e.segments,a=0;a<n.length;a++){var s=n[a],o=s.endDate;o=!i.i(r.isNullOrUndefined)(e.endDate)&&o.getTime()<e.endDate.getTime()&&a!==n.length-1?o:e.endDate,s.duration=this.parent.dataOperation.getDuration(s.startDate,o,e.durationUnit,e.isAutoSchedule,e.isMilestone),n.length>0&&o.getTime()<s.startDate.getTime()&&o.getTime()<=e.endDate.getTime()?n[a-1].duration=this.parent.dataOperation.getDuration(n[a-1].startDate,e.endDate,e.durationUnit,e.isAutoSchedule,e.isMilestone):t.push(s)}return t},e.prototype.endDateEdited=function(e){var t=e.data.ganttProperties,n=e.data[this.parent.taskFields.endDate];n=n?new Date(n.getTime()):null,i.i(r.isNullOrUndefined)(n)?(this.parent.setRecordValue("endDate",n,t,!0),this.parent.setRecordValue("duration",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0)):(0===n.getHours()&&86400!==this.parent.defaultEndTime&&this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,n),n=this.parent.dateValidationModule.checkEndDate(n,t),this.parent.setRecordValue("endDate",n,t,!0),!i.i(r.isNullOrUndefined)(t.startDate)&&i.i(r.isNullOrUndefined)(t.duration)?-1===this.parent.dateValidationModule.compareDates(t.endDate,t.startDate)&&(this.parent.setRecordValue("endDate",new Date(t.startDate.getTime()),t,!0),this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,t.endDate)):!i.i(r.isNullOrUndefined)(t.duration)&&i.i(r.isNullOrUndefined)(t.startDate)&&this.parent.setRecordValue("startDate",this.parent.dateValidationModule.getStartDate(t.endDate,t.duration,t.durationUnit,t),t,!0),i.i(r.isNullOrUndefined)(t.segments)||(t.segments=this.validateEndDateWithSegments(t)),-1===this.compareDatesFromRecord(t)?this.parent.dateValidationModule.calculateDuration(e.data):this.parent.editModule.revertCellEdit(e),this.parent.setRecordValue("isMilestone",0===t.duration,t,!0),t.isMilestone&&this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(t.startDate,t),t,!0)),!i.i(r.isNullOrUndefined)(e.data.ganttProperties.segments)&&e.data.ganttProperties.segments.length>0&&(this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(e.data,!1),e.data.ganttProperties,!0),this.parent.dataOperation.updateMappingData(e.data,"segments")),this.parent.dataOperation.updateWidthLeft(e.data),this.parent.dataOperation.updateMappingData(e.data,"startDate"),this.parent.dataOperation.updateMappingData(e.data,"endDate"),this.parent.dataOperation.updateMappingData(e.data,"duration"),this.parent.editModule.updateResourceRelatedFields(e.data,"endDate"),this.updateEditedRecord(e)},e.prototype.durationEdited=function(e){var t=e.data.ganttProperties,i=e.data[this.parent.taskFields.duration];this.parent.dataOperation.updateDurationValue(i,t),this.updateDates(e),this.parent.editModule.updateResourceRelatedFields(e.data,"duration"),this.updateEditedRecord(e)},e.prototype.updateDates=function(e){var t=e.data.ganttProperties,n=this.parent.dateValidationModule.getDateFromFormat(t.endDate),a=this.parent.dateValidationModule.getDateFromFormat(t.startDate),s=t.duration;i.i(r.isNullOrUndefined)(s)?(this.parent.setRecordValue("isMilestone",!1,t,!0),null!=e.data[this.parent.taskFields.duration]&&this.parent.setRecordValue("endDate",null,t,!0)):(i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(n)&&this.parent.setRecordValue("startDate",this.parent.dateValidationModule.getStartDate(n,s,t.durationUnit,t),t,!0),0!==s&&t.isMilestone&&(this.parent.setRecordValue("isMilestone",!1,t,!0),this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(t.startDate,t),t,!0)),!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0&&(this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(e.data,!1),t,!0),this.parent.dataOperation.updateMappingData(e.data,"segments")),this.parent.setRecordValue("isMilestone",0===t.duration,t,!0),this.parent.dateValidationModule.calculateEndDate(e.data)),this.parent.dataOperation.updateWidthLeft(e.data),this.parent.dataOperation.updateMappingData(e.data,"endDate"),this.parent.dataOperation.updateMappingData(e.data,"startDate"),this.parent.dataOperation.updateMappingData(e.data,"duration")},e.prototype.progressEdited=function(e){var t=e.data;if(this.parent.setRecordValue("progress",t[this.parent.taskFields.progress]>100?100:t[this.parent.taskFields.progress],t.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.progress,t[this.parent.taskFields.progress]>100?100:t[this.parent.taskFields.progress],e.data),t.ganttProperties.isAutoSchedule||this.parent.setRecordValue("autoWidth",this.parent.dataOperation.calculateWidth(t,!1),t.ganttProperties,!0),!i.i(r.isNullOrUndefined)(e.data.ganttProperties.segments)&&e.data.ganttProperties.segments.length>0&&!i.i(r.isNullOrUndefined)(this.parent.editModule.taskbarEditModule)&&this.parent.editModule.taskbarEditModule.updateSegmentProgress(e.data.ganttProperties),!e.data.hasChildRecords){var n=t.ganttProperties.isAutoSchedule?t.ganttProperties.width:t.ganttProperties.autoWidth;this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(n,t.ganttProperties.progress),t.ganttProperties,!0)}this.updateEditedRecord(e)},e.prototype.baselineEdited=function(e){var t=e.data.ganttProperties,i=e.data[this.parent.taskFields.baselineStartDate],r=e.data[this.parent.taskFields.baselineEndDate];r&&0===r.getHours()&&86400!==this.parent.defaultEndTime&&this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,r),this.parent.setRecordValue("baselineStartDate",this.parent.dateValidationModule.checkBaselineStartDate(i),t,!0),this.parent.setRecordValue("baselineEndDate",this.parent.dateValidationModule.checkBaselineEndDate(r),t,!0),t.baselineStartDate&&t.baselineEndDate&&(this.parent.setRecordValue("baselineLeft",this.parent.dataOperation.calculateBaselineLeft(t),t,!0),this.parent.setRecordValue("baselineWidth",this.parent.dataOperation.calculateBaselineWidth(t),t,!0)),this.updateEditedRecord(e)},e.prototype.resourceEdited=function(e,t,n){var a=this.parent.resourceFields,s=t[this.parent.taskFields.resourceInfo];if(s){this.isResourceCellEdited=!0;for(var o=this.parent.dataOperation.setResourceInfo(t),l=o.length,d=n.ganttProperties.resourceInfo,p=void 0,h=[],u=this.parent.resources,c=void 0,g=0;g<l;g++)!function(e){if(d){var t=d.length;for(c=0;c<t;c++){if(d[c][a.id]===s[e]){p=c;break}p=-1}}if(i.i(r.isNullOrUndefined)(p)||-1===p){var n=u.filter(function(t){return s[e]===t[a.id]}),o=i.i(r.extend)({},n[0]);o[a.unit]=100,h.push(o)}else h.push(d[p])}(g);e.data.ganttProperties.resourceInfo=h,this.parent.dataOperation.updateMappingData(e.data,"resourceInfo"),this.parent.editModule.updateResourceRelatedFields(e.data,"resource"),"ResourceView"===this.parent.viewType&&(this.parent.editModule.dialogModule.isResourceUpdate=!0,this.parent.editModule.dialogModule.previousResource=d),this.updateDates(e),this.updateEditedRecord(e)}},e.prototype.dependencyEdited=function(e,t){this.parent.predecessorModule.updateUnscheduledDependency(e.data),this.parent.connectorLineEditModule.updatePredecessor(e.data,e.data[this.parent.taskFields.dependency],e)||this.parent.editModule.revertCellEdit(t)},e.prototype.workEdited=function(e){var t=e.data.ganttProperties,i=e.data[this.parent.taskFields.work];this.parent.setRecordValue("work",i,t,!0),this.parent.editModule.updateResourceRelatedFields(e.data,"work"),this.updateDates(e),this.updateEditedRecord(e)},e.prototype.typeEdited=function(e,t){var i=e.data.ganttProperties,r=t.taskType;this.parent.setRecordValue("taskType",r,i,!0),this.updateEditedRecord(e)},e.prototype.compareDatesFromRecord=function(e){var t=this.parent.dateValidationModule.getValidStartDate(e),i=this.parent.dateValidationModule.getValidEndDate(e);return this.parent.dateValidationModule.compareDates(t,i)},e.prototype.updateEditedRecord=function(e){this.parent.editModule.initiateUpdateAction(e)},e.prototype.destroy=function(){this.parent.editModule.cellEditModule=void 0},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.previousScroll={top:0,left:0},this.parent=e,this.element=this.parent.ganttChartModule.scrollElement,this.addEventListeners()}return e.prototype.addEventListeners=function(){this.parent.on("grid-scroll",this.gridScrollHandler,this),r.EventHandler.add(this.element,"scroll",this.onScroll,this)},e.prototype.removeEventListeners=function(){r.EventHandler.remove(this.element,"scroll",this.onScroll),this.parent.off("grid-scroll",this.gridScrollHandler)},e.prototype.gridScrollHandler=function(e){this.element.scrollTop=i.i(r.getValue)("top",e),this.isFromTreeGrid=!0},e.prototype.updateTopPosition=function(){var e,t=this.parent.treeGrid.element.querySelector(".e-content"),n=t.scrollTop;if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){e=n-this.parent.virtualScrollModule.getTopPosition()}else e=n;if(!i.i(r.isNullOrUndefined)(this.parent.dayMarkersModule)){var a=i.i(r.getValue)("nonworkingDayRender.holidayContainer",this.parent.dayMarkersModule),s=i.i(r.getValue)("nonworkingDayRender.weekendContainer",this.parent.dayMarkersModule),o=i.i(r.getValue)("eventMarkerRender.eventMarkersContainer",this.parent.dayMarkersModule);a&&(a.style.top=i.i(r.formatUnit)(e)),s&&(s.style.top=i.i(r.formatUnit)(e)),o&&(o.style.top=i.i(r.formatUnit)(e))}this.parent.chartVerticalLineContainer&&(this.parent.chartVerticalLineContainer.style.top=i.i(r.formatUnit)(e))},e.prototype.onScroll=function(){var e={};this.element.scrollTop!==this.previousScroll.top&&(this.isFromTreeGrid?this.isFromTreeGrid=!1:this.parent.notify("chartScroll",{top:this.element.scrollTop}),e.previousScrollTop=this.previousScroll.top,this.previousScroll.top=this.element.scrollTop,e.scrollTop=this.element.scrollTop,e.scrollDirection="Vertical",e.action="VerticalScroll",this.updateTopPosition()),this.element.scrollLeft!==this.previousScroll.left&&(this.parent.ganttChartModule.chartTimelineContainer.scrollLeft=this.element.scrollLeft,e.previousScrollLeft=this.previousScroll.left,this.previousScroll.left=this.element.scrollLeft,e.scrollLeft=this.element.scrollLeft,e.scrollDirection="Horizontal",e.action="HorizontalScroll"),e.requestType="scroll",this.parent.trigger("actionComplete",e)},e.prototype.setHeight=function(e){this.element.style.height=i.i(r.formatUnit)(e)},e.prototype.setWidth=function(e){this.element.style.width=i.i(r.formatUnit)(e)},e.prototype.setScrollTop=function(e){this.element.scrollTop=e,this.parent.treeGrid.element.querySelector(".e-content").scrollTop=e},e.prototype.setScrollLeft=function(e){this.element.scrollLeft=e,this.parent.ganttChartModule.chartTimelineContainer.scrollLeft=this.element.scrollLeft,this.previousScroll.left=this.element.scrollLeft},e.prototype.destroy=function(){this.removeEventListeners()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){r.TreeGrid.Inject(r.ColumnMenu),this.parent=e}return e.prototype.getColumnMenu=function(){return this.parent.treeGrid.columnMenuModule.getColumnMenu()},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"columnMenu"},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Reorder),this.parent.treeGrid.allowReordering=this.parent.allowReordering,this.bindEvents()}return e.prototype.getModuleName=function(){return"reorder"},e.prototype.bindEvents=function(){var e=this;this.parent.treeGrid.columnDragStart=function(t){e.parent.trigger("columnDragStart",t)},this.parent.treeGrid.columnDrag=function(t){e.parent.trigger("columnDrag",t)},this.parent.treeGrid.columnDrop=function(t){e.parent.trigger("columnDrop",t)}},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Resize),this.parent.treeGrid.allowResizing=this.parent.allowResizing,this.bindEvents()}return e.prototype.getModuleName=function(){return"resize"},e.prototype.bindEvents=function(){var e=this;this.parent.treeGrid.resizeStart=function(t){e.parent.trigger("resizeStart",t)},this.parent.treeGrid.resizing=function(t){e.parent.trigger("resizing",t)},this.parent.treeGrid.resizeStop=function(t){e.parent.trigger("resizeStop",t)}},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(3)),a=i(2),s=i(8),o=(i.n(s),function(){function e(e){this.validationPredecessor=null,this.confirmPredecessorDialog=null,this.predecessorIndex=null,this.childRecord=null,this.parent=e,this.dateValidateModule=this.parent.dateValidationModule,this.parent.on("initPredessorDialog",this.initPredecessorValidationDialog,this)}return e.prototype.updateConnectorLineEditElement=function(e){var t=this.getConnectorLineHoverElement(e.target);i.i(r.getValue)("editModule.taskbarEditModule.taskBarEditAction",this.parent)||this.highlightConnectorLineElements(t)},e.prototype.getConnectorLineHoverElement=function(e){var t=i.i(a.j)(e,n._15),r=i.i(a.j)(e,n._16),s=i.i(a.j)(e,n._17);return t||r||s?i.i(a.j)(e,n._1):null},e.prototype.highlightConnectorLineElements=function(e){e?e!==this.connectorLineElement&&(this.removeHighlight(),this.addHighlight(e)):this.removeHighlight()},e.prototype.addHighlight=function(e){this.connectorLineElement=e,i.i(r.addClass)([e],[n._18]),e.querySelectorAll("."+n._15)[0].classList.contains("e-criticalconnector-line")?(i.i(r.addClass)(e.querySelectorAll("."+n._15),[n._19]),i.i(r.addClass)(e.querySelectorAll("."+n._16),[n._20]),i.i(r.addClass)(e.querySelectorAll("."+n._17),[n._21])):(i.i(r.addClass)(e.querySelectorAll("."+n._15),[n._22]),i.i(r.addClass)(e.querySelectorAll("."+n._16),[n._23]),i.i(r.addClass)(e.querySelectorAll("."+n._17),[n._24]))},e.prototype.removeHighlight=function(){i.i(r.isNullOrUndefined)(this.connectorLineElement)||(i.i(r.removeClass)([this.connectorLineElement],[n._18]),this.connectorLineElement.querySelectorAll("."+n._15)[0].classList.contains(n._19)?(i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._15),[n._19]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._16),[n._20]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._17),[n._21])):(i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._15),[n._22]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._16),[n._23]),i.i(r.removeClass)(this.connectorLineElement.querySelectorAll("."+n._17),[n._24])),this.connectorLineElement=null)},e.prototype.getEditedConnectorLineString=function(e){for(var t,n,a,s,o,l,d=[],p=[],h="",u=0;u<e.length;u++)if(t=e[u],n=t.ganttProperties.predecessor){for(var c=0;c<n.length;c++){a=n[c];if(this.parent.connectorLineModule.removeConnectorLineById("parent"+a.from+"child"+a.to),s=this.parent.connectorLineModule.getRecordByID(a.from),o=this.parent.connectorLineModule.getRecordByID(a.to),(s||o)&&(l=this.parent.predecessorModule.updateConnectorLineObject(s,o,a),!i.i(r.isNullOrUndefined)(l))){var g=d.indexOf(l.connectorLineId),f=this.parent.connectorLineModule.getConnectorLineTemplate(l);-1!==g?p[g]=f:(d.push(l.connectorLineId),p.push(f))}}h=p.join("")}return h},e.prototype.refreshEditedRecordConnectorLine=function(e){this.parent.connectorLineModule.removePreviousConnectorLines(this.parent.previousRecords),this.parent.connectorLineModule.expandedRecords=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.updatedRecords:this.parent.getExpandedRecords(this.parent.updatedRecords);var t=this.getEditedConnectorLineString(e);this.parent.connectorLineModule.dependencyViewContainer.innerHTML=this.parent.connectorLineModule.dependencyViewContainer.innerHTML+t},e.prototype.idFromPredecessor=function(e){for(var t,n=e.split(","),a=[],s=[],o=0;o<n.length;o++){var l=[];if(t=n[o].split("+"),"+",n[o].indexOf("-")>=0&&(t=n[o].split("-"),"-"),!i.i(r.isNullOrUndefined)(t[0])){-1===("ResourceView"===this.parent.viewType?this.parent.getTaskIds():this.parent.ids).indexOf(t[0])?-1!=t[0].indexOf(" ")?(s=t[0].split(" "),1===s.length&&(s=t[0].match(/(\d+|[A-z]+)/g)),l.push(s[0])):1===t[0].length||2===t[0].length?l.push(t[0]):l.push(t[0].slice(0,-2)):l.push(t[0])}a.push(l.join(""))}return a},e.prototype.predecessorValidation=function(e,t){for(var n,a,s=t.rowUniqueID,o=0;o<e.length;o++){n=e[o];var l=[];e.slice(0).splice(o,1);for(var d=this;null!==n;){var p=function(){var e=[];return-1!==l.indexOf(n)?"break":i.i(r.isNullOrUndefined)(d.parent.connectorLineModule.getRecordByID(n))?{value:!1}:(a=d.parent.connectorLineModule.getRecordByID(n).ganttProperties,!i.i(r.isNullOrUndefined)(a.predecessor)&&a.predecessor.length>0&&a.predecessor.forEach(function(t){a.rowUniqueID.toString()!==t.from&&e.push(t.from.toString())}),s.toString()===a.rowUniqueID.toString()||-1!==e.indexOf(s.toString())?{value:!1}:(l.push(n),!i.i(r.isNullOrUndefined)(a.predecessor)&&a.predecessor.length>0?void(n=a.predecessor[0].from):"break"))}();if("object"==typeof p)return p.value;if("break"===p)break}}return!0},e.prototype.getRootParent=function(e){var t=e;return e.parentItem?(t=this.parent.flatData.filter(function(t){return t.uniqueID==e.parentUniqueID})[0],t.parentItem&&(t=this.getRootParent(t)),t):t},e.prototype.validateParentPredecessor=function(e,t){if(t.hasChildRecords&&!e.hasChildRecords){if(e.parentUniqueID===t.uniqueID)return!1;do{if(e.parentItem&&(e=this.parent.flatData[this.parent.ids.indexOf(e.parentItem.taskId)],e.uniqueID===t.uniqueID))return!1}while(e.parentItem)}else if(!t.hasChildRecords&&e.hasChildRecords){if(t.parentUniqueID===e.uniqueID)return!1;do{if(t.parentItem&&(t=this.parent.flatData[this.parent.ids.indexOf(t.parentItem.taskId)],t.uniqueID===e.uniqueID))return!1}while(t.parentItem)}else if(t.hasChildRecords&&e.hasChildRecords)if(t.parentItem&&e.parentItem){if(e.parentUniqueID===t.uniqueID||e.uniqueID===t.parentUniqueID)return!1}else if(!t.parentItem&&e.parentItem){var i=this.parent.connectorLineEditModule.getRootParent(e);if(i.uniqueID===t.uniqueID)return!1}else if(t.parentItem&&!e.parentItem){var r=this.parent.connectorLineEditModule.getRootParent(t);if(r.uniqueID===e.uniqueID)return!1}return!0},e.prototype.validatePredecessorRelation=function(e,t){var n,a,s=!0,o="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(!i.i(r.isNullOrUndefined)(t)&&t.length>0){n=this.idFromPredecessor(t);for(var l=this,d=0;d<n.length;d++){var p=function(t){if(parseInt(n[n.length-1])!==e[l.parent.taskFields.id]){var d=l.parent.ids.indexOf(n[n.length-1]),p=l.parent.currentViewData[d];p&&e&&(s=l.validateParentPredecessor(p,e))}var h=n.slice(0),u=[],c=!0;if(h.forEach(function(e){-1===u.indexOf(e)?u.push(e):c=!1}),!c)return{value:!1};a=n[t];var g=[];n.slice(0).splice(t,1);for(;null!==a;){var f=function(){var t,n,s=[];if(-1!==g.indexOf(a))return"break";if(i.i(r.isNullOrUndefined)(l.parent.connectorLineModule.getRecordByID(a.toString())))return{value:!1};if(n=l.parent.connectorLineModule.getRecordByID(a.toString()).ganttProperties,!i.i(r.isNullOrUndefined)(n.predecessor)&&n.predecessor.length>0&&n.predecessor.forEach(function(e,i){n.rowUniqueID.toString()!==e.from&&(s.push(e.from.toString()),t=i)}),o.toString()===n.rowUniqueID.toString()||-1!==s.indexOf(o.toString()))return{value:!1};if(g.push(a),i.i(r.isNullOrUndefined)(n.predecessor)||!(n.predecessor.length>0))return"break";var d=void 0;return s.length>1?d=l.predecessorValidation(s,e.ganttProperties):1===s.length&&(a=n.predecessor[t].from),!1===d?{value:!1}:void 0}();if("object"==typeof f)return f;if("break"===f)break}}(d);if("object"==typeof p)return p.value}}return s},e.prototype.addPredecessor=function(e,t){var n=i.i(r.isNullOrUndefined)(e.ganttProperties.predecessorsName)||""===e.ganttProperties.predecessorsName?t:e.ganttProperties.predecessorsName+","+t;this.updatePredecessorHelper(e,n)},e.prototype.removePredecessor=function(e){this.updatePredecessorHelper(e,null)},e.prototype.updatePredecessor=function(e,t,i){return this.updatePredecessorHelper(e,t,i)},e.prototype.updatePredecessorHelper=function(e,t,n){if(i.i(r.isUndefined)(t)||this.validatePredecessorRelation(e,t)){this.parent.isOnEdit=!0;var a=[];i.i(r.isNullOrUndefined)(t)||""===t||(a=this.parent.predecessorModule.calculatePredecessor(t,e)),this.parent.setRecordValue("predecessor",a,e.ganttProperties,!0);var s=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("predecessorsName",s,e.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,s,e),this.parent.setRecordValue(this.parent.taskFields.dependency,s,e);var o={};return o.action=n&&n.action&&"CellEditing"===n.action?n.action:"DrawConnectorLine",o.data=e,this.parent.editModule.initiateUpdateAction(o),!0}return!1},e.prototype.checkParentRelation=function(e,t){var i=e;if(i&&i.parentItem&&-1!==t.indexOf(i.parentItem.taskId.toString()))return!1;for(var r=this,n=0;n<t.length;n++){var a=function(e){var i=r.parent.currentViewData.filter(function(i){return i&&i.ganttProperties.rowUniqueID.toString()===t[e].toString()});if(i[0]&&i[0].hasChildRecords)return{value:!1}}(n);if("object"==typeof a)return a.value}return!0},e.prototype.initPredecessorValidationDialog=function(){if(this.parent.taskFields.dependency&&this.parent.isInPredecessorValidation){var e=i.i(r.createElement)("div",{id:this.parent.element.id+"_dialogValidationRule"});this.parent.element.appendChild(e),this.renderValidationDialog()}},e.prototype.renderValidationDialog=function(){var e=new s.Dialog({header:"Validate Editing",isModal:!0,visible:!1,width:"50%",showCloseIcon:!0,close:this.validationDialogClose.bind(this),content:"",buttons:[{click:this.validationDialogOkButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("okText"),isPrimary:!0}},{click:this.validationDialogCancelButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("cancel")}}],target:this.parent.element,animationSettings:{effect:"None"}});document.getElementById(this.parent.element.id+"_dialogValidationRule").innerHTML="",e.isStringTemplate=!0,e.appendTo("#"+this.parent.element.id+"_dialogValidationRule"),this.parent.validationDialogElement=e},e.prototype.validationDialogOkButton=function(){var e=this.parent.currentEditedArgs;e.validateMode.preserveLinkWithEditing=document.getElementById(this.parent.element.id+"_ValidationAddlineOffset").checked,e.validateMode.removeLink=document.getElementById(this.parent.element.id+"_ValidationRemoveline").checked,e.validateMode.respectLink=document.getElementById(this.parent.element.id+"_ValidationCancel").checked,this.applyPredecessorOption(),this.parent.validationDialogElement.hide()},e.prototype.validationDialogCancelButton=function(){this.parent.currentEditedArgs.validateMode.respectLink=!0,this.applyPredecessorOption(),this.parent.validationDialogElement.hide()},e.prototype.validationDialogClose=function(e){i.i(r.getValue)("isInteraction",e)&&(this.parent.currentEditedArgs.validateMode.respectLink=!0,this.applyPredecessorOption())},e.prototype.applyPredecessorOption=function(){var e=this.parent.currentEditedArgs,t=e.data;e.validateMode.respectLink?(this.parent.editModule.reUpdatePreviousRecords(),this.parent.chartRowsModule.refreshRecords([e.data])):e.validateMode.removeLink?(this.removePredecessors(t,this.validationPredecessor),this.parent.editModule.updateEditedTask(e.editEventArgs)):e.validateMode.preserveLinkWithEditing&&(this.calculateOffset(t),this.parent.editModule.updateEditedTask(e.editEventArgs))},e.prototype.calculateOffset=function(e){for(var t=i.i(r.extend)([],e.ganttProperties.predecessor,[],!0),n=this.parent.predecessorModule.getValidPredecessor(e),s=0;s<n.length;s++){var o=n[s],l=this.parent.connectorLineModule.getRecordByID(o.from),d=void 0;if(i.i(a.c)(l.ganttProperties)&&i.i(a.c)(e.ganttProperties)){var p=void 0,h=void 0,u=void 0,c=void 0;switch(o.type){case"FS":p=new Date(l.ganttProperties.endDate.getTime()),h=new Date(e.ganttProperties.startDate.getTime());break;case"SS":p=new Date(l.ganttProperties.startDate.getTime()),h=new Date(e.ganttProperties.startDate.getTime());break;case"SF":p=new Date(l.ganttProperties.startDate.getTime()),h=new Date(e.ganttProperties.endDate.getTime());break;case"FF":p=new Date(l.ganttProperties.endDate.getTime()),h=new Date(e.ganttProperties.endDate.getTime())}if(p.getTime()<h.getTime())p=this.dateValidateModule.checkStartDate(p),h=this.dateValidateModule.checkEndDate(h,null),c=!1;else{var g=new Date(p.getTime());p=this.dateValidateModule.checkStartDate(h),h=this.dateValidateModule.checkEndDate(g,null),c=!0}p.getTime()<h.getTime()?(u=this.dateValidateModule.getDuration(p,h,o.offsetUnit,!0,!1),d=c?-1*u:u):d=0}else d=0;t[i.i(a.h)(o,"from",t,"to")].offset=d;var f=i.i(r.extend)([],l.ganttProperties.predecessor,[],!0);f[i.i(a.h)(o,"from",f,"to")].offset=d,this.parent.setRecordValue("predecessor",f,l.ganttProperties,!0)}this.parent.setRecordValue("predecessor",t,e.ganttProperties,!0);var m=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,m,e),this.parent.setRecordValue(this.parent.taskFields.dependency,m,e),this.parent.setRecordValue("predecessorsName",m,e.ganttProperties,!0)},e.prototype.removePredecessors=function(e,t){for(var n=i.i(r.extend)([],[],e.ganttProperties.predecessor,!0),s=t.length,o=0;o<s;o++){var l=this.parent.connectorLineModule.getRecordByID(t[o].from),d=i.i(r.extend)([],[],l.ganttProperties.predecessor,!0),p=i.i(a.h)(t[o],"from",n,"to");n.splice(p,1);var h=i.i(a.h)(t[o],"from",d,"to");d.splice(h,1),this.parent.setRecordValue("predecessor",d,l.ganttProperties,!0)}if(n.length!==e.ganttProperties.predecessor.length){this.parent.setRecordValue("predecessor",n,e.ganttProperties,!0);var u=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("predecessorsName",u,e.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,u,e),this.parent.setRecordValue(this.parent.taskFields.dependency,u,e)}},e.prototype.openValidationDialog=function(e){var t=this.validationDialogTemplate(e);this.parent.validationDialogElement.setProperties({content:t}),this.parent.validationDialogElement.show()},e.prototype.validationDialogTemplate=function(e){var t,n=this.parent.element.id,s=i.i(r.createElement)("div",{className:"e-ValidationContent"}),o=i.i(r.getValue)("task",e),l=i.i(r.getValue)("parentTask",e),d=i.i(r.getValue)("violationType",e),p=o.ganttProperties.taskName,h=this.parent.getFormatedDate(o.ganttProperties.startDate,"MM/dd/yyyy"),u=l.ganttProperties.taskName,c=[p,u];"taskBeforePredecessor_FS"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_FS"):"taskAfterPredecessor_FS"===d?t=this.parent.localeObj.getConstant("taskAfterPredecessor_FS"):"taskBeforePredecessor_SS"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_SS"):"taskAfterPredecessor_SS"===d?t=this.parent.localeObj.getConstant("taskAfterPredecessor_SS"):"taskBeforePredecessor_FF"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_FF"):"taskAfterPredecessor_FF"===d?t=this.parent.localeObj.getConstant("taskAfterPredecessor_FF"):"taskBeforePredecessor_SF"===d?t=this.parent.localeObj.getConstant("taskBeforePredecessor_SF"):"taskAfterPredecessor_SF"===d&&(t=this.parent.localeObj.getConstant("taskAfterPredecessor_SF")),t=i.i(a.l)(t,c);var g='<div id="'+n+'_ValidationText">'+t+"<div>",f='<table><tr><td><input type="radio" id="'+n+'_ValidationCancel" name="ValidationRule" checked/><label for="'+n+'_ValidationCancel" id= "'+n+'_cancelLink">Cancel, keep the existing link</label></td></tr><tr><td><input type="radio" id="'+n+'_ValidationRemoveline" name="ValidationRule"/><label for="'+n+'_ValidationRemoveline" id="'+n+'_removeLink">Remove the link and move <b>'+p+"</b> to start on <b>"+h+'</b>.</label></td></tr><tr><td><input type="radio" id="'+n+'_ValidationAddlineOffset" name="ValidationRule"/><label for="'+n+'_ValidationAddlineOffset" id="'+n+'_preserveLink">Move the <b>'+p+"</b> to start on <b>"+h+"</b> and keep the link.</label></td></tr></table>";return s.innerHTML=g+f,s},e.prototype.validateTypes=function(e){var t,n=this.parent.predecessorModule.getValidPredecessor(e);this.validationPredecessor=[];for(var a,s,o=this.parent.predecessorModule.getPredecessorDate(e,n),l=e.ganttProperties,d=this.parent.allowUnscheduledTasks&&i.i(r.isNullOrUndefined)(o)?l.endDate:this.dateValidateModule.getEndDate(o,l.duration,l.durationUnit,l,!1),p=0;p<n.length;p++){t=this.parent.connectorLineModule.getRecordByID(n[p].from);var h=null;"FS"===n[p].type?l.startDate<o?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_FS"):l.startDate>o&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_FS"):"SS"===n[p].type?l.startDate<o?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_SS"):l.startDate>o&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_SS"):"FF"===n[p].type?d<=t.ganttProperties.endDate?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_FF"):d>t.ganttProperties.endDate&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_FF"):"SF"===n[p].type&&(d<t.ganttProperties.startDate?(this.validationPredecessor.push(n[p]),h="taskBeforePredecessor_SF"):d>=t.ganttProperties.startDate&&(this.validationPredecessor.push(n[p]),h="taskAfterPredecessor_SF")),!i.i(r.isNullOrUndefined)(h)&&i.i(r.isNullOrUndefined)(s)&&(a=t,s=h)}return{parentTask:a,task:e,violationType:s}},e.prototype.addRemovePredecessor=function(e){var t=this.parent.previousRecords[e.uniqueID],n=e.ganttProperties.predecessor.slice();if(t&&t.ganttProperties&&t.ganttProperties.hasOwnProperty("predecessor")){var s=t.ganttProperties.predecessor;if(!i.i(r.isNullOrUndefined)(s))for(var o=0;o<s.length;o++){var l=this.parent.connectorLineModule.getRecordByID(s[o].from);if(l===e)e.ganttProperties.predecessor.push(s[o]);else{var d=i.i(r.extend)([],[],l.ganttProperties.predecessor,!0),p=i.i(a.h)(s[o],"from",d,"to");-1!==p&&(d.splice(p,1),this.parent.setRecordValue("predecessor",d,l.ganttProperties,!0))}}if(!i.i(r.isNullOrUndefined)(n))for(var h=0;h<n.length;h++){var l=this.parent.connectorLineModule.getRecordByID(n[h].from),d=i.i(r.extend)([],[],l.ganttProperties.predecessor,!0);d.push(n[h]),this.parent.setRecordValue("predecessor",d,l.ganttProperties,!0)}}},e.prototype.removePredecessorByIndex=function(e,t){var r=e.ganttProperties.predecessor,n=r.splice(t,1),s=this.parent.connectorLineModule.getRecordByID(n[0].from),o=s.ganttProperties.predecessor,l=i.i(a.h)(n[0],"from",o,"to");o.splice(l,1);var d=this.parent.predecessorModule.getPredecessorStringValue(e);r.push(n[0]),this.parent.connectorLineEditModule.updatePredecessor(e,d)},e.prototype.renderPredecessorDeleteConfirmDialog=function(){this.confirmPredecessorDialog=new s.Dialog({width:"320px",isModal:!0,content:this.parent.localeObj.getConstant("confirmPredecessorDelete"),buttons:[{click:this.confirmOkDeleteButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("okText"),isPrimary:!0}},{click:this.confirmCloseDialog.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("cancel")}}],target:this.parent.element,animationSettings:{effect:"None"}});var e=i.i(r.createElement)("div",{id:this.parent.element.id+"_deletePredecessorConfirmDialog"});this.parent.element.appendChild(e),this.confirmPredecessorDialog.isStringTemplate=!0,this.confirmPredecessorDialog.appendTo(e)},e.prototype.confirmCloseDialog=function(){this.confirmPredecessorDialog.destroy()},e.prototype.confirmOkDeleteButton=function(){this.removePredecessorByIndex(this.childRecord,this.predecessorIndex),this.confirmPredecessorDialog.destroy()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(3),n=i(6),a=(i.n(n),i(0)),s=(i.n(a),i(4)),o=(i.n(s),i(13)),l=(i.n(o),function(){function e(e){var t=this;this.segmentIndex=-1,this.headerContextMenuClick=function(e){var r=i.i(a.closest)(e.event.target,".e-row"),n=i.i(a.closest)(e.event.target,".e-chart-row");i.i(a.isNullOrUndefined)(r)&&i.i(a.isNullOrUndefined)(n)&&(e.type="Header",t.parent.trigger("contextMenuClick",e))},this.headerContextMenuOpen=function(e){var r=i.i(a.closest)(e.event.target,".e-row"),n=i.i(a.closest)(e.event.target,".e-chart-row");i.i(a.isNullOrUndefined)(r)&&i.i(a.isNullOrUndefined)(n)?(e.type="Header",t.parent.trigger("contextMenuOpen",e)):e.cancel=!0},this.parent=e,this.ganttID=e.element.id,n.TreeGrid.Inject(n.ContextMenu),this.parent.treeGrid.contextMenuClick=this.headerContextMenuClick.bind(this),this.parent.treeGrid.contextMenuOpen=this.headerContextMenuOpen.bind(this),this.addEventListener(),this.resetItems()}return e.prototype.addEventListener=function(){this.parent.isDestroyed||(this.parent.on("initiate-contextMenu",this.render,this),this.parent.on("reRender-contextMenu",this.reRenderContextMenu,this),this.parent.on("contextMenuClick",this.contextMenuItemClick,this),this.parent.on("contextMenuOpen",this.contextMenuBeforeOpen,this))},e.prototype.reRenderContextMenu=function(e){e.module===this.getModuleName()&&e.enable&&(this.contextMenu&&(this.contextMenu.destroy(),i.i(a.remove)(this.element)),this.resetItems(),this.render())},e.prototype.render=function(){this.element=this.parent.createElement("ul",{id:this.ganttID+"_contextmenu",className:r.a}),this.parent.element.appendChild(this.element);var e="#"+this.ganttID;this.contextMenu=new o.ContextMenu({items:this.getMenuItems(),locale:this.parent.locale,target:e,animationSettings:{effect:"None"},select:this.contextMenuItemClick.bind(this),beforeOpen:this.contextMenuBeforeOpen.bind(this),onOpen:this.contextMenuOpen.bind(this),onClose:this.contextMenuOnClose.bind(this),cssClass:"e-gantt"}),this.contextMenu.appendTo(this.element),this.parent.treeGrid.contextMenuItems=this.headerMenuItems},e.prototype.contextMenuItemClick=function(e){this.item=this.getKeyFromId(e.item.id);var t,r,n,s=i.i(a.getValue)("parentObj",e.item),o=-1;switch(s&&!i.i(a.isNullOrUndefined)(s.id)&&"DeleteDependency"===this.getKeyFromId(s.id)&&(o=s.items.indexOf(e.item)),this.parent.isAdaptive&&("TaskInformation"!==this.item&&"Above"!==this.item&&"Below"!==this.item&&"Child"!==this.item&&"DeleteTask"!==this.item||this.parent.selectionModule&&"Multiple"===this.parent.selectionSettings.type&&(this.parent.selectionModule.hidePopUp(),document.getElementsByClassName("e-gridpopup")[0].style.display="none")),this.item){case"TaskInformation":isNaN(Number(this.rowData.ganttProperties.rowUniqueID))?this.parent.openEditDialog(this.rowData.ganttProperties.rowUniqueID):this.parent.openEditDialog(Number(this.rowData.ganttProperties.rowUniqueID));break;case"Above":case"Below":case"Child":if(t=this.item,r=i.i(a.extend)({},{},this.rowData.taskData,!0),n=this.parent.taskFields,r[n.startDate]&&this.parent.setRecordValue(n.startDate,this.rowData.ganttProperties.startDate,r,!0),r[n.endDate]&&this.parent.setRecordValue(n.endDate,this.rowData.ganttProperties.endDate,r,!0),i.i(a.isNullOrUndefined)(n.dependency)||(r[n.dependency]=null),!i.i(a.isNullOrUndefined)(n.child)&&r[n.child]&&delete r[n.child],!i.i(a.isNullOrUndefined)(n.parentID)&&r[n.parentID]&&(r[n.parentID]=null),this.rowData){var l=this.parent.updatedRecords.indexOf(this.rowData);this.parent.addRecord(r,t,l)}break;case"Milestone":case"ToMilestone":this.parent.convertToMilestone(this.rowData.ganttProperties.rowUniqueID);break;case"DeleteTask":this.parent.editModule.deleteRecord(this.rowData);break;case"ToTask":if(r=i.i(a.extend)({},{},this.rowData.taskData,!0),n=this.parent.taskFields,i.i(a.isNullOrUndefined)(n.duration)){r[n.startDate]=new Date(this.rowData.taskData[n.startDate]);var d=new Date(this.rowData.taskData[n.startDate]);d.setDate(d.getDate()+1),r[n.endDate]=d}else{var p=this.rowData.ganttProperties;r[n.duration]="1 "+p.durationUnit}i.i(a.isNullOrUndefined)(r[n.milestone])||!0===r[n.milestone]&&(r[n.milestone]=!1),this.parent.updateRecordByID(r);break;case"Cancel":this.parent.cancelEdit();break;case"Save":this.parent.editModule.cellEditModule.isCellEdit=!1,this.parent.treeGrid.grid.saveCell();break;case"Dependency"+o:this.parent.connectorLineEditModule.removePredecessorByIndex(this.rowData,o);break;case"Auto":case"Manual":this.parent.changeTaskMode(this.rowData);break;case"Indent":this.parent.indent();break;case"Outdent":this.parent.outdent();break;case"Left":case"Right":this.mergeCall(this.item);break;case"SplitTask":this.splitTaskCall(e)}e.type="Content",e.rowData=this.rowData,this.parent.trigger("contextMenuClick",e)},e.prototype.splitTaskCall=function(e){var t=this;this.isEdit=!0;var r=this.parent.taskFields,n=this.getClickedDate(e.element);i.i(a.isNullOrUndefined)(this.parent.timelineSettings.bottomTier)&&"Hour"!==this.parent.timelineSettings.bottomTier.unit&&n.setHours(0,0,0,0);var s={rowData:this.rowData,requestType:"splitTaskbar",splitDate:n,cancel:!1,target:this.targetElement};this.parent.trigger("actionBegin",s,function(e){t.parent.chartRowsModule.splitTask(t.rowData[r.id],n)})},e.prototype.mergeCall=function(e){var t=this;this.isEdit=!0;var i=this.parent.taskFields,r=this.rowData.ganttProperties.segments,n="Right"===e?this.segmentIndex:r[this.segmentIndex-1].segmentIndex,a="Left"===e?this.segmentIndex:r[this.segmentIndex+1].segmentIndex,s=[{firstSegmentIndex:n,secondSegmentIndex:a}],o={rowData:this.rowData,mergeSegmentIndexes:s,requestType:"mergeSegment",cancel:!1,target:this.targetElement};this.parent.trigger("actionBegin",o,function(e){!1===e.cancel&&t.parent.chartRowsModule.mergeTask(t.rowData[i.id],s)})},e.prototype.getClickedDate=function(e){var t=this.parent.getOffsetRect(this.parent.element),r=t.left+this.parent.ganttChartModule.chartElement.offsetLeft+this.rowData.ganttProperties.left-this.parent.ganttChartModule.scrollElement.scrollLeft,n=this.clickedPosition-r,s=Math.ceil(n/this.parent.perDayWidth),o=this.rowData.ganttProperties.startDate;return i.i(a.isNullOrUndefined)(this.parent.timelineSettings.bottomTier)||"Hour"!==this.parent.timelineSettings.bottomTier.unit||(s=Math.ceil(n/this.parent.timelineSettings.timelineUnitSize),s-=1),this.parent.dataOperation.getEndDate(o,s,this.rowData.ganttProperties.durationUnit,this.rowData,!1)},e.prototype.contextMenuBeforeOpen=function(e){var t=this,n=e.event?e.event.target:this.parent.focusModule?this.parent.ganttChartModule.targetElement:this.parent.focusModule.getActiveElement();!i.i(a.isNullOrUndefined)(this.parent.editModule)&&this.parent.editModule.cellEditModule&&this.parent.editModule.cellEditModule.isCellEdit&&n.parentElement.classList.contains("e-row")&&this.parent.treeGrid.closeEdit(),i.i(a.isNullOrUndefined)(e.element)||e.element.id!==this.parent.element.id+"_contextmenu"||(this.clickedPosition=i.i(a.getValue)("event",e).clientX);var o=i.i(a.closest)(n,".e-gantt-child-taskbar");o&&(this.targetElement=e.target=o),e.gridRow=i.i(a.closest)(n,".e-row"),e.chartRow=i.i(a.closest)(n,".e-chart-row");var l=i.i(a.closest)(n,".e-gantt");if(!i.i(a.closest)(n,r.b)&&this.parent.editModule&&this.parent.editModule.cellEditModule&&this.parent.editModule.cellEditModule.isCellEdit&&this.parent.editModule.dialogModule.dialogObj&&!this.parent.editModule.dialogModule.dialogObj.open&&(this.parent.treeGrid.grid.saveCell(),this.parent.editModule.cellEditModule.isCellEdit=!1),this.parent.readOnly&&this.contextMenu.enableItems(["Add","Save","Convert","Delete Dependency","Delete Task","TaskMode","Indent","Outdent","SplitTask","MergeTask"],!1),(i.i(a.isNullOrUndefined)(e.gridRow)&&i.i(a.isNullOrUndefined)(e.chartRow)||0===this.contentMenuItems.length)&&(i.i(a.isNullOrUndefined)(e.parentItem)||i.i(a.isNullOrUndefined)(l)?e.cancel=!0:e.cancel=!1),!e.cancel){var d=-1;e.gridRow?d=parseInt(e.gridRow.getAttribute("data-rowindex"),0):e.chartRow&&(d=parseInt(e.chartRow.getAttribute("aria-rowindex"),0)),this.parent.selectionModule&&this.parent.allowSelection&&!e.parentItem&&!i.i(a.isNullOrUndefined)(e.chartRow)&&this.parent.selectionModule.selectRow(d),e.parentItem||(this.rowData=this.parent.updatedRecords[d]);for(var p=0,h=e.items;p<h.length;p++){var u=h[p];u.separator||(!n.classList.contains("e-gantt-unscheduled-taskbar")||u.text!==this.getLocale("splitTask")&&u.text!==this.getLocale("mergeTask")?this.updateItemStatus(u,n,d):this.hideItems.push(u.text))}if(e.rowData=this.rowData,e.type="Content",e.disableItems=this.disableItems,e.hideItems=this.hideItems,e.hideChildItems=[],0===e.rowData.level&&"ResourceView"===this.parent.viewType)return void(e.cancel=!0);var c=new s.Deferred;return this.parent.trigger("contextMenuOpen",e,function(i){c.resolve(i),t.hideItems=i.hideItems,t.disableItems=i.disableItems,i.parentItem||i.hideItems.length!==i.items.length||(t.revertItemStatus(),i.cancel=!0),t.hideItems.length>0&&t.contextMenu.hideItems(t.hideItems),t.disableItems.length>0&&t.contextMenu.enableItems(t.disableItems,!1),e.hideChildItems.length>0&&t.contextMenu.hideItems(e.hideChildItems)}),c}},e.prototype.updateItemStatus=function(e,t,n){var s=this.getKeyFromId(e.id),o=i.i(a.closest)(t,r.b),l=[],d=i.i(a.closest)(t,".e-gantt-child-taskbar");if(o)"Save"!==s&&"Cancel"!==s&&this.hideItems.push(e.text);else switch(s){case"TaskInformation":this.parent.editSettings.allowEditing&&this.parent.editModule||this.updateItemVisibility(e.text);break;case"Add":this.parent.editSettings.allowAdding&&this.parent.editModule||this.updateItemVisibility(e.text);break;case"Save":case"Cancel":this.hideItems.push(e.text);break;case"Convert":this.rowData.hasChildRecords?this.hideItems.push(e.text):this.parent.editSettings.allowEditing&&this.parent.editModule?(this.rowData.ganttProperties.isMilestone?l.push(this.createItemModel(r.c,"ToTask",this.getLocale("toTask"))):l.push(this.createItemModel(r.c,"ToMilestone",this.getLocale("toMilestone"))),e.items=l):this.updateItemVisibility(e.text);break;case"DeleteDependency":var p=this.getPredecessorsItems();this.rowData.hasChildRecords?this.hideItems.push(e.text):this.parent.editSettings.allowDeleting&&0!==p.length&&this.parent.editModule?p.length>0&&(e.items=p):this.updateItemVisibility(e.text);break;case"DeleteTask":this.parent.editSettings.allowDeleting&&this.parent.editModule||this.updateItemVisibility(e.text);break;case"TaskMode":"Custom"!==this.parent.taskMode?this.updateItemVisibility(e.text):(this.rowData.ganttProperties.isAutoSchedule?l.push(this.createItemModel(r.c,"Manual",this.getLocale("manual"))):l.push(this.createItemModel(r.c,"Auto",this.getLocale("auto"))),e.items=l);break;case"Indent":if(this.parent.allowSelection&&this.parent.editModule&&this.parent.editSettings){var h=this.parent.selectedRowIndex,u=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length),c=this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0]-1];this.parent.editSettings.allowEditing&&0!==h&&-1!==h&&u&&"ResourceView"!==this.parent.viewType&&this.parent.updatedRecords[h].level-c.level!=1||this.updateItemVisibility(e.text)}else this.hideItems.push(e.text);break;case"Outdent":if(this.parent.allowSelection&&this.parent.editModule&&this.parent.editSettings){var g=this.parent.selectionModule.getSelectedRowIndexes()[0],f=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length);this.parent.editSettings.allowEditing&&-1!==g&&0!==g&&f&&"ResourceView"!==this.parent.viewType&&0!==this.parent.updatedRecords[g].level||this.updateItemVisibility(e.text)}else this.hideItems.push(e.text);break;case"SplitTask":var m=this.parent.taskFields;(this.parent.readOnly||!d||i.i(a.isNullOrUndefined)(m.segments)||this.parent.currentViewData[n].hasChildRecords)&&this.updateItemVisibility(e.text);break;case"MergeTask":this.parent.readOnly||!d?this.updateItemVisibility(e.text):this.mergeItemVisiblity(t,e)}},e.prototype.mergeItemVisiblity=function(e,t){var n=[],s=this.parent.taskFields,o=this.getClickedDate(e);this.segmentIndex=this.parent.chartRowsModule.getSegmentIndex(o,this.rowData);var l=this.rowData.ganttProperties.segments;!i.i(a.isNullOrUndefined)(l)&&l.length>0?i.i(a.isNullOrUndefined)(s.segments)&&-1===this.segmentIndex?this.updateItemVisibility(t.text):(0===this.segmentIndex?n.push(this.createItemModel(r.c,"Right",this.getLocale("right"))):this.segmentIndex===l.length-1?n.push(this.createItemModel(r.c,"Left",this.getLocale("left"))):(n.push(this.createItemModel(r.c,"Right",this.getLocale("right"))),n.push(this.createItemModel(r.c,"Left",this.getLocale("left")))),t.items=n):this.hideItems.push(t.text)},e.prototype.updateItemVisibility=function(e){!i.i(a.isNullOrUndefined)(this.parent.contextMenuItems)?this.disableItems.push(e):this.hideItems.push(e)},e.prototype.contextMenuOpen=function(e){this.isOpen=!0;var t=e.element.querySelectorAll("li:not(.e-menu-hide):not(.e-disabled)")[0];i.i(a.isNullOrUndefined)(t)||i.i(a.addClass)([t],"e-focused")},e.prototype.getMenuItems=function(){for(var e=i.i(a.isNullOrUndefined)(this.parent.contextMenuItems)?this.getDefaultItems():this.parent.contextMenuItems,t=0,n=e;t<n.length;t++){var s=n[t];"string"==typeof s&&-1!==this.getDefaultItems().indexOf(s)?this.buildDefaultItems(s):"string"!=typeof s&&(-1!==this.getDefaultItems().indexOf(s.text)?this.buildDefaultItems(s.text,s.iconCss):s.target===r.d?this.headerMenuItems.push(s):this.contentMenuItems.push(s))}return this.contentMenuItems},e.prototype.createItemModel=function(e,t,i,r){return{text:i,id:this.generateID(t),target:e,iconCss:r?"e-icons "+r:null}},e.prototype.getLocale=function(e){return this.parent.localeObj.getConstant(e)},e.prototype.buildDefaultItems=function(e,t){var i;switch(e){case"AutoFitAll":case"AutoFit":case"SortAscending":case"SortDescending":this.headerMenuItems.push(e);break;case"TaskInformation":i=this.createItemModel(r.c,e,this.getLocale("taskInformation"),this.getIconCSS(r.e,t));break;case"Indent":i=this.createItemModel(r.c,e,this.getLocale("indent"),this.getIconCSS(r.f,t));break;case"Outdent":i=this.createItemModel(r.c,e,this.getLocale("outdent"),this.getIconCSS(r.g,t));break;case"Save":i=this.createItemModel(r.e,e,this.getLocale("save"),this.getIconCSS(r.h,t));break;case"Cancel":i=this.createItemModel(r.e,e,this.getLocale("cancel"),this.getIconCSS(r.i,t));break;case"Add":i=this.createItemModel(r.c,e,this.getLocale("add"),this.getIconCSS(r.j,t)),i.items=[],i.items.push(this.createItemModel(r.c,"Above",this.getLocale("above"),this.getIconCSS(r.k,t))),i.items.push(this.createItemModel(r.c,"Below",this.getLocale("below"),this.getIconCSS(r.l,t))),"ResourceView"!==this.parent.viewType&&i.items.push(this.createItemModel(r.c,"Child",this.getLocale("child"))),i.items.push(this.createItemModel(r.c,"Milestone",this.getLocale("milestone")));break;case"DeleteTask":i=this.createItemModel(r.c,e,this.getLocale("deleteTask"),this.getIconCSS(r.m,t));break;case"DeleteDependency":i=this.createItemModel(r.c,e,this.getLocale("deleteDependency")),i.items=[],i.items.push({});break;case"Convert":i=this.createItemModel(r.c,e,this.getLocale("convert")),i.items=[],i.items.push({});break;case"TaskMode":i=this.createItemModel(r.c,e,this.getLocale("changeScheduleMode")),i.items=[],i.items.push({});break;case"SplitTask":i=this.createItemModel(r.c,e,this.getLocale("splitTask"));break;case"MergeTask":i=this.createItemModel(r.c,e,this.getLocale("mergeTask")),i.items=[],i.items.push({})}i&&this.contentMenuItems.push(i)},e.prototype.getIconCSS=function(e,t){return i.i(a.isNullOrUndefined)(t)?e:t},e.prototype.getPredecessorsItems=function(){this.predecessors=this.parent.predecessorModule.getValidPredecessor(this.rowData);for(var e,t=[],i=0,n=0,a=this.predecessors;n<a.length;n++){var s=a[n],o=this.parent.getRecordByID(s.from),l=o.ganttProperties,d=l.rowUniqueID+" - "+l.taskName,p="Dependency"+i++;e=this.createItemModel(r.c,p,d),t.push(e)}return t},e.prototype.getDefaultItems=function(){return["AutoFitAll","AutoFit","TaskInformation","DeleteTask","Save","Cancel","SortAscending","SortDescending","Add","DeleteDependency","Convert","TaskMode","Indent","Outdent","SplitTask","MergeTask"]},e.prototype.getModuleName=function(){return"contextMenu"},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("initiate-contextMenu",this.render),this.parent.off("reRender-contextMenu",this.reRenderContextMenu),this.parent.off("contextMenuClick",this.contextMenuItemClick),this.parent.off("contextMenuOpen",this.contextMenuOpen))},e.prototype.contextMenuOnClose=function(e){e.items.length>0&&e.items[0].parentObj instanceof o.ContextMenu&&this.revertItemStatus()},e.prototype.revertItemStatus=function(){this.contextMenu.showItems(this.hideItems),this.contextMenu.enableItems(this.disableItems),this.hideItems=[],this.disableItems=[],this.isOpen=!1},e.prototype.resetItems=function(){this.hideItems=[],this.disableItems=[],this.headerMenuItems=[],this.contentMenuItems=[],this.item=null},e.prototype.generateID=function(e){return this.ganttID+"_contextMenu_"+e},e.prototype.getKeyFromId=function(e){var t=this.ganttID+"_contextMenu_";return e.indexOf(t)>-1?e.replace(t,""):"Custom"},e.prototype.destroy=function(){this.contextMenu.destroy(),i.i(a.remove)(this.element),this.removeEventListener(),this.contextMenu=null,this.element=null},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(3)),a=function(){function e(e){this.resourceCollectionIds=[],this.criticalTasks=[],this.parent=e}return e.prototype.getCriticalTasks=function(){return this.criticalTasks},e.prototype.showCriticalPath=function(e){var t=this.parent.ids,i=this.parent.flatData;if(e&&this.parent.flatData.length>0){this.parent.enableCriticalPath=!0;var r=this.parent.treeGrid.parentData,n=r[0].ganttProperties.endDate,a=0,s=[],o=[],l=[],d=0,p=[],h=[],u=[],c=[],g=[],f=[];r[0].ganttProperties.autoEndDate>r[0].ganttProperties.endDate&&!r[0].ganttProperties.isAutoSchedule&&(n=r[0].ganttProperties.autoEndDate),r[0].ganttProperties.taskId;for(var m=1;m<r.length;m++)r[m].ganttProperties.endDate>=n&&(n=r[m].ganttProperties.endDate,r[m].ganttProperties.taskId),r[m].ganttProperties.isAutoSchedule||r[m].ganttProperties.autoEndDate>=n&&(n=r[m].ganttProperties.autoEndDate,r[m].ganttProperties.taskId);this.maxEndDate=n;for(var y=0;y<i.length;y++)i[y].isCritical=!1,i[y].ganttProperties.isCritical=!1,a=this.parent.dataOperation.getDuration(i[y].ganttProperties.endDate,n,i[y].ganttProperties.durationUnit,i[y].ganttProperties.isAutoSchedule,i[y].ganttProperties.isMilestone),i[y].slack=a+" "+i[y].ganttProperties.durationUnit,i[y].ganttProperties.slack=a+" "+i[y].ganttProperties.durationUnit,i[y].ganttProperties.endDate>=n&&s.push(i[y].ganttProperties.taskId),i[y].ganttProperties.predecessor&&0!==i[y].ganttProperties.predecessor.length&&(o.push(i[y]),l.push(i[y].ganttProperties.taskId));if("ResourceView"===this.parent.viewType)for(var m=0;m<this.parent.taskIds.length;m++)this.resourceCollectionIds[m]=this.parent.taskIds[m].slice(1);for(var v=this,D=0;D<s.length;D++)!function(e){if(-1===l.indexOf(s[e])){if("ProjectView"===v.parent.viewType)d=t.indexOf(s[e].toString());else for(var r=v.parent.currentViewData.filter(function(t){return parseInt(t.ganttProperties.taskId)==s[e]}),n=0;n<r.length;n++)!r[n].hasChildRecords&&r[n].ganttProperties.endDate>=v.maxEndDate&&(d=r[n].index);i[d].ganttProperties.progress<100&&(i[d].isCritical=!0,i[d].ganttProperties.isCritical=!0),i[d].slack="0 "+i[d].ganttProperties.durationUnit,p.push(s[e])}else h.push(s[e])}(D);for(var w=o.length,k=[],S=0;S<w;S++){for(var T=-1,b=-1,P=-1,C=-1,M=void 0,R=S,x=o[S].ganttProperties.predecessor,O=o[S].ganttProperties.predecessor.length,I=o[S].ganttProperties.taskId,E=0;E<O;E++)M=isNaN(Number(x[E].from))||"string"==typeof I?(isNaN(Number(x[E].from)),x[E].from):parseInt(x[E].from,10),M===I&&(-1===T?x[E].offset?(T=x[E].to+":"+x[E].offset+x[E].offsetUnit,P=x[E].type):(T=x[E].to,P=x[E].type):x[E].offset?(T=T+","+x[E].to+":"+x[E].offset+x[E].offsetUnit,P=P+","+x[E].type):(T=T+","+x[E].to,P=P+","+x[E].type)),(M=isNaN(Number(x[E].to))||"string"==typeof I?(isNaN(Number(x[E].to)),x[E].to):parseInt(x[E].to,10))===I&&(-1===b?x[E].offset?(b=x[E].from+":"+x[E].offset+x[E].offsetUnit,C=x[E].type):(b=x[E].from,C=x[E].type):x[E].offset?(b=b+","+x[E].from+":"+x[E].offset+x[E].offsetUnit,C=C+","+x[E].type):(b=b+","+x[E].from,C=C+","+x[E].type));-1===b&&(b=null,C=null),-1===T&&(T=null,P=null),u.push({from:b,fromPredecessor:C,taskid:I,to:T,toPredecessor:P,currentIndex:R,slack:null,enddate:null}),c.push(I)}for(var F=u.length,U=0,V=void 0,N=0;N<F;N++)if(!u[N].to){V=u[N].taskid,U="ProjectView"===this.parent.viewType?t.indexOf(V.toString()):this.resourceCollectionIds.indexOf(V.toString());var L=i[U].ganttProperties;a=this.parent.dataOperation.getDuration(L.endDate,n,"minute",L.isAutoSchedule,L.isMilestone),u[N].slack=a,u[N].fs=-1,u[N].enddate=L.endDate,k.push({fromdata:u[N].from,todateID:u[N].taskid,fromDataPredecessor:u[N].fromPredecessor})}for(var D=0;D<k.length;D++)g.push(k[D]),this.slackCalculation(g,u,c,n,i,t);f=this.finalCriticalPath(u,p,i,t,n),this.criticalPathCollection=f,this.detailPredecessorCollection=u,this.predecessorCollectionTaskIds=c}if(!1===e&&this.parent.flatData.length>0){var B=void 0;this.parent.enableCriticalPath=!1;for(var N=0;N<this.criticalPathCollection.length;N++)B=t.indexOf(this.criticalPathCollection[N].toString()),i[B].isCritical=!1;this.criticalPathCollection=[],this.detailPredecessorCollection=[],this.predecessorCollectionTaskIds=[]}},e.prototype.slackCalculation=function(e,t,n,a,s,o){var l=e[0].fromdata.split(","),d=e[0].fromDataPredecessor.split(",");n=n.toString(),n=n.split(",");for(var p,h,u,c,g,f,m,y,v=[],D=0;D<l.length;D++){v=l[D].split(":"),p=n.indexOf(v[0].toString()),c=n.indexOf(e[0].todateID.toString()),"ProjectView"===this.parent.viewType?(h=o.indexOf(v[0].toString()),u=o.indexOf(e[0].todateID.toString())):(h=this.resourceCollectionIds.indexOf(v[0].toString()),u=this.resourceCollectionIds.indexOf(e[0].todateID.toString()));var w=s[h].ganttProperties,k=s[u].ganttProperties;v.length>1&&(m=-1!==v[1].indexOf("hour")?60*parseFloat(v[1]):-1!==v[1].indexOf("day")?parseFloat(v[1])*(this.parent.secondsPerDay/3600)*60:parseFloat(v[1])),"FS"===d[D]&&(g=w.endDate>k.startDate?-this.parent.dataOperation.getDuration(k.startDate,w.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.parent.dataOperation.getDuration(w.endDate,k.startDate,"minute",w.isAutoSchedule,w.isMilestone),i.i(r.isNullOrUndefined)(t[p].slack)?v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g):t[p].slack>g&&0!==t[p].slack&&v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g),v.length>1&&(t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate,w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),"SS"===d[D]&&(w.isAutoSchedule?(g=w.startDate>k.startDate?-this.parent.dataOperation.getDuration(k.endDate,w.startDate,"minute",w.isAutoSchedule,w.isMilestone):this.parent.dataOperation.getDuration(w.startDate,k.startDate,"minute",w.isAutoSchedule,w.isMilestone),i.i(r.isNullOrUndefined)(t[p].slack)?v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g):t[p].slack>g&&0!==t[p].slack&&v.length<=1&&(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g),v.length>1&&(t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate):w.isAutoSchedule||(g=this.getSlackDuration(w.endDate,a,"minute",s[h]),i.i(r.isNullOrUndefined)(t[p].slack)?t[p].slack=g:t[p].slack>g&&0!==t[p].slack&&(t[p].slack=g)),w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),"FF"===d[D]&&(1!==t[c].fs&&1!==t[c].ff&&-1!==t[c].fs||(1!==t[c].fs&&1!==t[c].ff||(f=k.endDate,y=t[c].slack),-1===t[c].fs&&(f=t[c].enddate,y=t[c].slack),g=f>w.endDate?-this.getSlackDuration(w.endDate,f,"minute",s[h]):this.getSlackDuration(f,w.endDate,"minute",s[h]),i.i(r.isNullOrUndefined)(t[p].slack)?v.length<=1&&(t[p].slack=y-g<0?0:y-g):t[p].slack>g&&0!==t[p].slack&&v.length<=1&&(t[p].slack=y-g<0?0:y-g),v.length>1&&(t[p].slack=t[c].slack-g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].ff=1,t[p].enddate=f,t[p].fsslack=y),w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),"SF"===d[D]&&(w.isAutoSchedule?i.i(r.isNullOrUndefined)(t[p].slack)?(v.length<=1?i.i(r.isNullOrUndefined)(t[c].to)?(g=this.getSlackDuration(w.endDate,a,"minute",s[h]),t[p].slack=g):i.i(r.isNullOrUndefined)(t[c].to)||(g=k.endDate>w.startDate?-this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(k.endDate,w.startDate,"minute",s[h]),t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g):v.length>1&&(g=k.endDate>=w.endDate?w.startDate>k.endDate?-this.getSlackDuration(k.endDate,w.startDate,"minute",s[h]):this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(w.endDate,a,"minute",s[h]),t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0)),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate):(v.length<=1?(i.i(r.isNullOrUndefined)(t[c].to)?g=this.getSlackDuration(w.endDate,a,"minute",s[h]):i.i(r.isNullOrUndefined)(t[c].to)||(g=k.endDate>w.startDate?-this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(k.endDate,w.startDate,"minute",s[h])),t[p].slack>g&&0!==t[p].slack&&(i.i(r.isNullOrUndefined)(t[c].to)?t[p].slack=g:i.i(r.isNullOrUndefined)(t[c].to)||(t[c].slack+g<0?t[p].slack=0:t[p].slack=t[c].slack+g))):v.length>1&&(g=k.endDate>w.endDate?w.startDate>k.endDate?-this.getSlackDuration(k.endDate,w.startDate,"minute",s[h]):this.parent.dataOperation.getDuration(w.startDate,k.endDate,"minute",w.isAutoSchedule,w.isMilestone):this.getSlackDuration(w.endDate,a,"minute",s[h]),t[p].slack>g&&0!==t[p].slack&&(t[p].slack=t[c].slack+g,t[p].slack=t[p].slack-m,t[p].slack<0&&(t[p].slack=0))),t[p].fs=1,t[p].fsslack=t[p].slack,t[p].enddate=w.startDate):w.isAutoSchedule||(g=this.getSlackDuration(w.endDate,a,"minute",s[h]),i.i(r.isNullOrUndefined)(t[p].slack)?t[p].slack=g:t[p].slack>g&&0!==t[p].slack&&(t[p].slack=g)),w.endDate>=a&&w.endDate<=a&&(t[p].slack=0)),t[p].from&&e.push({fromdata:t[p].from,todateID:t[p].taskid,fromDataPredecessor:t[p].fromPredecessor})}e&&(e.splice(0,1),e.length>0&&this.slackCalculation(e,t,n,a,s,o))},e.prototype.getSlackDuration=function(e,t,i,r){var n=this.parent.dateValidationModule.checkStartDate(new Date(e)),a=this.parent.dateValidationModule.checkEndDate(new Date(t));return this.parent.dataOperation.getTimeDifference(n,a,!0)<=0?0:this.parent.dataOperation.getDuration(n,a,i,r.ganttProperties.isAutoSchedule,!0)},e.prototype.finalCriticalPath=function(e,t,i,r,n){for(var a,s,o=[],l=e.length-1;l>=0;l--){a="ProjectView"===this.parent.viewType?r.indexOf(e[l].taskid.toString()):this.resourceCollectionIds.indexOf(e[l].taskid.toString());for(var d=i[a].ganttProperties.predecessor,p="0 "+i[a].ganttProperties.durationUnit,h=0;h<d.length;h++){var u=void 0;u="ProjectView"===this.parent.viewType?this.parent.ids.indexOf(d[h].to):this.resourceCollectionIds.indexOf(d[h].to);var c=void 0,g=i[a].ganttProperties;"FS"===d[h].type?(c=this.parent.dataOperation.getDuration(g.endDate,i[u].ganttProperties.startDate,g.durationUnit,g.isAutoSchedule,g.isMilestone),0===c&&a!==u&&i[a].slack!==p?(i[a].slack=i[u].slack,i[a].ganttProperties.slack=i[u].slack):0!==c&&a!==u&&i[u].isCritical&&(i[a].slack=c+" "+i[a].ganttProperties.durationUnit,i[a].ganttProperties.slack=c+" "+i[a].ganttProperties.durationUnit)):c="SF"===d[h].type?this.parent.dataOperation.getDuration(g.startDate,i[u].ganttProperties.endDate,g.durationUnit,g.isAutoSchedule,g.isMilestone):"SS"===d[h].type?this.parent.dataOperation.getDuration(g.startDate,i[u].ganttProperties.startDate,g.durationUnit,g.isAutoSchedule,g.isMilestone):this.parent.dataOperation.getDuration(g.endDate,i[u].ganttProperties.endDate,g.durationUnit,g.isAutoSchedule,g.isMilestone),s="number"==typeof i[a][this.parent.taskFields.id]?parseInt(d[h].from,10):d[h].from,s===i[a][this.parent.taskFields.id]&&i[u].slack===p&&c<=0&&(i[a].slack=p,i[a].ganttProperties.slack=p)}i[a].slack===p&&i[a].ganttProperties.progress<100&&(i[a].isCritical=!0,i[a].ganttProperties.isCritical=!0,this.criticalTasks.push(i[a]),o.push(e[l].taskid))}if(t.length>0)for(var h=0;h<t.length;h++)-1!==(a="ProjectView"===this.parent.viewType?r.indexOf(t[h].toString()):this.resourceCollectionIds.indexOf(t[h].toString()))&&i[a].ganttProperties.progress<100&&(this.criticalTasks.push(i[a]),o=o.concat(t[h]));return o},e.prototype.criticalConnectorLine=function(e,t,a,s){this.parent.ganttChartModule.chartElement;this.parent.removeCriticalPathStyles();for(var o=this,l=0;l<e.length;l++)!function(t){var a;if("ProjectView"===o.parent.viewType)a=o.parent.currentViewData[o.parent.ids.indexOf(e[t].toString())];else for(var s=o.parent.currentViewData.filter(function(i){return i.ganttProperties.taskId.toString()==e[t].toString()}),l=0;l<s.length;l++)(s[l].ganttProperties.isCritical||s[l].ganttProperties.endDate>=o.maxEndDate)&&(a=s[l]);var d=o.parent.currentViewData.indexOf(a),p=o.parent.getRowByIndex(d),h=void 0,u=o.parent.taskFields;if(a.parentItem)for(var c=o.parent.currentViewData.filter(function(e){return a.parentItem.uniqueID==e.uniqueID}),g=o.parent.currentViewData.indexOf(c[0]),f=o.parent.getRowByIndex(g),m=f.querySelectorAll(".e-taskbar-main-container"),y=0;y<m.length;y++)m[y].getAttribute("rowuniqueid")==a.rowUniqueID&&i.i(r.addClass)(m[y].querySelectorAll(".e-gantt-child-taskbar-inner-div"),n.n);h=o.parent.allowUnscheduledTasks&&!a[u.startDate]&&!a[u.endDate]&&a[u.duration]?n.o:n.p,p&&("ProjectView"===o.parent.viewType||"ResourceView"===o.parent.viewType&&!a.hasChildRecords)&&(p.getElementsByClassName("e-milestone-top")[0]&&i.i(r.addClass)(p.querySelectorAll(".e-milestone-top"),n.q),p.getElementsByClassName("e-milestone-bottom")[0]&&i.i(r.addClass)(p.querySelectorAll(".e-milestone-bottom"),n.r),p.getElementsByClassName("e-gantt-child-taskbar-inner-div").length>0&&i.i(r.addClass)(p.querySelectorAll(".e-gantt-child-taskbar-inner-div"),n.n),p.getElementsByClassName("e-gantt-child-progressbar-inner-div").length>0&&i.i(r.addClass)(p.querySelectorAll(".e-gantt-child-progressbar-inner-div"),h))}(l);if(0!==t.length)for(var d=0,p=void 0,h=[],u=void 0,c=void 0,l=0;l<this.criticalPathCollection.length;l++)if(d=s.indexOf(this.criticalPathCollection[l]),p=t[d],-1!==d&&p.to){h=p.to.split(",");for(var g=0;g<h.length;g++)if(c=h[g].split("+"),"+",h[g].indexOf("-")>=0&&(c=h[g].split("-"),"-"),u=c[0].replace(":",""),"number"==typeof e[g]&&(u=parseInt(c[0],10)),-1!==e.indexOf(u)){var f=this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u);f.length>0&&(i.i(r.addClass)(this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u)[0].querySelectorAll(".e-line"),n.s),i.i(r.addClass)(this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u)[0].querySelectorAll(".e-connector-line-right-arrow"),n.t),i.i(r.addClass)(this.parent.element.querySelectorAll("#ConnectorLineparent"+p.taskid+"child"+u)[0].querySelectorAll(".e-connector-line-left-arrow"),n.u))}}},e.prototype.getModuleName=function(){return"criticalPath"},e.prototype.destroy=function(){!this.parent.enableCriticalPath&&this.parent.criticalPathModule&&(this.parent.criticalPathModule=void 0)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(80),n=i(79),a=i(0),s=(i.n(a),function(){function e(e){this.parent=e,this.nonworkingDayRender=new r.a(this.parent),this.eventMarkerRender=new n.a(this.parent),this.wireEvents()}return e.prototype.wireEvents=function(){this.parent.on("refreshDayMarkers",this.refreshMarkers,this),this.parent.on("updateHeight",this.updateHeight,this),this.parent.on("ui-update",this.propertyChanged,this)},e.prototype.propertyChanged=function(e){for(var t=Object.keys(i.i(a.getValue)("properties",e)),r=0;r<t.length;r++){switch(t[r]){case"eventMarkers":this.eventMarkerRender.renderEventMarkers(),this.updateHeight();break;case"highlightWeekends":this.nonworkingDayRender.renderWeekends(),this.updateHeight();break;case"holidays":this.nonworkingDayRender.renderHolidays(),this.updateHeight()}}},e.prototype.refreshMarkers=function(){this.eventMarkerRender.renderEventMarkers(),this.nonworkingDayRender.renderWeekends(),this.nonworkingDayRender.renderHolidays()},e.prototype.updateHeight=function(){this.nonworkingDayRender.updateContainerHeight(),this.eventMarkerRender.updateContainerHeight()},e.prototype.getModuleName=function(){return"dayMarkers"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.nonworkingDayRender.removeContainers(),this.eventMarkerRender.removeContainer(),this.parent.off("refreshDayMarkers",this.refreshMarkers),this.parent.off("updateHeight",this.updateHeight),this.parent.off("ui-update",this.propertyChanged))},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return f});var r=i(0),n=(i.n(r),i(4)),a=(i.n(n),i(8)),s=(i.n(a),i(13)),o=(i.n(s),i(5)),l=(i.n(o),i(87)),d=(i.n(l),i(12)),p=(i.n(d),i(85)),h=(i.n(p),i(20)),u=(i.n(h),i(21)),c=(i.n(u),i(2)),g=i(6),f=(i.n(g),function(){function e(e){this.updatedEditFields=null,this.updatedAddFields=null,this.addedRecord=null,this.dialogEditValidationFlag=!1,this.ganttResources=[],this.isValidData=!0,this.previousResource=[],this.isResourceUpdate=!1,this.parent=e,this.localeObj=this.parent.localeObj,this.beforeOpenArgs={cancel:!1},this.types=this.getPredecessorType(),this.rowData={},this.editedRecord={},this.inputs={booleanedit:p.CheckBox,dropdownedit:u.DropDownList,datepickeredit:h.DatePicker,datetimepickeredit:h.DateTimePicker,maskededit:d.MaskedTextBox,numericedit:d.NumericTextBox,stringedit:d.TextBox,defaultedit:d.TextBox},this.processDialogFields(),this.wireEvents()}return e.prototype.wireEvents=function(){this.parent.on("chartDblClick",this.dblClickHandler,this)},e.prototype.dblClickHandler=function(e){var t=this.parent.ganttChartModule.getRecordByTarget(e);!i.i(r.isNullOrUndefined)(t)&&this.parent.editModule&&this.parent.editSettings.allowEditing&&this.openEditDialog(t)},e.prototype.processDialogFields=function(){i.i(r.isNullOrUndefined)(this.parent.editDialogFields)||this.parent.editDialogFields&&0===this.parent.editDialogFields.length?(this.updatedEditFields=this.getDefaultDialogFields(),this.updatedEditFields=this.validateDialogFields(this.updatedEditFields)):this.updatedEditFields=this.validateDialogFields(this.parent.editDialogFields),i.i(r.isNullOrUndefined)(this.parent.addDialogFields)||this.parent.addDialogFields&&0===this.parent.addDialogFields.length?(this.updatedAddFields=this.getDefaultDialogFields(),this.updatedAddFields=this.validateDialogFields(this.updatedAddFields)):this.updatedAddFields=this.validateDialogFields(this.parent.addDialogFields)},e.prototype.validateDialogFields=function(e){for(var t=[],n=0,a=0;a<e.length;a++){var s=i.i(o.getActualProperties)(e[a]);"General"!==s.type||!i.i(r.isNullOrUndefined)(s.fields)&&0!==s.fields.length||(s.fields=this.getGeneralColumnFields()),"Dependency"===s.type&&i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)||"Resources"===s.type&&i.i(r.isNullOrUndefined)(this.parent.taskFields.resourceInfo)||"Notes"===s.type&&i.i(r.isNullOrUndefined)(this.parent.taskFields.notes)||("Custom"!==s.type||!i.i(r.isNullOrUndefined)(s.fields)&&0!==s.fields.length||(n+=1,s.fields=this.getCustomColumnFields()),n>1||t.push(s))}return t},e.prototype.getGeneralColumnFields=function(){for(var e=[],t=0,i=Object.keys(this.parent.columnMapping);t<i.length;t++){var r=i[t];"dependency"!==r&&"resourceInfo"!==r&&"notes"!==r&&e.push(this.parent.columnMapping[r])}return e},e.prototype.getCustomColumnFields=function(){for(var e=[],t=0;t<this.parent.customColumns.length;t++)e.push(this.parent.customColumns[t]);return e},e.prototype.getDefaultDialogFields=function(){var e=[],t={},n=this.parent.taskFields,a=this.parent.columnMapping;return 0!==Object.keys(a).length&&(t.type="General",e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("dependency",a))||(t={},!1!==this.parent.columnByField[a.dependency.valueOf()].visible&&(t.type="Dependency"),e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("resourceInfo",a))||(t={},!1!==this.parent.columnByField[a.resourceInfo.valueOf()].visible&&(t.type="Resources"),e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("notes",a))||(t={},!1!==this.parent.columnByField[a.notes.valueOf()].visible&&(t.type="Notes"),e.push(t)),i.i(r.isNullOrUndefined)(i.i(r.getValue)("segments",n))||(t={},t.type="Segments",e.push(t)),this.parent.customColumns.length>0&&(t={},t.type="Custom",e.push(t)),e},e.prototype.openAddDialog=function(){this.isEdit=!1,this.editedRecord=this.composeAddRecord(),this.createDialog()},e.prototype.getMinimumStartDate=function(){var e=n.DataUtil.aggregates.min(this.parent.flatData,"ganttProperties.startDate");return e=i.i(r.isNullOrUndefined)(e)?new Date(this.parent.timelineModule.timelineStartDate.getTime()):new Date(e.getTime()),e=this.parent.dateValidationModule.checkStartDate(e),new Date(e.getTime())},e.prototype.composeAddRecord=function(){var e={};e.ganttProperties={};for(var t=this.parent.ganttColumns,n=this.parent.taskFields,a=this.parent.editModule.getNewTaskId(),s=0;s<t.length;s++){var o=t[s].field;o===n.id?(e[o]=a,e.ganttProperties.rowUniqueID=e[o]):t[s].field===n.startDate?(i.i(r.isNullOrUndefined)(e[n.endDate])?e[o]=this.getMinimumStartDate():e[o]=new Date(e[n.endDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone)),e.ganttProperties.startDate=new Date(e[o])):t[s].field===n.endDate?(i.i(r.isNullOrUndefined)(e[n.startDate])?e[o]=this.getMinimumStartDate():e[o]=new Date(e[n.startDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone)),e.ganttProperties.endDate=new Date(e[o])):t[s].field===n.duration?(e[o]=1,e.ganttProperties.duration=e[o],e.ganttProperties.durationUnit=this.parent.durationUnit.toLocaleLowerCase()):t[s].field===n.name?(e[o]=this.localeObj.getConstant("addDialogTitle")+" "+a,e.ganttProperties.taskName=e[o]):t[s].field===n.progress?(e[o]=0,e.ganttProperties.progress=e[o]):t[s].field===n.work?(e[o]=0,e.ganttProperties.work=e[o]):t[s].field===n.type?(e[o]=this.parent.taskType,e.ganttProperties.taskType=e[o]):e[this.parent.ganttColumns[s].field]=""}return e.ganttProperties.isAutoSchedule="Auto"===this.parent.taskMode||"Manual"!==this.parent.taskMode&&!0!==e[n.manual],e},e.prototype.openToolbarEditDialog=function(){var e=this.parent;if(e.editModule&&e.editSettings.allowEditing){this.parent.ganttChartModule.focusedRowIndex>-1&&e.selectionModule&&e.selectionModule.selectRow(this.parent.ganttChartModule.focusedRowIndex,!1,!1);var t=e.selectionModule?"Row"!==e.selectionSettings.mode&&"Both"!==e.selectionSettings.mode||1!==e.selectionModule.selectedRowIndexes.length?"Cell"===e.selectionSettings.mode&&1===e.selectionModule.getSelectedRowCellIndexes().length?e.updatedRecords[e.selectionModule.getSelectedRowCellIndexes()[0].rowIndex].ganttProperties.rowUniqueID:null:e.updatedRecords[e.selectionModule.selectedRowIndexes[0]].ganttProperties.rowUniqueID:null;i.i(r.isNullOrUndefined)(t)||this.openEditDialog(t)}},e.prototype.openEditDialog=function(e){var t=this.parent;i.i(r.isNullOrUndefined)(e)||(i.i(r.isNullOrUndefined)(e.ganttProperties)||("string"==typeof e.ganttProperties.taskId?this.numericOrString="stringedit":this.numericOrString="numericedit"),i.i(r.isNullOrUndefined)(e.ganttProperties)&&!i.i(r.isNullOrUndefined)(e)&&(isNaN(Number(e))||"stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType?this.numericOrString="stringedit":this.numericOrString="numericedit")),"object"!=typeof e||i.i(r.isNullOrUndefined)(e)?i.i(r.isNullOrUndefined)(e)?t.selectedRowIndex>-1&&(this.rowData=t.currentViewData[t.selectedRowIndex],this.rowIndex=t.selectedRowIndex):(this.rowIndex=t.ids.indexOf(e.toString()),this.rowIndex>-1&&(this.rowData=t.flatData[this.rowIndex])):(this.rowIndex=this.parent.currentViewData.indexOf(e),this.rowIndex>-1&&(this.rowData=e)),this.isEdit=!0,"ResourceView"===this.parent.viewType&&0===this.rowData.level||0!==Object.keys(this.rowData).length&&(this.editedRecord=i.i(r.extend)({},{},this.rowData,!0),this.createDialog())},e.prototype.createDialog=function(){var e=this,t=this.parent,n={};this.beforeOpenArgs.dialogModel=n,this.beforeOpenArgs.rowData=this.editedRecord,this.beforeOpenArgs.rowIndex=this.rowIndex;var a=this.parent.isAdaptive?"":"600px",s=this.parent.createElement("div",{id:t.element.id+"_dialog",styles:"max-width:"+a});s.classList.add("e-gantt-dialog"),t.element.appendChild(s),n.animationSettings={effect:"None"},n.header=this.localeObj.getConstant(this.isEdit?"editDialogTitle":"addDialogTitle"),n.isModal=!0,n.allowDragging=!this.parent.isAdaptive,n.showCloseIcon=!0;var o=this.parent.isAdaptive?{X:"top",Y:"left"}:{X:"center",Y:"center"};n.position=o,n.height=this.parent.isAdaptive?"100%":"auto",n.target=document.body,n.close=this.dialogClose.bind(this),n.closeOnEscape=!0,n.beforeClose=function(e){"escape"==e.closedBy&&"key-pressed"==e.event.name&&"INPUT"==e.event.target.nodeName&&(e.cancel=!0)},n.open=function(t){var n=i.i(r.getValue)("element",t),a=n.querySelector("#"+e.parent.element.id+"GeneralTabContainer");a&&a.scrollHeight>a.offsetHeight&&a.classList.add("e-scroll"),0===e.tabObj.selectedItem&&e.tabObj.select(0),e.parent.isAdaptive&&(n.style.maxHeight="none"),e.parent.focusModule&&e.parent.focusModule.setActiveElement(n)},n.locale=this.parent.locale,n.buttons=[{buttonModel:{content:this.localeObj.getConstant("saveButton"),cssClass:"e-primary"},click:this.buttonClick.bind(this)},{buttonModel:{cssClass:"e-flat",content:this.localeObj.getConstant("cancel")},click:this.buttonClick.bind(this)}],this.createTab(n,s)},e.prototype.buttonClick=function(e){var t=e.target;t.style.pointerEvents="none",this.localeObj.getConstant("cancel").toLowerCase()===e.target.innerText.trim().toLowerCase()?this.dialog&&!this.dialogObj.isDestroyed&&(this.dialogObj.hide(),this.dialogClose()):(this.initiateDialogSave(),t.style.pointerEvents="auto")},e.prototype.dialogClose=function(){this.dialog&&this.resetValues(),i.i(r.isNullOrUndefined)(this.parent.focusModule)||i.i(r.isNullOrUndefined)(this.parent.focusModule.getActiveElement(!0))||this.parent.focusModule.getActiveElement(!0).focus()},e.prototype.resetValues=function(){this.isEdit=!1,this.isAddNewResource=!1,this.editedRecord={},this.rowData={},this.rowIndex=-1,this.addedRecord=null,this.ganttResources=[],this.dialogEditValidationFlag=!1,this.dialog&&!this.dialogObj.isDestroyed&&(this.destroyDialogInnerElements(),this.dialogObj.destroy(),i.i(r.remove)(this.dialog))},e.prototype.destroyDialogInnerElements=function(){for(var e=this.parent,t=this.beforeOpenArgs.tabModel,n=t.items,a=0;a<n.length;a++){var s=n[a].content,o=s.id;if(!i.i(r.isNullOrUndefined)(o)||""!==o)if(o=o.replace(e.element.id,""),"General"===(o=o.replace("TabContainer","")))this.destroyCustomField(s);else if("Dependency"===o){var l=s.ej2_instances[0];l.destroy()}else if("Notes"===o){var d=s.ej2_instances[0];d.destroy()}else if("Resources"===o){var p=s.ej2_instances[0];p.destroy()}else-1!==o.indexOf("Custom")&&this.destroyCustomField(s)}},e.prototype.destroyCustomField=function(e){for(var t=e.childNodes,n=this.parent,a=0;a<t.length;a++){var s=t[a],l=s.querySelector('input[id^="'+n.element.id+'"]');if(l){var d=l.id.replace(n.element.id,""),p=s.querySelector("#"+n.element.id+d).ej2_instances[0];if(!i.i(r.isNullOrUndefined)(p)){var h=n.columnByField[d];if(!i.i(r.isNullOrUndefined)(h.edit)&&i.i(r.isNullOrUndefined)(h.edit.params)){var u=h.edit.destroy;"string"==typeof u?(u=i.i(o.getObject)(u,window))():h.edit.destroy()}else p.destroy()}}}},e.prototype.destroy=function(){this.resetValues(),this.parent.isDestroyed||(this.parent.off("chartDblClick",this.dblClickHandler),this.parent.editModule.dialogModule=void 0)},e.prototype.getEditFields=function(){return this.isEdit?this.updatedEditFields:this.updatedAddFields},e.prototype.createTab=function(e,t){var n,o=this,l=this.parent,d={},p=[],h=this.getEditFields(),u=l.taskFields,c=h.length;d.items=p,d.locale=this.parent.locale,this.beforeOpenArgs.tabModel=d;var g=0,f=0;if(c>0)for(var m=0;m<c;m++){var y=h[m],v={};if("General"===y.type){if(0===Object.keys(l.columnMapping).length)continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("generalTab")),v.content="General",this.beforeOpenArgs[v.content]=this.getFieldsModel(y.fields)}else if("Segments"===y.type){if(i.i(r.isNullOrUndefined)(u.segments))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("segments")),v.content="Segments",this.beforeOpenArgs[v.content]=this.getSegmentsModel(y.fields)}else if("Dependency"===y.type){if(i.i(r.isNullOrUndefined)(u.dependency))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("dependency")),v.content="Dependency",this.beforeOpenArgs[v.content]=this.getPredecessorModel(y.fields)}else if("Resources"===y.type){if(i.i(r.isNullOrUndefined)(u.resourceInfo))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("resourceName")),v.content="Resources",this.beforeOpenArgs[v.content]=this.getResourcesModel(y.fields)}else if("Notes"===y.type){if(i.i(r.isNullOrUndefined)(u.notes))continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("notes")),v.content="Notes",this.beforeOpenArgs[v.content]=this.getNotesModel(y.fields)}else{if(i.i(r.isNullOrUndefined)(y.fields)||0===y.fields.length)continue;i.i(r.isNullOrUndefined)(y.headerText)&&(y.headerText=this.localeObj.getConstant("customTab"),g++),v.content="Custom"+f++,this.beforeOpenArgs[v.content]=this.getFieldsModel(y.fields)}v.header={text:y.headerText},p.push(v)}this.beforeOpenArgs.requestType=this.isEdit?"beforeOpenEditDialog":"beforeOpenAddDialog";this.beforeOpenArgs.rowData,this.beforeOpenArgs.name,this.beforeOpenArgs.requestType,this.beforeOpenArgs.cancel;this.parent.trigger("actionBegin",this.beforeOpenArgs,function(i){if(o.renderTabItems(),!i.cancel){d.selected=o.tabSelectedEvent.bind(o),d.height=o.parent.isAdaptive?"100%":"auto",d.overflowMode="Scrollable",o.tabObj=new s.Tab(d),o.tabObj.isStringTemplate=!0,n=o.parent.createElement("div",{id:l.element.id+"_Tab"}),o.tabObj.appendTo(n),e.content=n,o.dialog=t,o.dialogObj=new a.Dialog(e),o.dialogObj.isStringTemplate=!0,o.dialogObj.appendTo(o.dialog);var r={action:"OpenDialog",requestType:o.isEdit?"openEditDialog":"openAddDialog",data:o.beforeOpenArgs.rowData,element:o.dialog,cancel:!1};o.parent.trigger("actionComplete",r,function(e){e.cancel&&o.resetValues()})}})},e.prototype.tabSelectedEvent=function(e){var t=this.parent,n=e.selectedContent.childNodes[0].id;if(this.parent.isAdaptive&&this.responsiveTabContent(n,t),n===t.element.id+"ResourcesTabContainer")this.resourceSelection(n);else if(n===t.element.id+"NotesTabContainer"){document.getElementById(n).ej2_instances[0].refresh();var a=document.querySelector("#"+this.parent.element.id+"NotesTabContainer");a.style.overflow="scroll"}else n===t.element.id+"SegmentsTabContainer"&&(i.i(r.isNullOrUndefined)(this.beforeOpenArgs.rowData.ganttProperties.startDate)?document.getElementById(n).ej2_instances[0].enableToolbarItems([this.parent.element.id+"SegmentsTabContainer_add"],!1):document.getElementById(n).ej2_instances[0].enableToolbarItems([this.parent.element.id+"SegmentsTabContainer_add"],!0))},e.prototype.responsiveTabContent=function(e,t){var i=document.getElementById(t.element.id+"_dialog_dialog-content"),r=i.clientHeight;r-=i.querySelector(".e-tab-header").offsetHeight;var n=document.querySelector("#"+e);if(n.classList.contains("e-grid")){r-=n.ej2_instances[0].getHeaderContent().offsetHeight;var a=n.querySelector(".e-toolbar");a&&(r-=a.offsetHeight)}n.parentElement.style.height=r+"px"},e.prototype.getFieldsModel=function(e){for(var t={},n=this.parent.columnByField,a=0;a<e.length;a++)if(e[a]!==this.parent.taskFields.dependency&&e[a]!==this.parent.taskFields.resourceInfo&&e[a]!==this.parent.taskFields.notes&&!i.i(r.isNullOrUndefined)(n[e[a]])){var s=e[a];this.createInputModel(n[s],t)}return t},e.prototype.createInputModel=function(e,t){var n=this,a=this.parent,s=this.parent.locale,o=this.parent.taskFields,l={placeholder:e.headerText,floatLabelType:"Auto"};switch(i.i(r.isNullOrUndefined)(this.parent.taskFields.id)||i.i(r.isNullOrUndefined)(this.parent.columnMapping.id)||i.i(r.isNullOrUndefined)(this.numericOrString)||o.id===e.field&&(e.editType=this.numericOrString),e.editType){case"booleanedit":var d={label:e.headerText,locale:s};t[e.field]=d;break;case"defaultedit":case"stringedit":var p=l;e.field!==a.columnMapping.duration&&e.field!==a.columnMapping.id&&e.field!==a.columnMapping.startDate&&e.field!==a.columnMapping.endDate||(p.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=l;break;case"numericedit":var h=l;o.progress===e.field&&(h.min=0,h.max=100),o.work===e.field&&(h.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=h;break;case"datepickeredit":var u=l;u.format=this.parent.getDateFormat(),u.strictMode=!0,u.firstDayOfWeek=a.timelineModule.customTimelineSettings.weekStartDay,e.field!==a.columnMapping.startDate&&e.field!==a.columnMapping.endDate||(u.renderDayCell=this.parent.renderWorkingDayCell.bind(this.parent),u.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=u;break;case"datetimepickeredit":var c=l;c.format=this.parent.getDateFormat(),c.strictMode=!0,c.firstDayOfWeek=a.timelineModule.customTimelineSettings.weekStartDay,e.field!==a.columnMapping.startDate&&e.field!==a.columnMapping.endDate||(c.renderDayCell=this.parent.renderWorkingDayCell.bind(this.parent),c.change=function(t){n.validateScheduleFields(t,e,a)}),t[e.field]=c;break;case"dropdownedit":if(e.field===a.columnMapping.type||e.field===a.columnMapping.manual){var g=[{ID:1,Value:"FixedUnit"},{ID:2,Value:"FixedWork"},{ID:3,Value:"FixedDuration"}];l.dataSource=g,l.fields={value:"Value"};l.change=function(t){e.field===o.manual&&(n.editedRecord.ganttProperties.isAutoSchedule=!t.value),n.validateScheduleFields(t,e,a)}}t[e.field]=l;break;case"maskededit":t[e.field]=l}return i.i(r.isNullOrUndefined)(e.edit)||i.i(r.isNullOrUndefined)(e.edit.params)||i.i(r.extend)(t[e.field],e.edit.params),t},e.prototype.validateScheduleFields=function(e,t,n){var a,s;i.i(r.isNullOrUndefined)(n.editModule.dialogModule.dialog)||(s=n.editModule.dialogModule.dialog);var o,l=null,p=n.editModule.dialogModule.editedRecord,h=null,u=null,c="ResourceView"===this.parent.viewType?this.parent.getTaskIds():this.parent.ids,g=this.parent.viewType;if(i.i(r.isNullOrUndefined)(e.element)?i.i(r.isNullOrUndefined)(e.container)?i.i(r.isNullOrUndefined)(e.event)||i.i(r.isNullOrUndefined)(e.event.path[1])||(o=e.event.path[1],l=o.querySelector("input").getAttribute("id"),o=o.querySelector("#"+l)):(o=e.container,l=o.querySelector("input").getAttribute("id"),o=o.querySelector("#"+l)):(o=e.element,l=o.getAttribute("id")),i.i(r.isNullOrUndefined)(o))h=e.value,u=t.field;else if(h=o.value,u=l.replace(n.element.id,""),"stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType){var f=function(e){return"ResourceView"===g?-1===c.indexOf("T"+e.value)&&-1===c.indexOf("R"+e.value):-1===c.indexOf(e.value)},m={rules:(a={},a[this.parent.taskFields.id]={required:!0,minLength:[f,"ID is already present, please enter new value"]},a)};new d.FormValidator("#"+this.parent.element.id+"GeneralTabContainer",m)}if(0===u.search("Segments"))return u=u.replace("SegmentsTabContainer",""),this.validateSegmentFields(n,u,h,e),!0;this.validateScheduleValuesByCurrentField(u,h,this.editedRecord);var y=p.ganttProperties,v=n.taskFields;return i.i(r.isNullOrUndefined)(v.startDate)||v.startDate===u||this.updateScheduleFields(s,y,"startDate"),i.i(r.isNullOrUndefined)(v.endDate)||v.endDate===u||this.updateScheduleFields(s,y,"endDate"),i.i(r.isNullOrUndefined)(v.duration)||v.duration===u||this.updateScheduleFields(s,y,"duration"),i.i(r.isNullOrUndefined)(v.work)||v.work===u||this.updateScheduleFields(s,y,"work"),this.dialogEditValidationFlag=!1,!0},e.prototype.updateScheduleFields=function(e,t,n){var a,s=this.parent,o=s.element.id,l=i.i(r.getValue)(n,s.columnMapping),d=s.columnByField[l],p=this.parent.taskFields;if("stringedit"===d.editType){var h=e.querySelector("#"+o+l).ej2_instances[0];a=i.i(r.isNullOrUndefined)(d.edit)||i.i(r.isNullOrUndefined)(d.edit.read)?i.i(r.isNullOrUndefined)(d.valueAccessor)?this.parent.dataOperation.getDurationString(t.duration,t.durationUnit):d.valueAccessor(l,s.editModule.dialogModule.editedRecord,d):d.edit.read(),h.value!==a.toString()&&p.duration===l?(h.value=a,h.dataBind()):p.startDate!==l&&p.endDate!==l||(h.value=p.startDate===l?t.startDate.toString():t.endDate.toString(),h.dataBind())}else if("datepickeredit"===d.editType||"datetimepickeredit"===d.editType){var u=(d.editType,e.querySelector("#"+o+l).ej2_instances[0]);a=t[n],(i.i(r.isNullOrUndefined)(u.value)&&!i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(a)&&!i.i(r.isNullOrUndefined)(u.value)||u.value!==a&&!i.i(r.isNullOrUndefined)(u.value)&&!i.i(r.isNullOrUndefined)(a)&&u.value.toString()!==a.toString())&&(u.value=a,u.dataBind())}else if("numericedit"===d.editType){var c=e.querySelector("#"+o+l).ej2_instances[0];a=t[n],i.i(r.isNullOrUndefined)(a)||c.value===a||(c.value=a,c.dataBind())}},e.prototype.validateDuration=function(e){var t=e.ganttProperties;if(!this.dialogEditValidationFlag){i.i(r.isNullOrUndefined)(t.duration)?(this.parent.setRecordValue("endDate",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0)):i.i(c.c)(t)||!i.i(r.isNullOrUndefined)(t.startDate)?(e.ganttProperties.isMilestone&&0!==e.ganttProperties.duration&&this.parent.dateValidationModule.checkStartDate(t.startDate),this.parent.dateValidationModule.calculateEndDate(e)):i.i(c.c)(t)||i.i(r.isNullOrUndefined)(t.endDate)||this.parent.dateValidationModule.calculateStartDate(e);var n=0===t.duration;this.parent.setRecordValue("isMilestone",n,t,!0),this.dialogEditValidationFlag=!0}},e.prototype.validateStartDate=function(e){var t=e.ganttProperties,n=this.parent.taskFields;this.dialogEditValidationFlag||(i.i(r.isNullOrUndefined)(t.startDate)?(this.parent.setRecordValue("duration",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0),this.parent.allowUnscheduledTasks&&i.i(r.isNullOrUndefined)(n.endDate)&&this.parent.setRecordValue("endDate",null,t,!0)):i.i(c.c)(t)?i.i(r.isNullOrUndefined)(n.duration)?this.parent.dateValidationModule.calculateDuration(e):(i.i(r.isNullOrUndefined)(n.endDate),this.parent.dateValidationModule.calculateEndDate(e)):i.i(r.isNullOrUndefined)(t.endDate)?i.i(r.isNullOrUndefined)(t.duration)||this.parent.dateValidationModule.calculateEndDate(e):this.parent.dateValidationModule.calculateDuration(e),this.dialogEditValidationFlag=!0)},e.prototype.validateEndDate=function(e){var t=e.ganttProperties,n=this.parent.taskFields;this.dialogEditValidationFlag||(i.i(r.isNullOrUndefined)(t.endDate)?(this.parent.setRecordValue("duration",null,t,!0),this.parent.setRecordValue("isMilestone",!1,t,!0)):i.i(c.c)(t)?i.i(r.isNullOrUndefined)(n.duration)?this.parent.dateValidationModule.calculateDuration(e):i.i(r.isNullOrUndefined)(t.startDate)?this.parent.dateValidationModule.calculateStartDate(e):(!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0&&(t.segments=this.parent.editModule.cellEditModule.validateEndDateWithSegments(t)),this.parent.dateValidationModule.calculateDuration(e)):i.i(r.isNullOrUndefined)(t.duration)?i.i(r.isNullOrUndefined)(t.startDate)||this.parent.dateValidationModule.calculateDuration(e):this.parent.dateValidationModule.calculateStartDate(e),this.dialogEditValidationFlag=!0)},e.prototype.validateScheduleValuesByCurrentField=function(e,t,n){var a=this.parent,s=n.ganttProperties,o=a.taskFields;if(o.duration===e&&(i.i(r.isNullOrUndefined)(t)||""===t?a.allowUnscheduledTasks&&this.parent.setRecordValue("duration",null,s,!0):a.dataOperation.updateDurationValue(t,s),this.validateDuration(n),this.parent.editModule.updateResourceRelatedFields(n,"duration")),o.startDate===e){if(""!==t){var l=this.parent.dateValidationModule.getDateFromFormat(t);l=this.parent.dateValidationModule.checkStartDate(l,s),this.parent.setRecordValue("startDate",l,s,!0)}else a.allowUnscheduledTasks&&!n.hasChildRecords&&this.parent.setRecordValue("startDate",null,s,!0);this.validateStartDate(n)}if(o.endDate===e){if(""!==t){var d=this.parent.dateValidationModule.getDateFromFormat(t);0===d.getHours()&&86400!==a.defaultEndTime&&this.parent.dateValidationModule.setTime(a.defaultEndTime,d),d=this.parent.dateValidationModule.checkEndDate(d,s),(i.i(r.isNullOrUndefined)(s.startDate)||d.getTime()>s.startDate.getTime())&&this.parent.setRecordValue("endDate",d,s,!0)}else a.allowUnscheduledTasks&&this.parent.setRecordValue("endDate",null,s,!0);this.validateEndDate(n)}return o.work===e&&(i.i(r.isNullOrUndefined)(t)||""===t||(this.parent.setRecordValue("work",t,s,!0),this.parent.editModule.updateResourceRelatedFields(n,"work"),this.validateDuration(n))),e===o.type&&this.parent.setRecordValue("taskType",t,s,!0),o.manual===e&&this.parent.editModule.updateTaskScheduleModes(n),!0},e.prototype.getSegmentsModel=function(e){var t=this,n=this.parent.taskFields;(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=[],i.i(r.isNullOrUndefined)(n.startDate)||e.push("startDate"),i.i(r.isNullOrUndefined)(n.endDate)||e.push("endDate"),i.i(r.isNullOrUndefined)(n.duration)||e.push("duration"));var a={};a.editSettings={allowEditing:!0,allowAdding:!0,allowDeleting:!0,mode:"Normal",newRowPosition:"Bottom"},a.locale=this.parent.locale,a.dataSource=[],a.rowHeight=this.parent.isAdaptive?48:null,a.toolbar=[{id:this.parent.element.id+"SegmentsTabContainer_add",prefixIcon:"e-add",tooltipText:this.localeObj.getConstant("add"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("add")},{id:this.parent.element.id+"SegmentsTabContainer_delete",prefixIcon:"e-delete",tooltipText:this.localeObj.getConstant("delete"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("delete")}];for(var s=[],o=this,l=0;l<e.length;l++)!function(n){var a={};switch(e[n]){case"startDate":case"endDate":a={field:e[n],headerText:o.localeObj.getConstant(e[n]),editType:"stringedit",width:"200px",edit:{write:function(a){var s;if(i.i(r.isNullOrUndefined)(t.beforeOpenArgs.General)){var o=t.getGeneralColumnFields();s=t.getFieldsModel(o)[t.parent.taskFields[e[n]]]}else s=t.beforeOpenArgs.General[t.parent.taskFields[e[n]]];var l=a.rowData[a.column.field];i.i(r.setValue)("value",l,s),new t.inputs[t.parent.columnByField[t.parent.taskFields[e[n]]].editType](s).appendTo(a.element)},read:function(e){return e.ej2_instances[0].value}},format:o.parent.getDateFormat()},"startDate"===e[n]&&(a.validationRules={required:!0}),s.push(a);break;case"duration":a={field:e[n],headerText:o.localeObj.getConstant(e[n]),editType:"stringedit",width:"100px",edit:{write:function(a){var s;if(i.i(r.isNullOrUndefined)(t.beforeOpenArgs.General)){var o=t.getGeneralColumnFields();s=t.getFieldsModel(o)[t.parent.taskFields[e[n]]]}else s=t.beforeOpenArgs.General[t.parent.taskFields[e[n]]];s.floatLabelType="Never";var l=a.rowData[a.column.field];i.i(r.isNullOrUndefined)(l)?i.i(r.setValue)("value",null,s):i.i(r.setValue)("value",l,s),i.i(r.setValue)("value",l,s),new d.TextBox(s).appendTo(a.element)},read:function(e){return e.ej2_instances[0].value.toString()}}},s.push(a)}}(l);return a.columns=s,a.height=this.parent.isAdaptive?"100%":"153px",a},e.prototype.getGridColumnByField=function(e,t){for(var i,r=0;r<t.length;r++)t[r].field===e&&(i=t[r]);return i},e.prototype.updateSegmentField=function(e,t,n){var a,s=this.parent.editModule.dialogModule.dialog,o=i.i(r.getValue)("Segments",this.beforeOpenArgs),l=this.getGridColumnByField(e,o.columns),d=this.parent.element.id,p=n[e];"stringedit"===l.editType?a=s.querySelector("#"+d+"SegmentsTabContainer"+e).ej2_instances[0]:"datepickeredit"===l.editType&&(a=s.querySelector("#"+d+"SegmentsTabContainer"+e).ej2_instances[0]),a.value.toString()!==p.toString()&&(a.value=p,a.dataBind())},e.prototype.validateSegmentFields=function(e,t,n,a){var s=this.parent.taskFields;if(!i.i(r.isNullOrUndefined)(s.duration)&&s.duration.toLowerCase()===t.toLowerCase()&&!i.i(r.isNullOrUndefined)(n)&&""!==n){this.selectedSegment.duration=Number(n);var o=e.dataOperation.getEndDate(this.selectedSegment.startDate,Number(n),this.editedRecord.ganttProperties.durationUnit,this.editedRecord.ganttProperties,!1);o=e.dataOperation.checkEndDate(o,this.editedRecord.ganttProperties,!1),this.selectedSegment.endDate=o}if(!i.i(r.isNullOrUndefined)(s.startDate)&&s.startDate.toLowerCase()===t.toLowerCase()&&""!==n){var l=this.parent.dateValidationModule.getDateFromFormat(n);l=this.parent.dateValidationModule.checkStartDate(l),this.selectedSegment.startDate=l,i.i(r.isNullOrUndefined)(s.endDate)||(this.selectedSegment.endDate=this.parent.dataOperation.getEndDate(l,this.selectedSegment.duration,this.editedRecord.ganttProperties.durationUnit,this.editedRecord.ganttProperties,!1))}if(!i.i(r.isNullOrUndefined)(s.endDate)&&s.endDate.toLowerCase()===t.toLowerCase()&&""!==n){var o=this.parent.dateValidationModule.getDateFromFormat(n);0===o.getHours()&&86400!==e.defaultEndTime&&this.parent.dateValidationModule.setTime(e.defaultEndTime,o),o=this.parent.dateValidationModule.checkEndDate(o,this.editedRecord.ganttProperties),this.selectedSegment.endDate=o,this.selectedSegment.duration=this.parent.dataOperation.getDuration(this.selectedSegment.startDate,this.selectedSegment.endDate,this.editedRecord.ganttProperties.durationUnit,!0,!1,!0)}i.i(r.isNullOrUndefined)(s.startDate)||this.updateSegmentField("startDate",a,this.selectedSegment),i.i(r.isNullOrUndefined)(s.endDate)||this.updateSegmentField("endDate",a,this.selectedSegment),i.i(r.isNullOrUndefined)(s.duration)||this.updateSegmentField("duration",a,this.selectedSegment)},e.prototype.getPredecessorModel=function(e){(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=["ID","Name","Type","Offset","UniqueId"]);var t={};t.editSettings={allowEditing:!0,allowAdding:!0,allowDeleting:!0,mode:"Normal"},t.locale=this.parent.locale,t.dataSource=[],t.rowHeight=this.parent.isAdaptive?48:null,t.toolbar=[{id:this.parent.element.id+"DependencyTabContainer_add",prefixIcon:"e-add",tooltipText:this.localeObj.getConstant("add"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("add")},{id:this.parent.element.id+"DependencyTabContainer_delete",prefixIcon:"e-delete",tooltipText:this.localeObj.getConstant("delete"),align:"Right",text:this.parent.isAdaptive?"":this.localeObj.getConstant("delete")}];for(var n=[],a=0;a<e.length;a++){var s={};"id"===e[a].toLowerCase()?(s={field:"id",headerText:this.localeObj.getConstant("id"),allowEditing:!1,width:"70px"},n.push(s)):"name"===e[a].toLowerCase()?(s={field:"name",headerText:this.localeObj.getConstant("name"),editType:"stringedit",width:"250px",validationRules:{required:!0}},n.push(s)):"type"===e[a].toLowerCase()?(s={field:"type",headerText:this.localeObj.getConstant("type"),editType:"dropdownedit",dataSource:this.types,foreignKeyField:"id",foreignKeyValue:"text",defaultValue:"FS",validationRules:{required:!0},width:"150px"},n.push(s)):"offset"===e[a].toLowerCase()?(s={field:"offset",headerText:this.localeObj.getConstant("offset"),editType:"stringedit",defaultValue:this.parent.dataOperation.getDurationString(0,this.beforeOpenArgs.rowData.ganttProperties.durationUnit),validationRules:{required:!0},width:"100px"},n.push(s)):"uniqueid"===e[a].toLowerCase()&&(s={field:"uniqueId",isPrimaryKey:!0,visible:!1,defaultValue:i.i(c.k)().toString()},n.push(s))}return t.columns=n,t.height=this.parent.isAdaptive?"100%":"153px",t},e.prototype.getResourcesModel=function(e){var t=this.parent,n=t.resourceFields;(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=[n.id,n.name,n.unit,n.group]);for(var a={allowFiltering:!0,treeColumnIndex:-1,childMapping:"",editSettings:{allowEditing:!0,mode:"Cell"},locale:this.parent.locale,allowSelection:!0,rowHeight:this.parent.isAdaptive?48:null,filterSettings:{type:"Menu"},selectionSettings:{checkboxOnly:!0,checkboxMode:"Default",persistSelection:!0,type:"Multiple"}},s=[{type:"checkbox",allowEditing:!1,allowSorting:!1,allowFiltering:!1,width:60}],o=0;o<e.length;o++){var l={};e[o]===n.id?(l={field:n.id,headerText:this.localeObj.getConstant("id"),isPrimaryKey:!0,width:"100px",allowEditing:!1},s.push(l)):e[o]===n.name?(l={field:n.name,headerText:this.localeObj.getConstant("name"),allowEditing:!1},s.push(l)):e[o]===n.unit?(l={field:n.unit,headerText:this.localeObj.getConstant("unit"),editType:"numericedit",edit:{params:{min:0}}},s.push(l)):e[o]!==n.group||i.i(r.isNullOrUndefined)(n.group)||(l={field:n.group,headerText:this.localeObj.getConstant("group"),allowEditing:!1},s.push(l))}return a.columns=s,a.height=this.parent.isAdaptive?"100%":"196px",a},e.prototype.getNotesModel=function(e){return(i.i(r.isNullOrUndefined)(e)||0===e.length)&&(e=["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateTable","CreateLink","|","ClearFormat","Print","|","Undo","Redo"]),{placeholder:this.localeObj.getConstant("writeNotes"),toolbarSettings:{items:e},height:this.parent.isAdaptive?"100%":"auto",locale:this.parent.locale}},e.prototype.createDivElement=function(e,t){return i.i(r.createElement)("div",{className:e,id:t})},e.prototype.createInputElement=function(e,t,n,a){return i.i(r.createElement)(a||"input",{className:e,attrs:{type:"text",id:t,name:n,title:n}})},e.prototype.renderTabItems=function(){for(var e=this.beforeOpenArgs.tabModel,t=e.items,i=0,r=0;r<t.length;r++){var n=t[r];n.content instanceof HTMLElement||("General"===n.content?n.content=this.renderGeneralTab(n.content):"Dependency"===n.content?n.content=this.renderPredecessorTab(n.content):"Resources"===n.content?n.content=this.renderResourceTab(n.content):n.content==="Custom"+i?(n.content=this.renderCustomTab(n.content),i++):"Notes"===n.content?n.content=this.renderNotesTab(n.content):"Segments"===n.content&&(this.editedRecord.hasChildRecords&&(n.disabled=!0),n.content=this.renderSegmentsTab(n.content)))}},e.prototype.segmentGridActionBegin=function(e){var t=this.parent.taskFields,n=this.beforeOpenArgs.Segments;if("add"===e.requestType||"beginEdit"===e.requestType||"save"===e.requestType){var a=n.dataSource,s=i.i(r.getValue)("rowData",e),o=this.beforeOpenArgs.rowData.ganttProperties.startDate;if(!i.i(r.isNullOrUndefined)(o)&&"add"===e.requestType){var l={},d=i.i(r.getValue)("startDate",s),p=i.i(r.getValue)("endDate",s),h=i.i(r.getValue)("duration",s),u=!i.i(r.isNullOrUndefined)(a)&&a.length>0?i.i(r.isNullOrUndefined)(t.endDate)?new Date(i.i(r.getValue)("startDate",a[0]).getTime()):new Date(i.i(r.getValue)("endDate",a[0]).getTime()):!i.i(r.isNullOrUndefined)(this.beforeOpenArgs.rowData.ganttProperties.startDate)&&new Date(this.beforeOpenArgs.rowData.ganttProperties.startDate.getTime());u.setHours(0,0,0,0),!i.i(r.isNullOrUndefined)(a)&&a.length>0&&u.setDate(u.getDate()+2),d=this.parent.dataOperation.checkStartDate(u),p=this.parent.dateValidationModule.getDateFromFormat(d),0===p.getHours()&&86400!==this.parent.defaultEndTime&&this.parent.dateValidationModule.setTime(this.parent.defaultEndTime,p),p=!i.i(r.isNullOrUndefined)(t.endDate)&&!i.i(r.isNullOrUndefined)(a)&&a.length<=0?this.beforeOpenArgs.rowData.ganttProperties.endDate:p,h=!i.i(r.isNullOrUndefined)(t.duration)&&!i.i(r.isNullOrUndefined)(a)&&a.length<=0?this.beforeOpenArgs.rowData.ganttProperties.duration:1,l={startDate:d,endDate:p,duration:h},e.rowData=l}this.selectedSegment=e.rowData}},e.prototype.renderSegmentsTab=function(e){var t=this.parent,n=this.beforeOpenArgs[e],a=this.beforeOpenArgs.rowData,s=[];this.isEdit&&(s=i.i(r.isNullOrUndefined)(a.ganttProperties.segments)?[]:a.ganttProperties.segments),n.dataSource=s,n.actionBegin=this.segmentGridActionBegin.bind(this),o.Grid.Inject(o.Edit,o.Page,o.Toolbar,o.ForeignKey);var l=new o.Grid(n),d=this.createDivElement("",t.element.id+""+e+"TabContainer");return l.appendTo(d),d},e.prototype.renderGeneralTab=function(e){for(var t=this.parent,i=this.beforeOpenArgs[e],r=this.createDivElement("e-edit-form-row",t.element.id+""+e+"TabContainer"),n=0,a=Object.keys(i);n<a.length;n++){var s=a[n];if(!1!==this.parent.columnByField[s].visible){var o=this.parent.columnByField[s],l=i[s];r.appendChild(this.renderInputElements(l,o))}}return r},e.prototype.isCheckIsDisabled=function(e){var t,n=!1;if(!1===e.allowEditing||e.isPrimaryKey||this.parent.readOnly)if(-1!==this.parent.customColumns.indexOf(e.field))n=!0;else if(e.field===this.parent.taskFields.id||e.field===this.parent.taskFields.name||e.field===this.parent.taskFields.duration||e.field===this.parent.taskFields.progress||e.field===this.parent.taskFields.startDate||e.field===this.parent.taskFields.endDate||e.field===this.parent.taskFields.baselineStartDate||e.field===this.parent.taskFields.baselineEndDate||e.field===this.parent.taskFields.work||e.field===this.parent.taskFields.type){for(var a=0;a<this.parent.currentViewData.length;a++)if(!i.i(r.isNullOrUndefined)(this.parent.currentViewData[a].ganttProperties.taskId)){t=this.parent.currentViewData[a].ganttProperties.taskId;break}n="string"!=typeof t}return this.isEdit&&(e.field===this.parent.taskFields.id&&(n=!0),this.editedRecord.hasChildRecords&&(e.field===this.parent.taskFields.endDate&&(!i.i(r.isNullOrUndefined)(this.editedRecord.isManual)&&0==this.editedRecord.isManual||"Auto"==this.parent.taskMode)||e.field===this.parent.taskFields.duration||e.field===this.parent.taskFields.progress||e.field===this.parent.taskFields.work||e.field===this.parent.taskFields.type)&&(n=!0)),n},e.prototype.isParentValid=function(e){if(e.length>0)for(var t=0;t<e.length;t++){if(e[t].uniqueID==this.beforeOpenArgs.rowData.uniqueID){this.isValidData=!1;break}if(e[t].hasChildRecords&&this.isParentValid(e[t].childRecords),!this.isValidData)break}return this.isValidData},e.prototype.renderPredecessorTab=function(e){var t=this,a=this.parent,s=this.beforeOpenArgs[e],l=this.parent.columnByField[this.parent.taskFields.dependency];(!1===l.allowEditing||l.isPrimaryKey||this.parent.readOnly)&&(s.editSettings.allowEditing=!1,s.editSettings.allowAdding=!1,s.editSettings.allowDeleting=!1);var d=this.beforeOpenArgs.rowData,p=[];this.taskNameCollection(),this.isEdit&&(p=this.predecessorEditCollection(d),this.updatePredecessorDropDownData(d)),s.dataSource=p,s.actionBegin=this.gridActionBegin.bind(this),s.columns[1].edit={write:function(e){"add"===i.i(r.getValue)("requestType",e)&&i.i(r.setValue)("rowData.uniqueId",i.i(c.k)(),e),new u.ComboBox({dataSource:new n.DataManager(t.idCollection),popupHeight:"180px",allowCustom:!1,fields:{value:"text"},value:e.rowData.name,change:function(e){var n=i.i(r.closest)(e.element,"tr"),a=n.querySelector("#"+t.parent.element.id+"DependencyTabContainerid");a&&(i.i(r.isNullOrUndefined)(e.itemData)||i.i(r.isNullOrUndefined)(e.item)?a.value="":a.value=e.itemData.id)},autofill:!0}).appendTo(e.element)},read:function(e){return e.ej2_instances[0].value}},o.Grid.Inject(o.Edit,o.Page,o.Toolbar,o.ForeignKey);var h=new o.Grid(s),g=this.createDivElement("e-dependent-div",a.element.id+""+e+"TabContainer");return h.appendTo(g),g},e.prototype.gridActionBegin=function(e){var t=this,n=this.beforeOpenArgs.Dependency;if("add"===e.requestType||"beginEdit"===e.requestType){var a="add"!==e.requestType;this.idCollection=i.i(r.extend)([],[],this.preTableCollection,!0);for(var s=n.dataSource,o=this,l=0;l<=s.length;l++)!function(n){o.idCollection.forEach(function(o,l){if(o.id===i.i(r.getValue)("id",s[n])){var d=i.i(r.getValue)("rowData",e);if(a&&i.i(r.getValue)("id",d)===o.id)return;t.idCollection.splice(t.idCollection.indexOf(o),1)}})}(l)}},e.prototype.updateResourceCollection=function(e,t){if(!i.i(r.isNullOrUndefined)(e.data)&&Object.keys(e.data).length){var n=(this.parent,document.querySelector("#"+t)),a=n.ej2_instances[0];if(!i.i(r.isNullOrUndefined)(a)&&a.getSelectedRecords().length>0){var s=a.getSelectedRecords(),o=void 0,l=[];for(o=0;o<s.length;o++)l.push(s[o].taskData);this.ganttResources=i.i(r.extend)([],l)}else this.ganttResources=[]}else this.ganttResources=[]},e.prototype.renderResourceTab=function(e){var t=this,n=this.parent,a=n.resourceFields,s=this.beforeOpenArgs.rowData,o=s.ganttProperties.resourceInfo,l=this.beforeOpenArgs[e],d=n.element.id+""+e+"TabContainer",p=[];if("ResourceView"===this.parent.viewType)for(var h=0;h<n.currentViewData.length;h++)for(var u=0;u<n.resources.length;u++)n.currentViewData[h][n.taskFields.id]===n.resources[u][a.id]&&(n.currentViewData[h].hasChildRecords||i.i(r.isNullOrUndefined)(n.currentViewData[h].parentItem))&&p.push(n.resources[u]);else p=i.i(r.extend)([],[],n.resources,!0);if(this.parent.dataOperation.updateResourceUnit(p),!i.i(r.isNullOrUndefined)(o)){var c=void 0,f=o.length,m=void 0,y=p.length;for(c=0;c<f;c++)for(m=0;m<y;m++)o[c][a.id]===p[m][a.id]&&(p[m][a.unit]=o[c][a.unit])}l.dataSource=p;var v=s.ganttProperties.resourceInfo;if(this.isEdit&&!i.i(r.isNullOrUndefined)(v))for(var h=0;h<v.length;h++)this.ganttResources.push(v[h]);l.rowSelected=function(e){t.updateResourceCollection(e,d)},l.rowDeselected=function(e){t.updateResourceCollection(e,d)};var D=this.createDivElement("e-resource-div",d);g.TreeGrid.Inject(g.Selection,g.Filter,g.Edit,g.VirtualScroll);var w=new g.TreeGrid(l),k=this.parent.columnByField[this.parent.taskFields.resourceInfo];return(!1===k.allowEditing||k.isPrimaryKey||this.parent.readOnly)&&(w.allowSelection=!1,w.allowFiltering=!1,w.editSettings.allowEditing=!1),w.dataBound=function(){if(t.parent.editDialogFields.length>=1&&"Resources"===t.parent.editDialogFields[0].type){var e=t.parent.element.id+"ResourcesTabContainer";t.resourceSelection(e)}},w.appendTo(D),D},e.prototype.resourceSelection=function(e){var t=this,n=document.querySelector("#"+e).ej2_instances[0],a=n.getCurrentViewRecords(),s=this.ganttResources;s&&s.length>0&&a.forEach(function(e,a){for(var o=0;o<s.length;o++)e.taskData[t.parent.resourceFields.id]!==s[o][t.parent.resourceFields.id]||i.i(r.isNullOrUndefined)(n.selectionModule)||-1!==n.getSelectedRowIndexes().indexOf(a)||n.selectRow(a)})},e.prototype.renderCustomTab=function(e){return this.renderGeneralTab(e)},e.prototype.renderNotesTab=function(e){var t=this.parent,i=this.beforeOpenArgs[e],r=this.editedRecord.ganttProperties,n=this.createDivElement("",t.element.id+""+e+"TabContainer");l.RichTextEditor.Inject(l.Toolbar,l.Link,l.HtmlEditor,l.QuickToolbar,l.Count),i.value=r.notes;var a=this.parent.columnByField[this.parent.taskFields.notes];return(!1===a.allowEditing||a.isPrimaryKey||this.parent.readOnly)&&(i.enabled=!1),new l.RichTextEditor(i).appendTo(n),n},e.prototype.renderInputElements=function(e,t){var n,a=this,s=this.parent.element.id,l=this.editedRecord,d=this.createDivElement("e-edit-form-column"),p={column:t,data:l};if(!i.i(r.isNullOrUndefined)(t.edit)&&i.i(r.isNullOrUndefined)(t.edit.params)){var h=t.edit.create;"string"==typeof h?(h=i.i(o.getObject)(h,window),n=h(p)):n=t.edit.create(p),n.className="",n.setAttribute("type","text"),n.setAttribute("id",s+""+t.field),n.setAttribute("name",t.field),n.setAttribute("title",t.field),d.appendChild(n)}else n=this.createInputElement("",s+""+t.field,t.field),d.appendChild(n);if(e.enabled=!this.isCheckIsDisabled(t),t.field===this.parent.taskFields.duration)if(i.i(r.isNullOrUndefined)(t.valueAccessor)){if(i.i(r.isNullOrUndefined)(t.edit)){var u=l.ganttProperties;e.value=this.parent.dataOperation.getDurationString(u.duration,u.durationUnit)}}else if("string"==typeof t.valueAccessor){var c=i.i(o.getObject)(t.valueAccessor,window);e.value=c(t.field,l,t)}else e.value=t.valueAccessor(t.field,l,t);else"booleanedit"===t.editType?!0===l[t.field]?e.checked=!0:e.checked=!1:e.value=l[t.field];if(!i.i(r.isNullOrUndefined)(t.edit)&&i.i(r.isNullOrUndefined)(t.edit.params)){var g=t.edit.write,f=void 0;"string"==typeof g?(g=i.i(o.getObject)(g,window),f=g({column:t,rowData:l,element:n})):f=t.edit.write({column:t,rowData:l,element:n}),t.field===this.parent.taskFields.duration&&(f.change=function(e){a.validateScheduleFields(e,t,a.parent)})}else{var f=new this.inputs[t.editType](e);f.appendTo(n)}return d},e.prototype.taskNameCollection=function(){var e=this.parent.flatData;this.preTaskIds=[],this.preTableCollection=[];for(var t=0;t<e.length;t++){var i=e[t],r=i;if(i.parentUniqueID===this.beforeOpenArgs.rowData.uniqueID)this.isValidData=!1;else do{if(r.parentItem&&(r=this.parent.flatData[this.parent.ids.indexOf(r.parentItem.taskId)],r.uniqueID==this.beforeOpenArgs.rowData.uniqueID)){this.isValidData=!1;break}}while(r.parentItem);if(i.hasChildRecords&&this.isValidData&&(this.isValidData=this.isParentValid(i.childRecords)),this.isValidData){var n="ResourceView"===this.parent.viewType?i.ganttProperties.taskId.toString():i.ganttProperties.rowUniqueID.toString(),a={id:n,text:n+"-"+i.ganttProperties.taskName,value:n};this.preTaskIds.push(a.id),this.preTableCollection.push(a)}else this.isValidData=!0}},e.prototype.predecessorEditCollection=function(e){var t=[],n=e.ganttProperties;if(this.isEdit&&!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)&&!i.i(r.isNullOrUndefined)(e)&&!i.i(r.isNullOrUndefined)(n.predecessor))for(var a=n.predecessor,s=this.preTableCollection,o=0;o<a.length;o++){var l=a[o].from.toString(),d={},p="ResourceView"===this.parent.viewType?n.taskId:n.rowUniqueID;if(p.toString()!==l){d.id=l;for(var h=0;h<s.length;h++)if(s[h].value===l){d.name=s[h].text;break}d.type=a[o].type;var u=a[o].offset,g=a[o].offsetUnit;d.offset=this.parent.dataOperation.getDurationString(u,g),d.uniqueId=i.i(c.k)(),t.push(d)}}return t},e.prototype.updatePredecessorDropDownData=function(e){var t=-1,i="ResourceView"===this.parent.viewType?e.ganttProperties.taskId.toString():e.ganttProperties.rowUniqueID.toString();t=this.preTaskIds.indexOf(i),this.preTableCollection.splice(t,1),this.preTaskIds.splice(t,1),this.validSuccessorTasks(e,this.preTaskIds,this.preTableCollection)},e.prototype.validSuccessorTasks=function(e,t,i){var r=this,n=e.ganttProperties;if(n.predecessor&&n.predecessor.length>0){var a=n.predecessor,s="ResourceView"===this.parent.viewType?n.taskId.toString():n.rowUniqueID.toString();a.forEach(function(e){if(e.from.toString()===s){var n=e.to,a=-1;a=t.indexOf(n),a>-1&&(t.splice(a,1),i.splice(a,1));var o=r.parent.connectorLineModule.getRecordByID(n);r.validSuccessorTasks(o,t,i)}})}},e.prototype.getPredecessorType=function(){var e=[this.parent.getPredecessorTextValue("SS"),this.parent.getPredecessorTextValue("SF"),this.parent.getPredecessorTextValue("FS"),this.parent.getPredecessorTextValue("FF")];return[{id:"FS",text:e[2],value:e[2]},{id:"FF",text:e[3],value:e[3]},{id:"SS",text:e[0],value:e[0]},{id:"SF",text:e[1],value:e[1]}]},e.prototype.initiateDialogSave=function(){this.isEdit?this.parent.initiateEditAction(!0):this.addedRecord={};for(var e=this.parent,t=this.beforeOpenArgs.tabModel,n=t.items,a=0;a<n.length;a++){var s=n[a].content,o=s.id;i.i(r.isNullOrUndefined)(o)&&""===o||(o=o.replace(e.element.id,""),o=o.replace("TabContainer",""),"General"===o?this.updateGeneralTab(s,!1):"Dependency"===o?this.updatePredecessorTab(s):"Notes"===o?this.updateNotesTab(s):"Resources"===o?this.updateResourceTab(s):-1!==o.indexOf("Custom")?this.updateCustomTab(s):"Segments"===o&&this.updateSegmentsData(s,this.beforeOpenArgs.rowData))}if(this.isEdit){this.parent.dataOperation.updateWidthLeft(this.rowData);var l={data:this.rowData,action:"DialogEditing"};this.parent.editModule.initiateUpdateAction(l)}else if("ResourceView"===this.parent.viewType){var d=i.i(r.extend)({},this.addedRecord,!0);if(d[this.parent.taskFields.resourceInfo].length)for(var a=0;a<d[this.parent.taskFields.resourceInfo].length;a++){var o=d[this.parent.taskFields.resourceInfo][a].toString(),p=this.parent.getTaskIds().indexOf("R"+o.toString());if(-1!==p){this.parent.editModule.addRecord(this.addedRecord,"Child",p);break}}else this.parent.editModule.addRecord(this.addedRecord,"Bottom")}else this.parent.editModule.addRecord(this.addedRecord,this.parent.editSettings.newRowPosition);return!0},e.prototype.updateSegmentTaskData=function(e){for(var t=[],n=this.parent.taskFields,a=0;a<e.length;a++){var s={};i.i(r.isNullOrUndefined)(n.startDate)||(s[this.parent.taskFields.startDate]=e[a].startDate),i.i(r.isNullOrUndefined)(n.endDate)||(s[this.parent.taskFields.endDate]=e[a].endDate),i.i(r.isNullOrUndefined)(n.duration)||(s[this.parent.taskFields.duration]=Number(e[a].duration),e[a].duration=s[this.parent.taskFields.duration]),t.push(s)}this.isEdit?(this.rowData.ganttProperties.segments=e,this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(this.rowData,!1),this.rowData.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.segments,t,this.rowData),e.length<=0&&this.validateDuration(this.rowData)):this.addedRecord[n.segments]=t},e.prototype.updateSegmentsData=function(e,t){var i,r=e.ej2_instances[0],n=r.isEdit;r.isEdit&&r.endEdit(),i=n&&r.currentViewData.length!=r.dataSource.length?r.dataSource:r.currentViewData,this.updateSegmentTaskData(i)},e.prototype.updateGeneralTab=function(e,t){var n=this.parent,a=e.childNodes,s={};this.isEdit||(s=this.addedRecord);for(var l=0;l<a.length;l++){var d=a[l],p=d.querySelector('input[id^="'+n.element.id+'"]');if(p){var h=p.id.replace(n.element.id,""),u=d.querySelector("#"+n.element.id+h).ej2_instances[0];if("stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType&&h===this.parent.taskFields.id){var c=u.value.toString();u.value=c}var g=n.columnByField[h];if(!i.i(r.isNullOrUndefined)(g.edit)&&i.i(r.isNullOrUndefined)(g.edit.params)){var f=g.edit.read;"string"==typeof f?(f=i.i(o.getObject)(f,window),s[h]=f(p,u.value)):s[h]=g.edit.read(p,u.value)}else t&&"booleanedit"===g.editType?!0===p.checked?s[h]=!0:s[h]=!1:s[h]=u.value}}this.isEdit&&(this.updateScheduleProperties(this.editedRecord,this.rowData),n.editModule.validateUpdateValues(s,this.rowData,!0))},e.prototype.updateScheduleProperties=function(e,t){this.parent.setRecordValue("startDate",e.ganttProperties.startDate,t.ganttProperties,!0),this.parent.setRecordValue("endDate",e.ganttProperties.endDate,t.ganttProperties,!0),this.parent.setRecordValue("duration",e.ganttProperties.duration,t.ganttProperties,!0),this.parent.setRecordValue("durationUnit",e.ganttProperties.durationUnit,t.ganttProperties,!0),this.parent.setRecordValue("work",e.ganttProperties.work,t.ganttProperties,!0),this.parent.setRecordValue("type",e.ganttProperties.taskType,t.ganttProperties,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.startDate)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.startDate),i.i(r.isNullOrUndefined)(this.parent.taskFields.endDate)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.endDate),i.i(r.isNullOrUndefined)(this.parent.taskFields.duration)||(this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.duration),this.parent.setRecordValue("durationUnit",e.ganttProperties.durationUnit,this.rowData,!0),0===this.rowData.ganttProperties.duration?this.parent.setRecordValue("isMilestone",!0,this.rowData.ganttProperties,!0):this.parent.setRecordValue("isMilestone",!1,this.rowData.ganttProperties,!0)),i.i(r.isNullOrUndefined)(this.parent.taskFields.work)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.work),i.i(r.isNullOrUndefined)(this.parent.taskFields.manual)||this.parent.dataOperation.updateMappingData(this.rowData,this.parent.taskFields.manual),i.i(r.isNullOrUndefined)(this.parent.taskFields.type)||this.parent.dataOperation.updateMappingData(this.rowData,"type")},e.prototype.updatePredecessorTab=function(e){var t=e.ej2_instances[0];t.isEdit&&t.endEdit();for(var i=t.dataSource,r=[],n=[],a="",s=[],o=0;o<i.length;o++){var l=i[o];if(-1===s.indexOf(l.id)){var d=l.id+l.type;l.offset&&-1!==l.offset.indexOf("-")?d+=l.offset:d+="+"+l.offset,r.push(d),s.push(l.id)}}this.isEdit?(r.length>0?(n=this.parent.predecessorModule.calculatePredecessor(r.join(","),this.rowData),this.parent.setRecordValue("predecessor",n,this.rowData.ganttProperties,!0),a=this.parent.predecessorModule.getPredecessorStringValue(this.rowData)):(n=[],this.parent.setRecordValue("predecessor",n,this.rowData.ganttProperties,!0),a=""),this.parent.setRecordValue("predecessorsName",a,this.rowData.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,a,this.rowData),this.parent.setRecordValue(this.parent.taskFields.dependency,a,this.rowData),this.parent.predecessorModule.updateUnscheduledDependency(this.rowData)):this.addedRecord[this.parent.taskFields.dependency]=r.length>0?r.join(","):""},e.prototype.updateResourceTab=function(e){var t=e.ej2_instances[0];t&&t.grid.endEdit();var n=this.ganttResources;"ResourceView"!==this.parent.viewType||i.i(r.isNullOrUndefined)(this.rowData.ganttProperties)||(JSON.stringify(this.ganttResources)!==JSON.stringify(this.rowData.ganttProperties.resourceInfo)?(this.isResourceUpdate=!0,this.previousResource=i.i(r.isNullOrUndefined)(this.rowData.ganttProperties.resourceInfo)?[]:this.rowData.ganttProperties.resourceInfo.slice()):this.isResourceUpdate=!1);var a=[];if(this.isEdit)this.parent.setRecordValue("resourceInfo",n,this.rowData.ganttProperties,!0),this.parent.dataOperation.updateMappingData(this.rowData,"resourceInfo"),this.parent.editModule.updateResourceRelatedFields(this.rowData,"resource"),this.validateDuration(this.rowData);else{for(var s=0;s<n.length;s++)a.push(n[s][this.parent.resourceFields.id]),this.isAddNewResource=!0;this.addedRecord[this.parent.taskFields.resourceInfo]=a}},e.prototype.updateNotesTab=function(e){var t=this.parent,i=e.ej2_instances[0];this.isEdit?(t.columnByField[t.taskFields.notes].disableHtmlEncode?this.parent.setRecordValue("notes",i.getHtml(),this.rowData.ganttProperties,!0):this.parent.setRecordValue("notes",i.getText(),this.rowData.ganttProperties,!0),t.dataOperation.updateMappingData(this.rowData,"notes")):this.addedRecord[this.parent.taskFields.notes]=i.getHtml()},e.prototype.updateCustomTab=function(e){this.updateGeneralTab(e,!0)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return c});var r=i(0),n=(i.n(r),i(4)),a=(i.n(n),i(5)),s=(i.n(a),i(2)),o=i(24),l=i(42),d=i(33),p=i(8),h=(i.n(p),i(21)),u=(i.n(h),i(29)),c=function(){function e(e){if(this.isFromDeleteMethod=!1,this.targetedRecords=[],this.updateParentRecords=[],this.isaddtoBottom=!1,this.confirmDialog=null,this.taskbarMoved=!1,this.predecessorUpdated=!1,this.isBreakLoop=!1,this.deletedTaskDetails=[],this.parent=e,this.validatedChildItems=[],this.parent.editSettings.allowEditing&&"Auto"===this.parent.editSettings.mode&&(this.cellEditModule=new o.a(this.parent)),this.parent.taskFields.dependency&&(this.parent.connectorLineEditModule=new u.a(this.parent)),(this.parent.editSettings.allowAdding||this.parent.editSettings.allowEditing&&("Dialog"===this.parent.editSettings.mode||"Auto"===this.parent.editSettings.mode))&&(this.dialogModule=new d.a(this.parent)),this.parent.editSettings.allowTaskbarEditing&&(this.taskbarEditModule=new l.a(this.parent)),this.parent.editSettings.allowDeleting){var t=i.i(r.createElement)("div",{id:this.parent.element.id+"_deleteConfirmDialog"});this.parent.element.appendChild(t),this.renderDeleteConfirmDialog()}this.parent.treeGrid.recordDoubleClick=this.recordDoubleClick.bind(this),this.parent.treeGrid.editSettings.allowAdding=this.parent.editSettings.allowAdding,this.parent.treeGrid.editSettings.allowDeleting=this.parent.editSettings.allowDeleting,this.parent.treeGrid.editSettings.showDeleteConfirmDialog=this.parent.editSettings.showDeleteConfirmDialog,this.parent.treeGrid.editSettings.allowNextRowEdit=this.parent.editSettings.allowNextRowEdit,this.updateDefaultColumnEditors()}return e.prototype.getModuleName=function(){return"edit"},e.prototype.updateDefaultColumnEditors=function(){for(var e=[this.parent.taskFields.id,this.parent.taskFields.progress,this.parent.taskFields.resourceInfo,"taskType"],t=0;t<e.length;t++)if(!i.i(r.isNullOrUndefined)(e[t])&&e[t].length>0){var n=this.parent.getColumnByField(e[t],this.parent.treeGridModule.treeGridColumns);n&&(n.field===this.parent.taskFields.id?this.updateIDColumnEditParams(n):n.field===this.parent.taskFields.progress&&i.i(r.isNullOrUndefined)(n.edit)?this.updateProgessColumnEditParams(n):n.field===this.parent.taskFields.resourceInfo?this.updateResourceColumnEditor(n):"taskType"===n.field&&this.updateTaskTypeColumnEditor(n))}},e.prototype.updateIDColumnEditParams=function(e){var t={min:0,decimals:0,validateDecimalOnType:!0,format:"n0",showSpinButton:!1};this.updateEditParams(e,t)},e.prototype.updateProgessColumnEditParams=function(e){var t={min:0,decimals:0,validateDecimalOnType:!0,max:100,format:"n0"};this.updateEditParams(e,t)},e.prototype.updateEditParams=function(e,t){i.i(r.isNullOrUndefined)(e.edit)?(e.edit={},e.edit.params={}):i.i(r.isNullOrUndefined)(e.edit.params)&&(e.edit.params={}),i.i(r.extend)(t,e.edit.params),e.edit.params=t,this.parent.getColumnByField(e.field,this.parent.ganttColumns).edit=e.edit},e.prototype.updateResourceColumnEditor=function(e){if(this.parent.editSettings.allowEditing&&i.i(r.isNullOrUndefined)(e.edit)&&"Auto"===this.parent.editSettings.mode){e.editType="dropdownedit",e.edit=this.getResourceEditor();var t=this.parent.getColumnByField(e.field,this.parent.ganttColumns);t.editType="dropdownedit",t.edit=e.edit}},e.prototype.getResourceEditor=function(){var e,t=this,a=this.parent.resourceFields,s={};return h.MultiSelect.Inject(h.CheckBoxSelection),s.write=function(i){t.parent.treeGridModule.currentEditRow={},e=new h.MultiSelect({dataSource:new n.DataManager(t.parent.resources),fields:{text:a.name,value:a.id},mode:"CheckBox",showDropDownIcon:!0,popupHeight:"350px",delimiterChar:",",value:t.parent.treeGridModule.getResourceIds(i.rowData)}),e.appendTo(i.element)},s.read=function(e){var n=e.ej2_instances[0].value,s=[];i.i(r.isNullOrUndefined)(n)&&(n=[]);for(var o=0;o<n.length;o++)for(var l=0;l<t.parent.resources.length;l++)if(t.parent.resources[l][a.id]===n[o]){s.push(t.parent.resources[l][a.name]);break}return t.parent.treeGridModule.currentEditRow[t.parent.taskFields.resourceInfo]=n,s.join(",")},s.destroy=function(){e&&e.destroy()},s},e.prototype.updateTaskTypeColumnEditor=function(e){if(this.parent.editSettings.allowEditing&&i.i(r.isNullOrUndefined)(e.edit)&&"Auto"===this.parent.editSettings.mode){e.editType="dropdownedit",e.edit=this.getTaskTypeEditor();var t=this.parent.getColumnByField(e.field,this.parent.ganttColumns);t.editType="dropdownedit",t.edit=e.edit}},e.prototype.getTaskTypeEditor=function(){var e,t=this,a={},s=[{ID:1,Value:"FixedUnit"},{ID:2,Value:"FixedWork"},{ID:3,Value:"FixedDuration"}];return a.write=function(a){t.parent.treeGridModule.currentEditRow={},e=new h.DropDownList({dataSource:new n.DataManager(s),fields:{value:"Value"},popupHeight:"350px",value:i.i(r.getValue)("taskType",a.rowData.ganttProperties)}),e.appendTo(a.element)},a.read=function(e){var i=e.ej2_instances[0].value;return t.parent.treeGridModule.currentEditRow.taskType=i,i},a.destroy=function(){e&&e.destroy()},a},e.prototype.reUpdateEditModules=function(){var e=this.parent.editSettings;if(e.allowEditing?(this.parent.editModule.cellEditModule&&"Dialog"===e.mode?(this.cellEditModule.destroy(),this.parent.treeGrid.recordDoubleClick=this.recordDoubleClick.bind(this)):i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)&&"Auto"===e.mode&&(this.cellEditModule=new o.a(this.parent)),this.parent.editModule.dialogModule&&"Auto"===e.mode?this.parent.treeGrid.recordDoubleClick=void 0:i.i(r.isNullOrUndefined)(this.parent.editModule.dialogModule)&&(this.dialogModule=new d.a(this.parent))):(this.cellEditModule&&this.cellEditModule.destroy(),this.dialogModule&&this.dialogModule.destroy()),e.allowDeleting&&e.showDeleteConfirmDialog){if(i.i(r.isNullOrUndefined)(this.confirmDialog)){var t=i.i(r.createElement)("div",{id:this.parent.element.id+"_deleteConfirmDialog"});this.parent.element.appendChild(t),this.renderDeleteConfirmDialog()}}else e.allowDeleting&&e.showDeleteConfirmDialog||this.confirmDialog&&!this.confirmDialog.isDestroyed&&this.confirmDialog.destroy();e.allowTaskbarEditing?i.i(r.isNullOrUndefined)(this.parent.editModule.taskbarEditModule)&&(this.taskbarEditModule=new l.a(this.parent)):this.taskbarEditModule&&this.taskbarEditModule.destroy()},e.prototype.recordDoubleClick=function(e){if(this.parent.editSettings.allowEditing&&"Dialog"===this.parent.editSettings.mode){var t=void 0;if(e.row){var n=i.i(r.getValue)("rowIndex",e.row);t=this.parent.currentViewData[n]}i.i(r.isNullOrUndefined)(t)||this.dialogModule.openEditDialog(t)}this.parent.ganttChartModule.recordDoubleClick(e)},e.prototype.destroy=function(){this.cellEditModule&&this.cellEditModule.destroy(),this.taskbarEditModule&&this.taskbarEditModule.destroy(),this.dialogModule&&this.dialogModule.destroy(),this.confirmDialog&&!this.confirmDialog.isDestroyed&&this.confirmDialog.destroy()},e.prototype.updateRecordByID=function(e){if(!this.parent.readOnly){var t=this.parent.taskFields;if(i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(e[t.id]))return;var n="ResourceView"===this.parent.viewType?this.parent.flatData[this.parent.getTaskIds().indexOf("T"+e[t.id])]:this.parent.getRecordByID(e[t.id]);if(!i.i(r.isNullOrUndefined)(this.parent.editModule)&&n){this.parent.isOnEdit=!0,this.validateUpdateValues(e,n,!0),e[this.parent.taskFields.resourceInfo]&&(0===n.ganttProperties.duration&&this.parent.dataOperation.updateWorkWithDuration(n),this.updateResourceRelatedFields(n,"resource"),this.parent.dateValidationModule.calculateEndDate(n));var a=Object.keys(e);if(-1===a.indexOf(t.startDate)&&-1===a.indexOf(t.endDate)&&-1===a.indexOf(t.duration)||this.parent.dataOperation.calculateScheduledValues(n,n.taskData,!1),this.parent.dataOperation.updateWidthLeft(n),i.i(r.isUndefined)(e[this.parent.taskFields.dependency])||e[this.parent.taskFields.dependency]===n.ganttProperties.predecessorsName){var s={};s.data=n,"ResourceView"===this.parent.viewType&&(s.action="methodUpdate"),this.parent.editModule.initiateUpdateAction(s)}else this.parent.connectorLineEditModule.updatePredecessor(n,e[this.parent.taskFields.dependency])}}},e.prototype.validateUpdateValues=function(e,t,n){for(var a=this.parent,o=a.taskFields,l=i.i(s.d)(a.columnMapping),d=[],p=!1,h=0,u=Object.keys(e);h<u.length;h++){var c=u[h];if(-1!==[o.startDate,o.endDate,o.duration].indexOf(c)){if(i.i(r.isNullOrUndefined)(e[c])&&!a.allowUnscheduledTasks)continue;if(n)if(o.duration===c)a.dataOperation.updateDurationValue(e[c],t.ganttProperties),t.ganttProperties.duration>0&&t.ganttProperties.isMilestone&&this.parent.setRecordValue("isMilestone",!1,t.ganttProperties,!0),a.dataOperation.updateMappingData(t,l[c]);else{var g="string"==typeof e[c]?new Date(e[c]):e[c];a.setRecordValue(l[c],g,t.ganttProperties,!0),a.dataOperation.updateMappingData(t,l[c])}else d.push(c),p=!0}else if(o.resourceInfo===c){var f=a.dataOperation.setResourceInfo(e);"ResourceView"===this.parent.viewType&&(JSON.stringify(f)!==JSON.stringify(t.ganttProperties.resourceInfo)?(this.parent.editModule.dialogModule.isResourceUpdate=!0,this.parent.editModule.dialogModule.previousResource=i.i(r.isNullOrUndefined)(t.ganttProperties.resourceInfo)?[]:t.ganttProperties.resourceInfo.slice()):this.parent.editModule.dialogModule.isResourceUpdate=!1),t.ganttProperties.resourceInfo=f,a.dataOperation.updateMappingData(t,"resourceInfo")}else if(o.dependency===c);else if(-1!==[o.progress,o.notes,o.durationUnit,o.expandState,o.milestone,o.name,o.baselineStartDate,o.baselineEndDate,o.id,o.segments].indexOf(c)){var m=a.columnByField[c],y=e[c];i.i(r.isNullOrUndefined)(m)||"datepickeredit"!==m.editType&&"datetimepickeredit"!==m.editType||(y=a.dataOperation.getDateFromFormat(y));var v=l[c];if(c===o.id)v="taskId";else if(c===o.name)v="taskName";else if(c===o.segments&&(v="segments",e&&!i.i(r.isNullOrUndefined)(e[this.parent.taskFields.segments])&&e[this.parent.taskFields.segments].length>0)){for(var D=0,w=0;w<t.ganttProperties.segments.length;w++)D+=t.ganttProperties.segments[w].duration;var k=t.ganttProperties.startDate,S=this.parent.dataOperation.getEndDate(k,D,t.ganttProperties.durationUnit,t.ganttProperties,!1);a.setRecordValue("endDate",a.dataOperation.getDateFromFormat(S),t.ganttProperties,!0)}i.i(r.isNullOrUndefined)(v)||a.setRecordValue(v,y,t.ganttProperties,!0),(c===o.baselineStartDate||c===o.baselineEndDate)&&t.ganttProperties.baselineStartDate&&t.ganttProperties.baselineEndDate&&(a.setRecordValue("baselineStartDate",a.dataOperation.checkBaselineStartDate(t.ganttProperties.baselineStartDate),t.ganttProperties,!0),a.dataOperation.setTime(this.parent.defaultEndTime,t.ganttProperties.baselineEndDate),a.setRecordValue("baselineEndDate",a.dataOperation.checkBaselineEndDate(t.ganttProperties.baselineEndDate),t.ganttProperties,!0),a.setRecordValue("baselineLeft",a.dataOperation.calculateBaselineLeft(t.ganttProperties),t.ganttProperties,!0),a.setRecordValue("baselineWidth",a.dataOperation.calculateBaselineWidth(t.ganttProperties),t.ganttProperties,!0)),a.setRecordValue("taskData."+c,y,t),c===o.segments&&e&&!i.i(r.isNullOrUndefined)(e[this.parent.taskFields.segments])&&e[this.parent.taskFields.segments].length>0&&a.dataOperation.setSegmentsInfo(t,!0),a.setRecordValue(c,y,t)}else if(o.indicators===c){var y=e[c];a.setRecordValue("indicators",y,t.ganttProperties,!0),a.setRecordValue("taskData."+c,y,t),a.setRecordValue(c,y,t)}else if(o.work===c)a.setRecordValue("work",e[c],t.ganttProperties,!0),this.parent.dataOperation.updateMappingData(t,"work"),this.parent.dataOperation.updateMappingData(t,"duration"),this.parent.dataOperation.updateMappingData(t,"endDate");else if(c===o.type)a.setRecordValue("taskType",e[c],t.ganttProperties,!0);else if(-1!==a.customColumns.indexOf(c)){var m=a.columnByField[c],y=e[c];i.i(r.isNullOrUndefined)(m.edit)&&("datepickeredit"!==m.editType&&"datetimepickeredit"!==m.editType||(y=a.dataOperation.getDateFromFormat(y))),a.setRecordValue("taskData."+c,y,t),a.setRecordValue(c,y,t)}else o.manual===c&&(a.setRecordValue("isAutoSchedule",!e[c],t.ganttProperties,!0),this.parent.setRecordValue(c,e[c],t),this.updateTaskScheduleModes(t))}p&&this.validateScheduleValues(d,t,e)},e.prototype.updateResourceRelatedFields=function(e,t){var n=e.ganttProperties,a=n.taskType,s=n.isAutoSchedule;if(!i.i(r.isNullOrUndefined)(n.resourceInfo))if(n.work>0||"work"===t)switch(a){case"FixedUnit":if(0===n.resourceInfo.length)return;s&&n.resourceInfo.length&&("work"===t||"resource"===t)?this.parent.dataOperation.updateDurationWithWork(e):s||"work"!==t?this.parent.dataOperation.updateWorkWithDuration(e):this.parent.dataOperation.updateUnitWithWork(e);break;case"FixedWork":if(0===n.resourceInfo.length)return;s?"duration"===t||"endDate"===t?(this.parent.dataOperation.updateUnitWithWork(e),0===n.duration&&(this.parent.setRecordValue("work",0,n,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.work)||this.parent.dataOperation.updateMappingData(e,"work"))):this.parent.dataOperation.updateDurationWithWork(e):"work"===t?this.parent.dataOperation.updateUnitWithWork(e):this.parent.dataOperation.updateWorkWithDuration(e);break;case"FixedDuration":n.resourceInfo.length&&"work"===t?this.parent.dataOperation.updateUnitWithWork(e):this.parent.dataOperation.updateWorkWithDuration(e)}else this.parent.dataOperation.updateWorkWithDuration(e)},e.prototype.validateScheduleValues=function(e,t,i){var r=this.parent;e.length>2?r.dataOperation.calculateScheduledValues(t,i,!1):e.length>1?this.validateScheduleByTwoValues(i,e,t):this.dialogModule.validateScheduleValuesByCurrentField(e[0],i[e[0]],t)},e.prototype.validateScheduleByTwoValues=function(e,t,i){var r,n,a,s=this.parent,o=s.taskFields,l=i.ganttProperties,d=s.allowUnscheduledTasks;-1!==t.indexOf(o.startDate)&&(r=e[o.startDate]),-1!==t.indexOf(o.endDate)&&(n=e[o.endDate]),-1!==t.indexOf(o.duration)&&(a=e[o.duration]),r&&n||d&&-1!==t.indexOf(o.startDate)&&-1!==t.indexOf(o.endDate)?(s.setRecordValue("startDate",s.dataOperation.getDateFromFormat(r),l,!0),s.setRecordValue("endDate",s.dataOperation.getDateFromFormat(n),l,!0),s.dataOperation.calculateDuration(i)):n&&a||d&&-1!==t.indexOf(o.endDate)&&-1!==t.indexOf(o.duration)?(s.setRecordValue("endDate",s.dataOperation.getDateFromFormat(n),l,!0),s.dataOperation.updateDurationValue(a,l)):(r&&a||d&&-1!==t.indexOf(o.startDate)&&-1!==t.indexOf(o.duration))&&(s.setRecordValue("startDate",s.dataOperation.getDateFromFormat(r),l,!0),s.dataOperation.updateDurationValue(a,l))},e.prototype.isTaskbarMoved=function(e){var t=!1,n=e.ganttProperties,a=this.parent.previousRecords&&this.parent.previousRecords[e.uniqueID];if(a&&a.ganttProperties){var s=i.i(r.getValue)("ganttProperties.startDate",a),o=i.i(r.getValue)("ganttProperties.endDate",a),l=i.i(r.getValue)("ganttProperties.duration",a),d=i.i(r.getValue)("ganttProperties.durationUnit",a),p=Object.keys(a.ganttProperties);-1===p.indexOf("startDate")&&-1===p.indexOf("endDate")&&-1===p.indexOf("duration")&&-1===p.indexOf("durationUnit")||(i.i(r.isNullOrUndefined)(s)&&!i.i(r.isNullOrUndefined)(n.startDate)||i.i(r.isNullOrUndefined)(o)&&!i.i(r.isNullOrUndefined)(n.endDate)||i.i(r.isNullOrUndefined)(n.startDate)&&!i.i(r.isNullOrUndefined)(s)||i.i(r.isNullOrUndefined)(n.endDate)&&!i.i(r.isNullOrUndefined)(o)||s&&s.getTime()!==n.startDate.getTime()||o&&o.getTime()!==n.endDate.getTime()||!i.i(r.isNullOrUndefined)(l)&&l!==n.duration||!i.i(r.isNullOrUndefined)(l)&&l===n.duration&&d!==n.durationUnit)&&(t=!0)}return t},e.prototype.isPredecessorUpdated=function(e){var t=!1,i=this.parent.previousRecords[e.uniqueID];return i&&i.ganttProperties&&i.ganttProperties.hasOwnProperty("predecessor")&&(e.ganttProperties.predecessorsName!==i.ganttProperties.predecessorsName?t=!0:this.parent.setRecordValue("predecessor",i.ganttProperties.predecessor,e.ganttProperties,!0)),t},e.prototype.isCheckPredecessor=function(e){var t=!1;return this.parent.previousRecords[e.uniqueID]&&this.parent.taskFields.dependency&&this.parent.isInPredecessorValidation&&this.parent.predecessorModule.getValidPredecessor(e).length>0&&this.isTaskbarMoved(e)&&(t=!0),t},e.prototype.updateGanttProperties=function(e,t){var i=["taskId","uniqueID","rowUniqueID","parentId"];Object.keys(e.ganttProperties).forEach(function(r){-1===i.indexOf(r)&&(t.ganttProperties[r]=e.ganttProperties[r])})},e.prototype.initiateUpdateAction=function(e){var t=this.isCheckPredecessor(e.data);this.taskbarMoved=this.isTaskbarMoved(e.data),this.predecessorUpdated=this.isPredecessorUpdated(e.data),this.predecessorUpdated&&(this.parent.isConnectorLineUpdate=!0,this.parent.connectorLineEditModule.addRemovePredecessor(e.data));var n={};if(t)if(n=this.parent.connectorLineEditModule.validateTypes(e.data),this.parent.isConnectorLineUpdate=!0,i.i(r.isNullOrUndefined)(i.i(r.getValue)("violationType",n)))this.updateEditedTask(e);else{var a=this.validateTaskEvent(e);!1===a.validateMode.preserveLinkWithEditing&&!1===a.validateMode.removeLink&&!1===a.validateMode.respectLink?this.parent.connectorLineEditModule.openValidationDialog(n):this.parent.connectorLineEditModule.applyPredecessorOption()}else this.taskbarMoved&&(this.parent.isConnectorLineUpdate=!0),this.updateEditedTask(e)},e.prototype.validateTaskEvent=function(e){var t={};return this.resetValidateArgs(),this.parent.currentEditedArgs=t,t.cancel=!1,t.data=e.data,t.requestType="validateLinkedTask",t.validateMode=this.parent.dialogValidateMode,t.editEventArgs=e,this.parent.actionBeginTask(t),t},e.prototype.resetValidateArgs=function(){this.parent.dialogValidateMode.preserveLinkWithEditing=!0,this.parent.dialogValidateMode.removeLink=!1,this.parent.dialogValidateMode.respectLink=!1},e.prototype.updateEditedTask=function(e){var t=e.data;if(this.updateParentChildRecord(t),this.parent.isConnectorLineUpdate){for(var i=0;i<this.validatedChildItems.length;i++){var r=this.validatedChildItems[i];r.ganttProperties.predecessor&&r.ganttProperties.predecessor.length>0&&(this.parent.editedTaskBarItem=r,this.parent.predecessorModule.validatePredecessor(r,[],""))}t.ganttProperties.predecessor&&(this.parent.isMileStoneEdited=t.ganttProperties.isMilestone,this.taskbarMoved&&(this.parent.editedTaskBarItem=t),this.parent.predecessorModule.validatePredecessor(t,[],"")),t.hasChildRecords&&this.parent.previousRecords[t.uniqueID].ganttProperties.startDate&&("DrawConnectorLine"===e.action||"DialogEditing"===e.action)&&this.updateChildItems(t),this.updateParentItemOnEditing()}t.parentItem&&this.parent.dataOperation.updateParentItems(t,!0),this.initiateSaveAction(e)},e.prototype.updateParentItemOnEditing=function(){for(var e=i.i(r.getValue)("parentRecord",this.parent.predecessorModule),t=0;t<e.length;t++)this.parent.dataOperation.updateParentItems(e[t]);i.i(r.setValue)("parentRecord",[],this.parent.predecessorModule),i.i(r.setValue)("parentIds",[],this.parent.predecessorModule)},e.prototype.updateParentChildRecord=function(e){var t=e;t.hasChildRecords&&this.taskbarMoved&&"Auto"===this.parent.taskMode&&!i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)&&!this.parent.editModule.cellEditModule.isResourceCellEdited&&this.updateChildItems(t),i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule)||(this.parent.editModule.cellEditModule.isResourceCellEdited=!1)},e.prototype.updateTaskScheduleModes=function(e){var t=e[this.parent.taskFields.startDate],i=e.ganttProperties;if(e.hasChildRecords&&i.isAutoSchedule)this.parent.setRecordValue("startDate",i.autoStartDate,i,!0),this.parent.setRecordValue("endDate",i.autoEndDate,i,!0),this.parent.setRecordValue("width",this.parent.dataOperation.calculateWidth(e,!0),i,!0),this.parent.setRecordValue("left",this.parent.dataOperation.calculateLeft(i,!0),i,!0),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(i.width,i.progress),i,!0),this.parent.dataOperation.calculateDuration(e);else if(e.hasChildRecords&&!i.isAutoSchedule)this.parent.dataOperation.updateWidthLeft(e),this.parent.dataOperation.calculateDuration(e),this.parent.setRecordValue("autoStartDate",i.startDate,i,!0),this.parent.setRecordValue("autoEndDate",i.endDate,i,!0),this.parent.setRecordValue("autoDuration",this.parent.dataOperation.calculateAutoDuration(e),i,!0),this.parent.dataOperation.updateAutoWidthLeft(e);else{var r=this.parent.dateValidationModule.checkStartDate(t,e.ganttProperties);this.parent.setRecordValue("startDate",r,e.ganttProperties,!0),this.parent.dataOperation.updateMappingData(e,"startDate"),this.parent.dateValidationModule.calculateEndDate(e),this.parent.setRecordValue("taskData."+this.parent.taskFields.manual,e[this.parent.taskFields.manual],e),this.parent.dataOperation.updateWidthLeft(e)}},e.prototype.calculateDateByRoundOffDuration=function(e,t){var n=e,a=n.ganttProperties,s=new Date(t.getTime());if(!i.i(r.isNullOrUndefined)(a.endDate)&&i.i(r.isNullOrUndefined)(a.startDate)){var o=this.parent.dateValidationModule.checkStartDate(s,a,null);this.parent.setRecordValue("endDate",this.parent.dateValidationModule.checkEndDate(o,n.ganttProperties),a,!0)}else this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(s,a,!1),a,!0),i.i(r.isNullOrUndefined)(a.duration)||this.parent.dateValidationModule.calculateEndDate(n);this.parent.dataOperation.updateWidthLeft(e),this.parent.dataOperation.updateTaskData(n)},e.prototype.updateParentProgress=function(e){var t=0,n=this.parent.getParentTask(e),a=n.childRecords,o=a?a.length:0,l=0,d=0,p=0,h=0,u={};if(a){for(var c=0;c<o;c++)a[c].ganttProperties.isMilestone&&!a[c].hasChildRecords||!i.i(s.c)(a[c].ganttProperties)?d+=1:(u=this.parent.dataOperation.getParentProgress(a[c]),l+=i.i(r.getValue)("totalProgress",u),h+=i.i(r.getValue)("totalDuration",u));p=o-d,t=p>0?Math.round(l/h):0,isNaN(t)&&(t=0),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(n.ganttProperties.isAutoSchedule?n.ganttProperties.width:n.ganttProperties.autoWidth,t),n.ganttProperties,!0),this.parent.setRecordValue("progress",Math.floor(t),n.ganttProperties,!0),this.parent.setRecordValue("totalProgress",l,n.ganttProperties,!0),this.parent.setRecordValue("totalDuration",h,n.ganttProperties,!0)}this.parent.dataOperation.updateTaskData(n),n.parentItem&&this.updateParentProgress(n.parentItem)},e.prototype.revertCellEdit=function(e){this.parent.editModule.reUpdatePreviousRecords(!1,!0),this.resetEditProperties()},e.prototype.reUpdatePreviousRecords=function(e,t){for(var i=this.parent.previousRecords,r=Object.keys(i),n=0;n<r.length;n++){var a=r[n],s=i[a],o=this.parent.getTaskByUniqueID(a);this.copyTaskData(o.taskData,s.taskData),delete s.taskData,this.copyTaskData(o.ganttProperties,s.ganttProperties),delete s.ganttProperties,this.copyTaskData(o,s);var l=this.parent.currentViewData.indexOf(o);if(e&&this.parent.chartRowsModule.refreshRow(l),t){var d="ProjectView"===this.parent.viewType?o.ganttProperties.taskId:o.ganttProperties.rowUniqueID;this.parent.treeGrid.grid.setRowData(d,o);this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[l].getAttribute("data-uid")).data=o}}},e.prototype.copyTaskData=function(e,t){i.i(r.isNullOrUndefined)(t)||i.i(r.extend)(e,t)},e.prototype.updateScheduleDatesOnEditing=function(e){},e.prototype.updateChildItems=function(e){var t,n=this.parent.previousRecords[e.uniqueID];t=i.i(r.isNullOrUndefined)(n)||i.i(r.isNullOrUndefined)(n)&&!i.i(r.isNullOrUndefined)(n.ganttProperties)?new Date(e.ganttProperties.startDate.getTime()):new Date(n.ganttProperties.startDate.getTime());var a,o,l,d,p,h=e.ganttProperties.startDate,u=[];if(this.getUpdatableChildRecords(e,u),0!==u.length){t.getTime()>h.getTime()?(a=this.parent.dateValidationModule.checkStartDate(h),o=this.parent.dateValidationModule.checkEndDate(t,e.ganttProperties),d=!1):(a=this.parent.dateValidationModule.checkStartDate(t),o=this.parent.dateValidationModule.checkEndDate(h,e.ganttProperties),d=!0),p=a.getTime()>=o.getTime()?0:this.parent.dateValidationModule.getDuration(a,o,"minute",!0,!1);for(var c=0;c<u.length;c++)if(u[c].ganttProperties.isAutoSchedule)if(p>0){var g=i.i(s.c)(u[c].ganttProperties)?u[c].ganttProperties.startDate:u[c].ganttProperties.startDate?u[c].ganttProperties.startDate:u[c].ganttProperties.endDate?u[c].ganttProperties.endDate:new Date(t.toString());l=d?this.parent.dateValidationModule.getEndDate(this.parent.dateValidationModule.checkStartDate(g,u[c].ganttProperties,u[c].ganttProperties.isMilestone),p,"minute",u[c].ganttProperties,!1):this.parent.dateValidationModule.getStartDate(this.parent.dateValidationModule.checkEndDate(g,u[c].ganttProperties),p,"minute",u[c].ganttProperties),this.calculateDateByRoundOffDuration(u[c],l),this.parent.isOnEdit&&-1===this.validatedChildItems.indexOf(u[c])&&this.validatedChildItems.push(u[c])}else i.i(r.isNullOrUndefined)(n)&&(l=t,this.calculateDateByRoundOffDuration(u[c],l),this.parent.isOnEdit&&-1===this.validatedChildItems.indexOf(u[c])&&this.validatedChildItems.push(u[c]));u.length&&this.parent.dataOperation.updateParentItems(e,!0)}},e.prototype.getUpdatableChildRecords=function(e,t){for(var i=e.childRecords,r=0;r<i.length;r++)i[r].ganttProperties.isAutoSchedule&&(t.push(i[r]),i[r].hasChildRecords&&this.getUpdatableChildRecords(i[r],t))},e.prototype.initiateSaveAction=function(e){var t=this;this.parent.showSpinner();var a={};a.requestType="beforeSave",a.data=e.data,a.cancel=!1,a.modifiedRecords=this.parent.editedRecords,i.i(r.isNullOrUndefined)(e.target)||(a.target=e.target),a.modifiedTaskData=i.i(s.e)(this.parent.editedRecords,!0),e.action&&"DrawConnectorLine"===e.action&&(a.action="DrawConnectorLine"),this.parent.trigger("actionBegin",a,function(r){if(r.cancel)t.reUpdatePreviousRecords(),t.parent.chartRowsModule.refreshRecords([e.data]),t.resetEditProperties(a);else if(r.modifiedTaskData=i.i(s.e)(r.modifiedRecords,null,null,t.parent),i.i(s.f)(t.parent.dataSource)){var o=t.parent.dataSource,l={changedRecords:r.modifiedTaskData},d=t.parent.query instanceof n.Query?t.parent.query:new n.Query,p=null,h=o.adaptor;if(h instanceof n.WebApiAdaptor&&h instanceof n.ODataAdaptor&&!o.dataSource.batchUrl){p=o.update(t.parent.taskFields.id,l.changedRecords,null,d)}else p=o.saveChanges(l,t.parent.taskFields.id,null,d);p.then(function(i){return t.dmSuccess(i,e)}).catch(function(i){return t.dmFailure(i,e)})}else t.saveSuccess(e)})},e.prototype.dmSuccess=function(e,t){this.saveSuccess(t)},e.prototype.dmFailure=function(e,t){if(this.deletedTaskDetails.length){for(var i=this.deletedTaskDetails,r=0;r<i.length;r++)i[r].isDelete=!1;this.deletedTaskDetails=[]}this.reUpdatePreviousRecords(!0,!0),this.resetEditProperties(),this.parent.trigger("actionFailure",{error:e})},e.prototype.updateSharedTask=function(e){for(var t=e.ganttProperties.sharedTaskUniqueIds,n=0;n<t.length;n++){var a=this.parent.flatData[this.parent.ids.indexOf(t[n].toString())];a.uniqueID!==e.uniqueID&&(this.updateGanttProperties(e,a),this.parent.setRecordValue("taskData",e.taskData,a,!0),this.parent.dataOperation.updateTaskData(a),this.parent.dataOperation.updateResourceName(a),i.i(r.isNullOrUndefined)(a.parentItem)||this.parent.dataOperation.updateParentItems(a.parentItem))}},e.prototype.saveSuccess=function(e){var t={};if(this.parent.timelineSettings.updateTimescaleView){var n=this.parent.editedRecords;this.parent.timelineModule.updateTimeLineOnEditing([n],e.action)}if("ResourceView"===this.parent.viewType){"TaskbarEditing"===e.action?this.updateSharedTask(e.data):"DialogEditing"!==e.action&&"CellEditing"!==e.action&&"methodUpdate"!==e.action||(this.parent.editModule.dialogModule.isResourceUpdate?(this.updateResoures(this.parent.editModule.dialogModule.previousResource,e.data.ganttProperties.resourceInfo,e.data),this.updateSharedTask(e.data),this.isTreeGridRefresh=!0):this.updateSharedTask(e.data));for(var a=0;a<this.updateParentRecords.length;a++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[a]);this.updateParentRecords=[],this.parent.editModule.dialogModule.isResourceUpdate=!1,this.parent.editModule.dialogModule.previousResource=[]}if(this.isTreeGridRefresh||(this.parent.chartRowsModule.refreshRecords(this.parent.editedRecords),this.parent.isConnectorLineUpdate&&!i.i(r.isNullOrUndefined)(this.parent.connectorLineEditModule)&&(this.parent.updatedConnectorLineCollection=[],this.parent.connectorLineIds=[],this.parent.connectorLineEditModule.refreshEditedRecordConnectorLine(this.parent.editedRecords),this.updateScheduleDatesOnEditing(e))),!this.parent.editSettings.allowTaskbarEditing||this.parent.editSettings.allowTaskbarEditing&&!this.taskbarEditModule.dependencyCancel){if(t.requestType="save",t.data=e.data,t.modifiedRecords=this.parent.editedRecords,t.modifiedTaskData=i.i(s.e)(this.parent.editedRecords,null,null,this.parent),i.i(r.isNullOrUndefined)(e.action)||i.i(r.setValue)("action",e.action,t),"TaskbarEditing"===e.action&&(t.taskBarEditAction=e.taskBarEditAction),this.endEditAction(e),this.parent.enableCriticalPath){var o=this.parent.criticalPathModule;o.showCriticalPath(!0),o.criticalConnectorLine(o.criticalPathCollection,o.detailPredecessorCollection,!0,o.predecessorCollectionTaskIds)}this.parent.trigger("actionComplete",t)}else this.taskbarEditModule.dependencyCancel=!1,this.resetEditProperties();"ResourceView"===this.parent.viewType&&this.isTreeGridRefresh&&(this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh(),this.isTreeGridRefresh=!1)},e.prototype.updateResoures=function(e,t,i){var r=this.parent.flatData,n=t?t.length:0,a=e?e.length:0;if(0!==n||0!==a){for(var s=0;s<n;s++){var o=[],l=parseInt(t[s][this.parent.resourceFields.id],10).toString();"NaN"===l&&(l=t[s][this.parent.resourceFields.id]);for(var d=0;d<e.length;d++){var p=parseInt(e[d][this.parent.resourceFields.id],10).toString();if("NaN"===p&&(p=e[d][this.parent.resourceFields.id]),p===l){o.push(d);break}}if(0===o.length){var h=r[this.parent.getTaskIds().indexOf("R"+l)];h&&this.addNewRecord(i,h)}else{var u=parseInt(o[0].toString(),10);"NaN"===u.toString()&&(u=o[0].toString()),e.splice(u,1)}}for(var c=e?e.length:0,s=0;s<c;s++)for(var g=i.ganttProperties.taskId,l=e[s][this.parent.resourceFields.id],f=r[this.parent.getTaskIds().indexOf("R"+l)],m=0;m<f.childRecords.length;m++)f.childRecords[m].ganttProperties.taskId===g&&this.removeChildRecord(f.childRecords[m]);if(n>0){var y=this.parent.getParentTask(i.parentItem);y&&y.ganttProperties.taskName===this.parent.localeObj.getConstant("unassignedTask")&&this.removeChildRecord(i)}0===n&&this.checkWithUnassignedTask(i)}},e.prototype.checkWithUnassignedTask=function(e){for(var t=null,n=0;n<this.parent.flatData.length;n++)this.parent.flatData[n].ganttProperties.taskName===this.parent.localeObj.getConstant("unassignedTask")&&(t=this.parent.flatData[n]);if(i.i(r.isNullOrUndefined)(t)){var a={};a[this.parent.taskFields.id]=0,a[this.parent.taskFields.name]=this.parent.localeObj.getConstant("unassignedTask");var s=this.parent.isOnEdit;this.parent.isOnEdit=!1;var o=this.parent.dataOperation.createRecord(a,0);this.parent.isOnEdit=s,this.addRecordAsBottom(o);var l=this.parent.flatData[this.parent.flatData.length-1];this.addNewRecord(e,l)}else this.addNewRecord(e,t)},e.prototype.addRecordAsBottom=function(e){var t=this.parent.flatData.length;this.parent.currentViewData.splice(t+1,0,e),this.parent.flatData.splice(t+1,0,e),this.parent.ids.splice(t+1,0,e.ganttProperties.rowUniqueID.toString());var i=0===e.level?"R"+e.ganttProperties.taskId:"T"+e.ganttProperties.taskId;this.parent.getTaskIds().splice(t+1,0,i),this.updateTreeGridUniqueID(e,"add")},e.prototype.addNewRecord=function(e,t){var n=null;n=i.i(r.extend)({},{},e,!0),this.parent.setRecordValue("uniqueID",i.i(a.getUid)(this.parent.element.id+"_data_"),n),this.parent.setRecordValue("uniqueID",n.uniqueID,n.ganttProperties,!0);var s=n.uniqueID.replace(this.parent.element.id+"_data_","");this.parent.setRecordValue("rowUniqueID",s,n),this.parent.setRecordValue("rowUniqueID",s,n.ganttProperties,!0),this.parent.setRecordValue("level",1,n),this.parent.taskFields.parentID&&this.parent.setRecordValue("parentId",t.ganttProperties.taskId,n.ganttProperties,!0),this.parent.setRecordValue("parentItem",this.parent.dataOperation.getCloneParent(t),n);var o=n.parentItem?n.parentItem.uniqueID:null;this.parent.setRecordValue("parentUniqueID",o,n),e.ganttProperties.sharedTaskUniqueIds.push(s),n.ganttProperties.sharedTaskUniqueIds=e.ganttProperties.sharedTaskUniqueIds,this.addRecordAsChild(t,n)},e.prototype.removeChildRecord=function(e){var t=this.parent,i=[];i=this.parent.dataSource instanceof n.DataManager&&this.parent.dataSource.dataSource.json.length>0?this.parent.dataSource.dataSource.json:this.parent.currentViewData;var r=this.parent.dataSource,a=e,s=this.parent.getParentTask(a.parentItem);if(a){if(a.parentItem){var o=s?s.childRecords:[],l=0;o&&o.length>0&&(1===o.length&&(this.parent.isOnDelete=!0,o[0].isDelete=!0,this.parent.dataOperation.updateParentItems(s),this.parent.isOnDelete=!1,o[0].isDelete=!1),l=o.indexOf(a),s.childRecords.splice(l,1),this.updateParentRecords.push(s))}if(a.ganttProperties.sharedTaskUniqueIds.length){var d=a.ganttProperties.sharedTaskUniqueIds.indexOf(a.ganttProperties.rowUniqueID);a.ganttProperties.sharedTaskUniqueIds.splice(d,1)}if(this.updateTreeGridUniqueID(a,"delete"),!this.parent.taskFields.parentID){var p=[];p.push(a.ganttProperties.rowUniqueID.toString()),this.parent.editModule.removeFromDataSource(p)}var h=this.parent.flatData.indexOf(a);if(t.taskFields.parentID){for(var u=void 0,c=this.parent.currentViewData,g=0;g<c.length;g++)c[g].ganttProperties.rowUniqueID===a.ganttProperties.rowUniqueID&&(u=g);-1!==u&&(r.length>0&&r.splice(u,1),i.splice(u,1),this.parent.flatData.splice(h,1),this.parent.ids.splice(h,1),this.parent.getTaskIds().splice(h,1))}var f=i.indexOf(a);if(!t.taskFields.parentID){var m=this.parent.editModule.getChildCount(a,0);i.splice(f,m+1),this.parent.flatData.splice(h,m+1),this.parent.ids.splice(h,m+1),this.parent.getTaskIds().splice(h,m+1)}a.parentItem&&s&&s.childRecords&&!s.childRecords.length&&(this.parent.setRecordValue("expanded",!1,s),this.parent.setRecordValue("hasChildRecords",!1,s))}},e.prototype.addRecordAsChild=function(e,t){var n,a=this.parent,s=this.parent.flatData.indexOf(e),o=this.parent.editModule.getChildCount(e,0);if(!i.i(r.isNullOrUndefined)(this.addRowIndex)&&this.addRowPosition&&e.childRecords&&"Child"!==this.addRowPosition){var l=e.childRecords[this.addRowIndex],d="Above"===this.addRowPosition||"Below"===this.addRowPosition?this.addRowPosition:"Child";n=l?this.addRowIndex+s+1:o+s+1,n="Above"===d?n:n+1}else n=i.i(r.isNullOrUndefined)(o)||0===o?s+1:o+s+1;this.parent.currentViewData.splice(n,0,t),this.parent.flatData.splice(n,0,t),this.parent.ids.splice(n,0,t.ganttProperties.rowUniqueID.toString()),this.updateTreeGridUniqueID(t,"add");var p=0===t.level?"R"+t.ganttProperties.taskId:"T"+t.ganttProperties.taskId;this.parent.getTaskIds().splice(n,0,p),e.hasChildRecords||(this.parent.setRecordValue("hasChildRecords",!0,e),this.parent.setRecordValue("expanded",!0,e),e.childRecords.length||(e.childRecords=[],!a.taskFields.parentID&&i.i(r.isNullOrUndefined)(e.taskData[this.parent.taskFields.child])&&(e.taskData[this.parent.taskFields.child]=[]))),e.childRecords.splice(e.childRecords.length,0,t),i.i(r.isNullOrUndefined)(t)||this.parent.taskFields.parentID||i.i(r.isNullOrUndefined)(e.taskData[this.parent.taskFields.child])||e.taskData[this.parent.taskFields.child].splice(e.childRecords.length,0,t.taskData),i.i(r.isNullOrUndefined)(t.parentItem)||this.updateParentRecords.push(e)},e.prototype.resetEditProperties=function(e){this.parent.currentEditedArgs={},this.resetValidateArgs(),this.parent.editedTaskBarItem=null,this.parent.isOnEdit=!1,this.validatedChildItems=[],this.parent.isConnectorLineUpdate=!1,this.parent.editedTaskBarItem=null,this.taskbarMoved=!1,this.predecessorUpdated=!1,i.i(r.isNullOrUndefined)(this.dialogModule)||!i.i(r.isNullOrUndefined)(e)&&(i.i(r.isNullOrUndefined)(e)||"beforeSave"!==e.requestType||e.cancel)||(this.dialogModule.dialog&&!this.dialogModule.dialogObj.isDestroyed&&this.dialogModule.dialogObj.hide(),this.dialogModule.dialogClose()),this.parent.hideSpinner(),this.parent.initiateEditAction(!1)},e.prototype.endEditAction=function(e){this.resetEditProperties(),"TaskbarEditing"===e.action?this.parent.trigger("taskbarEdited",e):"CellEditing"===e.action?this.parent.trigger("endEdit",e):"DialogEditing"===e.action&&(this.dialogModule.dialog&&!this.dialogModule.dialogObj.isDestroyed&&this.dialogModule.dialogObj.hide(),this.dialogModule.dialogClose())},e.prototype.saveFailed=function(e){this.reUpdatePreviousRecords(),this.parent.hideSpinner()},e.prototype.renderDeleteConfirmDialog=function(){var e=new p.Dialog({width:"320px",isModal:!0,visible:!1,content:this.parent.localeObj.getConstant("confirmDelete"),buttons:[{click:this.confirmDeleteOkButton.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("okText"),isPrimary:!0}},{click:this.closeConfirmDialog.bind(this),buttonModel:{content:this.parent.localeObj.getConstant("cancel")}}],target:this.parent.element,animationSettings:{effect:"None"}});e.appendTo("#"+this.parent.element.id+"_deleteConfirmDialog"),this.confirmDialog=e},e.prototype.closeConfirmDialog=function(){this.confirmDialog.hide()},e.prototype.confirmDeleteOkButton=function(){this.deleteSelectedItems(),this.confirmDialog.hide(),this.parent.element.querySelector(".e-treegrid").focus()},e.prototype.startDeleteAction=function(){if(this.parent.editSettings.allowDeleting&&!this.parent.readOnly)if(this.parent.editSettings.showDeleteConfirmDialog)this.confirmDialog.show();else{this.deleteSelectedItems();var e=this.parent.element.querySelector(".e-treegrid");e.focus()}},e.prototype.deleteResourceRecords=function(e){for(var t=[],i=this,r=0;r<e.length;r++)!function(r){if(e[r].parentItem){for(var n=e[r],a=n.ganttProperties.sharedTaskUniqueIds,s=0;s<a.length;s++)t.push(i.parent.flatData[i.parent.ids.indexOf(a[s].toString())]);t.push(i.parent.flatData[i.parent.ids.indexOf(n.ganttProperties.rowUniqueID)])}else{var o=i.parent.flatData.filter(function(t){return parseInt(t.ganttProperties.taskId)==parseInt(e[r].ganttProperties.taskId)&&t.hasChildRecords})[0];t.push(o)}}(r);this.deleteRow(t)},e.prototype.deleteSelectedItems=function(){if(this.isFromDeleteMethod)this.targetedRecords.length&&("ResourceView"===this.parent.viewType?this.deleteResourceRecords(this.targetedRecords):this.deleteRow(this.targetedRecords)),this.isFromDeleteMethod=!1;else{var e=[];"Cell"!==this.parent.selectionSettings.mode?e=this.parent.selectionModule.getSelectedRecords():"Cell"===this.parent.selectionSettings.mode&&(e=this.parent.selectionModule.getCellSelectedRecords()),"ResourceView"===this.parent.viewType?this.deleteResourceRecords(e):this.deleteRow(e)}},e.prototype.deleteRecord=function(e){this.isFromDeleteMethod=!0;var t=typeof e;switch(this.targetedRecords=[],t){case"number":case"string":var n=e.toString();"ResourceView"===this.parent.viewType?i.i(r.isNullOrUndefined)(n)||-1===this.parent.getTaskIds().indexOf("T"+n)||this.targetedRecords.push(this.parent.flatData[this.parent.getTaskIds().indexOf("T"+n)]):i.i(r.isNullOrUndefined)(n)||-1===this.parent.ids.indexOf(n)||this.targetedRecords.push(this.parent.getRecordByID(n));break;case"object":Array.isArray(e)?this.updateTargetedRecords(e):this.targetedRecords.push(e.valueOf())}this.startDeleteAction()},e.prototype.updateTargetedRecords=function(e){if(e.length){if("object"===typeof e[0])this.targetedRecords=e;else for(var t=0;t<e.length;t++){var n=e[t].toString();"ResourceView"===this.parent.viewType?i.i(r.isNullOrUndefined)(n)||-1===this.parent.getTaskIds().indexOf("T"+n)||this.targetedRecords.push(this.parent.flatData[this.parent.getTaskIds().indexOf("T"+n)]):i.i(r.isNullOrUndefined)(n)||-1===this.parent.ids.indexOf(n)||this.targetedRecords.push(this.parent.getRecordByID(n))}}},e.prototype.deleteRow=function(e){var t=e&&e.length?e:this.parent.selectionModule.getSelectedRecords();if(this.parent.addDeleteRecord=!0,t.length){this.parent.isOnDelete=!0,t.forEach(function(e){e.isDelete=!0}),"ResourceView"!==this.parent.viewType||e.length||(t=[]);for(var n=0;n<t.length;n++){var a=t[n];if(-1===this.deletedTaskDetails.indexOf(a)){if(a.parentItem){var s=this.parent.getParentTask(a.parentItem).childRecords;(1===s.length?s:s.filter(function(e){return!e.isDelete})).length>0&&this.parent.dataOperation.updateParentItems(a.parentItem)}var o=a.ganttProperties.predecessor;o&&o.length&&this.removePredecessorOnDelete(a),this.deletedTaskDetails.push(a),a.hasChildRecords&&this.deleteChildRecords(a)}}this.parent.selectionModule&&this.parent.allowSelection&&this.parent.selectionModule.clearSelection();var l={};l.deletedRecordCollection=this.deletedTaskDetails,l.updatedRecordCollection=this.parent.editedRecords,l.cancel=!1,l.action="delete",this.initiateDeleteAction(l),this.parent.isOnDelete=!1}i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.removePredecessorOnDelete=function(e){for(var t=e.ganttProperties.predecessor,n=0;n<t.length;n++){var a=t[n],s="ResourceView"===this.parent.viewType?e.ganttProperties.taskId:e.ganttProperties.rowUniqueID;if(a.from.toString()===s.toString()){var o=this.parent.connectorLineModule.getRecordByID(a.to.toString());if(!i.i(r.isNullOrUndefined)(o)){for(var l=i.i(r.extend)([],[],o.ganttProperties.predecessor,!0),d=void 0,p=0;p<l.length;p++){var h="ResourceView"===this.parent.viewType?o.ganttProperties.taskId:o.ganttProperties.rowUniqueID;if(l[p].to.toString()===h.toString()&&l[p].from.toString()===s.toString()){d=p;break}}l.splice(d,1),this.updatePredecessorValues(o,l)}}else if(a.to.toString()===s.toString()){var u=this.parent.connectorLineModule.getRecordByID(a.from.toString());if(!i.i(r.isNullOrUndefined)(u)){for(var c=i.i(r.extend)([],[],u.ganttProperties.predecessor,!0),d=void 0,p=0;p<c.length;p++){var g="ResourceView"===this.parent.viewType?u.ganttProperties.taskId:u.ganttProperties.rowUniqueID;if(c[p].from.toString()===g.toString()&&c[p].to.toString()===s.toString()){d=p;break}}c.splice(d,1),this.updatePredecessorValues(u,c)}}}},e.prototype.updatePredecessorValues=function(e,t){this.parent.setRecordValue("predecessor",t,e.ganttProperties,!0);var i=this.parent.predecessorModule.getPredecessorStringValue(e);this.parent.setRecordValue("predecessorsName",i,e.ganttProperties,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.dependency,i,e),this.parent.setRecordValue(this.parent.taskFields.dependency,i,e)},e.prototype.updateTaskId=function(e,t){if(!this.parent.readOnly){var n="number"==typeof e?e.toString():e,a="number"==typeof t?t.toString():t,s=this.parent.ids;if(!i.i(r.isNullOrUndefined)(n)&&!i.i(r.isNullOrUndefined)(a)){var o=s.indexOf(n),l=s.indexOf(a);if(-1===o||l>-1)return;var d=this.parent.flatData[o];if(d.ganttProperties.taskId=d.ganttProperties.rowUniqueID=a,d.taskData[this.parent.taskFields.id]=a,d[this.parent.taskFields.id]=a,s[o]=a,d.hasChildRecords&&this.parent.taskFields.parentID)for(var p=d.childRecords,h=0;h<p.length;h++){var u=p[h];u[this.parent.taskFields.parentID]=t,this.parent.chartRowsModule.refreshRecords([u])}if(this.parent.taskFields.dependency&&!i.i(r.isNullOrUndefined)(d.ganttProperties.predecessor))for(var c=d.ganttProperties.predecessor,g=void 0,f=0;f<c.length;f++){var m=c[f];m.to===n?g=this.parent.flatData[s.indexOf(m.from)]:m.from===n&&(g=this.parent.flatData[s.indexOf(m.to)]),this.updatePredecessorOnUpdateId(g,n,a)}this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh()}}},e.prototype.updatePredecessorOnUpdateId=function(e,t,i){if(this.parent.flatData.indexOf(e)>-1)for(var r=e.ganttProperties.predecessor,n=0;n<r.length;n++){var a=r[n];a.to===t?a.to=i:a.from===t&&(a.from=i)}this.updatePredecessorValues(e,e.ganttProperties.predecessor)},e.prototype.deleteChildRecords=function(e){for(var t=e.childRecords,i=0;i<t.length;i++){var r=t[i];if(-1===this.deletedTaskDetails.indexOf(r)){var n=r.ganttProperties.predecessor;n&&n.length&&this.removePredecessorOnDelete(r),this.deletedTaskDetails.push(r),r.hasChildRecords&&this.deleteChildRecords(r)}}},e.prototype.removeFromDataSource=function(e){var t;t=this.parent.dataSource instanceof n.DataManager?this.parent.dataSource.dataSource.json:this.parent.dataSource,this.removeData(t,e),this.isBreakLoop=!1},e.prototype.removeData=function(e,t){for(var n=0;n<e.length&&!this.isBreakLoop;n++)if(-1!==t.indexOf(i.i(r.getValue)(this.parent.taskFields.id,e[n]).toString())){if(e[n][this.parent.taskFields.child]){var a=e[n][this.parent.taskFields.child];this.removeData(a,t)}if(t.splice(t.indexOf(i.i(r.getValue)(this.parent.taskFields.id,e[n]).toString()),1),e.splice(n,1),0===t.length){this.isBreakLoop=!0;break}}else if(e[n][this.parent.taskFields.child]){var a=e[n][this.parent.taskFields.child];this.removeData(a,t)}},e.prototype.initiateDeleteAction=function(e){var t=this;this.parent.showSpinner();var r={};r.requestType="beforeDelete",r.data=e.deletedRecordCollection,r.modifiedRecords=e.updatedRecordCollection,r.modifiedTaskData=i.i(s.e)(e.updatedRecordCollection,null,null,this.parent),this.parent.trigger("actionBegin",r,function(r){if(r.cancel){for(var a=t.deletedTaskDetails,o=0;o<a.length;o++)a[o].isDelete=!1;t.deletedTaskDetails=[],t.reUpdatePreviousRecords(),t.parent.initiateEditAction(!1),t.parent.hideSpinner()}else if(i.i(s.f)(t.parent.dataSource)){var l=t.parent.dataSource;t.parent.timezone&&i.i(s.g)(r.modifiedTaskData,t.parent);var d={deletedRecords:i.i(s.e)(r.data,null,null,t.parent),changedRecords:r.modifiedTaskData},p=l.adaptor,h=t.parent.query instanceof n.Query?t.parent.query:new n.Query;if(p instanceof n.WebApiAdaptor&&p instanceof n.ODataAdaptor&&!l.dataSource.batchUrl){for(var u=null,c=0;c<d.deletedRecords.length;c++)u=l.remove(t.parent.taskFields.id,d.deletedRecords[c],null,h);u.then(function(){l.update(t.parent.taskFields.id,d.changedRecords,null,h).then(function(){return t.deleteSuccess(e)}).catch(function(i){return t.dmFailure(i,e)})}).catch(function(i){return t.dmFailure(i,e)})}else{var g=l.saveChanges(d,t.parent.taskFields.id,null,h);g.then(function(){return t.deleteSuccess(e)}).catch(function(i){return t.dmFailure(i,e)})}}else t.deleteSuccess(e)})},e.prototype.deleteSuccess=function(e){var t=this.parent.flatData,n=this.parent.currentViewData,a=this.parent.getRecordFromFlatdata(e.deletedRecordCollection),o=[];a.length>0&&(this.parent.selectedRowIndex=a[a.length-1].index);for(var l=0;l<a.length;l++){var d=a[l],p=n.indexOf(d),h=t.indexOf(d),u=this.parent.treeGrid.parentData.indexOf(d),c=i.i(r.getValue)("dataOperation.dataArray",this.parent),g=c.indexOf(d.taskData),f=void 0;if(-1!==p&&n.splice(p,1),-1!==h&&t.splice(h,1),-1!==g&&c.splice(g,1),!i.i(r.isNullOrUndefined)(d)){if(o.push(d.ganttProperties.taskId.toString()),-1!==h&&(this.parent.ids.splice(h,1),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(h,1)),0===d.level&&-1!==u&&this.parent.treeGrid.parentData.splice(u,1),d.parentItem){var m=this.parent.getParentTask(d.parentItem);if(m){var y=m.childRecords;f=y.indexOf(d),-1!==f&&y.splice(f,1),y.length||this.parent.setRecordValue("hasChildRecords",!1,m)}}this.updateTreeGridUniqueID(d,"delete")}}o.length>0&&this.removeFromDataSource(o);var v={};if(this.parent.updatedConnectorLineCollection=[],this.parent.connectorLineIds=[],this.parent.predecessorModule.createConnectorLinesCollection(this.parent.flatData),this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh(),this.parent.enableImmutableMode&&this.refreshRecordInImmutableMode(),v.requestType="delete",v.data=e.deletedRecordCollection,v.modifiedRecords=e.updatedRecordCollection,v.modifiedTaskData=i.i(s.e)(e.updatedRecordCollection,null,null,this.parent),i.i(r.setValue)("action",e.action,v),this.parent.isOnDelete=!1,"ResourceView"===this.parent.viewType)for(var D=v.data.filter(function(e){return!e.hasChildRecords}),l=0;l<D.length;l++)this.checkWithUnassignedTask(D[l]);this.parent.trigger("actionComplete",v),this.deletedTaskDetails=[],this.parent.initiateEditAction(!1),this.parent.hideSpinner()},e.prototype.getNewTaskId=function(){var e="ResourceView"===this.parent.viewType?this.parent.getTaskIds():this.parent.ids,t=e.length,i=t+1;if("ResourceView"===this.parent.viewType){if((-1!==e.indexOf("T"+i)||-1!==e.indexOf("R"+i))&&(i+=1,-1!==e.indexOf("T"+i)||-1!==e.indexOf("R"+i)))do{i+=1}while(-1!==e.indexOf("T"+i)||-1!==e.indexOf("R"+i))}else if(-1!=e.indexOf(i.toString())&&(i+=1,-1!=e.indexOf(i.toString())))do{i+=1}while(-1!=e.indexOf(i.toString()));return"stringedit"===this.parent.columnByField[this.parent.taskFields.id].editType?i=i.toString():i},e.prototype.prepareNewlyAddedData=function(e,t){var n,a,s=this.parent.taskFields,o=this.parent.ids;if(e[s.id]&&(-1!==o.indexOf(e[s.id].toString())?e[s.id]=null:(a="string"==typeof e[s.id]?e[s.id]:parseInt(e[s.id],10),e[s.id]=i.i(r.isNullOrUndefined)(a)?null:a)),e[s.id]||(n=this.getNewTaskId(),e[s.id]=n),this.parent.allowUnscheduledTasks||e[s.startDate]||(e[s.startDate]=this.parent.projectStartDate),!this.parent.allowUnscheduledTasks&&s.duration&&i.i(r.isNullOrUndefined)(e[s.duration])&&(e[s.endDate]||(e[s.duration]="5")),s.progress&&(e[s.progress]=e[s.progress]?e[s.progress]>100?100:e[s.progress]:0),!this.parent.allowUnscheduledTasks&&!e[s.endDate]&&s.endDate&&!e[s.duration]){var l=this.parent.dataOperation.getDateFromFormat(this.parent.projectStartDate);l.setDate(l.getDate()+4),e[s.endDate]=this.parent.getFormatedDate(l,this.parent.getDateFormat())}},e.prototype.updateNewlyAddedDataBeforeAjax=function(e,t,n,a){var s=this.parent.dataOperation.createRecord(e,t);if(s.index=parseInt(s.ganttProperties.rowUniqueID.toString(),10)-1,!i.i(r.isNullOrUndefined)(a)){this.parent.setRecordValue("parentItem",this.parent.dataOperation.getCloneParent(a),s);var o=s.parentItem?s.parentItem.index:null;this.parent.setRecordValue("parentIndex",o,s);var l=s.parentItem?s.parentItem.uniqueID:null;this.parent.setRecordValue("parentUniqueID",l,s),i.i(r.isNullOrUndefined)(this.parent.taskFields.id)||i.i(r.isNullOrUndefined)(this.parent.taskFields.parentID)||!s.parentItem||("ProjectView"===this.parent.viewType&&this.parent.setRecordValue(this.parent.taskFields.parentID,s.parentItem.taskId,s.taskData,!0),this.parent.setRecordValue("parentId",s.parentItem.taskId,s.ganttProperties,!0),this.parent.setRecordValue(this.parent.taskFields.parentID,s.parentItem.taskId,s,!0))}return this.parent.isOnEdit=!0,this.backUpAndPushNewlyAddedRecord(s,n,a),this.parent.taskFields.dependency&&s.ganttProperties.predecessorsName&&(this.parent.predecessorModule.ensurePredecessorCollectionHelper(s,s.ganttProperties),this.parent.predecessorModule.updatePredecessorHelper(s),this.parent.predecessorModule.validatePredecessorDates(s)),s.parentItem&&this.parent.getParentTask(s.parentItem).ganttProperties.isAutoSchedule&&this.parent.dataOperation.updateParentItems(s.parentItem),this.parent.isOnEdit=!1,s},e.prototype.getChildCount=function(e,t){var i;if(!e.hasChildRecords)return 0;for(var r=0;r<e.childRecords.length;r++)i=e.childRecords[r],t++,i.hasChildRecords&&(t=this.getChildCount(i,t));return t},e.prototype.getVisibleChildRecordCount=function(e,t,i){var r,n;if(e.hasChildRecords){r=e.childRecords,n=r.length;for(var a=0;a<n;a++)-1!==i.indexOf(r[a])&&t++,r[a].hasChildRecords&&(t=this.getVisibleChildRecordCount(r[a],t,i))}else-1!==i.indexOf(e)&&t++;return t},e.prototype.updatePredecessorOnIndentOutdent=function(e){for(var t,n,a=e.ganttProperties.predecessor.length,o=e.ganttProperties,l=o.predecessor,d=[],p=0;p<a;p++)if(l[p].to===o.rowUniqueID.toString()){t=this.parent.getRecordByID(l[p].from),n=i.i(s.h)(l[p],"from",t.ganttProperties.predecessor,"to");var h=i.i(r.extend)([],t.ganttProperties.predecessor,[],!0);h.splice(n,1),this.parent.setRecordValue("predecessor",h,t.ganttProperties,!0)}else if(l[p].from===o.rowUniqueID.toString()){t=this.parent.getRecordByID(l[p].to);var u=t.ganttProperties.predecessorsName.toString().split(","),c=l[p].from+l[p].type,g=u.indexOf(c);u.splice(g,1),this.parent.setRecordValue("predecessorsName",u.join(","),t.ganttProperties,!0),this.parent.setRecordValue(this.parent.taskFields.dependency,u.join(","),t),n=i.i(s.h)(l[p],"from",t.ganttProperties.predecessor,"to");var f=i.i(r.extend)([],t.ganttProperties.predecessor,[],!0);f.splice(n,1),this.parent.setRecordValue("predecessor",f,t.ganttProperties,!0),this.parent.predecessorModule.validatePredecessorDates(t)}this.parent.setRecordValue("predecessor",d,e.ganttProperties,!0),this.parent.setRecordValue("predecessorsName","",e.ganttProperties,!0)},e.prototype.predecessorToString=function(e,t){var i=[],r=0,n=e.length;for(r;r<n;r++)if(t.ganttProperties.rowUniqueID.toString()!==e[r].from){var a=e[r].from+e[r].type;e[r].offset=isNaN(e[r].offset)?0:e[r].offset,0!==e[r].offset&&(e[r].offset<0?a+=e[r].offset.toString()+"d":e[r].offset>0&&(a+="+"+e[r].offset.toString()+"d")),i.push(a)}return i.join(",")},e.prototype.backUpAndPushNewlyAddedRecord=function(e,t,n){var a,s,o,l=this.parent.flatData,d=this.parent.currentViewData,p=this.parent.ids;switch(t){case"Top":l.splice(0,0,e),d.splice(0,0,e),p.splice(0,0,e.ganttProperties.rowUniqueID.toString());break;case"Bottom":if(l.push(e),d.push(e),p.push(e.ganttProperties.rowUniqueID.toString()),"ResourceView"===this.parent.viewType){var h=0===e.level?"R"+e.ganttProperties.taskId:"T"+e.ganttProperties.taskId;this.parent.getTaskIds().push(h)}break;case"Above":s=l.indexOf(this.addRowSelectedItem),o=d.indexOf(this.addRowSelectedItem),this.recordCollectionUpdate(void 0,s,o,e,n,t);break;case"Below":if(a=l.indexOf(this.addRowSelectedItem),this.addRowSelectedItem.hasChildRecords){var u=this.getChildCount(this.addRowSelectedItem,0);s=a+u+1,o=d.indexOf(this.addRowSelectedItem)+this.getVisibleChildRecordCount(this.addRowSelectedItem,0,d)+1}else s=a+1,o=d.indexOf(this.addRowSelectedItem)+1;this.recordCollectionUpdate(NaN,s,o,e,n,t);break;case"Child":if(a=l.indexOf(this.addRowSelectedItem),this.addRowSelectedItem.hasChildRecords){var u=this.getChildCount(this.addRowSelectedItem,0);s=a+u+1,this.addRowSelectedItem.expanded||this.parent.enableMultiTaskbar||this.parent.expandByID(this.addRowSelectedItem.ganttProperties.rowUniqueID),o=d.indexOf(this.addRowSelectedItem)+this.getVisibleChildRecordCount(this.addRowSelectedItem,0,d)+1}else this.parent.setRecordValue("hasChildRecords",!0,this.addRowSelectedItem),this.parent.setRecordValue("isMilestone",!1,this.addRowSelectedItem.ganttProperties,!0),this.parent.setRecordValue("expanded",!0,this.addRowSelectedItem),this.parent.setRecordValue("childRecords",[],this.addRowSelectedItem),s=a+1,o=d.indexOf(this.addRowSelectedItem)+1,this.addRowSelectedItem.ganttProperties.predecessor&&this.updatePredecessorOnIndentOutdent(this.addRowSelectedItem),i.i(r.isNullOrUndefined)(this.addRowSelectedItem.ganttProperties.segments)||(this.addRowSelectedItem.ganttProperties.segments=null);this.recordCollectionUpdate(NaN,s,o,e,n,t)}this.newlyAddedRecordBackup=e},e.prototype.recordCollectionUpdate=function(e,t,a,s,o,l){var d=this.parent.flatData,p=this.parent.currentViewData,h=this.parent.ids;if(d.splice(t,0,s),p.splice(a,0,s),"ResourceView"===this.parent.viewType&&"number"==typeof s.ganttProperties.taskId){var u=s.ganttProperties.taskId;h.push(u.toString())}if(h.splice(t,0,s.ganttProperties.rowUniqueID.toString()),"ResourceView"===this.parent.viewType){var c=0===s.level?"R"+s.ganttProperties.taskId:"T"+s.ganttProperties.taskId;this.parent.getTaskIds().splice(t,0,c)}if(!i.i(r.isNullOrUndefined)(o)&&(e="Above"==l?o.childRecords.indexOf(this.addRowSelectedItem):"Below"==l?o.childRecords.indexOf(this.addRowSelectedItem)+1:o.childRecords.length,o.childRecords.splice(e,0,s),this.parent.taskFields.child||(this.parent.taskFields.child="Children"),this.parent.dataSource instanceof n.DataManager&&i.i(r.isNullOrUndefined)(o.taskData[this.parent.taskFields.parentID])||!i.i(r.isNullOrUndefined)(this.parent.dataSource))){var g=this.parent.taskFields.child;o.taskData[g]&&o.taskData[g].length>0?"Above"===l||"Below"===l?o.taskData[g].splice(e,0,s.taskData):o.taskData[g].push(s.taskData):(o.taskData[g]=[],o.taskData[g].push(s.taskData))}},e.prototype.constructTaskAddedEventArgs=function(e,t,r){var n={};if(n.action=n.requestType=r,e.length>1){n.data=[],n.newTaskData=[],n.recordIndex=[];for(var a=0;a<e.length;a++)n.data[a]=e[a],n.newTaskData[a]=i.i(s.e)([e[a]],n.data[a],n,this.parent),n.recordIndex[a]=e[a].index}else if(1===e.length)for(var a=0;a<e.length;a++)n.data=e[a],n.newTaskData=i.i(s.e)([e[a]],n.data,n,this.parent),n.recordIndex=e[a].index;return n.modifiedRecords=t,n.modifiedTaskData=i.i(s.e)(t,null,null,this.parent),n},e.prototype.addSuccess=function(e){this.parent.treeGrid.parentData=[],this.parent.addDeleteRecord=!0,this.parent.selectedRowIndex=0,this.parent.treeGrid.refresh(),this.parent.enableImmutableMode&&(this.parent.modifiedRecords=e.modifiedRecords,this.parent.modifiedRecords.push(e.data),this.refreshRecordInImmutableMode())},e.prototype.refreshRecordInImmutableMode=function(e,t){if(!t&&!i.i(r.isNullOrUndefined)(e))for(var n=e[0].index+1;n<this.parent.currentViewData.length&&e[0].level<this.parent.currentViewData[n].level;n++)this.parent.modifiedRecords.push(this.parent.currentViewData[n]);for(var a,s=this,n=0;n<this.parent.modifiedRecords.length;n++)!function(e){var t=s.parent.modifiedRecords[e],i=s.parent.allowRowDragAndDrop?1:0,r=s.parent.taskFields.id;a=s.parent.currentViewData.findIndex(function(e){return e[r]==t[r]}),s.parent.treeGrid.getRows()[a]&&(s.parent.treeGrid.renderModule.cellRender({data:t,cell:s.parent.treeGrid.getRows()[a].cells[s.parent.treeColumnIndex+i],column:s.parent.treeGrid.grid.getColumns()[s.parent.treeColumnIndex],requestType:"rowDragAndDrop"}),s.parent.treeGrid.renderModule.RowModifier({data:t,row:s.parent.treeGrid.getRows()[a],rowHeight:s.parent.rowHeight}))}(n)},e.prototype.updateRealDataSource=function(e,t){var a=this.parent.taskFields,o=i.i(s.i)(this.parent)?i.i(r.getValue)("result",this.parent.dataSource):this.parent.dataSource;this.parent.dataSource instanceof n.DataManager&&(o=this.parent.dataSource.dataSource.json);for(var l=0;l<e.length;l++)(i.i(r.isNullOrUndefined)(t)||i.i(r.isNullOrUndefined)(this.addRowSelectedItem))&&(t="Bottom"===t?"Bottom":"Top"),"Top"===t?o.splice(0,0,e[l].taskData):"Bottom"===t?o.push(e[l].taskData):i.i(r.isNullOrUndefined)(a.id)||i.i(r.isNullOrUndefined)(a.parentID)?i.i(r.isNullOrUndefined)(e[l].parentItem)&&this.addDataInRealDataSource(o,e[l].taskData,t):o.push(e[l].taskData),this.isBreakLoop=!1},e.prototype.addDataInRealDataSource=function(e,t,n){for(var a=0;a<e.length;a++){var s=this.parent.taskFields.child;if(this.isBreakLoop)break;if(i.i(r.getValue)(this.parent.taskFields.id,e[a]).toString()===this.addRowSelectedItem.ganttProperties.rowUniqueID.toString()){"Above"===n?e.splice(a,0,t):"Below"===n?e.splice(a+1,0,t):"Child"===n&&(e[a][s]&&e[a][s].length>0?e[a][s].push(t):(e[a][s]=[],e[a][s].push(t))),this.isBreakLoop=!0;break}if(e[a][s]){var o=e[a][s];this.addDataInRealDataSource(o,t,n)}}},e.prototype.addRecord=function(e,t,a){var o=this,l=this.parent.taskFields.id;if(this.parent.editModule&&this.parent.editSettings.allowAdding){this.parent.isDynamicData=!0;var d=[];if(i.i(r.isNullOrUndefined)(e))this.validateTaskPosition(e,t,a,d);else if(e instanceof Array)for(var p=0;p<e.length;p++)this.validateTaskPosition(e[p],t,a,d);else{if("object"!=typeof e)return;this.validateTaskPosition(e,t,a,d)}var h={};h=this.constructTaskAddedEventArgs(d,this.parent.editedRecords,"beforeAdd"),this.parent.showSpinner(),this.parent.trigger("actionBegin",h,function(e){if(i.i(r.isNullOrUndefined)(e.data[l])||e.data[l]!=e.data.ganttProperties.taskId&&(e.data.ganttProperties.taskId=e.data[l],e.newTaskData[l]=e.data[l]),e.cancel)e=e,o.removeAddedRecord(),o.reUpdatePreviousRecords(),o._resetProperties();else if(i.i(s.f)(o.parent.dataSource)){var a=o.parent.dataSource,p={addedRecords:[e.newTaskData],changedRecords:e.modifiedTaskData},h=e.data.ganttProperties.taskId.toString(),u=o.parent.query instanceof n.Query?o.parent.query:new n.Query,c=a.adaptor;if(c instanceof n.WebApiAdaptor&&c instanceof n.ODataAdaptor&&!a.dataSource.batchUrl){var g=a.insert(p.addedRecords,null,u);g.then(function(t){var n;n=i.i(r.isNullOrUndefined)(t[0])?p.addedRecords[0]:t[0],a.update(o.parent.taskFields.id,p.changedRecords,null,u).then(function(){if(o.parent.taskFields.id&&!i.i(r.isNullOrUndefined)(n[o.parent.taskFields.id])&&n[o.parent.taskFields.id].toString()!==h){o.parent.setRecordValue("taskId",n[o.parent.taskFields.id],e.data.ganttProperties,!0),o.parent.setRecordValue("taskData."+o.parent.taskFields.id,n[o.parent.taskFields.id],e.data),o.parent.setRecordValue(o.parent.taskFields.id,n[o.parent.taskFields.id],e.data),o.parent.setRecordValue("rowUniqueID",n[o.parent.taskFields.id].toString(),e.data.ganttProperties,!0);var t=o.parent.ids.indexOf(h);-1!==t&&(o.parent.ids[t]=n[o.parent.taskFields.id].toString())}o.updateNewRecord(d,e)}).catch(function(t){o.removeAddedRecord(),o.dmFailure(t,e),o._resetProperties()})}).catch(function(t){o.removeAddedRecord(),o.dmFailure(t,e),o._resetProperties()})}else{var f=a.saveChanges(p,o.parent.taskFields.id,null,u);f.then(function(t){if(o.parent.taskFields.id&&!i.i(r.isNullOrUndefined)(t.addedRecords[0][o.parent.taskFields.id])&&t.addedRecords[0][o.parent.taskFields.id].toString()!==h){o.parent.setRecordValue("taskId",t.addedRecords[0][o.parent.taskFields.id],e.data.ganttProperties,!0),o.parent.setRecordValue("taskData."+o.parent.taskFields.id,t.addedRecords[0][o.parent.taskFields.id],e.data),o.parent.setRecordValue(o.parent.taskFields.id,t.addedRecords[0][o.parent.taskFields.id],e.data),o.parent.setRecordValue("rowUniqueID",t.addedRecords[0][o.parent.taskFields.id].toString(),e.data.ganttProperties,!0);var n=o.parent.ids.indexOf(h);-1!==n&&(o.parent.ids[n]=t.addedRecords[0][o.parent.taskFields.id].toString())}o.updateNewRecord(d,e)}).catch(function(t){o.removeAddedRecord(),o.dmFailure(t,e),o._resetProperties()})}}else{if("ProjectView"===o.parent.viewType){if("Top"===t||"Bottom"===t||"Above"===t||"Below"===t||"Child"===t||i.i(r.isNullOrUndefined)(t)&&!e.data.parentItem)if(e.data instanceof Array)o.updateRealDataSource(e.data,t);else{var m=[];m.push(e.data),o.updateRealDataSource(m,t)}}else{var y=i.i(s.i)(o.parent)?i.i(r.getValue)("result",o.parent.dataSource):o.parent.dataSource;y.push(e.data.taskData)}0===d.level&&o.parent.treeGrid.parentData.splice(0,0,d),o.updateTreeGridUniqueID(d,"add"),o.refreshNewlyAddedRecord(e,d),o._resetProperties()}})}},e.prototype.createNewRecord=function(){for(var e={},t=this.parent.ganttColumns,n=this.parent.taskFields,a=this.parent.editModule.getNewTaskId(),s=0;s<t.length;s++){var o=t[s].field;o===n.id?e[o]=a:t[s].field===n.startDate?(i.i(r.isNullOrUndefined)(e[n.endDate])?e[o]=this.parent.editModule.dialogModule.getMinimumStartDate():e[o]=new Date(e[n.endDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone))):t[s].field===n.endDate?(i.i(r.isNullOrUndefined)(e[n.startDate])?e[o]=this.parent.editModule.dialogModule.getMinimumStartDate():e[o]=new Date(e[n.startDate]),this.parent.timezone&&(e[o]=this.parent.dateValidationModule.remove(e[o],this.parent.timezone))):t[s].field===n.duration?e[o]=1:t[s].field===n.name?e[o]=this.parent.editModule.dialogModule.localeObj.getConstant("addDialogTitle")+" "+a:t[s].field===n.progress?e[o]=0:t[s].field===n.work?e[o]=0:"taskType"===t[s].field?e[o]=this.parent.taskType:e[this.parent.ganttColumns[s].field]=""}return e},e.prototype.validateTaskPosition=function(e,t,n,a){var s=i.i(r.isNullOrUndefined)(n)||isNaN(parseInt(n.toString(),10))?this.parent.selectionModule?"Row"!==this.parent.selectionSettings.mode&&"Both"!==this.parent.selectionSettings.mode||1!==this.parent.selectionModule.selectedRowIndexes.length?"Cell"===this.parent.selectionSettings.mode&&1===this.parent.selectionModule.getSelectedRowCellIndexes().length?this.parent.selectionModule.getSelectedRowCellIndexes()[0].rowIndex:null:this.parent.selectionModule.selectedRowIndexes[0]:null:n;this.addRowSelectedItem=i.i(r.isNullOrUndefined)(s)?null:this.parent.updatedRecords[s],t=i.i(r.isNullOrUndefined)(t)?this.parent.editSettings.newRowPosition:t,e=i.i(r.isNullOrUndefined)(e)?this.createNewRecord():e,((i.i(r.isNullOrUndefined)(s)||s<0||i.i(r.isNullOrUndefined)(this.addRowSelectedItem))&&("Above"===t||"Below"===t||"Child"===t)||!t||"Above"!==t&&"Below"!==t&&"Child"!==t&&"Top"!==t&&"Bottom"!==t)&&(t="Top");var o,l=0;switch(t){case"Top":case"Bottom":l="ResourceView"===this.parent.viewType?1:0;break;case"Above":case"Below":l=this.addRowSelectedItem.level,o=this.parent.getParentTask(this.addRowSelectedItem.parentItem);break;case"Child":l=this.addRowSelectedItem.level+1,o=this.addRowSelectedItem}this.prepareNewlyAddedData(e,t);var d=this.updateNewlyAddedDataBeforeAjax(e,l,t,o);a.push(d)},e.prototype.updateNewRecord=function(e,t){if(0===e.level){this.parent.treeGrid.parentData.splice(0,0,e);i.i(r.getValue)("dataOperation.dataArray",this.parent).splice(0,0,e.taskData)}this.updateTreeGridUniqueID(e,"add"),this.refreshNewlyAddedRecord(t,e),this._resetProperties()},e.prototype._resetProperties=function(){this.parent.isOnEdit=!1,this.parent.hideSpinner(),this.addRowSelectedItem=null,this.newlyAddedRecordBackup=null,this.isBreakLoop=!1,this.parent.element.tabIndex=0,this.parent.initiateEditAction(!1)},e.prototype.updateTreeGridUniqueID=function(e,t){"add"===t?i.i(r.setValue)("uniqueIDCollection."+e.uniqueID,e,this.parent.treeGrid):"delete"===t&&i.i(r.deleteObject)(i.i(r.getValue)("uniqueIDCollection",this.parent.treeGrid),e.uniqueID)},e.prototype.refreshNewlyAddedRecord=function(e,t){if(this.parent.selectionModule&&this.parent.allowSelection&&("Row"===this.parent.selectionSettings.mode||"Both"===this.parent.selectionSettings.mode)&&(this.parent.staticSelectedRowIndex=this.parent.currentViewData.indexOf(e.data)),this.parent.timelineSettings.updateTimescaleView){var n=[];e.modifiedRecords.length>0?(n=e.data.length>0?e.data:[e.data],n.push.apply(n,e.modifiedRecords)):n=e.data.length>0?e.data:[e.data],this.parent.timelineModule.updateTimeLineOnEditing([n],e.action)}if(this.addSuccess(e),e=this.constructTaskAddedEventArgs(t,e.modifiedRecords,"add"),this.dialogModule.isAddNewResource&&!this.parent.isEdit&&this.parent.taskFields.work&&this.parent.dataOperation.updateWorkWithDuration(t[0]),this.parent.trigger("actionComplete",e),this.dialogModule.dialog&&!this.dialogModule.dialogObj.isDestroyed&&this.dialogModule.dialogObj.hide(),this.dialogModule.dialogClose(),"ResourceView"===this.parent.viewType)if(t.length>1)for(var a=0;a<t.length;a++){if(e.data[a].ganttProperties.sharedTaskUniqueIds.push(e.data[a].ganttProperties.rowUniqueID),e.data[a].ganttProperties.resourceInfo){var s=i.i(r.extend)([],[],e.data[a].ganttProperties.resourceInfo,!0);s.splice(0,1),this.updateResoures([],s,e.data[a])}else this.removeChildRecord(e.data[a]),this.parent.editModule.checkWithUnassignedTask(e.data[a]);for(var o=0;o<this.updateParentRecords.length;o++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[o]);this.updateParentRecords=[]}else{if(e.data.ganttProperties.sharedTaskUniqueIds.push(e.data.ganttProperties.rowUniqueID),e.data.ganttProperties.resourceInfo&&e.data.ganttProperties.resourceInfo.length){if(e.data.ganttProperties.resourceInfo.length>1){var s=i.i(r.extend)([],[],e.data.ganttProperties.resourceInfo,!0);s.splice(0,1),this.updateResoures([],s,e.data)}}else this.removeChildRecord(e.data),this.parent.editModule.checkWithUnassignedTask(e.data);for(var o=0;o<this.updateParentRecords.length;o++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[o]);this.updateParentRecords=[]}},e.prototype.removeAddedRecord=function(){var e=this.parent.flatData,t=this.parent.currentViewData,n=this.parent.ids,a=e.indexOf(this.newlyAddedRecordBackup),s=t.indexOf(this.newlyAddedRecordBackup),o=n.indexOf(this.newlyAddedRecordBackup.ganttProperties.rowUniqueID.toString());if(i.i(r.deleteObject)(this.parent.previousRecords,e[a].uniqueID),this.newlyAddedRecordBackup.parentItem){var l=this.parent.getParentTask(this.newlyAddedRecordBackup.parentItem),d=l.childRecords.indexOf(this.newlyAddedRecordBackup);l.childRecords.splice(d,1)}e.splice(a,1),t.splice(s,1),n.splice(o,1)},e.prototype.getPrevRecordIndex=function(){var e=this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0]-1],t=this.parent.selectionModule.getSelectedRecords()[0],i=this.parent.getRootParent(e,t.level);return this.parent.updatedRecords.indexOf(i)},e.prototype.indent=function(){var e,t=this.parent.selectedRowIndex,i=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length),r=this.parent.updatedRecords[this.parent.selectionModule.getSelectedRowIndexes()[0]-1],n=this.parent.selectionModule.getSelectedRecords()[0];this.parent.editSettings.allowEditing&&0!==t&&-1!==t&&i&&"ResourceView"!==this.parent.viewType&&this.parent.updatedRecords[t].level-r.level!=1&&(e=r.level-n.level==0?this.parent.selectionModule.getSelectedRowIndexes()[0]-1:this.getPrevRecordIndex(),this.indentOutdentRow([this.parent.selectionModule.getSelectedRowIndexes()[0]],e,"child"))},e.prototype.outdent=function(){var e,t=this.parent.selectionModule.getSelectedRowIndexes()[0],i=!!this.parent.selectionModule&&(1===this.parent.selectionModule.selectedRowIndexes.length||1===this.parent.selectionModule.getSelectedRowCellIndexes().length);if(this.parent.editSettings.allowEditing&&-1!==t&&0!==t&&i&&"ResourceView"!==this.parent.viewType&&0!==this.parent.updatedRecords[t].level){var r=this.parent.getTaskByUniqueID(this.parent.selectionModule.getSelectedRecords()[0].parentItem.uniqueID);e=this.parent.updatedRecords.indexOf(r),this.indentOutdentRow([t],e,"below")}},e.prototype.indentOutdentRow=function(e,t,i){var r=this;if(e[0],!0){"above"===i&&(this.dropPosition="topSegment"),"below"===i&&(this.dropPosition="bottomSegment"),"child"===i&&(this.dropPosition="middleSegment");for(var n=void 0,a=[],s=0;s<e.length;s++)a[s]=this.parent.updatedRecords[e[s]];var o={data:a,dropIndex:t,dropPosition:this.dropPosition};"middleSegment"===this.dropPosition?n="indenting":"bottomSegment"===this.dropPosition&&(n="outdenting");var l={action:n,data:a[0],cancel:!1};this.parent.trigger("actionBegin",l,function(e){e.cancel||r.reArrangeRows(o,!0)})}},e.prototype.reArrangeRows=function(e,t){if(this.dropPosition=e.dropPosition,"Invalid"!==e.dropPosition&&this.parent.editModule){var n=this.parent,a=void 0;this.droppedRecord=n.updatedRecords[e.dropIndex];var s=[],o=this.droppedRecord;e.data[0]?s=e.data:s.push(e.data);for(var l=0,d=s.length,p=0;p<d;p++){if(this.parent.isOnEdit=!0,a=s[p],this.draggedRecord=a,"Invalid"!==this.dropPosition){t&&this.deleteDragRow();var h=this.treeGridData.indexOf(o);if("bottomSegment"===this.dropPosition){if(o.hasChildRecords){l=this.parent.editModule.getChildCount(o,0),this.parent.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(h+l+1,0,this.draggedRecord.taskData),this.treeGridData.splice(h+l+1,0,this.draggedRecord),this.parent.ids.splice(h+l+1,0,this.draggedRecord.ganttProperties.rowUniqueID.toString());var u=this.parent.ids.indexOf(this.draggedRecord[this.parent.taskFields.id].toString());u!==h+l+1&&(this.parent.ids.splice(u,1),this.parent.ids.splice(h+l+1,0,this.draggedRecord[this.parent.taskFields.id].toString()))}else this.parent.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(h+1,0,this.draggedRecord.taskData),this.treeGridData.splice(h+1,0,this.draggedRecord),this.parent.ids.splice(h+1,0,this.draggedRecord.ganttProperties.rowUniqueID.toString());if(this.parent.setRecordValue("parentItem",this.treeGridData[h].parentItem,a),this.parent.setRecordValue("parentUniqueID",this.treeGridData[h].parentUniqueID,a),this.parent.setRecordValue("level",this.treeGridData[h].level,a),a.hasChildRecords){this.updateChildRecordLevel(a,1),this.updateChildRecord(a,h+l+1)}if(o.parentItem){var c=this.parent.getParentTask(o.parentItem).childRecords,g=c,f=g.indexOf(o)+1;g.splice(f,0,a)}}"middleSegment"===this.dropPosition&&this.dropMiddle(h),i.i(r.isNullOrUndefined)(a.parentItem&&-1!==this.updateParentRecords.indexOf(a.parentItem))||this.updateParentRecords.push(a.parentItem)}if(i.i(r.isNullOrUndefined)(a.parentItem)){var m=this.parent.treeGrid.parentData,y=m.indexOf(this.droppedRecord);"bottomSegment"===this.dropPosition&&m.splice(y+1,0,a)}this.refreshDataSource()}"middleSegment"===this.dropPosition&&(o.ganttProperties.predecessor&&(this.parent.editModule.removePredecessorOnDelete(o),o.ganttProperties.predecessor=null,o.ganttProperties.predecessorsName=null,o[this.parent.taskFields.dependency]=null,o.taskData[this.parent.taskFields.dependency]=null),o.ganttProperties.isMilestone&&(this.parent.setRecordValue("isMilestone",!1,o.ganttProperties,!0),i.i(r.isNullOrUndefined)(o.taskData[this.parent.taskFields.milestone])||!0===o.taskData[this.parent.taskFields.milestone]&&(o.taskData[this.parent.taskFields.milestone]=!1)));for(var v=0;v<this.updateParentRecords.length;v++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[v]);this.updateParentRecords=[],this.parent.isOnEdit=!1}this.refreshRecord(e)},e.prototype.refreshRecord=function(e,t){var r=this;if(i.i(s.f)(this.parent.dataSource)){var a=this.parent.dataSource,o={changedRecords:i.i(s.e)(this.parent.editedRecords,null,null,this.parent)},l=this.parent.query instanceof n.Query?this.parent.query:new n.Query,d=null,p=a.adaptor;if(p instanceof n.WebApiAdaptor&&p instanceof n.ODataAdaptor&&!a.dataSource.batchUrl){d=a.update(this.parent.taskFields.id,o.changedRecords,null,l)}else d=a.saveChanges(o,this.parent.taskFields.id,null,l);d.then(function(i){return r.indentSuccess(i,e,t)}).catch(function(e){return r.indentFailure(e)})}else this.indentOutdentSuccess(e,t)},e.prototype.indentSuccess=function(e,t,i){this.indentOutdentSuccess(t,i)},e.prototype.indentFailure=function(e){this.parent.trigger("actionFailure",{error:e})},e.prototype.indentOutdentSuccess=function(e,t){if(this.parent.treeGrid.parentData=[],this.parent.treeGrid.refresh(),this.parent.enableImmutableMode&&this.refreshRecordInImmutableMode(e.data,t),t?e.requestType="rowDropped":"middleSegment"===this.dropPosition?e.requestType="indented":"bottomSegment"===this.dropPosition&&(e.requestType="outdented"),e.modifiedRecords=this.parent.editedRecords,this.parent.timezone)for(var r=0;r<e.modifiedRecords.length;r++)i.i(s.g)(e.modifiedRecords[r],this.parent);this.parent.trigger("actionComplete",e),this.parent.editedRecords=[]},e.prototype.refreshDataSource=function(){var e,t,a=this.draggedRecord,s=this.droppedRecord,o=this.parent;if(e=this.parent.dataSource instanceof n.DataManager?i.i(r.getValue)("dataOperation.dataArray",this.parent):o.dataSource,e.length>0&&!i.i(r.isNullOrUndefined)(s)&&!s.parentItem){for(var l=0;l<Object.keys(e).length;l++)e[l][this.parent.taskFields.child]===s.taskData[this.parent.taskFields.child]&&(t=l);"topSegment"===this.dropPosition?this.parent.taskFields.parentID||e.splice(t,0,a.taskData):"bottomSegment"===this.dropPosition&&(this.parent.taskFields.parentID||e.splice(t+1,0,a.taskData))}else if(!this.parent.taskFields.parentID&&!i.i(r.isNullOrUndefined)(s)&&s.parentItem&&("topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition)){var d="topSegment"===this.dropPosition?"Above":"Below";this.parent.editModule.addRowSelectedItem=s,this.parent.editModule.updateRealDataSource(a,d),delete this.parent.editModule.addRowSelectedItem}this.parent.taskFields.parentID&&(a.parentItem?"topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition?(a[this.parent.taskFields.parentID]=s[this.parent.taskFields.parentID],a.taskData[this.parent.taskFields.parentID]=s[this.parent.taskFields.parentID],a.ganttProperties.parentId=s[this.parent.taskFields.parentID]):(a[this.parent.taskFields.parentID]=s[this.parent.taskFields.id],a.taskData[this.parent.taskFields.parentID]=s[this.parent.taskFields.id],a.ganttProperties.parentId=s[this.parent.taskFields.id]):(a[this.parent.taskFields.parentID]=null,a.taskData[this.parent.taskFields.parentID]=null,a.ganttProperties.parentId=null))},e.prototype.deleteDragRow=function(){this.parent.dataSource instanceof n.DataManager?this.ganttData=i.i(r.getValue)("dataOperation.dataArray",this.parent):this.ganttData=i.i(s.i)(this.parent)?i.i(r.getValue)("result",this.parent.dataSource):this.parent.dataSource,this.treeGridData=i.i(s.i)(this.parent)?i.i(r.getValue)("result",this.parent.treeGrid.dataSource):this.parent.treeGrid.dataSource;var e=this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);this.removeRecords(e)},e.prototype.updateIndentedChildRecords=function(e){for(var t={uniqueID:e.uniqueID,expanded:e.expanded,level:e.level,index:e.index,taskId:e.ganttProperties.rowUniqueID},i=0;i<e.childRecords.length;i++)this.parent.setRecordValue("parentItem",t,e.childRecords[i]),this.parent.setRecordValue("parentUniqueID",e.uniqueID,e.childRecords[i]);if(e.hasChildRecords){e=e.childRecords;for(var r=0;r<e.length;r++)this.updateIndentedChildRecords(e[r])}},e.prototype.dropMiddle=function(e){var t=this.parent,n=this.parent.editModule.getChildCount(this.droppedRecord,0),a=i.i(r.isNullOrUndefined)(n)||0===n?e+1:n+e+1;if("middleSegment"===this.dropPosition){if(t.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(a,0,this.draggedRecord.taskData),this.treeGridData.splice(a,0,this.draggedRecord),this.parent.ids.splice(a,0,this.draggedRecord[this.parent.taskFields.id].toString()),this.recordLevel(),this.draggedRecord.hasChildRecords&&(this.updateChildRecord(this.draggedRecord,a,this.droppedRecord.expanded),this.parent.enableImmutableMode)){var s=this.draggedRecord;this.updateIndentedChildRecords(s)}i.i(r.isNullOrUndefined)(this.draggedRecord.parentItem&&-1!==this.updateParentRecords.indexOf(this.draggedRecord.parentItem))&&this.updateParentRecords.push(this.draggedRecord.parentItem)}},e.prototype.updateChildRecordLevel=function(e,t){var i,r=0;if(t++,!e.hasChildRecords)return 0;r=e.childRecords.length;for(var n=0;n<r;n++){i=e.childRecords[n];var a=void 0;if(e.parentItem){a=this.parent.treeGrid.uniqueIDCollection[e.parentItem.uniqueID]}i.level=e.parentItem?a.level+t:e.level+1,i.hasChildRecords&&(t--,t=this.updateChildRecordLevel(i,t))}return t},e.prototype.updateChildRecord=function(e,t,i){var r,n=this.parent,a=0;if(!e.hasChildRecords)return 0;a=e.childRecords.length;for(var s=0;s<a;s++)r=e.childRecords[s],t++,n.flatData.splice(t,0,r),this.parent.ids.splice(t,0,r.ganttProperties.rowUniqueID.toString()),n.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(t,0,r.taskData),r.hasChildRecords&&(t=this.updateChildRecord(r,t));return t},e.prototype.removeRecords=function(e){var t,a=this.parent;t=this.parent.dataSource instanceof n.DataManager?i.i(r.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;var s=e,o=this.parent.getParentTask(s.parentItem);if(s){if(s.parentItem){var l=o?o.childRecords:[],d=0;l&&l.length>0&&(d=l.indexOf(s),o.childRecords.splice(d,1),this.parent.taskFields.parentID||o.taskData[this.parent.taskFields.child].splice(d,1),this.updateParentRecords.push(o))}if(a.taskFields.parentID){s.hasChildRecords&&s.childRecords.length>0&&this.removeChildItem(s);for(var p=void 0,h=t.length>0?t:this.parent.currentViewData,u=0;u<h.length;u++)h[u][this.parent.taskFields.id]===s.taskData[this.parent.taskFields.id]&&(p=u);if(-1!==p){t.length>0&&t.splice(p,1);for(var c=void 0,u=0;u<this.treeGridData.length;u++)this.treeGridData[u][this.parent.taskFields.id]===s.taskData[this.parent.taskFields.id]&&(c=u);this.treeGridData.splice(c,1),this.parent.ids.splice(c,1),-1!==this.parent.treeGrid.parentData.indexOf(s)&&this.parent.treeGrid.parentData.splice(this.parent.treeGrid.parentData.indexOf(s),1)}}var g=this.treeGridData.indexOf(s);if(!a.taskFields.parentID){var f=this.getChildCount(s,0);this.treeGridData.splice(g,f+1),this.parent.ids.splice(g,f+1);var m=this.ganttData.indexOf(s.taskData);-1!==m&&(this.ganttData.splice(m,1),this.parent.treeGrid.parentData.splice(m,1))}s.parentItem&&o&&o.childRecords&&!o.childRecords.length&&(this.parent.setRecordValue("expanded",!1,o),this.parent.setRecordValue("hasChildRecords",!1,o))}},e.prototype.removeChildItem=function(e){for(var t,a,s=0;s<e.childRecords.length;s++){t=e.childRecords[s];var o=void 0;o=this.parent.dataSource instanceof n.DataManager?i.i(r.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;for(var l=0;l<o.length;l++)o[l][this.parent.taskFields.id]===t.taskData[this.parent.taskFields.id]&&(a=l);if(-1!==a){o.length>0&&o.splice(a,1);for(var d=void 0,p=0;p<this.treeGridData.length;p++)this.treeGridData[p][this.parent.taskFields.id]===t.taskData[this.parent.taskFields.id]&&(d=p);this.treeGridData.splice(d,1),this.parent.ids.splice(d,1)}t.hasChildRecords&&this.removeChildItem(t)}},e.prototype.recordLevel=function(){var e=this.parent,t=this.draggedRecord,n=this.droppedRecord,a=e.taskFields.child;if(n.hasChildRecords||(n.hasChildRecords=!0,n.childRecords.length||(n.childRecords=[],!e.taskFields.parentID&&i.i(r.isNullOrUndefined)(n.taskData[a])&&(n.taskData[a]=[]))),"middleSegment"===this.dropPosition){var s=i.i(r.extend)({},n);delete s.childRecords;var o={uniqueID:s.uniqueID,expanded:s.expanded,level:s.level,index:s.index,taskId:s.ganttProperties.rowUniqueID};if(this.parent.setRecordValue("parentItem",o,t),this.parent.setRecordValue("parentUniqueID",n.uniqueID,t),n.childRecords.splice(n.childRecords.length,0,t),i.i(r.isNullOrUndefined)(t)||e.taskFields.parentID||i.i(r.isNullOrUndefined)(n.taskData[a])||n.taskData[e.taskFields.child].splice(n.childRecords.length,0,t.taskData),!i.i(r.isNullOrUndefined)(n.ganttProperties.segments)&&n.ganttProperties.segments.length>0&&(n.ganttProperties.segments=null,n.taskData[e.taskFields.segments]=null),t.hasChildRecords){t.level=n.level+1,this.updateChildRecordLevel(t,1)}else t.level=n.level+1;n.expanded=!0}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.ExcelExport),this.parent.treeGrid.allowExcelExport=this.parent.allowExcelExport,this.bindEvents()}return e.prototype.getModuleName=function(){return"excelExport"},e.prototype.destroy=function(){},e.prototype.bindEvents=function(){var e=this;this.parent.treeGrid.beforeExcelExport=function(t){e.parent.trigger("beforeExcelExport",t)},this.parent.treeGrid.excelQueryCellInfo=function(t){e.parent.trigger("excelQueryCellInfo",t)},this.parent.treeGrid.excelHeaderQueryCellInfo=function(t){e.parent.trigger("excelHeaderQueryCellInfo",t)},this.parent.treeGrid.excelExportComplete=function(t){e.parent.trigger("excelExportComplete",t)}},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(6),n=(i.n(r),i(5)),a=(i.n(n),i(0)),s=(i.n(a),i(12)),o=(i.n(s),i(20)),l=(i.n(o),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Filter),this.parent.treeGrid.allowFiltering=this.parent.allowFiltering,this.updateCustomFilters(),this.parent.treeGrid.filterSettings=i.i(n.getActualProperties)(this.parent.filterSettings),this.addEventListener()}return e.prototype.getModuleName=function(){return"filter"},e.prototype.updateCustomFilters=function(){for(var e=this.parent.taskFields,t=0;t<this.parent.ganttColumns.length;t++){var i=this.parent.ganttColumns[t];("datepickeredit"!==i.editType&&"datetimepickeredit"!==i.editType||i.field!==e.startDate&&i.field!==e.endDate&&i.field!==e.baselineStartDate&&i.field!==e.baselineEndDate)&&(i.field!==e.duration||"stringedit"!==i.editType)||this.initiateFiltering(this.parent.ganttColumns[t])}},e.prototype.updateModel=function(){this.parent.filterSettings=this.parent.treeGrid.filterSettings},e.prototype.addEventListener=function(){this.parent.on("updateModel",this.updateModel,this),this.parent.on("actionBegin",this.actionBegin,this),this.parent.on("actionComplete",this.actionComplete,this),this.parent.on("columnMenuOpen",this.columnMenuOpen,this)},e.prototype.wireEvents=function(e){a.EventHandler.add(document.getElementById(e),"click",this.mouseClickHandler,this)},e.prototype.initiateFiltering=function(e){var t=this.parent.getColumnByField(e.field,this.parent.treeGridModule.treeGridColumns);e.allowFiltering=!1!==e.allowFiltering,!e.allowFiltering||"Menu"!==this.parent.filterSettings.type&&"Excel"!==this.parent.filterSettings.type||e.filter||(e.filter={ui:this.getCustomFilterUi(e)}),t&&(t.allowFiltering=e.allowFiltering,t.filter=e.allowFiltering?e.filter:{})},e.prototype.getCustomFilterUi=function(e){var t=this.parent.taskFields,i={};return"datepickeredit"!==e.editType||e.field!==t.startDate&&e.field!==t.endDate&&e.field!==t.baselineStartDate&&e.field!==t.baselineEndDate?"datetimepickeredit"!==e.editType||e.field!==t.startDate&&e.field!==t.endDate&&e.field!==t.baselineStartDate&&e.field!==t.baselineEndDate?e.field===t.duration&&"stringedit"===e.editType&&(i=this.getDurationFilter()):i=this.getDateTimePickerFilter():i=this.getDatePickerFilter(e.field),i},e.prototype.mouseClickHandler=function(e){i.i(a.closest)(e.target,".e-excelfilter")&&this.parent.treeGrid.grid.notify("click",e)},e.prototype.unWireEvents=function(){a.EventHandler.remove(this.parent.element,"click",this.mouseClickHandler)},e.prototype.getDatePickerFilter=function(e){var t,r=this,s=this.parent,l=e===s.taskFields.startDate||e===s.taskFields.baselineStartDate?s.defaultStartTime:s.defaultEndTime;return{create:function(e){var s=i.i(n.getCustomDateFormat)(e.column.format,e.column.type),l=i.i(a.createElement)("input",{className:"flm-input"});e.target.appendChild(l),t=new o.DatePicker({placeholder:r.parent.localeObj.getConstant("enterValue"),format:s}),t.appendTo(l)},write:function(e){t.value=e.filteredValue},read:function(e){t.value&&t.value.setSeconds(l),e.fltrObj.filterByColumn(e.column.field,e.operator,t.value)}}},e.prototype.getDateTimePickerFilter=function(){var e,t=this;return{create:function(r){var s=i.i(n.getCustomDateFormat)(r.column.format,r.column.type),l=i.i(a.createElement)("input",{className:"flm-input"});r.target.appendChild(l),e=new o.DateTimePicker({placeholder:t.parent.localeObj.getConstant("enterValue"),format:s}),e.appendTo(l)},write:function(t){e.value=t.filteredValue},read:function(t){t.fltrObj.filterByColumn(t.column.field,t.operator,e.value)}}},e.prototype.getDurationFilter=function(){var e,t=this,r=this.parent,n="";return{create:function(r){var n=i.i(a.createElement)("input",{className:"e-input"});n.setAttribute("placeholder",t.parent.localeObj.getConstant("enterValue")),r.target.appendChild(n),e=new s.TextBox,e.appendTo(n)},write:function(t){e.value=t.filteredValue?n:""},read:function(s){var o=t.parent.dataOperation.getDurationValue(e.value),l=i.i(a.getValue)("duration",o),d=i.i(a.getValue)("durationUnit",o);if(l>=0){var p=void 0;"minute"===d?p=60*l/r.secondsPerDay:"hour"===d?p=60*l*60/r.secondsPerDay:(p=l,d="day"),s.fltrObj.filterByColumn(s.column.field,s.operator,p),n=t.parent.dataOperation.getDurationString(l,d)}else s.fltrObj.filterByColumn(s.column.field,s.operator,null),n=null}}},e.prototype.columnMenuOpen=function(e){this.filterMenuElement&&document.body.contains(this.filterMenuElement)&&i.i(a.remove)(this.filterMenuElement),this.filterMenuElement=null},e.prototype.actionBegin=function(e){},e.prototype.closeFilterOnContextClick=function(e){var t=document.querySelector("body > div.e-datepicker"),r=document.querySelector("body > div.e-datetimepicker");if(this.filterMenuElement&&document.body.contains(this.filterMenuElement)){var n=i.i(a.closest)(e,"#"+this.parent.element.id)||e.querySelector("#"+this.parent.element.id);(!this.filterMenuElement.contains(e)&&!i.i(a.isNullOrUndefined)(n)||!this.filterMenuElement.contains(e)&&i.i(a.isNullOrUndefined)(t)&&i.i(a.isNullOrUndefined)(r)&&("DIV"===e.nodeName||"HTML"===e.nodeName||"SPAN"===e.nodeName||"BUTTON"===e.nodeName))&&(i.i(a.remove)(this.filterMenuElement),this.parent.treeGrid.grid.notify("filter-menu-close",{isOpen:!1}),this.filterMenuElement=null)}},e.prototype.actionComplete=function(e){if(i.i(a.isNullOrUndefined)(e.filterModel)||i.i(a.isNullOrUndefined)(e.filterModel.dialogObj)||i.i(a.isNullOrUndefined)(e.filterModel.dialogObj.element)||"Excel"===this.parent.filterSettings.type&&this.wireEvents(e.filterModel.dialogObj.element.id),e.requestType===n.filterAfterOpen){"Menu"===this.parent.treeGrid.filterSettings.type?this.filterMenuElement=i.i(a.getValue)("filterModel.dlgObj.element",e):this.filterMenuElement=i.i(a.getValue)("filterModel.dialogObj.element",e),this.updateFilterMenuPosition(this.filterMenuElement,e);var t=this.parent.taskFields.id,r=this.parent.taskFields.dependency,s=this.parent.taskFields.resourceInfo,o=this.parent.treeGrid.grid.filterModule,l=i.i(a.getValue)("values",o);if(e.columnName===r&&i.i(a.isNullOrUndefined)(i.i(a.getValue)(r,l))||e.columnName===s&&i.i(a.isNullOrUndefined)(i.i(a.getValue)(s,l))){var d=this.filterMenuElement.querySelector(".e-dropdownlist"),p=void 0;i.i(a.isNullOrUndefined)(d)||(p=i.i(a.getValue)("ej2_instances[0]",d),p.index=2,p.dataBind())}else if(e.columnName===t&&i.i(a.isNullOrUndefined)(i.i(a.getValue)(t,l))&&"Menu"===this.parent.treeGrid.filterSettings.type){var d=this.filterMenuElement.querySelector(".e-flmenu-input"),p=i.i(a.getValue)("ej2_instances[0]",d);!i.i(a.isNullOrUndefined)(p)&&i.i(a.isNullOrUndefined)(this.parent.columnByField[e.columnName].format)&&(p.format="n")}}},e.prototype.updateFilterMenuPosition=function(e,t){i.i(a.addClass)([e],"e-gantt"),document.querySelector("#"+this.parent.treeGrid.grid.element.id).appendChild(e),"Menu"===this.parent.treeGrid.filterSettings.type&&e.querySelector(".e-valid-input").focus()},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("updateModel",this.updateModel),this.parent.off("actionBegin",this.actionBegin),this.parent.off("actionComplete",this.actionComplete),this.parent.off("columnMenuOpen",this.columnMenuOpen))},e.prototype.destroy=function(){this.removeEventListener(),this.unWireEvents()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.parent=e,this.activeElement=null,this.previousActiveElement=null}return e.prototype.getActiveElement=function(e){return e?this.previousActiveElement:this.activeElement},e.prototype.setActiveElement=function(e){this.previousActiveElement=this.activeElement,this.activeElement=e},e.prototype.onKeyPress=function(e){var t=this.parent,n=t.getExpandedRecords(t.currentViewData);if(i.i(r.isNullOrUndefined)(this.parent.focusModule.getActiveElement())&&("expandAll"===e.action||"collapseAll"===e.action)){var a=this.parent.element.querySelector(".e-treegrid");a.focus()}var s=this.parent.focusModule.getActiveElement();if("home"!==e.action&&"end"!==e.action&&"downArrow"!==e.action&&"upArrow"!==e.action&&"delete"!==e.action&&"rightArrow"!==e.action&&"leftArrow"!==e.action&&"focusTask"!==e.action&&"focusSearch"!==e.action&&"expandAll"!==e.action&&"collapseAll"!==e.action||i.i(r.isNullOrUndefined)(t.editModule)||i.i(r.isNullOrUndefined)(t.editModule.cellEditModule)||!0!==t.editModule.cellEditModule.isCellEdit)switch(t.isAdaptive&&("addRowDialog"!==e.action&&"editRowDialog"!==e.action&&"delete"!==e.action&&"addRow"!==e.action||t.selectionModule&&"Multiple"===t.selectionSettings.type&&(t.selectionModule.hidePopUp(),document.getElementsByClassName("e-gridpopup")[0].style.display="none")),e.action){case"home":if(t.selectionModule&&"Cell"!==t.selectionSettings.mode){if(0===t.selectedRowIndex)return;t.selectionModule.selectRow(0,!1,!0)}break;case"end":if(t.selectionModule&&"Cell"!==t.selectionSettings.mode){var o=n[n.length-1];if(t.selectedRowIndex===t.flatData.indexOf(o))return;t.selectionModule.selectRow(t.flatData.indexOf(o),!1,!0)}break;case"downArrow":case"upArrow":var l=t.element.querySelector("#"+t.element.id+"_searchbar");l&&l.parentElement.classList.contains("e-input-focus")&&t.selectionModule.clearSelection(),t.element.classList.contains("e-scroll-disabled")||(this.upDownKeyNavigate(e),i.i(r.isNullOrUndefined)(s)||i.i(r.isNullOrUndefined)(s.closest(".e-chart-row"))||t.ganttChartModule.manageFocus(this.getActiveElement(),"remove",!0));break;case"expandAll":t.ganttChartModule.expandCollapseAll("expand");break;case"collapseAll":t.ganttChartModule.expandCollapseAll("collapse");break;case"expandRow":case"collapseRow":this.expandCollapseKey(e);break;case"saveRequest":if(!i.i(r.isNullOrUndefined)(t.editModule)&&!i.i(r.isNullOrUndefined)(t.editModule.cellEditModule)&&t.editModule.cellEditModule.isCellEdit){var d=t.editModule.cellEditModule.editedColumn;if(d.field===t.columnMapping.duration&&!i.i(r.isNullOrUndefined)(d.edit)&&!i.i(r.isNullOrUndefined)(d.edit.read)){var p=e.target.ej2_instances[0],h=e.target.value,u=t.currentViewData[t.selectedRowIndex].ganttProperties,c=void 0;d.field===t.columnMapping.duration&&(c=i.i(r.isNullOrUndefined)(d.edit)||i.i(r.isNullOrUndefined)(d.edit.read)?i.i(r.isNullOrUndefined)(d.valueAccessor)?t.dataOperation.getDurationString(u.duration,u.durationUnit):d.valueAccessor(t.columnMapping.duration,t.editedRecords,d):d.edit.read(),h!==c.toString()&&(p.value=h,p.dataBind()))}if(t.editModule.dialogModule.dialogObj&&i.i(r.getValue)("dialogOpen",t.editModule.dialogModule.dialogObj))return;t.editModule.cellEditModule.isCellEdit=!1,t.treeGrid.grid.saveCell();var a=t.element.querySelector(".e-treegrid");a.focus()}if(!i.i(r.isNullOrUndefined)(this.parent.onTaskbarClick)&&!i.i(r.isNullOrUndefined)(s)&&!i.i(r.isNullOrUndefined)(s.closest(".e-chart-row"))){var g=e.target,f=s.querySelector(".e-gantt-parent-taskbar,.e-gantt-child-taskbar,.e-gantt-milestone");f&&this.parent.ganttChartModule.onTaskbarClick(e,g,f)}break;case"cancelRequest":i.i(r.isNullOrUndefined)(t.editModule)||i.i(r.isNullOrUndefined)(t.editModule.cellEditModule)||(t.editModule.cellEditModule.isCellEdit=!1,i.i(r.isNullOrUndefined)(t.toolbarModule)||t.toolbarModule.refreshToolbarItems());break;case"addRow":if(i.i(r.isNullOrUndefined)(document.getElementById(this.parent.element.id+"_dialog"))){e.preventDefault(),t.addRecord(void 0,this.parent.editSettings.newRowPosition);var a=t.element;a.focus()}break;case"addRowDialog":if(e.preventDefault(),t.editModule&&t.editModule.dialogModule&&t.editSettings.allowAdding){if(t.editModule.dialogModule.dialogObj&&i.i(r.getValue)("dialogOpen",t.editModule.dialogModule.dialogObj))return;t.editModule.dialogModule.openAddDialog()}break;case"editRowDialog":e.preventDefault();if(t.element.querySelector(".e-treegrid").focus(),t.editModule&&t.editModule.dialogModule&&t.editSettings.allowEditing){if(t.editModule.dialogModule.dialogObj&&i.i(r.getValue)("dialogOpen",t.editModule.dialogModule.dialogObj))return;t.editModule.dialogModule.openToolbarEditDialog()}break;case"delete":t.selectionModule&&t.editModule&&t.editModule.dialogModule&&(!t.editModule.dialogModule.dialogObj||t.editModule.dialogModule.dialogObj&&!t.editModule.dialogModule.dialogObj.visible)&&(!t.editSettings.allowTaskbarEditing||t.editSettings.allowTaskbarEditing&&!t.editModule.taskbarEditModule.touchEdit)&&("Cell"!==t.selectionSettings.mode&&t.selectionModule.selectedRowIndexes.length||"Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length)&&(i.i(r.isNullOrUndefined)(e.target)?t.editModule.startDeleteAction():"INPUT"!==e.target.tagName&&t.editModule.startDeleteAction());break;case"focusTask":e.preventDefault();var m=void 0;if(t.selectionModule){var y=t.currentViewData;if("Cell"===t.selectionSettings.mode||i.i(r.isNullOrUndefined)(y[t.selectedRowIndex])){if("Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length>0){var v=t.selectionModule.getSelectedRowCellIndexes();m=y[v[v.length-1].rowIndex].ganttProperties.rowUniqueID}}else m=t.currentViewData[t.selectedRowIndex].ganttProperties.rowUniqueID}m&&t.scrollToTask(m.toString());break;case"focusSearch":if(t.element.querySelector("#"+t.element.id+"_searchbar")){var l=t.element.querySelector("#"+t.element.id+"_searchbar");l.setAttribute("tabIndex","-1"),l.focus()}break;case"tab":case"shiftTab":t.element.classList.contains("e-scroll-disabled")||t.ganttChartModule.onTabAction(e);break;case"contextMenu":var D=document.getElementById(this.parent.element.id+"_contextmenu").ej2_instances[0],w=this.parent.getOffsetRect(e.target),k=w.top+w.height/2,S=w.left+w.width/2;this.setActiveElement(e.target),D.open(k,S),e.preventDefault();break;default:var T={requestType:"keyPressed",action:e.action,keyEvent:e};t.trigger("actionComplete",T)}},e.prototype.upDownKeyNavigate=function(e){e.preventDefault();var t=this.parent,i=t.getExpandedRecords(t.currentViewData);if(t.selectionModule){if("Cell"!==t.selectionSettings.mode&&-1!==t.selectedRowIndex){var r=t.currentViewData[t.selectedRowIndex],n=(this.parent.ganttChartModule.focusedRowIndex,i.indexOf(r)),a="downArrow"===e.action?i[n+1]:i[n-1];t.selectionModule.selectRow(t.currentViewData.indexOf(a),!1,!0)}else if("Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length>0){var s=t.selectionModule.getSelectedRowCellIndexes(),o=s[s.length-1],l=o.cellIndexes[o.cellIndexes.length-1],r=t.currentViewData[o.rowIndex],n=i.indexOf(r),a="downArrow"===e.action?i[n+1]:i[n-1],d={rowIndex:t.currentViewData.indexOf(a),cellIndex:l};t.selectionModule.selectCell(d)}this.parent.ganttChartModule.focusedRowIndex=this.parent.selectedRowIndex}},e.prototype.expandCollapseKey=function(e){var t=this.parent;if(t.selectionModule&&-1!==t.selectedRowIndex){var i=void 0;if("Cell"!==t.selectionSettings.mode)i=t.selectedRowIndex;else if("Cell"===t.selectionSettings.mode&&t.selectionModule.getSelectedRowCellIndexes().length>0){var r=t.selectionModule.getSelectedRowCellIndexes();i=r[r.length-1].rowIndex}"expandRow"===e.action?t.expandByIndex(i):t.collapseByIndex(i)}},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(17),n=i(7),a=i(0),s=(i.n(a),i(50)),o=i(1),l=(i.n(o),i(57)),d=function(){function e(e){this.isPdfExport=!1,this.parent=e,this.helper=new s.a(this.parent),this.pdfDocument=void 0}return e.prototype.getModuleName=function(){return"pdfExport"},e.prototype.destroy=function(){},e.prototype.initGantt=function(){this.pdfDocument=void 0,this.gantt=new l.a(this.parent)},e.prototype.export=function(e,t,r){var n=this,s={requestType:"beforePdfExport",ganttObject:this.parent,cancel:!1};return this.parent.trigger("beforePdfExport",s),i.i(a.getValue)("cancel",s)?new Promise(function(e,t){return e()}):new Promise(function(i,a){n.exportWithData(r,i,e,t)})},e.prototype.exportWithData=function(e,t,r,n){var s=this,l=[];i.i(a.isNullOrUndefined)(r)&&(r={}),l="CurrentViewData"===r.exportType?this.parent.currentViewData:this.parent.flatData,this.initGantt(),i.i(a.isNullOrUndefined)(e)?this.pdfDocument=new o.PdfDocument:this.pdfDocument=e,this.processExport(l,r,n).then(function(){s.parent.trigger("pdfExportComplete",{}),t(s.pdfDocument)})},e.prototype.processExport=function(e,t,r){var s=this,l=this.pdfDocument.sections.add();this.processSectionExportProperties(l,t);var d=l.pages.add();return new Promise(function(i,r){s.helper.processGridExport(e,s.gantt,t),s.helper.initializePdf(s.pdfDocument),i()}).then(function(){var e=new n.a;e.break=o.PdfLayoutBreakType.FitElement;var l=s.gantt.drawGrid(d,0,0,e);return s.gantt.drawChart(l),r||(!i.i(a.isNullOrUndefined)(t)&&t.fileName?s.pdfDocument.save(t.fileName):s.pdfDocument.save("Export.pdf"),s.pdfDocument.destroy()),s.pdfDocument})},e.prototype.processSectionExportProperties=function(e,t){if(i.i(a.isNullOrUndefined)(t))this.gantt.ganttStyle=new r.a(t.theme).style;else{var n=new o.PdfPageSettings;if(i.i(a.isNullOrUndefined)(t.pageOrientation)||"Portrait"!==t.pageOrientation?n.orientation=o.PdfPageOrientation.Landscape:n.orientation=o.PdfPageOrientation.Portrait,i.i(a.isNullOrUndefined)(t.pageSize)||(n.size=this.getPageSize(t.pageSize)),e.setPageSettings(n),i.i(a.isNullOrUndefined)(t.ganttStyle))this.gantt.ganttStyle=new r.a(t.theme).style;else{var s=new r.a(t.theme).style;this.gantt.ganttStyle=i.i(a.extend)({},s,t.ganttStyle,!0)}}},e.prototype.getPageSize=function(e){switch(e){case"Letter":return new o.SizeF(612,792);case"Note":return new o.SizeF(540,720);case"Legal":return new o.SizeF(612,1008);case"A0":return new o.SizeF(2380,3368);case"A1":return new o.SizeF(1684,2380);case"A2":return new o.SizeF(1190,1684);case"A3":return new o.SizeF(842,1190);case"A5":return new o.SizeF(421,595);case"A6":return new o.SizeF(297,421);case"A7":return new o.SizeF(210,297);case"A8":return new o.SizeF(148,210);case"A9":return new o.SizeF(105,148);case"B0":return new o.SizeF(2836,4008);case"B1":return new o.SizeF(2004,2836);case"B2":return new o.SizeF(1418,2004);case"B3":return new o.SizeF(1002,1418);case"B4":return new o.SizeF(709,1002);case"B5":return new o.SizeF(501,709);case"Archa":return new o.SizeF(648,864);case"Archb":return new o.SizeF(864,1296);case"Archc":return new o.SizeF(1296,1728);case"Archd":return new o.SizeF(1728,2592);case"Arche":return new o.SizeF(2592,3456);case"Flsa":return new o.SizeF(612,936);case"HalfLetter":return new o.SizeF(396,612);case"Letter11x17":return new o.SizeF(792,1224);case"Ledger":return new o.SizeF(1224,792);default:return new o.SizeF(595,842)}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(6),n=(i.n(r),i(0)),a=(i.n(n),i(4)),s=(i.n(a),i(15)),o=function(){function e(e){this.isTest=!1,this.updateParentRecords=[],this.isaddtoBottom=!1,this.isSharedTask=!1,this.canDrop=!0,this.parent=e,r.TreeGrid.Inject(r.RowDD),this.parent.treeGrid.allowRowDragAndDrop=this.parent.allowRowDragAndDrop,this.bindEvents()}return e.prototype.getModuleName=function(){return"rowDragAndDrop"},e.prototype.destroy=function(){},e.prototype.bindEvents=function(){this.parent.treeGrid.rowDragStart=this.rowDragStart.bind(this),this.parent.treeGrid.rowDragStartHelper=this.rowDragStartHelper.bind(this),this.parent.treeGrid.rowDrag=this.rowDrag.bind(this),this.parent.treeGrid.rowDrop=this.rowDrop.bind(this)},e.prototype.rowDragStart=function(e){this.parent.trigger("rowDragStart",e),this.parent.element.style.position="relative"},e.prototype.addErrorElem=function(){var e=document.getElementsByClassName("e-ganttdrag")[0];if(!e.querySelectorAll(".e-errorelem").length){var t=document.createElement("div");i.i(n.classList)(t,["e-errorcontainer"],[]),i.i(n.classList)(t,["e-icons","e-errorelem"],[]);var r=e.querySelector(".errorValue"),a=e.querySelector(".e-rowcell").innerHTML;r&&(a=r.innerHTML,r.parentNode.removeChild(r)),e.querySelector(".e-rowcell").innerHTML="";var s=document.createElement("span");s.className="errorValue",s.style.paddingLeft="16px",s.innerHTML=a,e.querySelector(".e-rowcell").appendChild(t),e.querySelector(".e-rowcell").appendChild(s)}},e.prototype.removeErrorElem=function(){var e=document.querySelector(".e-errorelem");e&&e.remove()},e.prototype.rowDrag=function(e){var t=this.parent.element.querySelector(".e-cloneproperties");t.style.display="none";var r=t.cloneNode(!0);r.classList.add("e-ganttdrag"),r.style.display="",this.parent.element.querySelectorAll(".e-cloneproperties").length<=1?this.parent.element.appendChild(r):document.getElementsByClassName("e-cloneproperties")[0].querySelectorAll(".e-errorelem").length?this.addErrorElem():this.removeErrorElem(),"Both"===this.parent.gridLines&&i.i(n.addClass)(this.parent.element.querySelectorAll(".e-ganttdrag .e-rowcell"),["e-bothganttlines"]);var a=this.parent.element.querySelector(".e-ganttdrag"),s=this.parent.element.getClientRects()[0].top,o=this.parent.element.getClientRects()[0].left,l=i.i(n.getValue)("event",e.originalEvent).clientX-o,d=i.i(n.getValue)("event",e.originalEvent).clientY-s;a.style.left=l+20+"px",a.style.top=d+20+"px",this.parent.trigger("rowDrag",e)},e.prototype.rowDragStartHelper=function(e){this.parent.trigger("rowDragStartHelper",e),this.parent.readOnly&&(e.cancel=!0),"ResourceView"===this.parent.viewType&&0===i.i(n.getValue)("level",e.data[0])&&(e.cancel=!0)},e.prototype.rowDrop=function(e){var t=document.querySelector(".e-ganttdrag");t&&t.remove();var r=i.i(n.closest)(e.target,".e-row"),a=r?parseInt(r.getAttribute("data-rowindex"),10):e.dropIndex;e.dropIndex=a,e.dropRecord=this.parent.updatedRecords[e.dropIndex],this.parent.trigger("rowDrop",e),"ResourceView"===this.parent.viewType&&("middleSegment"===e.dropPosition&&(1!==e.dropRecord.level&&e.dropRecord.uniqueID!==i.i(n.getValue)("parentItem",e.data[0]).uniqueID||(e.cancel=!0)),"middleSegment"!==e.dropPosition&&(0!==e.dropRecord.level&&i.i(n.getValue)("parentItem",e.data[0]).uniqueID!==e.dropRecord.parentItem.uniqueID||(e.cancel=!0))),e.cancel||(e.requestType="beforeDrop",this.parent.trigger("actionBegin",e),e.cancel||(this.dropRows(e,!0),e.cancel=!0))},e.prototype.dropRows=function(e,t){if(!this.parent.readOnly){if(this.dropPosition=e.dropPosition,"Invalid"!==e.dropPosition&&this.parent.editModule){var r=this.parent,a=void 0;this.droppedRecord=r.updatedRecords[e.dropIndex];var s=[],o=this.droppedRecord;e.data[0]?s=e.data:s.push(e.data);for(var l=0,d=s.length,p=this,h=0;h<d;h++){var u=function(e){if(p.parent.isOnEdit=!0,a=s[e],p.draggedRecord=a,"Invalid"!==p.dropPosition){if("ResourceView"===p.parent.viewType&&(p.checkisSharedTask(),p.previousParent=p.draggedRecord.parentItem.uniqueID),p.isSharedTask)return{value:void 0};t&&p.deleteDragRow();var d=p.treeGridData.indexOf(o);if("topSegment"===p.dropPosition&&p.dropAtTop(d),"bottomSegment"===p.dropPosition&&!p.isSharedTask){if(o.hasChildRecords){if(l=p.parent.editModule.getChildCount(o,0),p.parent.taskFields.parentID&&p.ganttData.length>0&&p.ganttData.splice(d+l+1,0,p.draggedRecord.taskData),p.treeGridData.splice(d+l+1,0,p.draggedRecord),p.parent.ids.splice(d+l+1,0,p.draggedRecord.ganttProperties.rowUniqueID.toString()),"ResourceView"===p.parent.viewType){var h=0===p.draggedRecord.level?"R"+p.draggedRecord.ganttProperties.taskId:"T"+p.draggedRecord.ganttProperties.taskId;p.parent.getTaskIds().splice(d+l+1,0,h)}}else if(p.parent.taskFields.parentID&&p.ganttData.length>0&&p.ganttData.splice(d+1,0,p.draggedRecord.taskData),p.treeGridData.splice(d+1,0,p.draggedRecord),p.parent.ids.splice(d+1,0,p.draggedRecord.ganttProperties.rowUniqueID.toString()),"ResourceView"===p.parent.viewType){var u=0===p.draggedRecord.level?"R"+p.draggedRecord.ganttProperties.taskId:"T"+p.draggedRecord.ganttProperties.taskId;p.parent.getTaskIds().splice(d+1,0,u)}if(p.parent.setRecordValue("parentItem",p.treeGridData[d].parentItem,a),p.parent.setRecordValue("parentUniqueID",p.treeGridData[d].parentUniqueID,a),p.parent.setRecordValue("level",p.treeGridData[d].level,a),a.hasChildRecords){p.updateChildRecordLevel(a,1),p.updateChildRecord(a,d+l+1)}if(o.parentItem){var c=p.parent.getParentTask(o.parentItem).childRecords,g=c,f=g.indexOf(o)+1;g.splice(f,0,a)}}"middleSegment"===p.dropPosition&&(p.dropMiddle(d),o.childRecords.length>0&&(delete o.ganttProperties.segments,delete o.taskData[p.parent.taskFields.segments])),i.i(n.isNullOrUndefined)(a.parentItem&&-1!==p.updateParentRecords.indexOf(a.parentItem))||p.updateParentRecords.push(a.parentItem)}if(!p.parent.enableVirtualization){var m=r.flatData,y=void 0,v=void 0,D=p.parent.dataSource,w=p.parent.taskFields.id;if(a.index<o.index){y=a.index;for(var k=0;k<D.length;k++){if("break"===function(e){var t=p.parent.currentViewData.filter(function(t){return t[w]===D[e][w]})[0];if(t&&t.index>o.index)return v=t.index,"break"}(k))break}}else{y=o.index;for(var S=0;S<D.length;S++){if("break"===function(e){var t=p.parent.currentViewData.filter(function(t){return t[w]===D[e][w]})[0];if(t&&t.index>a.index)return v=t.index,"break"}(S))break}}for(var T=y;T<=v;T++)!function(e){if(!i.i(n.isNullOrUndefined)(m[e])&&(m[e].index=e,!i.i(n.isNullOrUndefined)(m[e].parentItem))){var t=m.filter(function(t){return t.uniqueID===m[e].parentUniqueID})[0];m[e].parentItem.index=t.index}}(T)}r.rowDragAndDropModule.refreshDataSource()}(h);if("object"==typeof u)return u.value}if("middleSegment"===this.dropPosition&&(o.ganttProperties.predecessor&&(this.parent.editModule.removePredecessorOnDelete(o),o.ganttProperties.predecessor=null,o.ganttProperties.predecessorsName=null,o[this.parent.taskFields.dependency]=null,o.taskData[this.parent.taskFields.dependency]=null),o.ganttProperties.isMilestone&&(this.parent.setRecordValue("isMilestone",!1,o.ganttProperties,!0),i.i(n.isNullOrUndefined)(o.taskData[this.parent.taskFields.milestone])||!0===o.taskData[this.parent.taskFields.milestone]&&(o.taskData[this.parent.taskFields.milestone]=!1))),"ResourceView"===this.parent.viewType&&!this.isSharedTask){var c=void 0;c="middleSegment"===this.dropPosition?this.droppedRecord.uniqueID:this.droppedRecord.parentItem.uniqueID;var g=this.parent.getTaskByUniqueID(c),f={};f[this.parent.taskFields.resourceInfo]=[],f[this.parent.taskFields.resourceInfo].push(g.ganttProperties.taskId),this.removeExistingResources();var m=this.parent.dataOperation.setResourceInfo(f),y=this.draggedRecord;i.i(n.isNullOrUndefined)(y.ganttProperties.resourceInfo)&&(y.ganttProperties.resourceInfo=[]),"Unassigned Task"===g.ganttProperties.taskName?(y.ganttProperties.resourceInfo=[],y.ganttProperties.sharedTaskUniqueIds=[y.ganttProperties.rowUniqueID]):y.ganttProperties.resourceInfo.push(m[0]),this.updateCurrentTask(y),"Unassigned Task"===g.ganttProperties.taskName?this.deleteSharedResourceTask():this.updateSharedResourceTask()}if(this.parent.taskFields.dependency){var v,D=!0,w=void 0;w=a.parentItem?this.parent.currentViewData[this.parent.ids.indexOf(a.parentItem.taskId)]:a,v=o.parentItem?this.parent.currentViewData[this.parent.ids.indexOf(o.parentItem.taskId)]:o;var k=void 0;if(v.uniqueID===w.uniqueID||w.parentItem&&v.uniqueID==this.parent.currentViewData[this.parent.ids.indexOf(w.parentItem.taskId)].uniqueID){k=this.parent.currentViewData.filter(function(e){if(e.ganttProperties.predecessor&&e.ganttProperties.predecessor.length>0)for(var t=0;t<e.ganttProperties.predecessor.length;t++)return parseInt(e.ganttProperties.predecessor[t].to)===parseInt(v.ganttProperties.taskId)||parseInt(e.ganttProperties.predecessor[t].from)===parseInt(v.ganttProperties.taskId);return null});for(var S=[],h=0;h<k.length;h++){if(S=[],k[h].ganttProperties.predecessor)for(var T=0;T<k[h].ganttProperties.predecessor.length;T++)parseInt(k[h].ganttProperties.taskId)!==parseInt(k[h].ganttProperties.predecessor[T].from)?S.push(k[h].ganttProperties.predecessor[T].from):S.push(k[h].ganttProperties.predecessor[T].to);for(var b=this,P=0;P<S.length;P++)!function(e){var t=S[e].replace(/\D/g,""),i=b.parent.currentViewData.filter(function(e){return parseInt(e.ganttProperties.taskId)==parseInt(t)});(D=b.parent.connectorLineEditModule.validateParentPredecessor(k[h],i[0]))||(b.parent.dataOperation.resetDependency(k[h]),b.parent.dataOperation.resetDependency(i[0]))}(P)}}}for(var P=0;P<this.updateParentRecords.length;P++)this.parent.dataOperation.updateParentItems(this.updateParentRecords[P]);this.updateParentRecords=[],this.parent.isOnEdit=!1}i.i(n.isNullOrUndefined)(this.parent.editModule)||this.parent.editModule.refreshRecord(e,!0)}},e.prototype.updateCurrentTask=function(e){this.parent.dataOperation.updateMappingData(e,"resourceInfo"),this.parent.editModule.updateResourceRelatedFields(e,"resource"),this.parent.editModule.dialogModule.dialogEditValidationFlag=!1,this.parent.editModule.dialogModule.validateDuration(e),this.parent.dataOperation.updateWidthLeft(e),this.parent.dataOperation.updateTaskData(e)},e.prototype.deleteSharedResourceTask=function(){for(var e=0;e<this.parent.getTaskIds().length;e++)this.parent.getTaskIds()[e]==="T"+this.draggedRecord.ganttProperties.taskId&&("Unassigned Task"!==this.parent.getTaskByUniqueID(this.parent.currentViewData[e].parentItem.uniqueID).ganttProperties.taskName&&this.removeRecords(this.parent.currentViewData[e]),i.i(n.isNullOrUndefined)(this.parent.currentViewData[e].parentItem&&-1!==this.updateParentRecords.indexOf(this.parent.currentViewData[e].parentItem))||this.updateParentRecords.push(this.parent.currentViewData[e].parentItem))},e.prototype.removeExistingResources=function(){var e=this.parent.getTaskByUniqueID(this.previousParent);if(this.draggedRecord.ganttProperties.resourceInfo)for(var t=0;t<this.draggedRecord.ganttProperties.resourceInfo.length;t++)if(this.draggedRecord.ganttProperties.resourceInfo[t][this.parent.resourceFields.id]===e.ganttProperties.taskId){this.draggedRecord.ganttProperties.resourceInfo.splice(t,1);break}},e.prototype.updateSharedResourceTask=function(){for(var e=0;e<this.parent.getTaskIds().length;e++)this.parent.getTaskIds()[e]==="T"+this.draggedRecord.ganttProperties.taskId&&(this.parent.editModule.updateGanttProperties(this.draggedRecord,this.parent.flatData[e]),this.parent.dataOperation.updateTaskData(this.parent.flatData[e]),i.i(n.isNullOrUndefined)(this.parent.flatData[e].parentItem&&-1!==this.updateParentRecords.indexOf(this.parent.currentViewData[e].parentItem))||this.updateParentRecords.push(this.parent.flatData[e].parentItem))},e.prototype._getExistingTaskWithID=function(e){for(var t=[],i=0;i<this.parent.getTaskIds().length;i++)this.parent.getTaskIds()[i]==="T"+e.ganttProperties.taskId&&t.push(this.parent.flatData[i]);return t},e.prototype.removeResourceInfo=function(e){var t=this.parent.getTaskByUniqueID(this.draggedRecord.parentItem.uniqueID);if(e.ganttProperties.resourceInfo&&e.ganttProperties.resourceInfo.length>1){var r=this._getExistingTaskWithID(e),a=void 0;if(null==r)return;for(var s=0;s<r.length;s++){a=r[s];for(var o=a.ganttProperties.resourceInfo,l=0;l<o.length;l++)if(o[l][this.parent.resourceFields.id]===t.ganttProperties.taskId){o.splice(l,1),this.parent.setRecordValue("resourceInfo",o,a.ganttProperties,!0),this.updateCurrentTask(a),i.i(n.isNullOrUndefined)(a.parentItem&&-1!==this.updateParentRecords.indexOf(a.parentItem))||this.updateParentRecords.push(a.parentItem);break}}}},e.prototype.refreshDataSource=function(){var e,t,r=this.draggedRecord,s=this.droppedRecord,o=this.parent,l=this.parent.taskFields;if(e=this.parent.dataSource instanceof a.DataManager?i.i(n.getValue)("dataOperation.dataArray",this.parent):o.dataSource,e.length>0&&!i.i(n.isNullOrUndefined)(s)&&!s.parentItem){for(var d=0;d<Object.keys(e).length;d++)i.i(n.isNullOrUndefined)(s.taskData[l.child])||e[d][l.child]!==s.taskData[l.child]?i.i(n.isNullOrUndefined)(s.taskData[l.child])&&s.taskData[l.id]===e[d][l.id]&&(t=d):t=d;"topSegment"===this.dropPosition?this.parent.taskFields.parentID||e.splice(t,0,r.taskData):"bottomSegment"===this.dropPosition&&(this.parent.taskFields.parentID||e.splice(t+1,0,r.taskData))}else if(!this.parent.taskFields.parentID&&!i.i(n.isNullOrUndefined)(s)&&s.parentItem&&("topSegment"===this.dropPosition||"bottomSegment"===this.dropPosition)){var p="topSegment"===this.dropPosition?"Above":"Below";this.parent.editModule.addRowSelectedItem=s,this.parent.editModule.updateRealDataSource([r],p),delete this.parent.editModule.addRowSelectedItem}if(this.parent.taskFields.parentID)if(r.parentItem){var h="middleSegment"===this.dropPosition?this.parent.taskFields.id:this.parent.taskFields.parentID;r[this.parent.taskFields.parentID]=s[h],r.ganttProperties.parentId=s[h],("ResourceView"===this.parent.viewType&&"middleSegment"!==this.dropPosition||"ProjectView"===this.parent.viewType)&&(r.taskData[this.parent.taskFields.parentID]=s.taskData[h])}else r[this.parent.taskFields.parentID]=null,r.taskData[this.parent.taskFields.parentID]=null,r.ganttProperties.parentId=null},e.prototype.dropMiddle=function(e){var t=this.parent,r=this.parent.editModule.getChildCount(this.droppedRecord,0),a=i.i(n.isNullOrUndefined)(r)||0===r?e+1:r+e+1;if("middleSegment"===this.dropPosition&&!this.isSharedTask){if(t.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(a,0,this.draggedRecord.taskData),this.treeGridData.splice(a,0,this.draggedRecord),this.parent.ids.splice(a,0,this.draggedRecord.ganttProperties.rowUniqueID.toString()),"ResourceView"===this.parent.viewType){var s=0===this.draggedRecord.level?"R"+this.draggedRecord.ganttProperties.taskId:"T"+this.draggedRecord.ganttProperties.taskId;this.parent.getTaskIds().splice(a,0,s)}this.draggedRecord.hasChildRecords&&this.updateChildRecord(this.draggedRecord,a,this.droppedRecord.expanded),this.recordLevel(),i.i(n.isNullOrUndefined)(this.draggedRecord.parentItem&&-1!==this.updateParentRecords.indexOf(this.draggedRecord.parentItem))&&this.updateParentRecords.push(this.draggedRecord.parentItem)}},e.prototype.recordLevel=function(){var e=this.parent,t=this.draggedRecord,r=this.droppedRecord,a=e.taskFields.child;if(r.hasChildRecords||(r.hasChildRecords=!0,r.childRecords.length||(r.childRecords=[],!e.taskFields.parentID&&i.i(n.isNullOrUndefined)(r.taskData[a])&&(r.taskData[a]=[]))),"middleSegment"===this.dropPosition){var s=i.i(n.extend)({},r);delete s.childRecords;var o={uniqueID:s.uniqueID,expanded:s.expanded,level:s.level,index:s.index,taskId:s.ganttProperties.rowUniqueID};if(this.parent.setRecordValue("parentItem",o,t),this.parent.setRecordValue("parentUniqueID",r.uniqueID,t),r.childRecords.splice(r.childRecords.length,0,t),i.i(n.isNullOrUndefined)(t)||e.taskFields.parentID||i.i(n.isNullOrUndefined)(r.taskData[a])||r.taskData[e.taskFields.child].splice(r.childRecords.length,0,t.taskData),t.hasChildRecords){t.level=r.level+1,this.parent.setRecordValue("level",this.draggedRecord.level,this.draggedRecord),this.updateChildRecordLevel(t,1)}else t.level=r.level+1;r.expanded=!0}},e.prototype.deleteDragRow=function(){this.treeGridData=i.i(s.e)(this.parent)?i.i(n.getValue)("result",this.parent.treeGrid.dataSource):this.parent.treeGrid.dataSource,this.parent.dataSource instanceof a.DataManager?this.ganttData=i.i(n.getValue)("dataOperation.dataArray",this.parent):this.ganttData=i.i(s.e)(this.parent)?i.i(n.getValue)("result",this.parent.dataSource):this.parent.dataSource;var e=this.parent.getTaskByUniqueID(this.draggedRecord.uniqueID);this.removeRecords(e)},e.prototype.checkisSharedTask=function(){this.isSharedTask=!1;for(var e=null,t=0===this.droppedRecord.level?this.droppedRecord.uniqueID:this.droppedRecord.parentItem.uniqueID,i=this.parent.getTaskByUniqueID(t),r=i.childRecords,n=0;n<r.length;n++)"T"+this.draggedRecord.ganttProperties.taskId=="T"+r[n].ganttProperties.taskId&&(this.isSharedTask=!0,e=r[n]);this.isSharedTask&&this.removeResourceInfo(e)},e.prototype.dropAtTop=function(e){var t=this.parent;if(!this.isSharedTask){if(t.taskFields.parentID&&this.ganttData.length>0&&this.ganttData.splice(e,0,this.draggedRecord.taskData),this.treeGridData.splice(e,0,this.draggedRecord),this.parent.ids.splice(e,0,this.draggedRecord.ganttProperties.rowUniqueID.toString()),this.parent.setRecordValue("parentItem",this.droppedRecord.parentItem,this.draggedRecord),this.parent.setRecordValue("parentUniqueID",this.droppedRecord.parentUniqueID,this.draggedRecord),this.parent.setRecordValue("level",this.droppedRecord.level,this.draggedRecord),"ResourceView"===this.parent.viewType){var r=0===this.draggedRecord.level?"R"+this.draggedRecord.ganttProperties.taskId:"T"+this.draggedRecord.ganttProperties.taskId;this.parent.getTaskIds().splice(e,0,r)}if(this.draggedRecord.hasChildRecords){this.updateChildRecord(this.draggedRecord,e),this.updateChildRecordLevel(this.draggedRecord,1)}if(this.droppedRecord.parentItem){var a=this.parent.getParentTask(this.droppedRecord.parentItem).childRecords,s=a,o=s.indexOf(this.droppedRecord);s.splice(o,0,this.draggedRecord)}i.i(n.isNullOrUndefined)(this.draggedRecord.parentItem&&-1!==this.updateParentRecords.indexOf(this.draggedRecord.parentItem))||this.updateParentRecords.push(this.draggedRecord.parentItem)}},e.prototype.updateChildRecordLevel=function(e,t){var i,r=0;if(t++,!e.hasChildRecords)return 0;r=e.childRecords.length;for(var n=0;n<r;n++){i=e.childRecords[n];var a=void 0;if(e.parentItem){a=this.parent.treeGrid.uniqueIDCollection[e.parentItem.uniqueID]}i.level=e.parentItem?a.level+t:e.level+1,this.parent.setRecordValue("level",i.level,i),i.hasChildRecords&&(t--,t=this.updateChildRecordLevel(i,t))}return t},e.prototype.updateChildRecord=function(e,t,i){var r,n=this.parent,a=0;if(!e.hasChildRecords)return 0;a=e.childRecords.length;for(var s=0;s<a;s++)r=e.childRecords[s],t++,n.flatData.splice(t,0,r),this.parent.ids.splice(t,0,r.ganttProperties.rowUniqueID.toString()),n.taskFields.parentID&&n.dataSource.length>0&&this.ganttData.splice(t,0,r.taskData),r.hasChildRecords&&(t=this.updateChildRecord(r,t));return t},e.prototype.removeRecords=function(e){var t,r=this.parent;t=this.parent.dataSource instanceof a.DataManager?i.i(n.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;var s=e,o=this.parent.getParentTask(s.parentItem);if(s){if(s.parentItem){var l=o?o.childRecords:[],d=0;l&&l.length>0&&("ResourceView"===this.parent.viewType&&1===l.length&&(this.parent.isOnDelete=!0,l[0].isDelete=!0,this.parent.dataOperation.updateParentItems(o),this.parent.isOnDelete=!1,l[0].isDelete=!1),d=l.indexOf(s),o.childRecords.splice(d,1),!this.parent.taskFields.parentID&&o.taskData[this.parent.taskFields.child]&&o.taskData[this.parent.taskFields.child].splice(d,1),this.updateParentRecords.push(o))}if(!this.parent.taskFields.parentID){var p=[];p.push(s.ganttProperties.taskId.toString()),("ProjectView"===this.parent.viewType||"ResourceView"===this.parent.viewType&&"middleSegment"!==this.dropPosition)&&this.parent.editModule.removeFromDataSource(p)}if(r.taskFields.parentID){s.hasChildRecords&&s.childRecords.length>0&&this.removeChildItem(s);for(var h=void 0,u=t.length>0&&"ResourceView"!==this.parent.viewType?t:this.parent.flatData,c=0;c<u.length;c++)"ResourceView"===this.parent.viewType?u[c].ganttProperties.rowUniqueID===s.ganttProperties.rowUniqueID&&(h=c):u[c][this.parent.taskFields.id]===s.taskData[this.parent.taskFields.id]&&(h=c);if(-1!==h){t.length>0&&t.splice(h,1);var g=this.treeGridData.indexOf(s);this.treeGridData.splice(g,1),this.parent.ids.splice(g,1),-1!==this.parent.treeGrid.parentData.indexOf(s)&&this.parent.treeGrid.parentData.splice(this.parent.treeGrid.parentData.indexOf(s),1),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(h,1)}}var f=this.treeGridData.indexOf(s);if(!r.taskFields.parentID){var m=this.parent.editModule.getChildCount(s,0);this.treeGridData.splice(f,m+1),this.parent.ids.splice(f,m+1);var y=this.ganttData.indexOf(s.taskData);-1!==y&&(this.ganttData.splice(y,1),this.parent.treeGrid.parentData.splice(y,1)),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(f,m+1)}s.parentItem&&o&&o.childRecords&&!o.childRecords.length&&(o.expanded=!1,o.hasChildRecords=!1)}},e.prototype.removeChildItem=function(e){for(var t,r,s=0;s<e.childRecords.length;s++){t=e.childRecords[s];var o=void 0;o=this.parent.dataSource instanceof a.DataManager?i.i(n.getValue)("dataOperation.dataArray",this.parent):this.parent.dataSource;for(var l=0;l<o.length;l++)o[l][this.parent.taskFields.id]===t.taskData[this.parent.taskFields.id]&&(r=l);if(-1!==r){o.length>0&&o.splice(r,1);var d=this.treeGridData.indexOf(t);this.treeGridData.splice(d,1),this.parent.ids.splice(d,1),"ResourceView"===this.parent.viewType&&this.parent.getTaskIds().splice(r,1)}t.hasChildRecords&&this.removeChildItem(t)}},e.prototype.reorderRows=function(e,t,i){if(!this.parent.readOnly){if(e[0],0)return;"above"===i&&(this.dropPosition="topSegment"),"below"===i&&(this.dropPosition="bottomSegment"),"child"===i&&(this.dropPosition="middleSegment");for(var r=[],n=0;n<e.length;n++)r[n]=this.parent.updatedRecords[e[n]];var a={data:r,dropIndex:t,dropPosition:this.dropPosition};this.dropRows(a,!0)}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(5),n=(i.n(r),i(0)),a=(i.n(n),i(4)),s=(i.n(a),function(){function e(e){this.isSelectionFromChart=!1,this.multipleIndexes=[],this.selectedRowIndexes=[],this.enableSelectMultiTouch=!1,this.openPopup=!1,this.parent=e,this.bindEvents(),this.parent.treeGrid.selectedRowIndex=this.parent.selectedRowIndex,this.parent.treeGrid.allowSelection=this.parent.allowSelection,this.parent.treeGrid.grid.selectionSettings.enableToggle=this.parent.selectionSettings.enableToggle,this.parent.treeGrid.selectionSettings=i.i(r.getActualProperties)(this.parent.selectionSettings),this.wireEvents()}return e.prototype.getModuleName=function(){return"selection"},e.prototype.wireEvents=function(){this.parent.on("selectRowByIndex",this.selectRowByIndex,this),this.parent.isAdaptive?(this.parent.on("chartMouseClick",this.mouseUpHandler,this),this.parent.on("treeGridClick",this.popUpClickHandler,this)):this.parent.on("chartMouseUp",this.mouseUpHandler,this)},e.prototype.selectRowByIndex=function(){-1===this.parent.selectedRowIndex&&-1===this.parent.staticSelectedRowIndex||!this.parent.isLoad||(this.selectRow(-1!==this.parent.staticSelectedRowIndex?this.parent.staticSelectedRowIndex:this.parent.selectedRowIndex),this.parent.staticSelectedRowIndex=-1)},e.prototype.bindEvents=function(){this.parent.treeGrid.rowSelecting=this.rowSelecting.bind(this),this.parent.treeGrid.rowSelected=this.rowSelected.bind(this),this.parent.treeGrid.rowDeselecting=this.rowDeselecting.bind(this),this.parent.treeGrid.rowDeselected=this.rowDeselected.bind(this),this.parent.treeGrid.cellSelecting=this.cellSelecting.bind(this),this.parent.treeGrid.cellSelected=this.cellSelected.bind(this),this.parent.treeGrid.cellDeselecting=this.cellDeselecting.bind(this),this.parent.treeGrid.cellDeselected=this.cellDeselected.bind(this)},e.prototype.rowSelecting=function(e){if(!this.parent.isGanttChartRendered)return void(e.cancel=!0);e.isCtrlPressed=this.isMultiCtrlRequest,e.isShiftPressed=this.isMultiShiftRequest,e.target=this.actualTarget,i.i(n.isNullOrUndefined)(e.foreignKeyData)||0!==Object.keys(e.foreignKeyData).length||delete e.foreignKeyData,this.parent.trigger("rowSelecting",e)},e.prototype.rowSelected=function(e){var t="Multiple"!==this.parent.selectionSettings.type||i.i(n.isNullOrUndefined)(e.rowIndexes)?[e.rowIndex]:e.rowIndexes;this.addRemoveClass(t),this.selectedRowIndexes=i.i(n.extend)([],this.getSelectedRowIndexes(),[],!0),this.parent.setProperties({selectedRowIndex:this.parent.treeGrid.grid.selectedRowIndex},!0),this.isMultiShiftRequest&&(this.selectedRowIndexes=t),this.parent.autoFocusTasks&&this.parent.ganttChartModule.updateScrollLeft(i.i(n.getValue)("data.ganttProperties.left",e)),e.target=this.actualTarget,i.i(n.isNullOrUndefined)(e.foreignKeyData)||0!==Object.keys(e.foreignKeyData).length||delete e.foreignKeyData,this.prevRowIndex=e.rowIndex,i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(e),this.parent.trigger("rowSelected",e)},e.prototype.rowDeselecting=function(e){e.target=this.actualTarget,e.isInteracted=this.isInteracted,this.parent.trigger("rowDeselecting",e)},e.prototype.rowDeselected=function(e){var t,r;if(0!==this.multipleIndexes.length)t=this.multipleIndexes;else if(i.i(n.isNullOrUndefined)(e.rowIndexes))t=[e.rowIndex];else{for(var a=0;a<e.rowIndexes.length;a++)e.rowIndexes[a]===e.rowIndex&&(r=!0);t=r?e.rowIndexes:[e.rowIndex]}this.addRemoveClass(t),this.selectedRowIndexes=i.i(n.extend)([],this.getSelectedRowIndexes(),[],!0),this.parent.setProperties({selectedRowIndex:-1},!0),1===this.selectedRowIndexes.length&&this.parent.setProperties({selectedRowIndex:this.selectedRowIndexes[0]},!0),i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(),"Multiple"===this.parent.selectionSettings.type&&this.parent.isAdaptive&&0===this.selectedRowIndexes.length&&this.hidePopUp(),e.target=this.actualTarget,e.isInteracted=this.isInteracted,this.parent.trigger("rowDeselected",e),this.isInteracted=!1,this.multipleIndexes=[]},e.prototype.cellSelecting=function(e){var t=new a.Deferred;return this.parent.trigger("cellSelecting",e,function(e){t.resolve(e)}),t},e.prototype.cellSelected=function(e){this.parent.trigger("cellSelected",e),i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.cellDeselecting=function(e){this.parent.trigger("cellDeselecting",e)},e.prototype.cellDeselected=function(e){this.parent.trigger("cellDeselected",e),i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},e.prototype.selectCell=function(e,t){this.parent.treeGrid.selectCell(e,t)},e.prototype.selectCells=function(e){this.parent.treeGrid.grid.selectCells(e)},e.prototype.selectRow=function(e,t,r){var a,s=[].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector("tbody").children),o=s.filter(function(t){return parseInt(t.getAttribute("aria-rowindex"),0)===e})[0];-1===e||i.i(n.isNullOrUndefined)(o)||"Cell"===this.parent.selectionSettings.mode||(this.parent.showActiveElement&&!r?this.parent.treeGrid.grid.selectionModule.preventFocus=!0:this.parent.treeGrid.grid.selectionModule.preventFocus=!1,i.i(n.isNullOrUndefined)(this.selectedClass)||this.selectedClass!==o||t||(a=!0),!0!==a&&this.parent.treeGrid.selectRow(e,t),this.parent.treeGrid.grid.selectionModule.preventFocus=!0!==this.parent.treeGrid.grid.selectionModule.preventFocus&&this.parent.treeGrid.grid.selectionModule.preventFocus,this.prevRowIndex=e,this.selectedClass=o)},e.prototype.selectRows=function(e){!i.i(n.isNullOrUndefined)(e)&&e.length>0&&this.parent.treeGrid.selectRows(e)},e.prototype.getSelectedRowIndexes=function(){return this.parent.treeGrid.getSelectedRowIndexes()},e.prototype.getSelectedRowCellIndexes=function(){return this.parent.treeGrid.getSelectedRowCellIndexes()},e.prototype.getSelectedRecords=function(){return this.parent.treeGrid.getSelectedRecords()},e.prototype.getCellSelectedRecords=function(){for(var e=this.parent.selectionModule.getSelectedRowCellIndexes(),t=[],i=0;i<e.length;i++)t.push(this.parent.currentViewData[e[i].rowIndex]);return t},e.prototype.getSelectedRows=function(){return this.parent.treeGrid.getSelectedRows()},e.prototype.clearSelection=function(){this.addRemoveClass(this.selectedRowIndexes),this.parent.treeGrid.clearSelection(),this.parent.selectedRowIndex=-1,this.selectedRowIndexes=[],this.selectedClass=null,i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(),this.isInteracted=!1},e.prototype.highlightSelectedRows=function(e,t){if(this.isMultiCtrlRequest=e.ctrlKey||this.enableSelectMultiTouch,this.isMultiShiftRequest=e.shiftKey,this.actualTarget=e.target,this.isInteracted=!0,this.isSelectionFromChart=t,t){var r=i.i(n.closest)(e.target,"tr.e-chart-row"),a=parseInt(r.getAttribute("aria-rowindex"),10),s=this.parent.selectionSettings.enableToggle;if("Single"===this.parent.selectionSettings.type||!this.isMultiCtrlRequest&&!this.isMultiShiftRequest)this.selectRow(a,s);else if(this.isMultiShiftRequest)this.selectRowsByRange(i.i(n.isNullOrUndefined)(this.prevRowIndex)?a:this.prevRowIndex,a);else{i.i(n.setValue)("isMultiCtrlRequest",!0,this.parent.treeGrid.grid.selectionModule),this.parent.treeGrid.grid.selectionModule.addRowsToSelection([a]);var o=this.selectedRowIndexes.indexOf(a)>-1;o&&this.addRemoveClass([a])}}},e.prototype.getselectedrowsIndex=function(e,t){for(var i=[],r=e<t?{i:e,max:t}:{i:t,max:e},n=r.i,a=r.max;n<=a;n++)i.push(n);e>t&&i.reverse(),this.selectedRowIndexes=i},e.prototype.selectRowsByRange=function(e,t){this.isSelectionFromChart=!0,this.getselectedrowsIndex(e,t),this.selectRows(this.selectedRowIndexes)},e.prototype.addRemoveClass=function(e){for(var t=[].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector("tbody").children),r=this,a=0;a<e.length;a++)!function(a){var s=t.filter(function(t){return parseInt(t.getAttribute("aria-rowindex"),0)===e[a]})[0];i.i(n.isNullOrUndefined)(s)||(r.getSelectedRowIndexes().indexOf(e[a])>-1?r.addClass(s):r.removeClass(s))}(a)},e.prototype.addClass=function(e){i.i(n.addClass)([e],"e-active"),e.setAttribute("aria-selected","true")},e.prototype.removeClass=function(e){i.i(n.removeClass)([e],"e-active"),e.removeAttribute("aria-selected")},e.prototype.showPopup=function(e){this.isSelectionFromChart?(i.i(r.setCssInGridPopUp)(this.parent.element.querySelector(".e-ganttpopup"),e,"e-rowselect e-icons e-icon-rowselect"+(this.enableSelectMultiTouch&&(this.getSelectedRecords().length>1||this.getSelectedRowCellIndexes().length>1)?" e-spanclicked":"")),document.getElementsByClassName("e-gridpopup")[0].style.display="none",this.openPopup=!0):0===this.selectedRowIndexes.length&&this.hidePopUp()},e.prototype.hidePopUp=function(){this.openPopup?(document.getElementsByClassName("e-ganttpopup")[0].style.display="none",this.openPopup=!1):document.getElementsByClassName("e-gridpopup")[0].style.display="none"},e.prototype.popUpClickHandler=function(e){var t=e.target,r=this.parent.treeGrid.grid,a=i.i(n.closest)(t,".e-ganttpopup")?i.i(n.closest)(t,".e-ganttpopup"):i.i(n.closest)(t,".e-gridpopup");if(a){var s=a.querySelector(".e-rowselect");i.i(n.closest)(t,".e-ganttpopup")&&!s.classList.contains("e-spanclicked")?(this.enableSelectMultiTouch=!0,s.classList.add("e-spanclicked")):i.i(n.closest)(t,".e-gridpopup")&&s.classList.contains("e-spanclicked")?(this.openPopup=!0,this.enableSelectMultiTouch=!0):(this.hidePopUp(),this.enableSelectMultiTouch=!1,i.i(n.closest)(t,".e-ganttpopup")&&s.classList.remove("e-spanclicked"))}else if("Multiple"===this.parent.selectionSettings.type&&this.parent.isAdaptive){var o=i.i(n.closest)(t,".e-rowcell");o&&0===this.selectedRowIndexes.length&&this.hidePopUp()}r&&i.i(n.setValue)("enableSelectMultiTouch",this.enableSelectMultiTouch,r.selectionModule)},e.prototype.mouseUpHandler=function(e){var t=!1,a=null;if(e.target.closest(".e-rowcell")?a=e.target:e.target.closest(".e-chart-row")&&(a=e.target.closest(".e-left-label-container")||e.target.closest(".e-taskbar-main-container")||e.target.closest(".e-right-label-container")),this.parent.focusModule&&this.parent.focusModule.setActiveElement(a),this.parent.editModule&&this.parent.editSettings.allowTaskbarEditing&&this.parent.editModule.taskbarEditModule){var s=this.parent.editModule.taskbarEditModule;(s.isMouseDragged||s.tapPointOnFocus)&&(t=!0)}if(!t&&this.parent.element.contains(e.target)){var o=i.i(r.parentsUntil)(e.target,"e-chart-row"),l=e.target.classList.contains("e-rowcell")||e.target.classList.contains("e-row")||e.target.classList.contains("e-treegridexpand")||e.target.classList.contains("e-treegridcollapse")||!i.i(n.isNullOrUndefined)(o);this.popUpClickHandler(e),"Cell"!==this.parent.selectionSettings.mode&&l?(i.i(n.closest)(e.target,"tr.e-chart-row")?(this.parent.enableVirtualization&&(this.parent.treeGrid.grid.selectionModule.isInteracted=!0),this.highlightSelectedRows(e,!0)):this.highlightSelectedRows(e,!1),"Multiple"===this.parent.selectionSettings.type&&this.parent.isAdaptive&&(this.selectedRowIndexes.length>0?this.showPopup(e):this.hidePopUp())):this.isSelectionFromChart=!1}},e.prototype.maintainSelectedRecords=function(e){this.parent.selectionModule.getSelectedRowIndexes().indexOf(e)>-1&&this.addRemoveClass([e])},e.prototype.destroy=function(){this.parent.isDestroyed||(this.parent.off("selectRowByIndex",this.selectRowByIndex),this.parent.isAdaptive?(this.parent.off("chartMouseClick",this.mouseUpHandler),this.parent.off("treeGridClick",this.popUpClickHandler)):this.parent.off("chartMouseUp",this.mouseUpHandler))},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(6),n=(i.n(r),i(5)),a=(i.n(n),function(){function e(e){this.parent=e,r.TreeGrid.Inject(r.Sort),this.parent.treeGrid.allowSorting=this.parent.allowSorting,this.parent.treeGrid.sortSettings=i.i(n.getActualProperties)(this.parent.sortSettings),this.addEventListener()}return e.prototype.getModuleName=function(){return"sort"},e.prototype.addEventListener=function(){this.parent.on("updateModel",this.updateModel,this)},e.prototype.removeEventListener=function(){this.parent.isDestroyed||this.parent.off("updateModel",this.updateModel)},e.prototype.destroy=function(){this.removeEventListener()},e.prototype.sortColumn=function(e,t,i){this.parent.treeGrid.sortByColumn(e,t,i)},e.prototype.clearSorting=function(){this.parent.treeGrid.clearSorting()},e.prototype.updateModel=function(){this.parent.sortSettings=this.parent.treeGrid.sortSettings},e.prototype.removeSortColumn=function(e){this.parent.treeGrid.grid.removeSortColumn(e)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(2)),a=i(10),s=i(3),o=i(78),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d=this&&this.__assign||function(){return d=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},d.apply(this,arguments)},p=function(e){function t(t){var i=e.call(this,t)||this;return i.isMouseDragged=!1,i.dependencyCancel=!1,i.editElement=null,i.elementOffsetLeft=0,i.elementOffsetTop=0,i.elementOffsetWidth=0,i.elementOffsetHeight=0,i.segmentIndex=-1,i.parent=t,i.initPublicProp(),i.wireEvents(),i.editTooltip=new o.a(i.parent,i),i}return l(t,e),t.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)},t.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},t.prototype.mouseDownHandler=function(e){if(this.parent.editSettings.allowTaskbarEditing&&!this.parent.readOnly)if(this.canDrag=!1,this.parent.isAdaptive&&this.taskBarEditElement){var t=this.getElementByPosition(e),r=i.i(n.j)(t,s.F);!r||r.innerHTML!==this.taskBarEditElement.innerHTML||t.classList.contains(s.G)||t.classList.contains(s.H)||this.tapPointOnFocus||(this.updateTaskBarEditElement(e),this.canDrag=!0,e.preventDefault())}else this.parent.isAdaptive||this.updateTaskBarEditElement(e)},t.prototype.mouseClickHandler=function(e){if(this.parent.editSettings.allowTaskbarEditing){var t=this.getElementByPosition(e),r=i.i(n.j)(t,s.F);if(this.parent.selectionModule&&this.parent.selectionModule.enableSelectMultiTouch)return void(this.tapPointOnFocus&&this.updateTaskBarEditElement(e));this.tapPointOnFocus&&r&&r.innerHTML!==this.taskBarEditElement.innerHTML?(this.connectorSecondRecord=this.parent.ganttChartModule.getRecordByTaskBar(r),this.connectorSecondAction="ConnectorPointLeftDrag",this.connectorSecondElement=r,this.fromPredecessorText="Finish",this.validateConnectorPoint()&&this.taskBarEditingAction(e,!0),this.showHideActivePredecessors(!1),this.initPublicProp()):t.classList.contains(s.I)||t.classList.contains(s.J)?(this.canDrag=!1,this.multipleSelectionEnabled(),this.showHideTaskBarEditingElements(t,this.taskBarEditElement),this.tapPointOnFocus=!0,this.taskBarEditAction="ConnectorPointRightDrag",this.connectorSecondRecord=this.taskBarEditRecord,this.taskBarEditingAction(e,!1)):(this.tapPointOnFocus&&(this.showHideActivePredecessors(!1),this.showHideTaskBarEditingElements(r,this.taskBarEditElement)),this.updateTaskBarEditElement(e))}},t.prototype.showHideActivePredecessors=function(e){var t=this.taskBarEditRecord.ganttProperties,n=t.predecessor,a="ResourceView"===this.parent.viewType?t.taskId:t.rowUniqueID;if(n)for(var o=0;o<n.length;o++){var l=n[o];a.toString()!==l.from&&a.toString()!==l.to||this.applyActiveColor(l.from,l.to,e)}var d=this.parent.ganttChartModule.chartBodyContainer;e?(i.i(r.addClass)([this.taskBarEditElement],[s.K]),i.i(r.addClass)([d],[s.L])):(i.i(r.removeClass)([this.taskBarEditElement],[s.K]),i.i(r.removeClass)([d],[s.L])),this.touchEdit=e,i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems()},t.prototype.applyActiveColor=function(e,t,n){var a="ProjectView"===this.parent.viewType?this.taskBarEditRecord.ganttProperties.taskId.toString():this.taskBarEditRecord.ganttProperties.rowUniqueID.toString(),o=a===e?this.parent.connectorLineModule.getRecordByID(t):this.parent.connectorLineModule.getRecordByID(e),l=this.parent.ganttChartModule.getChartRows()[this.parent.currentViewData.indexOf(o)];if(!i.i(r.isNullOrUndefined)(l)){var d=l.querySelector("."+s.F),p=this.parent.element.querySelector("#ConnectorLineparent"+e+"child"+t);n?(i.i(r.addClass)([d],[s.M]),p&&i.i(r.addClass)([p],[s.M])):(i.i(r.removeClass)([d],[s.M]),p&&i.i(r.removeClass)([p],[s.M]))}},t.prototype.validateConnectorPoint=function(){var e=this.taskBarEditRecord.ganttProperties,t=this.connectorSecondRecord.ganttProperties,i=!0,r="ResourceView"===this.parent.viewType?e.taskId:e.rowUniqueID,n="ResourceView"===this.parent.viewType?t.taskId:t.rowUniqueID;if(this.connectorSecondRecord.hasChildRecords)i=!1;else if(t.predecessor)for(var a=0;a<t.predecessor.length;a++){var s=t.predecessor[a];if(s.from===r.toString()&&s.to===n.toString()){this.parent.connectorLineEditModule.childRecord=this.connectorSecondRecord,this.parent.connectorLineEditModule.predecessorIndex=a,this.parent.connectorLineEditModule.renderPredecessorDeleteConfirmDialog(),i=!1;break}if(s.from===n.toString()&&s.to===r.toString()){this.parent.connectorLineEditModule.childRecord=this.taskBarEditRecord,this.parent.connectorLineEditModule.predecessorIndex=a,this.parent.connectorLineEditModule.renderPredecessorDeleteConfirmDialog(),i=!1;break}}return i},t.prototype.mouseLeaveHandler=function(e){this.dragMouseLeave=!0},t.prototype.updateTaskBarEditElement=function(e){var t,a=this.getElementByPosition(e);if(a.classList.contains(s.N)||a.classList.contains(s.O)||a.classList.contains(s.P))t=i.i(n.j)(a,s.O);else if(a.classList.contains(s.Q)||a.classList.contains(s.R)||a.classList.contains(s.S))t=i.i(n.j)(a,s.S);else if(t=i.i(n.j)(a,s.F),!i.i(r.isNullOrUndefined)(t)&&!a.classList.contains("e-connectorpoint-left")&&!a.classList.contains("e-connectorpoint-right")){var o=this.parent.ganttChartModule.getRecordByTaskBar(t);!i.i(r.isNullOrUndefined)(o.ganttProperties.segments)&&o.ganttProperties.segments.length>0&&(t=i.i(n.j)(a,s.T))}if(this.parent.editSettings.allowTaskbarEditing&&t){this.showHideTaskBarEditingElements(t,this.taskBarEditElement),this.editElement=t,this.taskBarEditElement=t;var l=this.taskBarEditElement.getAttribute("data-segment-index");if(i.i(r.isNullOrUndefined)(l)?this.segmentIndex=-1:this.segmentIndex=Number(l),this.taskBarEditRecord=this.parent.ganttChartModule.getRecordByTaskBar(this.taskBarEditElement),("mousedown"===e.type||"touchstart"===e.type||"click"===e.type)&&(this.roundOffDuration=!0,this.taskBarEditAction=this.getTaskBarAction(e),"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)||(this.taskBarEditAction=null),this.updateMouseDownProperties(e),"ResourceView"===this.parent.viewType)){if(0===this.taskBarEditRecord.level)return;if(this.parent.enableMultiTaskbar){var d=this.parent.getTaskByUniqueID(this.taskBarEditRecord.parentItem.uniqueID);i.i(r.isNullOrUndefined)(d)||d.expanded||(this.prevZIndex=this.taskBarEditElement.style.zIndex,this.taskBarEditElement.style.zIndex="1000",i.i(r.addClass)([this.taskBarEditElement.querySelector(".e-gantt-child-taskbar")],"e-collapsed-taskbar-drag"))}}}else this.parent.isAdaptive?(this.taskBarEditElement&&this.showHideTaskBarEditingElements(t,this.taskBarEditElement),this.initPublicProp()):this.showHideTaskBarEditingElements(t,this.taskBarEditElement)},t.prototype.showHideTaskBarEditingElements=function(e,t,n){t=t||this.editElement;var a=!!this.parent.taskFields.progress,o=!0;if(!this.parent.readOnly){if("ResourceView"===this.parent.viewType&&this.parent.enableMultiTaskbar&&e){var l=this.parent.ganttChartModule.getRecordByTaskBar(e),d=this.parent.getParentTask(l.parentItem);i.i(r.isNullOrUndefined)(d)||d.expanded||(a=!1,o=!1)}if(e){if(e.querySelector("."+s.U)){if(i.i(r.addClass)([e.querySelector("."+s.U)],[s.V]),i.i(r.addClass)([e.querySelector("."+s.W)],[s.X]),a){var p=!i.i(r.isNullOrUndefined)(e.querySelector("."+s.Y));p&&i.i(r.addClass)([e.querySelector("."+s.Y)],[s.Z])}}else if(this.parent.isAdaptive&&a){var l=this.parent.ganttChartModule.getRecordByTaskBar(e);l.hasChildRecords&&i.i(r.addClass)([e],[s._0])}if(i.i(r.addClass)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+s._1),[s._2]),!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)&&(e.querySelector("."+s.G)||e.parentElement.querySelector("."+s.G))&&o){var h=i.i(r.isNullOrUndefined)(e.querySelector("."+s.G))?e.parentElement:e;i.i(r.addClass)([h.querySelector("."+s.G)],[s.I]),i.i(r.addClass)([h.querySelector("."+s.H)],[s.J])}}else n||i.i(r.removeClass)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+s._1),[s._2]);if(t&&e!==t){if(t.querySelector("."+s.U)&&(i.i(r.removeClass)([t.querySelector("."+s.U)],[s.V]),i.i(r.removeClass)([t.querySelector("."+s.W)],[s.X]),t.querySelector("."+s.Y)&&i.i(r.removeClass)([t.querySelector("."+s.Y)],[s.Z])),i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)||!t.querySelector("."+s.G)&&!t.parentElement.querySelector("."+s.G)){if(this.parent.isAdaptive){var l=this.parent.ganttChartModule.getRecordByTaskBar(t);l&&l.hasChildRecords&&i.i(r.removeClass)([t],[s._0])}}else{var h=i.i(r.isNullOrUndefined)(t.querySelector("."+s.G))?t.parentElement:t;i.i(r.removeClass)([h.querySelector("."+s.G)],[s.I]),i.i(r.removeClass)([h.querySelector("."+s.H)],[s.J])}this.editElement=null}}},t.prototype.getTaskBarAction=function(e){var t=this.getElementByPosition(e),n=this.taskBarEditRecord,a="";return t.classList.contains(s.U)?a="LeftResizing":t.classList.contains(s.W)?a="RightResizing":(t.classList.contains(s.Y)||i.i(r.closest)(t,"."+s.Y))&&this.parent.taskFields.progress?a="ProgressResizing":t.classList.contains(s.G)?a="ConnectorPointLeftDrag":t.classList.contains(s.H)?a="ConnectorPointRightDrag":t.classList.contains(s.N)?a="ParentResizing":t.classList.contains(s.P)||t.classList.contains(s.O)||t.classList.contains(s.S)||t.classList.contains(s.Q)||t.classList.contains(s.R)||t.classList.contains(s.S)?a="ManualParentDrag":n&&(a=n.hasChildRecords?"Auto"===this.parent.taskMode?"ParentDrag":"":n.ganttProperties.isMilestone?"MilestoneDrag":"ChildDrag"),a},t.prototype.updateMouseDownProperties=function(e){var t=this.getCoordinate(e);if(t.pageX||t.pageY){var i=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);this.mouseDownX=t.pageX-i.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.tooltipPositionX=this.mouseDownX,this.mouseDownY=t.pageY-i.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,"",""))},t.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 e=this.taskBarEditRecord.ganttProperties;this.previousItem=this.parent.timelineModule.extendFunction(e,this.previousItemProperty),"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction&&this.editTooltip.showHideTaskbarEditTooltip(!0,this.segmentIndex),this.taskBarEditElement.setAttribute("aria-grabbed","true")}},t.prototype.mouseMoveAction=function(e){var t=this;if(this.parent.isAdaptive){if(!this.canDrag)return;this.multipleSelectionEnabled()}var i=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer),r=this.getCoordinate(e);if(this.mouseMoveX=r.pageX-i.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.mouseMoveY=r.pageY-i.top+this.parent.ganttChartModule.scrollObject.previousScroll.top,this.dragMouseLeave=!1,this.isMouseDragCheck(),this.isMouseDragged&&this.taskBarEditAction){var n={cancel:!1,requestType:"taskbarediting",taskBarEditAction:this.taskBarEditAction,data:this.taskBarEditRecord};-1!==this.segmentIndex&&(n.requestType="mergeSegment"),this.parent.trigger("actionBegin",n,function(i){!1===i.cancel&&t.taskBarEditingAction(e,!1)})}else this.parent.isAdaptive||this.taskBarEditAction||this.updateTaskBarEditElement(e)},t.prototype.taskBarEditingAction=function(e,t){var n=this,a={},s=this.parent.ganttChartModule.getIndexByTaskBar(this.taskBarEditElement);if(null!==this.taskBarEditRecord){if(a.editingFields=this.taskBarEditRecord.ganttProperties,a.data=this.taskBarEditRecord,"ResourceView"===this.parent.viewType&&0===a.data.level)return;a.recordIndex=s,a.taskBarEditAction=this.taskBarEditAction,a.roundOffDuration=this.roundOffDuration,a.cancel=!1,a.previousData=this.previousItem,a.segmentIndex=this.segmentIndex,this.roundOffDuration=a.roundOffDuration,this.targetElement=a.target=i.i(r.closest)(e.target,".e-gantt-child-taskbar"),this.updateMouseMoveProperties(e),"ProgressResizing"===this.taskBarEditAction?this.performProgressResize(e):"LeftResizing"===this.taskBarEditAction?this.enableLeftResizing(e):"RightResizing"===this.taskBarEditAction||"ParentResizing"===this.taskBarEditAction?this.enableRightResizing(e):"ParentDrag"===this.taskBarEditAction||"ChildDrag"===this.taskBarEditAction||"MilestoneDrag"===this.taskBarEditAction||"ManualParentDrag"===this.taskBarEditAction?this.enableDragging(e):"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||(this.updateConnectorLineSecondProperties(e),this.triggerDependencyEvent(e),this.parent.isAdaptive||this.drawFalseLine()),this.setItemPosition(),this.updateEditedItem(),this.editTooltip.updateTooltip(this.segmentIndex),t&&this.taskBarEditedAction(e),this.parent.trigger("taskbarEditing",a,function(e){e.cancel&&null!==n.taskBarEditRecord&&(n.tapPointOnFocus=!1,i.i(r.merge)(n.taskBarEditRecord.ganttProperties,e.previousData))})}},t.prototype.updateMouseMoveProperties=function(e){var t=this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer),i=this.getCoordinate(e);(i.pageX||i.pageY)&&(this.mouseMoveX=i.pageX-t.left+this.parent.ganttChartModule.scrollObject.previousScroll.left,this.tooltipPositionX=this.mouseMoveX,this.mouseMoveY=i.pageY-t.top+this.parent.ganttChartModule.scrollObject.previousScroll.top);var r="ConnectorPointLeftDrag"===this.taskBarEditAction||"ConnectorPointRightDrag"===this.taskBarEditAction;if(this.taskBarEditRecord.ganttProperties.width>3&&("ProgressResizing"!==this.taskBarEditAction||0!==this.taskBarEditRecord.ganttProperties.progress&&100!==this.taskBarEditRecord.ganttProperties.progress)||r){var n=this.mouseMoveX-this.parent.ganttChartModule.scrollObject.previousScroll.left+t.left,a=this.mouseMoveY-this.parent.ganttChartModule.scrollObject.previousScroll.top+t.top;n+20>t.left+this.parent.ganttChartModule.chartBodyContainer.offsetWidth?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.left,this.startScrollTimer("right")):n-20<t.left?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.left,this.startScrollTimer("left")):r&&a+80>t.top+this.parent.ganttChartModule.chartBodyContainer.offsetHeight?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.top,this.startScrollTimer("bottom")):r&&a-20<t.top?(this.timerCount=this.parent.ganttChartModule.scrollObject.previousScroll.top,this.startScrollTimer("top")):this.stopScrollTimer()}else this.stopScrollTimer()},t.prototype.startScrollTimer=function(e){var t=this;this.stopScrollTimer(),this.scrollTimer=window.setInterval(function(){t.timerCount="right"===e?t.timerCount+1>=t.parent.timelineModule.totalTimelineWidth?t.parent.timelineModule.totalTimelineWidth:t.timerCount+1:"bottom"===e?t.timerCount+1:t.timerCount-1<0?0:t.timerCount-1,"bottom"===e||"top"===e?t.parent.ganttChartModule.scrollObject.setScrollTop(t.timerCount):t.parent.ganttChartModule.scrollObject.setScrollLeft(t.timerCount),"ConnectorPointLeftDrag"!==t.taskBarEditAction&&"ConnectorPointRightDrag"!==t.taskBarEditAction||t.drawFalseLine()},0)},t.prototype.stopScrollTimer=function(){window.clearInterval(this.scrollTimer),this.scrollTimer=null},t.prototype.enableDragging=function(e){var t=this.taskBarEditRecord.ganttProperties,n=0;if(this.taskBarEditElement.classList.contains("e-segmented-taskbar")&&!this.taskBarEditElement.classList.contains("e-segment-first")){var a=this.taskBarEditRecord.ganttProperties.segments.map(function(e){return d({},e)}),s=a[this.segmentIndex];this.mouseDownX>this.mouseMoveX?(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,s.left=s.left-n):(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,s.left=s.left+n);var o=a[this.segmentIndex-1],l=a[this.segmentIndex+1],p=void 0;p=this.taskBarEditElement.classList.contains("e-segment-inprogress")?s.left<o.left+o.width?o.left+o.width:s.width+s.left>l.left?l.left-s.width:s.left:s.left<o.left+o.width?o.left+o.width:t.left+s.width+s.left>=this.parent.timelineModule.totalTimelineWidth?this.parent.timelineModule.totalTimelineWidth-s.width:s.left,s.left=p,this.parent.setRecordValue("segments",a,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")}else{this.mouseDownX>this.mouseMoveX?(n=this.mouseDownX-this.mouseMoveX)>0&&this.parent.setRecordValue("left",this.previousItem.left-n,t,!0):(n=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("left",this.previousItem.left+n,t,!0));var p=t.left<0?0:t.left+t.width>=this.parent.timelineModule.totalTimelineWidth?this.parent.timelineModule.totalTimelineWidth-t.width:t.left;this.parent.setRecordValue("left",p,t,!0)}},t.prototype.performProgressResize=function(e){var t=this.taskBarEditRecord.ganttProperties,i=0;this.mouseDownX>this.mouseMoveX?this.mouseMoveX>t.left&&this.mouseMoveX<t.left+t.width&&t.left>0?(i=this.mouseMoveX-t.left,this.parent.setRecordValue("progressWidth",i,t,!0)):this.mouseMoveX>=t.left+t.width?this.parent.setRecordValue("progressWidth",t.width,t,!0):this.parent.setRecordValue("progressWidth",0,t,!0):this.mouseMoveX>t.left&&this.mouseMoveX<t.left+t.width?(i=this.mouseMoveX-t.left,this.parent.setRecordValue("progressWidth",i,t,!0)):this.mouseMoveX<=t.left?this.parent.setRecordValue("progressWidth",0,t,!0):this.parent.setRecordValue("progressWidth",t.width,t,!0);var r=t.progressWidth>t.width?t.width:t.progressWidth;r=t.progressWidth<0?0:t.progressWidth,this.parent.setRecordValue("progressWidth",r,t,!0);var n=t.width-t.progressWidth;this.progressBorderRadius=n<=4?4-n:0},t.prototype.enableLeftResizing=function(e){var t=this.taskBarEditRecord.ganttProperties,i=0;this.taskBarEditElement.classList.contains("e-segmented-taskbar")?this.enableSplitTaskLeftResize(t):(this.mouseDownX>this.mouseMoveX?this.mouseMoveX<t.left+t.width?(i=this.mouseDownX-this.mouseMoveX,t.left>0&&(this.parent.setRecordValue("left",this.previousItem.left-i,t,!0),this.parent.setRecordValue("width",this.previousItem.width+i,t,!0))):this.mouseMoveX>t.left+t.width&&(i=this.mouseDownX-this.mouseMoveX,this.parent.setRecordValue("left",this.previousItem.left-i,t,!0),this.parent.setRecordValue("width",3,t,!0)):this.mouseMoveX<t.left+t.width?(i=this.mouseMoveX-this.mouseDownX,t.left<t.left+t.width&&this.previousItem.left+i<=this.previousItem.left+this.previousItem.width&&(this.parent.setRecordValue("left",this.previousItem.left+i,t,!0),this.parent.setRecordValue("width",this.previousItem.width-i,t,!0))):(i=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("left",this.previousItem.left+i,t,!0),this.parent.setRecordValue("width",3,t,!0)),this.updateEditPosition(e,t),this.parent.setRecordValue("left",this.previousItem.left+this.previousItem.width-t.width,t,!0))},t.prototype.enableSplitTaskLeftResize=function(e){var t=this.taskBarEditRecord.ganttProperties.segments.map(function(e){return d({},e)}),n=t[this.segmentIndex],a=0;if(this.mouseDownX>this.mouseMoveX)if(this.mouseMoveX<e.left+n.width+n.left){if(a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,n.left>0){if(n.left=n.left-a,n.width=n.width+a,0!==this.segmentIndex){var s=t[this.segmentIndex-1];if(e.left+n.left<e.left+s.left+s.width){var o=e.left+s.left+s.width-(e.left+n.left);n.width-=o,n.left=n.left+o}}}else if(n.left<=0&&0===this.segmentIndex){this.parent.setRecordValue("left",e.left-a,e,!0),this.parent.setRecordValue("width",e.width+a,e,!0),n.width=n.width+a;for(var l=1;l<e.segments.length;l++){var p=t[l];p.left=p.left+a}}}else this.mouseMoveX>e.left+n.width+n.left&&(a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,n.left=n.left-a,n.width=this.parent.perDayWidth);else if(this.mouseMoveX<e.left+n.width+n.left-this.parent.perDayWidth)if(a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,0===this.segmentIndex&&n.left<=0){this.parent.setRecordValue("left",e.left+a,e,!0),this.parent.setRecordValue("width",e.width-a,e,!0),n.width=n.width-a;for(var l=1;l<e.segments.length;l++){var h=t[l];h.left=h.left-a}}else n.left<n.left+n.width&&n.left+a<=n.left+n.width&&(n.left=n.left+a,n.width=n.width-a);else if(this.mouseMoveX<e.left+n.left+n.width&&n.width>this.parent.perDayWidth){a=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX;var u=n.width-a<this.parent.perDayWidth?this.parent.perDayWidth>n.width?this.parent.perDayWidth-n.width:n.width-this.parent.perDayWidth:0;if(a-=u,0===this.segmentIndex){this.parent.setRecordValue("width",e.width-a,e,!0),this.parent.setRecordValue("left",e.left+a,e,!0);for(var l=1;l<e.segments.length;l++){var c=t[l];c.left=c.left-a}}else n.left=n.left+a,n.width=n.width-a}this.parent.setRecordValue("segments",t,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},t.prototype.updateEditPosition=function(e,t){this.updateIsMilestone(t),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(t.width,t.progress),t,!0)},t.prototype.updateIsMilestone=function(e){e.width<=3?(this.parent.setRecordValue("width",3,e,!0),this.parent.setRecordValue("isMilestone",!0,e,!0)):(this.parent.setRecordValue("width",e.width,e,!0),this.parent.setRecordValue("isMilestone",!1,e,!0))},t.prototype.enableRightResizing=function(e){var t=this.taskBarEditRecord.ganttProperties,n=0;if(this.taskBarEditElement.classList.contains("e-segmented-taskbar")){var a=this.taskBarEditRecord.ganttProperties.segments.map(function(e){return d({},e)}),s=a[this.segmentIndex];this.mouseDownX>this.mouseMoveX?this.mouseMoveX>t.left+s.left&&this.mouseDownX-this.mouseMoveX>3?(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseDownX-this.mouseMoveX:this.previousMouseMove-this.mouseMoveX,this.previousMouseMove=this.mouseMoveX,s.width=s.width-n):this.mouseMoveX<t.left+s.left&&(s.width=this.parent.perDayWidth):this.mouseMoveX>s.left&&(n=i.i(r.isNullOrUndefined)(this.previousMouseMove)?this.mouseMoveX-this.mouseDownX:this.mouseMoveX-this.previousMouseMove,this.previousMouseMove=this.mouseMoveX,s.width=s.width+n);var o=void 0,l=this.segmentIndex!==a.length-1?a[this.segmentIndex+1]:null;i.i(r.isNullOrUndefined)(l)||(this.taskBarEditElement.classList.contains("e-segment-last")||(o=s.left+s.width>l.left?l.left-s.left:s.width),s.width=o),this.segmentIndex===t.segments.length-1&&0===this.segmentIndex&&this.parent.setRecordValue("width",s.width,t,!0),this.parent.setRecordValue("segments",a,t,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")}else this.mouseDownX>this.mouseMoveX?this.mouseMoveX>t.left&&this.mouseDownX-this.mouseMoveX>3?(n=this.mouseDownX-this.mouseMoveX,this.parent.setRecordValue("width",this.previousItem.width-n,t,!0)):this.mouseMoveX<t.left&&this.parent.setRecordValue("width",3,t,!0):this.mouseMoveX>t.left&&(n=this.mouseMoveX-this.mouseDownX,this.parent.setRecordValue("width",this.previousItem.width+n,t,!0)),this.updateEditPosition(e,t)},t.prototype.updateEditedItem=function(){var e,t,n,a,s=this.taskBarEditRecord.ganttProperties;switch(this.taskBarEditAction){case"ProgressResizing":this.parent.setRecordValue("progress",this.getProgressPercent(s.width,s.progressWidth),s,!0);break;case"LeftResizing":-1===this.segmentIndex?(e=this.getRoundOffStartLeft(s,this.roundOffDuration),t=this.getDateByLeft(e),i.i(r.isNullOrUndefined)(s.endDate)&&(n=this.parent.dateValidationModule.getValidEndDate(s),this.parent.setRecordValue("endDate",n,s,!0)),a=this.parent.dateValidationModule.checkStartDate(t,s,null),this.parent.setRecordValue("startDate",new Date(a.getTime()),s,!0),0===this.parent.dateValidationModule.compareDates(s.startDate,s.endDate)&&i.i(r.isNullOrUndefined)(s.isMilestone)&&!1===s.isMilestone&&0===s.duration&&this.parent.setRecordValue("duration",1,s,!0),s.isMilestone&&this.parent.setRecordValue("endDate",new Date(a.getTime()),s,!0),this.parent.dateValidationModule.calculateDuration(this.taskBarEditRecord),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")):this.updateSplitLeftResize(s);break;case"RightResizing":case"ParentResizing":if(-1===this.segmentIndex){e=this.getRoundOffEndLeft(s,this.roundOffDuration);var o=this.getDateByLeft(e);i.i(r.isNullOrUndefined)(s.startDate)&&(a=this.parent.dateValidationModule.getValidStartDate(s),this.parent.setRecordValue("startDate",a,s,!0));var l=i.i(r.isNullOrUndefined)(s.startDate)?a:s.startDate;n=s.isMilestone?l:this.parent.dateValidationModule.checkEndDate(o,this.taskBarEditRecord.ganttProperties),this.parent.setRecordValue("endDate",new Date(n.getTime()),s,!0),this.parent.dateValidationModule.calculateDuration(this.taskBarEditRecord),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")}else this.updateSplitRightResizing(s);break;case"ParentDrag":case"ChildDrag":case"MilestoneDrag":case"ManualParentDrag":-1===this.segmentIndex||0===this.segmentIndex?this.updateChildDrag(s):this.setSplitTaskDrag(s)}},t.prototype.updateChildDrag=function(e){var t,n=this.getRoundOffStartLeft(e,this.roundOffDuration),a=this.getDateByLeft(n);0===this.segmentIndex?(this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(a,e,null),e,!0),e.segments[0].startDate=a,e.segments[0].endDate=this.parent.dataOperation.getEndDate(e.segments[0].startDate,e.segments[0].duration,e.durationUnit,e,!1),this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments"),this.parent.chartRowsModule.incrementSegments(e.segments,0,this.taskBarEditRecord),this.parent.setRecordValue("endDate",e.segments[e.segments.length-1].endDate,e,!0)):!i.i(r.isNullOrUndefined)(e.endDate)&&i.i(r.isNullOrUndefined)(e.startDate)?(t=this.parent.dateValidationModule.checkStartDate(a,e,null),t=this.parent.dateValidationModule.checkEndDate(t,this.taskBarEditRecord.ganttProperties),this.parent.setRecordValue("endDate",t,e,!0)):(this.parent.setRecordValue("startDate",this.parent.dateValidationModule.checkStartDate(a,e,null),e,!0),i.i(r.isNullOrUndefined)(e.duration)||this.parent.dateValidationModule.calculateEndDate(this.taskBarEditRecord))},t.prototype.updateSplitLeftResize=function(e){var t=e.segments[this.segmentIndex],n=0===this.segmentIndex?this.getRoundOffStartLeft(e,this.roundOffDuration):this.getRoundOffStartLeft(t,this.roundOffDuration),a=0===this.segmentIndex?this.getDateByLeft(n):this.getDateByLeft(e.left+n),s=this.parent.dataOperation.checkStartDate(a,e,!1),o=this.parent.dataOperation.getDuration(s,t.endDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);if(t.startDate=new Date(s.getTime()),t.duration=o,this.parent.setRecordValue("duration",this.sumOfDuration(e.segments),e,!0),0===this.segmentIndex&&this.parent.setRecordValue("startDate",t.startDate,e,!0),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration"),!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex-1])){var l=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex-1].endDate,e.segments[this.segmentIndex].startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);t.offsetDuration=l}this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},t.prototype.updateSplitRightResizing=function(e){var t=e.segments[this.segmentIndex],n=this.getRoundOffEndLeft(e,this.roundOffDuration),a=this.getDateByLeft(n),s=this.parent.dataOperation.checkEndDate(a,e,!1),o=this.parent.dataOperation.getDuration(t.startDate,s,e.durationUnit,e.isAutoSchedule,e.isMilestone);if(t.endDate=new Date(s.getTime()),t.duration=o,!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex+1])){var l=e.segments[this.segmentIndex+1],d=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex].endDate,l.startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);t.offsetDuration=d}this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments"),this.parent.setRecordValue("duration",this.sumOfDuration(e.segments),e,!0),this.parent.setRecordValue("endDate",e.segments[e.segments.length-1].endDate,e,!0),this.parent.editModule.updateResourceRelatedFields(this.taskBarEditRecord,"duration")},t.prototype.sumOfDuration=function(e){for(var t=0,i=0;i<e.length;i++){t+=e[i].duration}return t},t.prototype.setSplitTaskDrag=function(e){var t=e.segments[this.segmentIndex],n=this.getRoundOffStartLeft(t,this.roundOffDuration),a=this.getDateByLeft(e.left+n);if(a=this.parent.dateValidationModule.checkStartDate(a,e,null),t.startDate=a,t.endDate=this.parent.dataOperation.getEndDate(t.startDate,t.duration,e.durationUnit,e,!1),t.duration=this.parent.dataOperation.getDuration(t.startDate,t.endDate,e.durationUnit,e.isAutoSchedule,e.isMilestone),this.parent.setRecordValue("duration",this.sumOfDuration(e.segments),e,!0),this.parent.setRecordValue("endDate",e.segments[e.segments.length-1].endDate,e,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.endDate)||this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"endDate"),!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex-1])){var s=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex-1].endDate,e.segments[this.segmentIndex].startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);1!==t.startDate.getDay()||0!==s||this.parent.includeWeekend||(s=1),t.offsetDuration=s}if(!i.i(r.isNullOrUndefined)(e.segments[this.segmentIndex+1])){var o=e.segments[this.segmentIndex+1],s=this.parent.dataOperation.getDuration(e.segments[this.segmentIndex].endDate,o.startDate,e.durationUnit,e.isAutoSchedule,e.isMilestone);1!==o.startDate.getDay()||0!==s||this.parent.includeWeekend||(s=1),o.offsetDuration=s}this.parent.setRecordValue("segments",e.segments,e,!0),this.parent.dataOperation.updateMappingData(this.taskBarEditRecord,"segments")},t.prototype.getRoundOffEndLeft=function(e,t){var i="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier,r=e.width+e.left;if(-1!==this.segmentIndex){var n=e.segments[this.segmentIndex];r=r-e.width+n.width+n.left}var a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(r),1,"Day")/864e5),s=this.parent.perDayWidth-this.parent.perDayWidth/a,o=s/this.parent.perDayWidth;if(void 0===t&&(t=!1),t){if(t)if("Hour"===i){var l=this.parent.perDayWidth/24;a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(r),1,"Hour")/36e5),s=this.parent.perDayWidth/24-this.parent.perDayWidth/24/a,0!==s&&(r=r-s+l)}else if("Minutes"===i){var d=this.parent.perDayWidth/1440;a=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(r),1,"Minutes")/6e4),s=this.parent.perDayWidth/1440-this.parent.perDayWidth/1440/a,0!==s&&(r=r-s+d)}else 0!==s&&(r=r-s+this.parent.perDayWidth)}else"Hour"!==i&&"Minutes"!==i&&(o>.5?r=r-s+this.parent.perDayWidth:o<.5&&(r=r-s+this.parent.perDayWidth/2));return r},t.prototype.getRoundOffStartLeft=function(e,t){var n=(i.i(r.isNullOrUndefined)(e),e.left),a="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier,s=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(n),1,"Day")/864e5),o=this.parent.perDayWidth-this.parent.perDayWidth/s,l=o/this.parent.perDayWidth;return void 0===t&&(t=!1),t?t&&("Hour"===a?(s=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(n),1,"Hour")/36e5),o=this.parent.perDayWidth/24-this.parent.perDayWidth/24/s,n-=o):"Minutes"===a?(s=1/(this.parent.timelineModule.getIncrement(this.getDateByLeft(n),1,"Minutes")/6e4),o=this.parent.perDayWidth/1440-this.parent.perDayWidth/1440/s,n-=o):n-=o):"Hour"!==a&&"Minutes"!==a&&(l<=.5?n-=o:l>.5&&(n=n-o+this.parent.perDayWidth/2)),n},t.prototype.getDateByLeft=function(e){var t=new Date(this.parent.timelineModule.timelineStartDate.toString()),i=864e5/this.parent.perDayWidth;t.setTime(t.getTime()+e*i);var r="None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.topTier:this.parent.timelineModule.bottomTier;return"Hour"!==r&&"Minutes"!==r&&(this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString()))&&!this.parent.isInDst(t)?t.setTime(t.getTime()+36e5):!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString()))&&this.parent.isInDst(t)&&t.setTime(t.getTime()-36e5)),t},t.prototype.setItemPosition=function(){var e=this.taskBarEditRecord.ganttProperties,t=i.i(r.isNullOrUndefined)(e.segments)?null:e.segments[this.segmentIndex],n="MilestoneDrag"===this.taskBarEditAction||e.isMilestone?this.parent.chartRowsModule.milestoneHeight:e.width,a=this.parent.isAdaptive?n-2:n-10;i.i(r.isNullOrUndefined)(t)||(a=this.parent.isAdaptive?t.width-2:t.width-10);var o=this.taskBarEditElement.classList.contains(s.F)?this.taskBarEditElement:i.i(r.closest)(this.taskBarEditElement,"tr."+s._3).querySelector("."+s.F),l=this.taskBarEditElement.classList.contains("e-segmented-taskbar"),d=i.i(r.closest)(this.taskBarEditElement,"tr."+s._3).querySelector("."+s._4),p=i.i(r.closest)(this.taskBarEditElement,"tr."+s._3).querySelector("."+s._5),h=this.taskBarEditElement.querySelector("."+s._6),u=this.taskBarEditElement.querySelector("."+s._7),c=this.taskBarEditElement.querySelector("."+s.Y),g=this.taskBarEditElement.querySelector("."+s.W),f=this.taskBarEditElement.querySelector("."+s._8),m=this.taskBarEditElement.querySelector("."+s._9),y=this.taskBarEditElement.querySelector("."+s._10),v=this.taskBarEditElement,D=this.taskBarEditElement.querySelector("."+s.P),w=this.taskBarEditElement.querySelector("."+s.N),k=this.taskBarEditElement.querySelector("."+s._11);if("ConnectorPointRightDrag"!==this.taskBarEditAction&&"ConnectorPointLeftDrag"!==this.taskBarEditAction){if("ParentResizing"!==this.taskBarEditAction&&"ManualParentDrag"!==this.taskBarEditAction){if(!l||i.i(r.isNullOrUndefined)(e.segments)||"RightResizing"!==this.taskBarEditAction&&0===this.segmentIndex||(this.taskBarEditElement.style.width=t.width+"px",this.taskBarEditElement.style.left=t.left+"px"),o.style.width=n+"px",o.style.left=e.left+"px",d.style.width=e.left+"px","LeftResizing"===this.taskBarEditAction&&0===this.segmentIndex)for(var S=this.taskBarEditElement.parentElement,T=S.getElementsByClassName("e-segmented-taskbar"),b=0;b<e.segments.length;b++){var P=e.segments[b],C=T[b];C.style.width=P.width+"px",C.style.left=P.left+"px"}i.i(r.isNullOrUndefined)(p)||(p.style.left=e.left+n+"px")}y&&(y.style.left=(this.parent.isAdaptive?n+10:n+2)+"px"),"MilestoneDrag"===this.taskBarEditAction||e.isMilestone?(o.style.left=e.left-n/2+"px",d.style.width=e.left-n/2+"px",i.i(r.isNullOrUndefined)(p)||(p.style.left=e.left+n/2+"px")):"ProgressResizing"===this.taskBarEditAction?-1===this.segmentIndex?(u.style.left=e.left+e.progressWidth-10+"px",i.i(r.isNullOrUndefined)(h)||(h.style.width=e.progressWidth+"px",h.style.borderBottomRightRadius=this.progressBorderRadius+"px",h.style.borderTopRightRadius=this.progressBorderRadius+"px",c.style.left=e.progressWidth-8+"px")):(this.updateSegmentProgress(this.taskBarEditRecord.ganttProperties),h.style.width=e.segments[this.segmentIndex].progressWidth+"px",h.style.borderBottomRightRadius=this.progressBorderRadius+"px",h.style.borderTopRightRadius=this.progressBorderRadius+"px",c.style.left=e.segments[this.segmentIndex].progressWidth-8+"px"):"RightResizing"!==this.taskBarEditAction||i.i(r.isNullOrUndefined)(u)?"ParentDrag"===this.taskBarEditAction?(i.i(r.isNullOrUndefined)(f)||(f.style.width=n+"px"),i.i(r.isNullOrUndefined)(h)||(m.style.width=e.progressWidth+"px")):"ParentResizing"===this.taskBarEditAction?(v.style.width=D.style.width=e.width+"px",w.style.left=e.width-k.offsetLeft+"px"):"ManualParentDrag"===this.taskBarEditAction?v.style.left=e.left-e.autoLeft+"px":(i.i(r.isNullOrUndefined)(u)||l||(u.style.width=n+"px"),i.i(r.isNullOrUndefined)(h)||(g.style.left=a+"px",h.style.width=e.progressWidth+"px",i.i(r.isNullOrUndefined)(c)||(c.style.left=e.progressWidth-10+"px")),l&&(g.style.left=a+"px",h.style.width=t.progressWidth+"px",i.i(r.isNullOrUndefined)(c)||(c.style.left=t.progressWidth-10+"px"))):(u.style.width=n+"px",i.i(r.isNullOrUndefined)(h)||(h.style.width=e.progressWidth+"px",g.style.left=a+"px",i.i(r.isNullOrUndefined)(c)||(c.style.left=e.progressWidth-10+"px")))}},t.prototype.mouseUpHandler=function(e){var t=this.isMouseDragged;if(this.previousMouseMove=null,this.editTooltip.showHideTaskbarEditTooltip(!1,this.segmentIndex),this.taskBarEditAction&&this.isMouseDragged)if(!this.dragMouseLeave&&this.taskBarEditedAction)this.taskBarEditedAction(e),this.isMouseDragged=!1;else if(this.parent.isOnEdit=!1,this.cancelTaskbarEditActionInMouseLeave(),this.parent.enableCriticalPath&&this.parent.criticalPathModule){var n=this.parent.criticalPathModule;n.criticalConnectorLine(n.criticalPathCollection,n.detailPredecessorCollection,!0,n.predecessorCollectionTaskIds)}"ResourceView"===this.parent.viewType&&this.parent.enableMultiTaskbar&&!i.i(r.isNullOrUndefined)(this.taskBarEditElement)&&(i.i(r.isNullOrUndefined)(this.taskBarEditElement.querySelector(".e-gantt-child-taskbar"))||this.taskBarEditElement.querySelector(".e-gantt-child-taskbar").classList.contains("e-collapsed-taskbar-drag")&&(i.i(r.removeClass)([this.taskBarEditElement.querySelector(".e-gantt-child-taskbar")],"e-collapsed-taskbar-drag"),this.taskBarEditElement.style.zIndex=this.prevZIndex,this.prevZIndex="")),this.parent.isAdaptive&&!t||this.initPublicProp(),this.stopScrollTimer()},t.prototype.taskBarEditedAction=function(e){var t={},i=this.mouseDownX,r=this.mouseDownY,n=this.taskBarEditRecord,a=this.parent.ganttChartModule.getIndexByTaskBar(this.taskBarEditElement),s=this.mouseMoveX,o=this.getCoordinate(e),l=o.pageY-this.parent.ganttChartModule.chartBodyContainer.offsetTop;"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||this.drawPredecessor||(this.dependencyCancel=!0),"ConnectorPointLeftDrag"!==this.taskBarEditAction&&"ConnectorPointRightDrag"!==this.taskBarEditAction||!this.drawPredecessor?(i!==s||Math.abs(r-l)>=(this.parent.rowHeight-this.parent.taskbarHeight)/2)&&null!==n&&(t.editingFields=n.ganttProperties,t.data=n,t.recordIndex=a,t.previousData=this.previousItem,t.taskBarEditAction=this.taskBarEditAction,t.action="TaskbarEditing",t.roundOffDuration=this.roundOffDuration,t.target=this.targetElement,this.taskbarEditedArgs=t,this.taskbarEdited(t)):this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord,this.finalPredecessor)},t.prototype.cancelTaskbarEditActionInMouseLeave=function(){this.parent.editModule.reUpdatePreviousRecords(!0)},t.prototype.updateSegmentProgress=function(e){for(var t=e.segments,i=!0,r=this.splitTasksDuration(t)*this.parent.perDayWidth,n=this.parent.dataOperation.getProgressWidth(r,e.progress),a=0;a<t.length;a++){var s=t[a];delete s.progressWidth,n>0&&n>s.width?(n-=s.width,s.progressWidth=s.width,s.showProgress=!1):i&&(s.progressWidth=n,s.showProgress=!0,n-=s.width,i=!1)}},t.prototype.taskbarEdited=function(e){var t=i.i(r.extend)({},e),n=t.data,a=n.ganttProperties;if("ProgressResizing"===t.taskBarEditAction)t.previousData.progress!==a.progress&&(this.parent.setRecordValue("progress",this.getProgressPercent(a.width,a.progressWidth),a,!0),n.parentItem&&this.parent.editModule.updateParentProgress(n.parentItem),i.i(r.isNullOrUndefined)(a.segments)||this.updateSegmentProgress(a));else{var s=t.data.ganttProperties.segments;if(!i.i(r.isNullOrUndefined)(s)&&s.length>0&&("LeftResizing"===this.taskBarEditAction&&0!==this.segmentIndex||"ChildDrag"===this.taskBarEditAction&&0!==this.segmentIndex||"RightResizing"===this.taskBarEditAction)){var o=s[this.segmentIndex],l=this.taskBarEditRecord.ganttProperties,d=0===this.segmentIndex?null:s[this.segmentIndex-1],p=this.segmentIndex===s.length-1?null:s[this.segmentIndex+1],h=i.i(r.isNullOrUndefined)(p)?this.parent.cloneProjectEndDate:new Date(p.startDate.getTime()),u=i.i(r.isNullOrUndefined)(d)?this.parent.cloneProjectStartDate:new Date(d.endDate.getTime());h.setHours(0,0,0,0),u.setHours(0,0,0,0);var c=new Date(o.startDate.getTime()),g=new Date(o.endDate.getTime());if(c.setDate(c.getDate()-1),g.setDate(g.getDate()+1),c.setHours(0,0,0,0),g.setHours(0,0,0,0),c.getTime()<=u.getTime()&&!i.i(r.isNullOrUndefined)(d)&&!i.i(r.isNullOrUndefined)(o)){var f=[{firstSegmentIndex:d.segmentIndex,secondSegmentIndex:o.segmentIndex}];this.parent.chartRowsModule.mergeTask(l.taskId,f)}else if(g.getTime()>=h.getTime()&&this.segmentIndex!==s.length-1){var f=[{firstSegmentIndex:o.segmentIndex,secondSegmentIndex:p.segmentIndex}];this.parent.chartRowsModule.mergeTask(l.taskId,f)}else if(g.getTime()>=h.getTime()){o.endDate.setDate(this.parent.cloneProjectEndDate.getDate()-1),o.startDate=this.parent.dataOperation.getStartDate(o.endDate,o.duration,l.durationUnit,l);for(var m=s.length-2;m>=0;m++){var y=s[m],v=y.endDate;v.setDate(v.getDate()-y.offsetDuration),y.endDate=v,y.startDate=this.parent.dataOperation.getStartDate(y.endDate,y.duration,l.durationUnit,l)}}}this.parent.dataOperation.updateWidthLeft(t.data)}this.parent.dataOperation.updateTaskData(n),this.parent.editModule.initiateUpdateAction(t)},t.prototype.getProgressPercent=function(e,t){return Math.ceil(t/e*100)},t.prototype.drawFalseLine=function(){var e,t=this.mouseDownX,n=this.mouseDownY,a=this.mouseMoveX,o=this.mouseMoveY,l=Math.sqrt((t-a)*(t-a)+(n-o)*(n-o)),d=180*Math.atan2(o-n,a-t)/Math.PI,p="rotate("+d+"deg)";"ConnectorPointLeftDrag"===this.taskBarEditAction&&(e=this.elementOffsetLeft-this.parent.chartRowsModule.connectorPointWidth/2-this.parent.ganttChartModule.scrollObject.previousScroll.left),"ConnectorPointRightDrag"===this.taskBarEditAction&&(e=this.elementOffsetLeft+this.elementOffsetWidth+this.parent.chartRowsModule.connectorPointWidth/2-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=i.i(r.createElement)("div",{className:s._12,id:"ganttfalseline"+this.parent.element.id,styles:"transform-origin: 0% 100%;right: auto;position: absolute;transform:"+p+";border-top-width: 1px;border-top-style: dashed;z-index: 5;width:"+(l-3)+"px;left:"+e+"px;top:"+h+"px;"}),this.parent.ganttChartModule.chartBodyContainer.appendChild(this.falseLine)},t.prototype.removeFalseLine=function(e){this.falseLine&&(i.i(r.remove)(this.falseLine),this.falseLine=null,e&&(this.elementOffsetLeft=0,this.elementOffsetTop=0,this.elementOffsetWidth=0,this.elementOffsetHeight=0,i.i(r.removeClass)(this.parent.ganttChartModule.scrollElement.querySelectorAll("."+s._1),[s._2])))},t.prototype.updateConnectorLineSecondProperties=function(e){var t=this.getElementByPosition(e),a=i.i(n.j)(t,s.F);this.connectorSecondAction=null;var o=0;if(i.i(n.j)(t,s.G)?(this.connectorSecondAction="ConnectorPointLeftDrag",this.toPredecessorText="Start"):i.i(n.j)(t,s.H)?(this.connectorSecondAction="ConnectorPointRightDrag",this.toPredecessorText="Finish"):(this.connectorSecondAction=null,this.toPredecessorText=null),this.taskBarEditElement!==a&&this.taskBarEditElement!==this.highlightedSecondElement){if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){o=this.parent.virtualScrollModule.getTopPosition()}(this.parent.virtualScrollModule&&this.parent.enableVirtualization&&!this.elementOffsetLeft||!this.parent.enableVirtualization)&&(this.taskBarEditElement.children[0].classList.contains("e-manualparent-main-container")?(this.elementOffsetLeft=this.taskBarEditElement.children[0].offsetLeft+this.taskBarEditElement.offsetLeft,this.elementOffsetTop=this.taskBarEditElement.offsetTop-5+this.taskBarEditElement.children[0].offsetTop+o):(this.elementOffsetLeft=this.taskBarEditElement.offsetLeft,this.elementOffsetTop=this.taskBarEditElement.offsetTop+o),this.elementOffsetWidth=this.taskBarEditElement.offsetWidth,this.elementOffsetHeight=this.taskBarEditElement.offsetHeight),this.showHideTaskBarEditingElements(a,this.highlightedSecondElement,!0)}i.i(r.isNullOrUndefined)(this.connectorSecondAction)&&!i.i(r.isNullOrUndefined)(this.connectorSecondElement)&&(this.editTooltip.showHideTaskbarEditTooltip(!1,this.segmentIndex),i.i(r.removeClass)([this.connectorSecondElement.querySelector("."+s.G)],[s._13]),i.i(r.removeClass)([this.connectorSecondElement.querySelector("."+s.H)],[s._13])),this.connectorSecondElement=this.connectorSecondAction?a:null,this.highlightedSecondElement=a,this.connectorSecondRecord=i.i(r.isNullOrUndefined)(this.connectorSecondElement)?null:this.parent.ganttChartModule.getRecordByTaskBar(this.connectorSecondElement)},t.prototype.triggerDependencyEvent=function(e,t){var n,a,o=this.taskBarEditRecord.ganttProperties,l=this.connectorSecondRecord?this.connectorSecondRecord.ganttProperties:null,d=this.getElementByPosition(e),p=d,h="ResourceView"===this.parent.viewType?o.taskId:o.rowUniqueID;if("ConnectorPointLeftDrag"===this.taskBarEditAction?n=h+"S":"ConnectorPointRightDrag"===this.taskBarEditAction&&(n=h+"F"),this.connectorSecondAction&&("ConnectorPointLeftDrag"===this.connectorSecondAction?(n+="S",a="start"):"ConnectorPointRightDrag"===this.connectorSecondAction&&(n+="F",a="finish")),i.i(r.isNullOrUndefined)(l))return void(this.drawPredecessor=!1);l.predecessorsName?this.finalPredecessor=l.predecessorsName+","+n:this.finalPredecessor=n;var u=this.parent.connectorLineEditModule.validatePredecessorRelation(this.connectorSecondRecord,this.finalPredecessor),c=this.parent.predecessorModule.calculatePredecessor(n,this.connectorSecondRecord),g={};if(g.fromItem=o,g.toItem=l,g.newPredecessorString=this.finalPredecessor,g.predecessor=c&&c[0],g.isValidLink=u,g.requestType="ValidateDependency",this.parent.trigger("actionBegin",g),g.isValidLink=!(!u&&g.isValidLink)&&g.isValidLink,g.isValidLink){if(this.editTooltip.toolTipObj||this.parent.isAdaptive||this.editTooltip.showHideTaskbarEditTooltip(!0,this.segmentIndex),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");f[1].innerText=l.taskName,f[2].innerText=this.parent.localeObj.getConstant(a);var m=this.parent.connectorLineModule.tooltipTable.parentElement.parentElement;m.offsetTop+m.offsetHeight>e.pageY&&(m.style.top=e.pageY-m.offsetHeight-20+"px")}this.drawPredecessor=!0}else this.parent.isAdaptive?(d.classList.contains(s.G)||d.classList.contains(s.H))&&this.showHideActivePredecessors(!0):i.i(r.addClass)([p],[s._13]),this.drawPredecessor=!1},t.prototype.getCoordinate=function(e){var t={};if(this.parent.isAdaptive&&e&&"click"!==e.type){var i=e;"touchmove"!==i.type&&"touchstart"!==i.type&&"touchend"!==i.type||(t.pageX=i.changedTouches[0].pageX,t.pageY=i.changedTouches[0].pageY)}else if(e){var i=e;t.pageX=i.pageX,t.pageY=i.pageY}return t},t.prototype.getElementByPosition=function(e){if(this.parent.isAdaptive){var t=this.getCoordinate(e);return document.elementFromPoint(t.pageX-window.pageXOffset,t.pageY-window.pageYOffset)}return e.target},t.prototype.multipleSelectionEnabled=function(){this.parent.selectionModule&&"Cell"!==this.parent.selectionSettings.mode&&"Multiple"===this.parent.selectionSettings.type&&this.parent.selectionModule.hidePopUp()},t.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))},t.prototype.destroy=function(){this.unWireEvents(),this.stopScrollTimer(),this.parent.editModule.taskbarEditModule=void 0},t}(a.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(13),n=(i.n(r),i(0)),a=(i.n(n),i(3)),s=i(16),o=i(12),l=(i.n(o),function(){function e(e){this.predefinedItems={},this.items=["Add","Edit","Update","Delete","Cancel","ExpandAll","CollapseAll","Search","PrevTimeSpan","NextTimeSpan","ZoomIn","ZoomOut","ZoomToFit","ExcelExport","CsvExport","PdfExport","Indent","Outdent","CriticalPath"],this.parent=e,this.id=this.parent.element.id,this.parent.on("ui-toolbarupdate",this.propertyChanged,this)}return e.prototype.getModuleName=function(){return"toolbar"},e.prototype.renderToolbar=function(){if((this.parent.toolbar||[]).length>0){this.element=i.i(n.createElement)("div",{id:this.parent.controlId+"_Gantt_Toolbar",className:a.E}),this.parent.treeGrid.grid.headerModule?this.parent.element.insertBefore(this.element,this.parent.treeGridPane.offsetParent):this.parent.element.appendChild(this.element);for(var e=["Add","Edit","Update","Delete","Cancel","ExpandAll","CollapseAll","PrevTimeSpan","NextTimeSpan","ZoomIn","ZoomOut","ZoomToFit","ExcelExport","CsvExport","PdfExport","Indent","Outdent","CriticalPath"],t=0,r=e;t<r.length;t++){var s=r[t],o=void 0,l=void 0;"CriticalPath"===s?(o="critical-path",l="criticalPath"):(o=s.toLowerCase(),l=s[0].toLowerCase()+s.slice(1)),this.predefinedItems[s]={id:this.parent.element.id+"_"+o,prefixIcon:"e-"+o,text:this.parent.isAdaptive?"":this.parent.localeObj.getConstant(l),tooltipText:this.parent.localeObj.getConstant(l)+("add"===l||"edit"===l||"delete"===l?this.parent.localeObj.getConstant("task"):"expandAll"===l||"collapseAll"===l?this.parent.localeObj.getConstant("tasks"):""),align:this.parent.isAdaptive?"Right":"Left"}}var d=this.parent.localeObj.getConstant("search");this.parent.isAdaptive?this.predefinedItems.Search={id:this.id+"_searchbutton",prefixIcon:"e-search-icon",tooltipText:d,align:"Right"}:this.predefinedItems.Search={id:this.id+"_search",template:'<div class="e-input-group e-search" role="search"><input id="'+this.id+'_searchbar" class="e-input" name="input" type="search"placeholder= "'+d+'"/><span id="'+this.id+'_searchbutton" class="e-input-group-icon e-search-icon e-icons"tabindex="-1" title="'+d+'" aria-label= "search"></span></div>',tooltipText:d,align:"Right",cssClass:"e-search-wrapper"},this.createToolbar()}},e.prototype.createToolbar=function(){var e=this.getItems();this.toolbar=new r.Toolbar({items:e,clicked:this.toolbarClickHandler.bind(this),height:this.parent.isAdaptive?48:"auto"}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(this.element);var t=this.element.querySelector("#"+this.parent.element.id+"_cancel"),s=this.element.querySelector("#"+this.parent.element.id+"_update");if(t&&i.i(n.addClass)([t],a.a),s&&i.i(n.addClass)([s],a.a),this.parent.isAdaptive){this.element.insertBefore(this.getSearchBarElement(),this.element.childNodes[0]),this.searchElement=this.element.querySelector("#"+this.parent.element.id+"_searchbar");new o.TextBox({placeholder:this.parent.localeObj.getConstant("search"),floatLabelType:"Never",showClearButton:!0}).appendTo(this.searchElement)}else this.searchElement=this.element.querySelector("#"+this.parent.element.id+"_searchbar");this.parent.filterModule&&(this.wireEvent(),this.parent.searchSettings&&this.updateSearchTextBox()),this.parent.readOnly&&this.enableItems([this.parent.element.id+"_add",this.parent.element.id+"_update",this.parent.element.id+"_delete",this.parent.element.id+"_cancel",this.parent.element.id+"_indent",this.parent.element.id+"_outdent"],!1)},e.prototype.getSearchBarElement=function(){var e=this,t=i.i(n.createElement)("div",{className:"e-adaptive-searchbar",styles:"display: none"}),r=i.i(n.createElement)("input",{attrs:{type:"text"},id:this.parent.element.id+"_searchbar"}),a=i.i(n.createElement)("span",{className:"e-backarrowspan e-icons"});return a.onclick=function(){t.style.display="none",e.element.childNodes[1].style.display="block"},t.appendChild(a),t.appendChild(r),t},e.prototype.wireEvent=function(){this.searchElement&&(n.EventHandler.add(this.searchElement,"keyup",this.keyUpHandler,this),n.EventHandler.add(this.searchElement,"focus",this.focusHandler,this),n.EventHandler.add(this.searchElement,"blur",this.blurHandler,this))},e.prototype.propertyChanged=function(e){i.i(n.getValue)("module",e)===this.getModuleName()&&this.parent.toolbar&&(this.element&&this.element.parentNode&&i.i(n.remove)(this.element),this.renderToolbar(),this.refreshToolbarItems())},e.prototype.unWireEvent=function(){this.searchElement&&(n.EventHandler.remove(this.searchElement,"keyup",this.keyUpHandler),n.EventHandler.remove(this.searchElement,"focus",this.focusHandler),n.EventHandler.remove(this.searchElement,"blur",this.blurHandler),this.searchElement=null),this.parent.off("ui-toolbarupdate",this.propertyChanged)},e.prototype.keyUpHandler=function(e){13===e.keyCode&&this.parent.searchSettings.key!==this.searchElement.value&&(this.parent.searchSettings.key=this.searchElement.value,this.parent.dataBind())},e.prototype.focusHandler=function(e){e.target.parentElement.classList.add("e-input-focus")},e.prototype.blurHandler=function(e){e.target.parentElement.classList.remove("e-input-focus")},e.prototype.updateSearchTextBox=function(){this.searchElement&&this.searchElement.value!==this.parent.searchSettings.key&&(this.searchElement.value=this.parent.searchSettings.key)},e.prototype.getItems=function(){var e=[],t=this.parent.toolbar,i=-1;if(t.forEach(function(e,t){("string"==typeof e&&"Search"===e||"object"==typeof e&&"Search"===e.text)&&(i=t)}),i>-1){var r=t.splice(i,1);t.push(r[0])}for(var n=0,a=t;n<a.length;n++){var s=a[n];"string"==typeof s?e.push(this.getItemObject(s)):e.push(this.getItem(s))}return e},e.prototype.getItem=function(e){var t=this.predefinedItems[e.text];return t?i.i(n.extend)(t,t,e):e},e.prototype.getItemObject=function(e){return this.predefinedItems[e]||{text:e,id:this.id+"_"+e}},e.prototype.toolbarClickHandler=function(e){var t=this,r=this.parent,a=this.id;i.i(n.extend)(e,{cancel:!1}),r.trigger(s.a,e,function(e){if(!e.cancel)switch(!0===t.parent.isAdaptive&&(e.item.id!==a+"_edit"&&e.item.id!==a+"_add"&&e.item.id!==a+"_delete"&&e.item.id!==a+"_searchbutton"&&e.item.id!==a+"_expandall"&&e.item.id!==a+"_collapseall"||t.parent.selectionModule&&"Multiple"===t.parent.selectionSettings.type&&(t.parent.selectionModule.hidePopUp(),document.getElementsByClassName("e-gridpopup")[0].style.display="none")),!i.i(n.isNullOrUndefined)(e.item)&&e.item.id){case a+"_edit":r.editModule&&r.editSettings.allowEditing&&r.editModule.dialogModule.openToolbarEditDialog();break;case a+"_indent":r.editModule&&r.selectionModule.getSelectedRecords().length&&r.indent();break;case a+"_critical-path":r.enableCriticalPath?r.enableCriticalPath=!1:r.enableCriticalPath=!0;break;case a+"_outdent":r.editModule&&r.selectionModule.getSelectedRecords().length&&r.outdent();break;case a+"_update":r.editModule.cellEditModule.isCellEdit=!1,r.treeGrid.grid.saveCell();break;case a+"_cancel":r.cancelEdit();break;case a+"_add":r.editModule&&r.editSettings.allowAdding&&r.editModule.dialogModule.openAddDialog();break;case a+"_delete":t.parent.selectionModule&&t.parent.editModule&&("Cell"!==t.parent.selectionSettings.mode&&t.parent.selectionModule.selectedRowIndexes.length||"Cell"===t.parent.selectionSettings.mode&&t.parent.selectionModule.getSelectedRowCellIndexes().length)&&t.parent.editModule.startDeleteAction();break;case a+"_search":if(i.i(n.getValue)("originalEvent.target.id",e)===t.parent.element.id+"_searchbutton"&&t.parent.filterModule){var s=t.element.querySelector("#"+t.parent.element.id+"_searchbar").value;t.parent.searchSettings.key!==s&&(t.parent.searchSettings.key=s,t.parent.dataBind())}break;case a+"_searchbutton":var o=t.element.querySelector(".e-adaptive-searchbar");o.parentElement.childNodes[1].style.display="none",o.style.display="block";break;case a+"_expandall":t.parent.ganttChartModule.expandCollapseAll("expand");break;case a+"_collapseall":t.parent.ganttChartModule.expandCollapseAll("collapse");break;case a+"_prevtimespan":t.parent.previousTimeSpan();break;case a+"_nexttimespan":t.parent.nextTimeSpan();break;case a+"_zoomin":t.zoomIn();break;case a+"_zoomout":t.zoomOut();break;case a+"_zoomtofit":t.zoomToFit()}})},e.prototype.zoomIn=function(){this.parent.timelineModule.processZooming(!0)},e.prototype.zoomToFit=function(){this.parent.timelineModule.processZoomToFit(),this.parent.ganttChartModule.updateScrollLeft(0)},e.prototype.zoomOut=function(){this.parent.timelineModule.processZooming(!1)},e.prototype.refreshToolbarItems=function(e){var t,r=this.parent,a=[],s=[],o=r.editSettings,l=this.id,d=r.selectedRowIndex,p=!!r.selectionModule&&(1===r.selectionModule.selectedRowIndexes.length||1===r.selectionModule.getSelectedRowCellIndexes().length),h=this.toolbar?this.toolbar.items:[],u=[l+"_add",l+"_edit",l+"_delete",l+"_update",l+"_cancel",l+"_indent",l+"_outdent"],c="ResourceView"===this.parent.viewType&&0!==i.i(n.getValue)("data.level",e)||"ProjectView"===this.parent.viewType;if(i.i(n.isNullOrUndefined)(this.parent.editModule))s.push(l+"_delete"),s.push(l+"_add"),s.push(l+"_edit"),s.push(l+"_update"),s.push(l+"_cancel"),s.push(l+"_indent"),s.push(l+"_outdent");else{var g=!!r.editModule.taskbarEditModule&&r.editModule.taskbarEditModule.touchEdit,f=r.flatData&&r.flatData.length;o.allowAdding&&!g?a.push(l+"_add"):s.push(l+"_add"),o.allowEditing&&c&&f&&p&&!g?a.push(l+"_edit"):s.push(l+"_edit"),o.allowEditing&&0!==d&&-1!==d&&f&&p&&"ResourceView"!==this.parent.viewType?0===r.updatedRecords[d].level&&f&&!g?(a.push(l+"_indent"),s.push(l+"_outdent")):(t=r.updatedRecords[d-1],r.updatedRecords[d].level-t.level==1&&-1!==d?(s.push(l+"_indent"),a.push(l+"_outdent")):-1!==d&&(a.push(l+"_indent"),a.push(l+"_outdent"))):(s.push(l+"_indent"),s.push(l+"_outdent"));var m=!!r.selectionModule&&(r.selectionModule.selectedRowIndexes.length>0||r.selectionModule.getSelectedRowCellIndexes().length>0);if(o.allowDeleting&&f&&m&&!g?a.push(l+"_delete"):s.push(l+"_delete"),"Auto"===r.editSettings.mode&&!i.i(n.isNullOrUndefined)(r.editModule.cellEditModule)&&r.editModule.cellEditModule.isCellEdit){a=[],a.push(l+"_update",l+"_cancel"),s=[];for(var y=0;y<h.length;y++)h[y].id!==l+"_update"&&h[y].id!==l+"_cancel"&&-1!==u.indexOf(h[y].id)&&s.push(h[y].id)}else{s.push(l+"_update",l+"_cancel");for(var y=0;y<h.length;y++)-1===a.indexOf(h[y].id)&&-1===s.indexOf(h[y].id)&&a.push(h[y].id)}}for(var v=0;v<a.length;v++){for(var D=void 0,y=0;y<h.length;y++)if(h[y].id===a[v]){D=y;break}h.length>0&&this.toolbar.hideItem(D,!1)}for(var w=0;w<s.length;w++){for(var D=void 0,y=0;y<h.length;y++)if(h[y].id===s[w]){D=y;break}h.length>0&&this.toolbar.hideItem(D,!0)}},e.prototype.enableItems=function(e,t){for(var i=0,r=e;i<r.length;i++){var n=r[i],a=this.element.querySelector("#"+n);a&&this.toolbar.enableItems(a.parentElement,t)}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.toolbar.destroy(),this.parent.filterModule&&this.unWireEvent(),i.i(n.remove)(this.element))},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(6),n=(i.n(r),function(){function e(e){this.parent=e,this.bindTreeGridProperties()}return e.prototype.getModuleName=function(){return"virtualScroll"},e.prototype.bindTreeGridProperties=function(){this.parent.treeGrid.enableVirtualization=this.parent.enableVirtualization,r.TreeGrid.Inject(r.VirtualScroll)},e.prototype.getTopPosition=function(){var e,t=this.parent.ganttChartModule.scrollElement.querySelector(".e-virtualtable"),i=t.style.transform.split(",");if(i.length>1)e=i[1].trim().split(")")[0];else{var r=t.style.transform;e=r.substring(r.lastIndexOf("(")+1,r.lastIndexOf(")"))}return parseFloat(e)},e.prototype.destroy=function(){},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(0),n=(i.n(r),i(3)),a=i(25),s=i(5),o=(i.n(s),i(83)),l=function(){function e(e){this.isExpandCollapseFromChart=!1,this.isExpandAll=!1,this.isGanttElement=!1,this.parent=e,this.chartTimelineContainer=null,this.rangeViewContainer=i.i(r.createElement)("div",{className:n._28}),this.rangeViewContainer.setAttribute("role","RangeContainer"),this.virtualRender=new o.a(this.parent),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("renderPanels",this.renderChartContainer,this),this.parent.on("recordsUpdated",this.renderChartElements,this),this.parent.on("dataReady",this.renderInitialContents,this),this.parent.on("tree-grid-created",this.renderChartContents,this),this.parent.on("destroy",this.destroy,this)},e.prototype.renderChartContents=function(){this.parent.notify("refreshDayMarkers",{}),this.wireEvents()},e.prototype.renderChartContainer=function(){this.chartElement=i.i(r.createElement)("div",{id:this.parent.element.id+"GanttChart",className:n._79}),this.parent.chartPane.appendChild(this.chartElement),this.renderTimelineContainer(),this.renderBodyContainers()},e.prototype.renderInitialContents=function(){this.parent.timelineModule.createTimelineSeries()},e.prototype.renderOverAllocationContainer=function(){for(var e=0;e<this.parent.flatData.length;e++){var t=this.parent.flatData[e];t.childRecords.length>0&&this.parent.dataOperation.updateOverlappingValues(t)}var i=this.parent.element.querySelector("."+n._28);i&&(i.innerHTML=""),0===this.parent.treeGrid.grid.filterSettings.columns.length&&this.renderRangeContainer(this.parent.currentViewData)},e.prototype.renderChartElements=function(){if(this.parent.isFromOnPropertyChange)this.rangeViewContainer.innerHTML="",this.parent.updateProjectDates(this.parent.cloneProjectStartDate,this.parent.cloneProjectEndDate,this.parent.isTimelineRoundOff),this.parent.isFromOnPropertyChange=!1;else{if(this.parent.chartRowsModule.renderChartRows(),this.parent.predecessorModule&&this.parent.taskFields.dependency&&(this.parent.connectorLineIds=[],this.parent.updatedConnectorLineCollection=[],this.parent.predecessorModule.createConnectorLinesCollection()),this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection),this.parent.enableCriticalPath){var e=this.parent.criticalPathModule;this.parent.criticalPathModule.criticalConnectorLine(e.criticalPathCollection,e.detailPredecessorCollection,this.parent.enableCriticalPath,e.predecessorCollectionTaskIds)}"ResourceView"===this.parent.viewType&&this.parent.showOverAllocation&&this.renderOverAllocationContainer()}this.updateWidthAndHeight(),this.parent.notify("selectRowByIndex",{})},e.prototype.renderRangeContainer=function(e){var t,i,r,n=e.length;if(0===this.parent.treeGrid.grid.filterSettings.columns.length)for(t=0;t<n;t++)i=e[t],(r=i.ganttProperties.workTimelineRanges)&&this.renderRange(r,i)},e.prototype.getTopValue=function(e){var t=this.parent.getExpandedRecords(this.parent.currentViewData),i=t.indexOf(e);return e.expanded?(i+1)*this.parent.rowHeight:i*this.parent.rowHeight},e.prototype.getRangeHeight=function(e){return!e.expanded&&e.hasChildRecords?this.parent.rowHeight-Math.floor(this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight):e.childRecords.length*this.parent.rowHeight-Math.floor(this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight)},e.prototype.renderRange=function(e,t){var a=this.getTopValue(t),s=this.rangeViewContainer.querySelector(".rangeContainer"+t.ganttProperties.rowUniqueID);s&&s.remove();var o=i.i(r.createElement)("div",{className:"rangeContainer"+t.ganttProperties.rowUniqueID,styles:"top:"+a+"px; position: absolute;"});if(0!==t.level||t.expanded||!i.i(r.isNullOrUndefined)(t.parentItem)||this.parent.enableMultiTaskbar){for(var l=0;l<e.length;l++){var d=this.getRangeHeight(t),p=i.i(r.createElement)("div",{className:n._80+" e-leftarc",styles:"left:"+e[l].left+"px;\n top: "+Math.floor((this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight)/2)+"px;\n height: "+(d+1)+"px; border-right: 0px"}),h=i.i(r.createElement)("div",{className:n._80+" e-rightarc",styles:"left:"+(e[l].left+e[l].width-5)+"px;\n top: "+Math.floor((this.parent.rowHeight-this.parent.chartRowsModule.taskBarHeight)/2)+"px; height: "+(d+1)+"px;\n border-left: 0px"});o.appendChild(p),o.appendChild(h),this.rangeViewContainer.appendChild(o)}this.parent.ganttChartModule.chartBodyContent.appendChild(this.rangeViewContainer)}},e.prototype.renderTimelineContainer=function(){this.chartTimelineContainer=i.i(r.createElement)("div",{className:n._81}),this.chartTimelineContainer.setAttribute("role","presentation"),this.chartElement.appendChild(this.chartTimelineContainer)},e.prototype.renderBodyContainers=function(){this.chartBodyContainer=i.i(r.createElement)("div",{className:n._82}),this.chartElement.appendChild(this.chartBodyContainer),this.scrollElement=i.i(r.createElement)("div",{className:n._83+" "+n._84,styles:"position:relative;"}),this.chartBodyContainer.appendChild(this.scrollElement),this.chartBodyContent=i.i(r.createElement)("div",{className:n._85,styles:"position:relative; overflow:hidden "}),this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.ganttChartModule.virtualRender.renderWrapper():this.scrollElement.appendChild(this.chartBodyContent),this.scrollObject=new a.a(this.parent);var e=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(e=this.parent.toolbarModule.element.offsetHeight),this.scrollObject.setHeight(this.parent.ganttHeight-this.chartTimelineContainer.offsetHeight-e)},e.prototype.updateWidthAndHeight=function(){var e=0===this.parent.contentHeight?this.parent.flatData.length>1?36:0:this.parent.contentHeight,t=this.parent.element.getElementsByClassName("e-chart-scroll-container e-content")[0];if(e>=t.offsetHeight||"auto"===this.parent.height)this.chartBodyContent.style.height=i.i(r.formatUnit)(e);else{var n=this.parent.element.getElementsByClassName("e-chart-rows-container")[0].offsetHeight;t.offsetHeight>=n?this.chartBodyContent.style.height=t.offsetHeight-17+"px":this.chartBodyContent.style.height=t.offsetHeight+"px"}this.chartBodyContent.style.width=i.i(r.formatUnit)(this.parent.timelineModule.totalTimelineWidth),this.setVirtualHeight(),this.parent.notify("updateHeight",{}),this.parent.updateGridLineContainerHeight(),this.updateLastRowBottomWidth()},e.prototype.setVirtualHeight=function(){if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){i.i(r.getValue)("virtualTrack",this.parent.ganttChartModule.virtualRender).style.height=this.parent.updatedRecords.length*this.parent.rowHeight+"px"}},e.prototype.updateLastRowBottomWidth=function(){if(this.parent.currentViewData.length>0&&"auto"!==this.parent.height){var e=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.currentViewData:this.parent.getExpandedRecords(this.parent.currentViewData),t=e[e.length-1],n=this.parent.currentViewData.indexOf(t),a=this.parent.getRowByIndex(n),s=this.parent.chartRowsModule.ganttChartTableBody;if(s.querySelectorAll(".e-chart-row-cell.e-chart-row-border.e-lastrow")&&i.i(r.removeClass)(s.querySelectorAll(".e-chart-row-cell.e-chart-row-border.e-lastrow"),"e-lastrow"),this.chartBodyContent.clientHeight<this.chartBodyContainer.clientHeight&&a){i.i(r.addClass)(a.querySelectorAll("td"),"e-lastrow");var o=0===this.parent.contentHeight?this.parent.flatData.length>1?36:0:this.parent.contentHeight,l=this.parent.element.getElementsByClassName("e-chart-scroll-container e-content")[0];if(o>=l.offsetHeight)this.chartBodyContent.style.height=i.i(r.formatUnit)(o);else{var d=this.parent.element.getElementsByClassName("e-chart-rows-container")[0].offsetHeight;l.offsetHeight>=d?this.chartBodyContent.style.height=l.offsetHeight-17+"px":this.chartBodyContent.style.height=l.offsetHeight+"px"}}}},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("renderPanels",this.renderChartContainer),this.parent.off("recordsUpdated",this.renderChartElements),this.parent.off("dataReady",this.renderInitialContents),this.parent.off("tree-grid-created",this.renderChartContents),this.parent.off("destroy",this.destroy))},e.prototype.ganttChartMouseDown=function(e){3!==e.which&&this.parent.editSettings.allowTaskbarEditing&&(this.parent.notify("chartMouseDown",e),this.parent.element.tabIndex=0)},e.prototype.ganttChartMouseClick=function(e){this.parent.autoFocusTasks&&this.scrollToTarget(e),this.parent.notify("chartMouseClick",e)},e.prototype.ganttChartMouseUp=function(e){this.parent.editSettings.allowTaskbarEditing&&this.parent.notify("chartMouseUp",e)},e.prototype.scrollToTarget=function(e){var t=i.i(r.closest)(e.target,"tr");if(t&&this.parent.element.contains(t)&&(this.parent.element.querySelectorAll(".e-chart-rows-container")[0].contains(e.target)||this.parent.element.querySelectorAll(".e-gridcontent")[0].contains(e.target))&&this.parent.currentViewData.length>0){var n=i.i(r.getValue)("rowIndex",i.i(r.closest)(e.target,"tr")),a=this.parent.currentViewData[n].ganttProperties.startDate;if(!i.i(r.isNullOrUndefined)(a)){var s=this.parent.dataOperation.getTaskLeft(a,!1);this.parent.autoFocusTasks&&this.updateScrollLeft(s)}}},e.prototype.updateScrollLeft=function(e){e=e>0?e:0,e=this.scrollElement.scrollWidth<=e?this.scrollElement.scrollWidth:e,(this.scrollElement.offsetWidth+this.parent.ganttChartModule.scrollElement.scrollLeft<e||this.scrollElement.scrollLeft>e)&&this.scrollObject.setScrollLeft(e-50)},e.prototype.mouseUp=function(e){if(this.parent.allowRowDragAndDrop){var t=this.parent.element.querySelector(".e-ganttdrag");t&&t.remove()}this.isGanttElement||this.parent.notify("chartMouseUp",e),this.isGanttElement=!1},e.prototype.documentMouseUp=function(e){if(this.isGanttElement=!0,this.parent.allowRowDragAndDrop){var t=this.parent.element.querySelector(".e-ganttdrag");t&&t.remove()}if(!this.parent.isDestroyed&&3!==e.which){var a=!1;if(this.parent.editSettings.allowTaskbarEditing&&i.i(r.getValue)("editModule.taskbarEditModule.isMouseDragged",this.parent)&&i.i(r.getValue)("editModule.taskbarEditModule.taskBarEditAction",this.parent)&&(a=!0),this.parent.notify("chartMouseUp",e),this.parent.showActiveElement&&this.focusedElement&&!e.target.classList.contains("e-split-bar")&&(this.focusedElement.tabIndex=0===this.focusedElement.tabIndex?-1:this.focusedElement.tabIndex,i.i(r.removeClass)([this.focusedElement],"e-active-container")),!a){var s=e.target,o=e.target.classList.contains(n.F)||i.i(r.closest)(e.target,"."+n.F);i.i(r.closest)(s,".e-gantt-parent-taskbar")&&!this.parent.editSettings.allowEditing?this.chartExpandCollapseRequest(e):!o&&this.parent.autoFocusTasks&&this.scrollToTarget(e)}if(this.parent.editModule&&this.parent.editModule.taskbarEditModule&&this.parent.editModule.taskbarEditModule.removeFalseLine(!0),!i.i(r.isNullOrUndefined)(this.parent.onTaskbarClick)&&!a){var s=e.target,l=i.i(r.closest)(s,".e-gantt-parent-taskbar,.e-gantt-child-taskbar,.e-gantt-milestone");l&&this.onTaskbarClick(e,s,l)}}},e.prototype.onTaskbarClick=function(e,t,n){var a=i.i(r.closest)(t,"tr"),s=i.i(r.getValue)("rowIndex",a),o=this.getRecordByTarget(e),l={data:o,taskbarElement:n,rowIndex:s,target:t};this.parent.trigger("onTaskbarClick",l)},e.prototype.ganttChartLeave=function(e){this.parent.editSettings.allowTaskbarEditing&&this.parent.notify("chartMouseLeave",e)},e.prototype.ganttChartMove=function(e){this.parent.editSettings.allowTaskbarEditing&&(this.parent.notify("chartMouseMove",e),!i.i(r.isNullOrUndefined)(this.parent.taskFields.dependency)&&this.parent.connectorLineEditModule&&this.parent.connectorLineEditModule.updateConnectorLineEditElement(e))},e.prototype.contextClick=function(e){this.parent.allowFiltering&&this.parent.filterModule&&this.parent.filterModule.closeFilterOnContextClick(e.srcElement)},e.prototype.mouseMoveHandler=function(e){if(!i.i(r.isNullOrUndefined)(this.parent.onMouseMove)&&(this.parent.flatData.length||e.target.classList.contains("e-header-cell-label")||e.target.classList.contains("e-headercell"))){var t=e.target,n={originalEvent:e},a=i.i(r.closest)(t,".e-chart-row-cell,.e-connector-line-container,.e-event-markers,.e-header-cell-label,.e-rowcell,.e-headercell,.e-indicator-span");if(a){var s=void 0,o=i.i(r.closest)(t,".e-rowcell,.e-chart-row-cell"),l=i.i(r.closest)(t,".e-rowcell,.e-headercell");if(o&&(s=this.parent.ganttChartModule.getRecordByTarget(e),n.data=s),l){var d=i.i(r.getValue)("cellIndex",l);n.column=this.parent.treeGrid.columns[d]}if(i.i(r.closest)(t,".e-indicator-span")){var p=0,h=s.ganttProperties.indicators;if(h.length>1)for(p=0;p<h.length&&h[p].name!==a.innerText.trim();p++);n.indicator=h[p]}if(i.i(r.closest)(t,".e-connector-line-container")){var u={};u.target=a,n.predecessor=this.parent.tooltipModule.getPredecessorTooltipData(u)}if(i.i(r.closest)(t,".e-event-markers")){var u={};u.target=a,n.eventMarkers=this.parent.tooltipModule.getMarkerTooltipData(u)}t.classList.contains("e-header-cell-label")&&(n.date=new Date(t.dataset.content))}this.parent.trigger("onMouseMove",n)}},e.prototype.doubleClickHandler=function(e){this.parent.notify("chartDblClick",e);var t=e.target,n=i.i(r.closest)(t,"tr"),a=i.i(r.getValue)("rowIndex",n),s=this.parent.ganttChartModule.getRecordByTarget(e),o={row:n,rowData:s,rowIndex:a,target:t};this.recordDoubleClick(o)},e.prototype.recordDoubleClick=function(e){this.parent.trigger("recordDoubleClick",e)},e.prototype.getRecordByTarget=function(e){var t,a=i.i(r.closest)(e.target,"div."+n.F);if(i.i(r.isNullOrUndefined)(a)){if(a=i.i(r.closest)(e.target,"tr")){var s=i.i(r.getValue)("rowIndex",i.i(r.closest)(e.target,"tr"));t=this.parent.currentViewData[s]}}else{var o=a.getAttribute("rowUniqueId");t=this.parent.getRecordByID(o)}return t},e.prototype.getChartRows=function(){return null!=document.getElementById(this.parent.element.id+"GanttTaskTableBody")?document.getElementById(this.parent.element.id+"GanttTaskTableBody").querySelectorAll(".e-chart-row"):null},e.prototype.chartExpandCollapseRequest=function(e){if(!this.parent.enableMultiTaskbar){var t=e.target,n=i.i(r.closest)(t,".e-gantt-parent-taskbar"),a=this.getRecordByTarget(e),s=i.i(r.closest)(t,"tr"),o=i.i(r.getValue)("rowIndex",s),l=this.parent.treeGrid.getRows()[o],d={data:a,gridRow:l,chartRow:s,cancel:!1};this.isExpandCollapseFromChart=!0,n.classList.contains("e-row-expand")?this.collapseGanttRow(d):n.classList.contains("e-row-collapse")&&this.expandGanttRow(d)}},e.prototype.reRenderConnectorLines=function(){if(this.parent.connectorLineModule.dependencyViewContainer.innerHTML="",this.parent.connectorLineIds=[],this.parent.updatedConnectorLineCollection=[],this.parent.predecessorModule.createConnectorLinesCollection(),this.parent.connectorLineModule.renderConnectorLines(this.parent.updatedConnectorLineCollection),this.parent.enableCriticalPath&&this.parent.criticalPathModule){var e=this.parent.criticalPathModule;e.criticalConnectorLine(e.criticalPathCollection,e.detailPredecessorCollection,!0,e.predecessorCollectionTaskIds)}},e.prototype.collapseGanttRow=function(e,t){var n=this;t?this.collapsedGanttRow(e):this.parent.trigger("collapsing",e,function(e){n.isExpandCollapseFromChart&&!i.i(r.getValue)("cancel",e)&&n.collapsedGanttRow(e),n.isExpandCollapseFromChart=!1})},e.prototype.collapsedGanttRow=function(e){if(!(i.i(r.isNullOrUndefined)(e.gridRow)&&this.parent.enableVirtualization||i.i(r.isNullOrUndefined)(e.chartRow))){var t=i.i(r.getValue)("data",e);this.isExpandCollapseFromChart?(this.expandCollapseChartRows("collapse",i.i(r.getValue)("chartRow",e),t,null),this.parent.treeGrid.collapseRow(i.i(r.getValue)("gridRow",e),t),this.isExpandCollapseFromChart=!1):this.expandCollapseChartRows("collapse",i.i(r.getValue)("chartRow",e),t,null),"ResourceView"===this.parent.viewType&&this.renderMultiTaskbar(t),this.parent.enableVirtualization||this.parent.updateContentHeight(),this.updateWidthAndHeight(),this.reRenderConnectorLines(),i.i(r.getValue)("chartRow",e).setAttribute("aria-expanded","false"),this.parent.trigger("collapsed",e)}},e.prototype.expandGanttRow=function(e,t){var n=this;t?this.expandedGanttRow(e):this.parent.trigger("expanding",e,function(e){n.isExpandCollapseFromChart&&!i.i(r.getValue)("cancel",e)&&n.expandedGanttRow(e),n.isExpandCollapseFromChart=!1})},e.prototype.expandedGanttRow=function(e){if(!(i.i(r.isNullOrUndefined)(e.gridRow)&&this.parent.enableVirtualization||i.i(r.isNullOrUndefined)(e.chartRow))){var t=i.i(r.getValue)("data",e);this.isExpandCollapseFromChart?(this.expandCollapseChartRows("expand",i.i(r.getValue)("chartRow",e),t,null),this.parent.treeGrid.expandRow(i.i(r.getValue)("gridRow",e),t),this.isExpandCollapseFromChart=!1):(this.parent.isExpandCollapseLevelMethod||this.expandCollapseChartRows("expand",i.i(r.getValue)("chartRow",e),t,null),this.parent.isExpandCollapseLevelMethod=!1),"ResourceView"===this.parent.viewType&&this.renderMultiTaskbar(t),this.parent.enableVirtualization||this.parent.updateContentHeight(),this.updateWidthAndHeight(),this.reRenderConnectorLines(),i.i(r.getValue)("chartRow",e).setAttribute("aria-expanded","true"),this.parent.trigger("expanded",e)}},e.prototype.renderMultiTaskbar=function(e){this.parent.enableMultiTaskbar?this.parent.chartRowsModule.refreshRecords([e],!0):this.parent.showOverAllocation&&this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData)},e.prototype.expandCollapseChartRows=function(e,t,n,a){var s;if("expand"===e){s="table-row",a||(n.expanded=!0);for(var o=t.querySelectorAll(".e-row-collapse"),l=0;l<o.length;l++)i.i(r.addClass)([o[l]],"e-row-expand"),i.i(r.removeClass)([o[l]],"e-row-collapse")}else if("collapse"===e){s="none",a||(n.expanded=!1);for(var o=t.querySelectorAll(".e-row-expand"),l=0;l<o.length;l++)i.i(r.addClass)([o[l]],"e-row-collapse"),i.i(r.removeClass)([o[l]],"e-row-expand")}for(var d=n.childRecords,p=this.getChartRows(),h=[],u=0;u<p.length;u++)p[u].classList.contains("gridrowtaskId"+n.ganttProperties.rowUniqueID+"level"+(n.level+1))&&h.push(p[u]);for(var u=0;u<h.length;u++)h[u].style.display=s,d[u].childRecords&&d[u].childRecords.length&&("collapse"===e||d[u].expanded||this.isExpandAll)&&this.expandCollapseChartRows(e,h[u],d[u],!0)},e.prototype.expandCollapseAll=function(e){"expand"===e?(this.isExpandAll=!0,this.parent.treeGrid.expandAll()):this.parent.treeGrid.collapseAll(),this.isExpandAll=!1},e.prototype.expandAtLevel=function(e){this.parent.treeGrid.expandAtLevel(e)},e.prototype.collapseAtLevel=function(e){this.parent.enableVirtualization&&(this.parent.isExpandCollapseLevelMethod=!0),this.parent.treeGrid.collapseAtLevel(e)},e.prototype.wireEvents=function(){var e=r.Browser.isPointer,t=r.Browser.touchStartEvent,i=r.Browser.touchEndEvent,n=r.Browser.touchMoveEvent,a=e?"pointerleave":"mouseleave";r.EventHandler.add(this.parent.chartPane,t,this.ganttChartMouseDown,this),r.EventHandler.add(this.parent.chartPane,a,this.ganttChartLeave,this),r.EventHandler.add(this.parent.chartPane,n,this.ganttChartMove,this),this.parent.isAdaptive&&(r.EventHandler.add(this.parent.chartPane,s.click,this.ganttChartMouseClick,this),r.EventHandler.add(this.parent.chartPane,i,this.ganttChartMouseUp,this)),this.parent.isAdaptive||(r.EventHandler.add(this.parent.element,i,this.documentMouseUp,this),r.EventHandler.add(document,i,this.mouseUp,this)),r.EventHandler.add(this.parent.element,"mousemove",this.mouseMoveHandler,this),r.EventHandler.add(document.body,"contextmenu",this.contextClick,this),r.EventHandler.add(document,"mouseup",this.contextClick,this),r.EventHandler.add(this.parent.chartRowsModule.ganttChartTableBody,"dblclick",this.doubleClickHandler,this)},e.prototype.unWireEvents=function(){var e=r.Browser.isPointer,t=r.Browser.touchStartEvent,i=r.Browser.touchEndEvent,n=r.Browser.touchMoveEvent,a=e?"pointerleave":"mouseleave";r.EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody,t,this.ganttChartMouseDown),r.EventHandler.remove(this.parent.chartPane,a,this.ganttChartLeave),r.EventHandler.remove(this.parent.chartPane,n,this.ganttChartMove),this.parent.isAdaptive&&(r.EventHandler.remove(this.parent.chartPane,s.click,this.ganttChartMouseClick),r.EventHandler.remove(this.parent.chartPane,i,this.ganttChartMouseUp)),this.parent.isAdaptive||(r.EventHandler.remove(this.parent.element,i,this.documentMouseUp),r.EventHandler.remove(document,i,this.mouseUp)),r.EventHandler.remove(this.parent.element,"mousemove",this.mouseMoveHandler),r.EventHandler.remove(document.body,"contextmenu",this.contextClick),r.EventHandler.remove(document,"mouseup",this.contextClick),r.EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody,"dblclick",this.doubleClickHandler)},e.prototype.getRecordByTaskBar=function(e){return this.parent.currentViewData[this.getIndexByTaskBar(e)]},e.prototype.onTabAction=function(e){this.parent.treeGrid.grid.enableHeaderFocus=this.parent.enableHeaderFocus;var t=this.parent.editModule&&this.parent.editModule.cellEditModule&&this.parent.editModule.cellEditModule.isCellEdit;if(this.parent.showActiveElement||t){var n=t?e.target.closest(".e-rowcell"):e.target;(n.closest(".e-rowcell")||n.closest(".e-chart-row"))&&this.parent.focusModule.setActiveElement(n),this.focusedRowIndex=n.closest(".e-rowcell")?n.parentElement.rowIndex:n.closest(".e-chart-row")?n.closest(".e-chart-row").rowIndex:-1;var a="tab"===e.action,s=this.getNextElement(n,a,t);if(this.tempNextElement=s,i.i(r.isNullOrUndefined)(s.cellIndex)||(this.parent.allowRowDragAndDrop?(this.childrenIndex=s.cellIndex,this.nextElementIndex=s.cellIndex-1):(this.childrenIndex=s.cellIndex,this.nextElementIndex=s.cellIndex),this.parent.ganttColumns[this.nextElementIndex].allowEditing||this.parent.ganttColumns[this.nextElementIndex].field===this.parent.taskFields.id?this.isEditableElement=!1:this.isEditableElement=!0),"noNextRow"===s)return void this.manageFocus(n,"remove",!0);if("string"!=typeof s){if((n.classList.contains("e-rowcell")||n.closest(".e-chart-row-cell")||n.classList.contains("e-headercell")||n.closest(".e-segmented-taskbar"))&&e.preventDefault(),a&&n.classList.contains("e-rowdragdrop"))return void this.parent.treeGrid.grid.notify("key-pressed",e);if(n.classList.contains("e-rowcell")&&s&&s.classList.contains("e-rowcell")||n.classList.contains("e-headercell"))if(a)if(this.parent.editSettings.allowNextRowEdit){var o=this.parent.currentViewData[this.focusedRowIndex],l=this.parent.ganttColumns[s.getAttribute("data-colindex")].field;o.hasChildRecords?l===this.parent.taskFields.endDate||l===this.parent.taskFields.duration||l===this.parent.taskFields.dependency||l===this.parent.taskFields.progress||l===this.parent.taskFields.work||"taskType"===l?(this.parent.treeGrid.grid.endEdit(),this.parent.treeGrid.grid.notify("key-pressed",e)):l===this.parent.taskFields.name||l===this.parent.taskFields.startDate?this.parent.treeGrid.grid.notify("key-pressed",e):(this.parent.treeGrid.grid.notify("key-pressed",e),t&&this.parent.treeGrid.editCell(this.focusedRowIndex,l)):this.parent.treeGrid.grid.notify("key-pressed",e)}else this.parent.treeGrid.grid.notify("key-pressed",e);else this.parent.treeGrid.grid.notify("key-pressed",e);if((!this.parent.editModule||!this.parent.editModule.cellEditModule||i.i(r.isNullOrUndefined)(this.parent.editModule.cellEditModule.editedColumn))&&s){if(n.classList.contains("e-rowcell")?this.manageFocus(n,"remove",!1):this.manageFocus(n,"remove",!0),s.classList.contains("e-rowcell")&&n.nextElementSibling||n.classList.contains("e-right-label-container")){if(!n.classList.contains("e-rowcell")){this.parent.treeGrid.grid.notify("key-pressed",e);var d=i.i(r.getValue)("focusModule",this.parent.treeGrid.grid);d.currentInfo.element=s,d.currentInfo.elementToFocus=s,d.content.matrix.current=[s.parentElement.rowIndex,s.cellIndex]}this.manageFocus(s,"add",!1)}else this.manageFocus(s,"add",!0);this.parent.focusModule.setActiveElement(s)}}}},e.prototype.getNextElement=function(e,t,n){for(var a=t?e.nextElementSibling:e.previousElementSibling;a&&a.parentElement.classList.contains("e-row");){if(!a.matches(".e-hide")&&!a.matches(".e-rowdragdrop"))return a;a=t?a.nextElementSibling:a.previousElementSibling}if(!i.i(r.isNullOrUndefined)(a)&&(a.classList.contains("e-taskbar-main-container")||a.classList.contains("e-right-connectorpoint-outer-div"))){var s=this.parent.currentViewData[this.focusedRowIndex];!i.i(r.isNullOrUndefined)(s.ganttProperties.segments)&&s.ganttProperties.segments.length>0&&(a=a.classList.contains("e-right-connectorpoint-outer-div")?a.parentElement.nextElementSibling:a.getElementsByClassName("e-gantt-child-taskbar-inner-div")[0])}if(this.validateNextElement(a))return a;var o=-1,l=null;if(e.classList.contains("e-rowcell")&&n&&this.parent.editSettings.allowNextRowEdit)return o=e.parentElement.rowIndex,l=this.getNextRowElement(o,t,!0),this.getChildElement(l,t);if(e.classList.contains("e-rowcell"))if(o=e.parentElement.rowIndex,t){if(l=this.parent.getRowByIndex(o),this.validateNextElement(l,"e-left-label-container"))return l.getElementsByClassName("e-left-label-container")[0];if(this.validateNextElement(l,"e-taskbar-main-container"))return l.getElementsByClassName("e-taskbar-main-container")[0];if(this.validateNextElement(l,"e-right-label-container"))return l.getElementsByClassName("e-right-label-container")[0]}else{if(l=this.getNextRowElement(o,t,!1),this.validateNextElement(l,"e-right-label-container"))return l.getElementsByClassName("e-right-label-container")[0];if(this.validateNextElement(l,"e-taskbar-main-container"))return l.getElementsByClassName("e-taskbar-main-container")[0];if(this.validateNextElement(l,"e-left-label-container"))return l.getElementsByClassName("e-left-label-container")[0]}else if(e.parentElement.classList.contains("e-chart-row-cell")||e.parentElement.parentElement.classList.contains("e-chart-row-cell")){o=i.i(r.closest)(e,".e-chart-row").rowIndex,l=t?this.getNextRowElement(o,t,!0):this.parent.treeGrid.grid.getRowByIndex(o);var d=this.getChildElement(l,t);return d}return null},e.prototype.getNextRowElement=function(e,t,i){var r=this.parent.getExpandedRecords(this.parent.currentViewData),n=this.parent.currentViewData[e],a=r.indexOf(n),s=t?r[a+1]:r[a-1],o=this.parent.currentViewData.indexOf(s);return s?i?this.parent.treeGrid.grid.getRowByIndex(o):this.parent.getRowByIndex(o):null},e.prototype.validateNextElement=function(e,t){if(e&&e.classList.contains("e-rowcell"))return!0;if(e&&t){var n=e.getElementsByClassName(t)[0];return!(!n||!n.hasChildNodes())}return!!e&&!(i.i(r.isNullOrUndefined)(e)||!e.hasChildNodes())},e.prototype.getChildElement=function(e,t){var i;if(!e)return"noNextRow";for(i=t?e.children[0]:e.children[e.children.length-1];i;){if(!i.matches(".e-hide")&&!i.matches(".e-rowdragdrop"))return i;i=t?i.nextElementSibling:i.previousElementSibling}return i},e.prototype.manageFocus=function(e,t,n){if(n){var a=null;if(e.classList.contains("e-left-label-container")||e.classList.contains("e-right-label-container"))a=e.getElementsByTagName("span")[0];else if(e.classList.contains("e-taskbar-main-container")||e.classList.contains("e-gantt-child-taskbar-inner-div")){var s=i.i(r.closest)(e,".e-chart-row").rowIndex,o=this.parent.currentViewData[s],l=o.hasChildRecords?o.ganttProperties.isAutoSchedule?"e-gantt-parent-taskbar":"e-manualparent-main-container":o.ganttProperties.isMilestone?"e-gantt-milestone":!i.i(r.isNullOrUndefined)(o.ganttProperties.segments)&&o.ganttProperties.segments.length>0?"e-segmented-taskbar":"e-gantt-child-taskbar";a=e.getElementsByClassName(l)[0],i.i(r.isNullOrUndefined)(a)&&(a=e)}(e.classList.contains("e-right-label-temp-container")||e.classList.contains("e-left-label-temp-container")||e.classList.contains("e-indicator-span"))&&("add"===t?(e.setAttribute("tabIndex","0"),i.i(r.addClass)([e],"e-active-container"),e.focus()):(i.i(r.removeClass)([e],"e-active-container"),e.setAttribute("tabIndex","-1"),e.blur())),"add"!==t||i.i(r.isNullOrUndefined)(a)?i.i(r.isNullOrUndefined)(a)||(i.i(r.removeClass)([a],"e-active-container"),e.setAttribute("tabIndex","-1"),e.blur()):(e.setAttribute("tabIndex","0"),i.i(r.addClass)([a],"e-active-container"),e.focus(),this.focusedElement=a)}else"add"===t?(e.setAttribute("tabIndex","0"),i.i(r.addClass)([e],["e-focused","e-focus"]),e.focus()):(e.setAttribute("tabIndex","-1"),i.i(r.removeClass)([e],["e-focused","e-focus"]),e.blur())},e.prototype.getIndexByTaskBar=function(e){var t,a;if(t=e.classList.contains(n.F)?e:i.i(r.closest)(e,"div."+n.F),i.i(r.isNullOrUndefined)(t))t=i.i(r.closest)(e,"tr."+n._3),a=[].slice.call(this.parent.chartRowsModule.ganttChartTableBody.childNodes).indexOf(t);else{var s=t.getAttribute("rowUniqueId"),o=this.parent.getRecordByID(s);a=this.parent.currentViewData.indexOf(o)}return a},e.prototype.destroy=function(){this.removeEventListener(),this.unWireEvents(),this.scrollObject.destroy(),this.scrollObject=null},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return T});var r=i(0),n=(i.n(r),i(8)),a=(i.n(n),i(48)),s=i(45),o=i(81),l=i(49),d=i(9),p=i(10),h=i(76),u=i(14),c=i(3),g=i(6),f=(i.n(g),i(5)),m=(i.n(f),i(77)),y=i(47),v=i(82),D=i(37),w=i(2),k=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),S=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},T=function(e){function t(t,n){var a=e.call(this,t,n)||this;return a.isCancelled=!1,a.previousRecords={},a.editedRecords=[],a.modifiedRecords=[],a.isOnEdit=!1,a.isOnDelete=!1,a.isExpandCollapseLevelMethod=!1,a.isDynamicData=!1,a.isConnectorLineUpdate=!1,a.staticSelectedRowIndex=-1,a.needsID=!0,a.showActiveElement=!0,a.addDeleteRecord=!1,a.enableHeaderFocus=!0,a.enableValidation=!0,a.isTreeGridRendered=!1,a.isFromOnPropertyChange=!1,a.isGanttChartRendered=!1,a.isEdit=!1,i.i(r.setValue)("mergePersistData",a.mergePersistGanttData,a),a}return k(t,e),t.prototype.getModuleName=function(){return"gantt"},t.prototype.preRender=function(){this.initProperties()},t.prototype.initProperties=function(){this.globalize=new r.Internationalization(this.locale),this.isAdaptive=r.Browser.isDevice,this.flatData=[],this.currentViewData=[],this.updatedRecords=[],this.ids=[],this.ganttColumns=[],this.localeObj=new r.L10n(this.getModuleName(),this.getDefaultLocale(),this.locale),this.dataOperation=new a.a(this),this.nonWorkingHours=[],this.nonWorkingTimeRanges=[],this.workingTimeRanges=[],this.defaultEndTime=null,this.defaultStartTime=null,this.durationUnitTexts={days:"days",hours:"hours",minutes:"minutes",day:"day",hour:"hour",minute:"minute"},this.durationUnitEditText={minute:["m","min","minute","minutes"],hour:["h","hr","hour","hours"],day:["d","dy","day","days"]},this.perDayWidth=null,this.isMileStoneEdited=!1,this.chartVerticalLineContainer=null,this.updatedConnectorLineCollection=[],this.connectorLineIds=[],this.predecessorsCollection=[],this.isInPredecessorValidation=this.enablePredecessorValidation,this.isValidationEnabled=!0,this.isLoad=!0,this.editedTaskBarItem=null,this.validationDialogElement=null,this.currentEditedArgs={},this.dialogValidateMode={respectLink:!1,removeLink:!1,preserveLinkWithEditing:!0},this.secondsPerDay=this.dataOperation.getSecondsPerDay(),this.nonWorkingDayIndex=[],this.dataOperation.getNonWorkingDayIndex(),this.columnMapping={},this.controlId=this.element.id,this.cloneProjectStartDate=this.enablePersistence&&this.cloneProjectStartDate?this.cloneProjectStartDate:null,this.cloneProjectEndDate=this.enablePersistence&&this.cloneProjectEndDate?this.cloneProjectEndDate:null,this.totalHolidayDates=this.dataOperation.getHolidayDates(),this.ganttChartModule=new s.a(this),this.timelineModule=new o.a(this),this.chartRowsModule=new h.a(this),this.treeGridModule=new l.a(this),this.dateValidationModule=new p.a(this),this.predecessorModule=new u.a(this),this.connectorLineModule=new m.a(this),this.splitterModule=new y.a(this),this.tooltipModule=new v.a(this),this.keyConfig={home:"home",end:"end",downArrow:"downarrow",upArrow:"uparrow",collapseAll:"ctrl+uparrow",expandAll:"ctrl+downarrow",collapseRow:"ctrl+shift+uparrow",expandRow:"ctrl+shift+downarrow",saveRequest:"13",cancelRequest:"27",addRow:"insert",addRowDialog:"ctrl+insert",editRowDialog:"ctrl+f2",delete:"delete",tab:"tab",shiftTab:"shift+tab",focusTask:"shift+f5",indentLevel:"shift+leftarrow",outdentLevel:"shift+rightarrow",focusSearch:"ctrl+shift+70",contextMenu:"shift+F10"},this.focusModule=new D.a(this),this.zoomingLevels=this.getZoomingLevels(),this.resourceFieldsMapping(),i.i(r.isNullOrUndefined)(this.resourceFields.unit)&&(this.resourceFields.unit="unit"),i.i(r.isNullOrUndefined)(this.taskFields.work)||(this.taskType="FixedWork"),this.taskIds=[]},t.prototype.getDateFormat=function(){if(i.i(r.isNullOrUndefined)(this.dateFormat)){return this.globalize.getDatePattern({skeleton:"yMd"})}return this.dateFormat},t.prototype.getDefaultTZOffset=function(){var e=new Date((new Date).getFullYear(),0,1),t=new Date((new Date).getFullYear(),6,1);return Math.max(e.getTimezoneOffset(),t.getTimezoneOffset())},t.prototype.isInDst=function(e){return e.getTimezoneOffset()<this.getDefaultTZOffset()},t.prototype.resourceFieldsMapping=function(){var e=this.resourceFields;e.id=i.i(r.isNullOrUndefined)(e.id)?this.resourceIDMapping:e.id,e.name=i.i(r.isNullOrUndefined)(e.name)?this.resourceNameMapping:e.name},t.prototype.validateDimentionValue=function(e){return i.i(r.isNullOrUndefined)(e)?null:"string"==typeof e&&"auto"!==e&&-1===e.indexOf("%")?-1===e.indexOf("px")?e+"px":e:"number"==typeof e?e+"px":e.toString()},t.prototype.calculateDimensions=function(){var e=this.validateDimentionValue(this.height),t=this.validateDimentionValue(this.width);i.i(r.isNullOrUndefined)(this.width)||"string"!=typeof this.width||-1===this.width.indexOf("%")||(t=this.width);var n=this.element.style.height,a=this.element.style.width;t&&(this.element.style.width=t),e&&(this.element.style.height=e),e||n||(this.element.style.height="auto"),t||a||(this.element.style.width="auto"),this.ganttHeight=this.element.offsetHeight,this.ganttWidth=this.element.offsetWidth},t.prototype.render=function(){this.isReact&&(this.treeGrid.isReact=!0,this.treeGrid.grid.isReact=!0),i.i(n.createSpinner)({target:this.element},this.createElement),this.trigger("load",{}),this.element.classList.add(c._25),this.isAdaptive?this.element.classList.add(c._26):this.element.classList.remove(c._26),this.calculateDimensions(),i.i(r.isNullOrUndefined)(this.toolbarModule)||this.renderToolbar(),this.splitterModule.renderSplitter(),this.notify("renderPanels",null),this.showSpinner(),this.dataOperation.checkDataBinding()},t.prototype.showSpinner=function(){i.i(n.showSpinner)(this.element)},t.prototype.hideSpinner=function(){i.i(n.hideSpinner)(this.element)},t.prototype.processTimeline=function(){this.timelineModule.processTimelineUnit(),this.timelineModule.calculateZoomingLevelsPerDayWidth()},t.prototype.renderGantt=function(e){if(this.predecessorModule&&this.taskFields.dependency&&(this.predecessorModule.parentIds=[],this.predecessorModule.parentRecord=[],this.predecessorModule.updatePredecessors(),this.isInPredecessorValidation&&this.enableValidation&&this.predecessorModule.updatedRecordsDateByPredecessor()),this.enableValidation&&(this.dataOperation.calculateProjectDates(),this.timelineModule.validateTimelineProp()),e)if(this.isFromOnPropertyChange=e,this.enableValidation&&this.dataOperation.updateGanttData(),this.predecessorModule.updateParentPredecessor(),this.dataSource instanceof Object&&i.i(w.i)(this)){var t=i.i(r.getValue)("count",this.dataSource);this.treeGrid.dataSource={result:this.flatData,count:t}}else this.treeGrid.setProperties({dataSource:this.flatData},!1);else this.enableValidation&&this.dataOperation.updateGanttData(),this.predecessorModule.updateParentPredecessor(),this.treeGridPane.classList.remove("e-temp-content"),i.i(r.remove)(this.treeGridPane.querySelector(".e-gantt-temp-header")),this.notify("dataReady",{}),this.enableContextMenu&&this.notify("initiate-contextMenu",{}),this.renderTreeGrid(),this.wireEvents(),this.notify("initPredessorDialog",{});this.splitterModule.updateSplitterPosition(),"Vertical"!==this.gridLines&&"Both"!==this.gridLines||this.renderChartVerticalLines()},t.prototype.removeCriticalPathStyles=function(){var e=this.ganttChartModule.chartElement;i.i(r.removeClass)(e.querySelectorAll(".e-gantt-child-taskbar-inner-div"),c.n),i.i(r.removeClass)(e.querySelectorAll(".e-gantt-child-progressbar-inner-div"),c.p),i.i(r.removeClass)(e.querySelectorAll(".e-milestone-top"),c.q),i.i(r.removeClass)(e.querySelectorAll(".e-milestone-bottom"),c.r),i.i(r.removeClass)(this.element.querySelectorAll(".e-line"),c.s),i.i(r.removeClass)(this.element.querySelectorAll(".e-connector-line-right-arrow"),c.t),i.i(r.removeClass)(this.element.querySelectorAll(".e-connector-line-left-arrow"),c.u)},t.prototype.wireEvents=function(){this.allowKeyboard&&(this.keyboardModule=new r.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfig,eventName:"keydown"})),r.EventHandler.add(window,"resize",this.windowResize,this)},t.prototype.windowResize=function(){if(!i.i(r.isNullOrUndefined)(this.element)&&(this.updateContentHeight(),this.ganttChartModule.updateWidthAndHeight(),this.treeGridModule.ensureScrollBar(),this.predecessorModule&&this.taskFields.dependency&&(this.updateRowHeightInConnectorLine(this.updatedConnectorLineCollection),this.connectorLineModule.renderConnectorLines(this.updatedConnectorLineCollection)),this.enableCriticalPath)){var e=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(e.criticalPathCollection,e.detailPredecessorCollection,!0,e.predecessorCollectionTaskIds)}},t.prototype.keyActionHandler=function(e){this.focusModule.onKeyPress(e)},t.prototype.updateRowHeightInConnectorLine=function(e){if(e&&e.length){var t=this.ganttChartModule.getChartRows()[0]&&this.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;if(t&&!isNaN(t))for(var i=0;i<e.length;i++)e[i].rowHeight=t}},t.prototype.renderToolbar=function(){i.i(r.isNullOrUndefined)(this.toolbarModule)||(this.toolbarModule.renderToolbar(),this.toolbarModule.refreshToolbarItems())},t.prototype.renderTreeGrid=function(){this.treeGridModule.renderTreeGrid()},t.prototype.updateCurrentViewData=function(){this.currentViewData=this.treeGrid.getCurrentViewRecords().slice()},t.prototype.getRecordFromFlatdata=function(e){for(var t=[],i=0;i<e.length;i++)t.push(this.getTaskByUniqueID(e[i].uniqueID));return t},t.prototype.updateContentHeight=function(e){if(this.virtualScrollModule&&this.enableVirtualization&&!i.i(r.isNullOrUndefined)(e)){var t=i.i(r.getValue)("result.length",e);this.contentHeight=t*this.rowHeight}else{var n=this.virtualScrollModule&&this.enableVirtualization?this.currentViewData:this.getExpandedRecords(this.currentViewData),a=void 0,s=i.i(r.isNullOrUndefined)(this.ganttChartModule.getChartRows())?null:this.ganttChartModule.getChartRows()[0];a=!i.i(r.isNullOrUndefined)(s)&&s.getBoundingClientRect().height>0?s.getBoundingClientRect().height:this.rowHeight,this.contentHeight=n.length*a}},t.prototype.getExpandStatus=function(e){var t=this.getParentTask(e.parentItem);if(i.i(r.isNullOrUndefined)(t))return!0;if(!1===t.expanded)return!1;if(t.parentItem){return!1!==this.getParentTask(t.parentItem).expanded&&this.getExpandStatus(this.getParentTask(t.parentItem))}return!0},t.prototype.getExpandedRecords=function(e){var t=this;return i.i(r.isNullOrUndefined)(e)?[]:e.filter(function(e){return!0===t.getExpandStatus(e)})},t.prototype.getZoomingLevels=function(){var e=this.timelineSettings.weekStartDay;return[{topTier:{unit:"Year",format:"yyyy",count:50},bottomTier:{unit:"Year",format:"yyyy",count:10},timelineUnitSize:99,level:0,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:20},bottomTier:{unit:"Year",format:"yyyy",count:5},timelineUnitSize:99,level:1,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:5},bottomTier:{unit:"Year",format:"yyyy",count:1},timelineUnitSize:99,level:2,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"MMM, yy",count:1},bottomTier:{unit:"Month",formatter:this.displayHalfValue,count:6},timelineUnitSize:66,level:3,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"MMM, yy",count:1},bottomTier:{unit:"Month",formatter:this.displayHalfValue,count:6},timelineUnitSize:99,level:4,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"MMM, yy",count:1},bottomTier:{unit:"Month",formatter:this.displayQuarterValue,count:3},timelineUnitSize:66,level:5,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:1},bottomTier:{unit:"Month",formatter:this.displayQuarterValue,count:3},timelineUnitSize:99,level:6,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Year",format:"yyyy",count:1},bottomTier:{unit:"Month",format:"MMM yyyy",count:1},timelineUnitSize:99,level:7,timelineViewMode:"Year",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Month",format:"MMM, yy",count:1},bottomTier:{unit:"Week",format:"dd",count:1},timelineUnitSize:33,level:8,timelineViewMode:"Month",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Month",format:"MMM, yyyy",count:1},bottomTier:{unit:"Week",format:"dd MMM",count:1},timelineUnitSize:66,level:9,timelineViewMode:"Month",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Month",format:"MMM, yyyy",count:1},bottomTier:{unit:"Week",format:"dd MMM",count:1},timelineUnitSize:99,level:10,timelineViewMode:"Month",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Week",format:"MMM dd, yyyy",count:1},bottomTier:{unit:"Day",format:"d",count:1},timelineUnitSize:33,level:11,timelineViewMode:"Week",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Week",format:"MMM dd, yyyy",count:1},bottomTier:{unit:"Day",format:"d",count:1},timelineUnitSize:66,level:12,timelineViewMode:"Week",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Week",format:"MMM dd, yyyy",count:1},bottomTier:{unit:"Day",format:"d",count:1},timelineUnitSize:99,level:13,timelineViewMode:"Week",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:12},timelineUnitSize:66,level:14,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:12},timelineUnitSize:99,level:15,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:6},timelineUnitSize:66,level:16,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:6},timelineUnitSize:99,level:17,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:2},timelineUnitSize:66,level:18,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:2},timelineUnitSize:99,level:19,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:1},timelineUnitSize:66,level:20,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Day",format:"E dd yyyy",count:1},bottomTier:{unit:"Hour",format:"hh a",count:1},timelineUnitSize:99,level:21,timelineViewMode:"Day",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Hour",format:"ddd MMM, h a",count:1},bottomTier:{unit:"Minutes",format:"mm",count:30},timelineUnitSize:66,level:22,timelineViewMode:"Hour",weekStartDay:0,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Hour",format:"ddd MMM, h a",count:1},bottomTier:{unit:"Minutes",format:"mm",count:15},timelineUnitSize:66,level:23,timelineViewMode:"Hour",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0},{topTier:{unit:"Hour",format:"ddd MMM, h a",count:1},bottomTier:{unit:"Minutes",format:"mm",count:1},timelineUnitSize:66,level:24,timelineViewMode:"Hour",weekStartDay:e,updateTimescaleView:!0,weekendBackground:null,showTooltip:!0}]},t.prototype.displayQuarterValue=function(e){var t=e.getMonth();return t>=0&&t<=2?"Q1":t>=3&&t<=5?"Q2":t>=6&&t<=8?"Q3":"Q4"},t.prototype.displayHalfValue=function(e){var t=e.getMonth();return t>=0&&t<=5?"H1":"H2"},t.prototype.getFormatedDate=function(e,t){return i.i(r.isNullOrUndefined)(e)?null:(i.i(r.isNullOrUndefined)(t)&&(t=this.getDateFormat()),this.globalize.formatDate(e,{format:t}))},t.prototype.getDurationString=function(e,t){return this.dateValidationModule.getDurationString(e,t)},t.prototype.getWorkString=function(e,t){return this.dateValidationModule.getWorkString(e,t)},t.prototype.updateTreeColumns=function(){var e,t=this.treeGrid.grid.getColumns();-1!==this.treeColumnIndex&&this.columns[this.treeColumnIndex]&&!i.i(r.isNullOrUndefined)(this.columns[this.treeColumnIndex].template)&&(e=this.columns[this.treeColumnIndex].template,this.columns[this.treeColumnIndex].field);for(var n,a=0;a<t.length;a++){n={};for(var s=0;s<this.columns.length;s++)if(this.columns[s].field==t[a].field){for(var o=0,l=Object.keys(this.columns[s]);o<l.length;o++){var d=l[o];i.i(r.isUndefined)(this.columns[s][d])||(n[d]=t[a][d]),n.visible=t[a].visible,n.width=t[a].width}this.columns[s]=n,"checkbox"===this.columns[s].type||i.i(r.isNullOrUndefined)(e)||""===e||(this.columns[s].template=e)}}this.columns.length>0&&this.treeGrid.setProperties({columns:this.columns},!0)},t.prototype.treeDataBound=function(e){this.element.getElementsByClassName("e-chart-root-container")[0].style.height="100%";var t=(this.element.getElementsByClassName("e-gridcontent")[0].style.height,this.element.getElementsByClassName("e-timeline-header-container")[0].offsetHeight);if("calc(100% - "+t+"px)",this.element.getElementsByClassName("e-chart-scroll-container e-content")[0].style.height="calc(100% - "+t+"px)",i.i(r.isNullOrUndefined)(this.toolbarModule)||i.i(r.isNullOrUndefined)(this.toolbarModule.element)?this.splitterElement.style.height="100%":this.splitterElement.style.height="calc(100% - "+this.toolbarModule.element.offsetHeight+"px)",this.isLoad){if(this.enablePersistence&&this.updateTreeColumns(),this.updateCurrentViewData(),this.enableVirtualization||this.updateContentHeight(),!this.isTreeGridRendered){this.isTreeGridRendered=!0;i.i(r.isNullOrUndefined)(this.toolbarModule)||i.i(r.isNullOrUndefined)(this.toolbarModule.element)||this.toolbarModule.element.offsetHeight,this.timelineModule.isSingleTier?(i.i(r.addClass)(this.treeGrid.element.querySelectorAll(".e-headercell"),c._27),i.i(r.addClass)(this.treeGrid.element.querySelectorAll(".e-columnheader"),c._27)):(i.i(r.removeClass)(this.treeGrid.element.querySelectorAll(".e-headercell"),c._27),i.i(r.removeClass)(this.treeGrid.element.querySelectorAll(".e-columnheader"),c._27)),this.treeGrid.height="100%",this.notify("tree-grid-created",{}),this.createGanttPopUpElement(),this.hideSpinner(),i.i(r.setValue)("isGanttCreated",!0,e),this.renderComplete()}}else this.getCurrentRecords(e);if(this.enableCriticalPath&&this.criticalPathModule&&this.criticalPathModule.showCriticalPath(this.enableCriticalPath),this.notify("recordsUpdated",{}),this.enableCriticalPath&&this.criticalPathModule){var n=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(n.criticalPathCollection,n.detailPredecessorCollection,!0,n.predecessorCollectionTaskIds)}this.initialChartRowElements=this.ganttChartModule.getChartRows(),this.isLoad=!1,this.trigger("dataBound",e)},t.prototype.getCurrentRecords=function(e){this.predecessorModule&&this.taskFields.dependency&&this.connectorLineModule.removePreviousConnectorLines(this.currentViewData),this.updateCurrentViewData(),this.enableVirtualization||this.updateContentHeight(),this.virtualScrollModule&&this.enableVirtualization&&(this.ganttChartModule.virtualRender.adjustTable(),this.ganttChartModule.scrollObject.updateTopPosition())},t.prototype.onPropertyChanged=function(e,t){for(var n=!1,a=0,s=Object.keys(e);a<s.length;a++){var o=s[a];switch(o){case"allowSelection":case"allowRowDragAndDrop":case"allowFiltering":case"showColumnMenu":case"allowResizing":case"allowReordering":case"enableImmutableMode":this.treeGrid[o]=this[o],this.treeGrid.dataBind();break;case"workWeek":this.dataOperation.getNonWorkingDayIndex(),this.dataOperation.reUpdateGanttData(),this.chartRowsModule.initiateTemplates(),this.taskFields.dependency&&this.predecessorModule.updatedRecordsDateByPredecessor(),this.chartRowsModule.refreshGanttRows(),this.treeGrid.refreshColumns(),this.timelineModule.refreshTimeline();break;case"toolbar":this.notify("ui-toolbarupdate",{module:"toolbar",properties:e});break;case"columnMenuItems":this.treeGrid.grid.columnMenuItems=i.i(f.getActualProperties)(this.columnMenuItems);break;case"eventMarkers":case"highlightWeekends":this.notify("ui-update",{module:"day-markers",properties:e});break;case"sortSettings":this.treeGrid.sortSettings=i.i(f.getActualProperties)(this.sortSettings),this.treeGrid.dataBind();break;case"timelineSettings":this.timelineModule.refreshTimeline();break;case"rowHeight":case"taskbarHeight":this.treeGrid.rowHeight=this.rowHeight,this.treeGrid.dataBind(),this.chartRowsModule.initiateTemplates(),this.timelineModule.updateChartByNewTimeline(),this.taskFields.dependency&&this.ganttChartModule.reRenderConnectorLines();break;case"timezone":this.dataOperation.checkDataBinding(!0);break;case"enableCriticalPath":if(this.enableCriticalPath&&this.criticalPathModule){this.criticalPathModule.showCriticalPath(this.enableCriticalPath);var l=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(l.criticalPathCollection,l.detailPredecessorCollection,!0,l.predecessorCollectionTaskIds)}else this.removeCriticalPathStyles();break;case"filterSettings":this.treeGrid.filterSettings=i.i(f.getActualProperties)(this.filterSettings),this.treeGrid.dataBind();break;case"gridLines":this.treeGrid.gridLines=this.gridLines,this.treeGrid.dataBind(),this.renderChartGridLines();break;case"tooltipSettings":this.tooltipModule.toolTipObj&&this.tooltipModule.toolTipObj.destroy(),this.tooltipModule.createTooltip();break;case"splitterSettings":this.splitterModule.updateSplitterPosition();break;case"selectionSettings":this.treeGrid.selectionSettings=i.i(f.getActualProperties)(this.selectionSettings),this.treeGrid.grid.selectionSettings.enableToggle=this.selectionSettings.enableToggle,this.treeGrid.dataBind();break;case"searchSettings":void 0!==e.searchSettings.key&&(this.treeGrid.grid.searchSettings=i.i(f.getActualProperties)(this.searchSettings),this.treeGrid.grid.dataBind()),this.treeGrid.searchSettings=i.i(f.getActualProperties)(this.searchSettings),this.treeGrid.dataBind(),this.toolbarModule&&this.toolbarModule.updateSearchTextBox();break;case"labelSettings":case"renderBaseline":case"baselineColor":this.chartRowsModule.initiateTemplates(),this.chartRowsModule.refreshGanttRows();break;case"resourceIDMapping":case"resourceNameMapping":case"resources":this.dataOperation.reUpdateResources(),this.treeGrid.refreshColumns(),this.chartRowsModule.initiateTemplates(),this.chartRowsModule.refreshGanttRows();break;case"includeWeekend":case"dayWorkingTime":case"allowUnscheduledTasks":case"holidays":"holidays"===o&&(this.totalHolidayDates=this.dataOperation.getHolidayDates(),this.notify("ui-update",{module:"day-markers",properties:e})),this.dataOperation.reUpdateGanttData(),this.treeGrid.refreshColumns(),this.chartRowsModule.initiateTemplates(),this.chartRowsModule.refreshGanttRows();break;case"addDialogFields":case"editDialogFields":this.editModule&&this.editModule.dialogModule&&this.editModule.dialogModule.processDialogFields();break;case"columns":this.treeGridModule.treeGridColumns=[],this.treeGridModule.validateGanttColumns(),this.treeGrid.columns=this.treeGridModule.treeGridColumns,this.chartRowsModule.initiateTemplates(),this.timelineModule.updateChartByNewTimeline();break;case"width":case"height":this.reUpdateDimention();break;case"editSettings":this.treeGrid.editSettings.allowAdding=this.editSettings.allowAdding,this.treeGrid.editSettings.allowDeleting=this.editSettings.allowDeleting,this.treeGrid.editSettings.showDeleteConfirmDialog=this.editSettings.showDeleteConfirmDialog,this.treeGrid.editSettings.allowEditing=this.editSettings.allowEditing,this.treeGrid.editSettings.allowNextRowEdit=this.editSettings.allowNextRowEdit,i.i(r.isNullOrUndefined)(this.editModule)||this.editModule.reUpdateEditModules(),i.i(r.isNullOrUndefined)(this.toolbarModule)||this.toolbarModule.refreshToolbarItems();break;case"connectorLineBackground":case"connectorLineWidth":this.taskFields.dependency&&(this.connectorLineModule.initPublicProp(),this.ganttChartModule.reRenderConnectorLines());break;case"treeColumnIndex":this.treeGrid.treeColumnIndex=this.treeColumnIndex;break;case"projectStartDate":case"projectEndDate":this.dataOperation.calculateProjectDates(),this.updateProjectDates(this.cloneProjectStartDate,this.cloneProjectEndDate,this.isTimelineRoundOff);break;case"selectedRowIndex":i.i(r.isNullOrUndefined)(this.selectionModule)||this.selectionModule.selectRowByIndex();break;case"dataSource":if(this.closeGanttActions(),this.dataSource instanceof Object&&i.i(w.i)(this)){this.treeGrid.hasChildMapping="isParent";var d=i.i(r.getValue)("count",this.dataSource);this.treeGrid.dataSource={result:this.flatData,count:d}}else this.treeGrid.hasChildMapping=null;this.dataOperation.checkDataBinding(!0);break;case"enableContextMenu":case"contextMenuItems":this.enableContextMenu||"contextMenuItems"===o?this.notify("reRender-contextMenu",{module:"contextMenu",enable:this.contextMenuItems}):this.treeGrid.contextMenuItems=[],this.treeGrid.dataBind();break;case"currencyCode":case"locale":case"enableRtl":case"readOnly":case"viewType":n=!0;break;case"validateManualTasksOnLinking":this.validateManualTasksOnLinking=e.validateManualTasksOnLinking;break;case"showOverAllocation":this.updateOverAllocationCotainer()}}n&&this.refresh()},t.prototype.updateOverAllocationCotainer=function(){if(this.showOverAllocation&&"ResourceView"===this.viewType)this.ganttChartModule.renderOverAllocationContainer();else{var e=this.element.querySelector("."+c._28);e&&(e.innerHTML="")}},t.prototype.getPersistData=function(){for(var e=["sortSettings","filterSettings","columns","searchSettings","selectedRowIndex","treeColumnIndex","currentZoomingLevel","cloneProjectStartDate","cloneProjectEndDate"],t={filterSettings:["type","mode","showFilterBarStatus","immediateModeDelay","ignoreAccent","hierarchyMode"],searchSettings:["fields","operator","ignoreCase"],sortSettings:[],columns:[],selectedRowIndex:[]},n=["filter","edit","filterBarTemplate","headerTemplate","template","commandTemplate","commands","dataSource"],a=0;a<e.length;a++)for(var s=this[e[a]],o=0,l=t[e[a]];!i.i(r.isNullOrUndefined)(l)&&o<l.length;o++){var d=l[o];delete s[d]}return this.ignoreInArrays(n,this.columns),this.addOnPersist(e)},t.prototype.ignoreInArrays=function(e,t){for(var i=0;i<t.length;i++)this.ignoreInColumn(e,t[i])},t.prototype.ignoreInColumn=function(e,t){for(var i=0;i<e.length;i++)delete t[e[i]],t.filter={}},t.prototype.destroy=function(){this.notify("destroy",{}),i.i(r.isNullOrUndefined)(this.validationDialogElement)||this.validationDialogElement.isDestroyed||this.validationDialogElement.destroy();for(var t=["ganttChartModule","timelineModule","chartRowsModule","treeGridModule","ganttDataUpdatesModule","dateValidationModule","tooltipModule"],n=0;n<t.length;n++)this[t[n]]&&(this[t[n]]=null);this.keyboardModule&&this.keyboardModule.destroy(),this.editModule&&this.editModule.dialogModule&&this.editModule.dialogModule.destroy(),e.prototype.destroy.call(this),this.chartVerticalLineContainer=null,this.element.innerHTML="",i.i(r.removeClass)([this.element],c._25),this.element.innerHTML="",this.isTreeGridRendered=!1,this.resetTemplates(),r.EventHandler.remove(window,"resize",this.windowResize)},t.prototype.getTaskbarHeight=function(){return this.chartRowsModule.taskBarHeight},t.prototype.requiredModules=function(){var e=[];return this.isDestroyed?e:(this.allowSorting&&e.push({member:"sort",args:[this]}),(this.allowFiltering||this.toolbar&&-1!==this.toolbar.indexOf("Search"))&&e.push({member:"filter",args:[this]}),this.allowReordering&&e.push({member:"reorder",args:[this]}),this.allowExcelExport&&e.push({member:"excelExport",args:[this]}),this.allowRowDragAndDrop&&e.push({member:"rowDragAndDrop",args:[this]}),this.enableCriticalPath&&e.push({member:"criticalPath",args:[this]}),this.allowResizing&&e.push({member:"resize",args:[this]}),this.toolbar&&e.push({member:"toolbar",args:[this]}),(this.editSettings.allowAdding||this.editSettings.allowEditing||this.editSettings.allowDeleting||this.editSettings.allowTaskbarEditing||this.allowRowDragAndDrop)&&e.push({member:"edit",args:[this]}),this.allowSelection&&e.push({member:"selection",args:[this]}),this.tooltipSettings.showTooltip&&e.push({member:"tooltip",args:[this]}),(this.highlightWeekends||this.holidays&&this.holidays.length>0||this.eventMarkers&&this.eventMarkers.length>0)&&e.push({member:"dayMarkers",args:[this]}),this.enableContextMenu&&e.push({member:"contextMenu",args:[this]}),this.showColumnMenu&&e.push({member:"columnMenu",args:[this]}),this.allowPdfExport&&e.push({member:"pdfExport",args:[this]}),this.enableVirtualization&&e.push({member:"virtualScroll",args:[this]}),e)},t.prototype.sortColumn=function(e,t,i){this.sortModule&&this.allowSorting&&this.sortModule.sortColumn(e,t,i)},t.prototype.mergePersistGanttData=function(){this.treeGrid||(this.treeGrid=new g.TreeGrid);this.treeGrid.grid.mergePersistGridData.apply(this)},t.prototype.mergeColumns=function(e,t){this.treeGrid.grid.mergeColumns.apply(this,[e,t])},t.prototype.clearSorting=function(){this.sortModule.clearSorting()},t.prototype.renderChartGridLines=function(){var e="e-chart-row-border",t=this.chartVerticalLineContainer,n=document.getElementById(this.element.id+"GanttTaskTableBody").querySelectorAll("td");if("Vertical"===this.gridLines){if(i.i(r.isNullOrUndefined)(t)?this.renderChartVerticalLines():"none"===t.style.display&&(t.style.display="block"),n[0].classList.contains(e))for(var a=0;a<n.length;a++)i.i(r.removeClass)([n[a]],e)}else if("Horizontal"===this.gridLines){if(i.i(r.isNullOrUndefined)(t)||(t.style.display="none"),!n[0].classList.contains(e))for(var a=0;a<n.length;a++)i.i(r.addClass)([n[a]],e)}else if("Both"===this.gridLines){if(i.i(r.isNullOrUndefined)(t)?this.renderChartVerticalLines():"none"===t.style.display&&(t.style.display="block"),!n[0].classList.contains(e))for(var a=0;a<n.length;a++)i.i(r.addClass)([n[a]],e)}else if("None"===this.gridLines&&(i.i(r.isNullOrUndefined)(t)||"none"===t.style.display||(t.style.display="none"),n[0].classList.contains(e)))for(var a=0;a<n.length;a++)i.i(r.removeClass)([n[a]],e)},t.prototype.updateGridLineContainerHeight=function(){this.chartVerticalLineContainer&&(this.chartVerticalLineContainer.style.height=i.i(r.formatUnit)(this.getContentHeight()))},t.prototype.getContentHeight=function(){var e=this.ganttChartModule.scrollElement.offsetHeight-16,t=this.ganttChartModule.chartBodyContent.offsetHeight;return t<e?t:e},t.prototype.reUpdateDimention=function(){var e=0;if(this.calculateDimensions(),i.i(r.isNullOrUndefined)(this.toolbarModule)||i.i(r.isNullOrUndefined)(this.toolbarModule.element)||(this.toolbarModule.toolbar.refresh(),this.toolbarModule.refreshToolbarItems(),e=this.toolbarModule.element.offsetHeight),this.treeGrid.height=this.ganttHeight-e-this.treeGrid.grid.getHeaderContent().offsetHeight,this.splitterModule.splitterObject.height=(this.ganttHeight-e).toString(),i.i(r.isNullOrUndefined)(this.chartVerticalLineContainer)||(this.chartVerticalLineContainer.style.height=this.ganttHeight+"px"),!i.i(r.isNullOrUndefined)(this.dayMarkersModule)){var t=i.i(r.getValue)("nonworkingDayRender.holidayContainer",this.dayMarkersModule),n=i.i(r.getValue)("nonworkingDayRender.weekendContainer",this.dayMarkersModule),a=i.i(r.getValue)("eventMarkerRender.eventMarkersContainer",this.dayMarkersModule);t&&(t.style.height=this.ganttHeight+"px"),n&&(n.style.height=this.ganttHeight+"px"),a&&(a.style.height=this.ganttHeight+"px")}this.splitterModule.splitterObject.width=this.ganttWidth.toString(),this.ganttChartModule.scrollObject.setHeight(this.ganttHeight-this.ganttChartModule.chartTimelineContainer.offsetHeight-e)},t.prototype.renderChartVerticalLines=function(){this.element.contains(this.chartVerticalLineContainer)||(this.chartVerticalLineContainer=i.i(r.createElement)("div",{id:this.element.id+"line-container",styles:"position:absolute;height:100%;z-index:1"}),this.ganttChartModule.chartBodyContent.appendChild(this.chartVerticalLineContainer)),this.chartVerticalLineContainer.innerHTML="";var e=this.element.getElementsByClassName("e-timeline-header-table-container")[1];i.i(r.isNullOrUndefined)(e)&&(e=this.element.getElementsByClassName("e-timeline-header-table-container")[0]);for(var t,n=e.getElementsByTagName("th"),a=n.length,s=0,o=i.i(r.createElement)("div"),l=0;l<a;l++){s=0===l?-1:s+parseFloat(t),t=n[l].style.width;var d=i.i(r.createElement)("div",{className:"e-line-container-cell",styles:"left:"+s+"px"});o.appendChild(d)}this.chartVerticalLineContainer.innerHTML=o.innerHTML},t.prototype.getDefaultLocale=function(){return{emptyRecord:"No records to display",id:"ID",name:"Name",startDate:"Start Date",endDate:"End Date",duration:"Duration",progress:"Progress",dependency:"Dependency",notes:"Notes",criticalPath:"Critical Path",baselineStartDate:"Baseline Start Date",baselineEndDate:"Baseline End Date",taskMode:"Task Mode",changeScheduleMode:"Change Schedule Mode",subTasksStartDate:"SubTasks Start Date",subTasksEndDate:"SubTasks End Date",scheduleStartDate:"Schedule Start Date",scheduleEndDate:"Schedule End Date",auto:"Auto",manual:"Manual",type:"Type",offset:"Offset",resourceName:"Resources",resourceID:"Resource ID",day:"day",hour:"hour",minute:"minute",days:"days",hours:"hours",minutes:"minutes",generalTab:"General",customTab:"Custom Columns",writeNotes:"Write Notes",addDialogTitle:"New Task",editDialogTitle:"Task Information",add:"Add",edit:"Edit",update:"Update",delete:"Delete",cancel:"Cancel",search:"Search",task:" task",tasks:" tasks",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomToFit:"Zoom to fit",excelExport:"Excel export",csvExport:"CSV export",pdfExport:"Pdf export",expandAll:"Expand all",collapseAll:"Collapse all",nextTimeSpan:"Next timespan",prevTimeSpan:"Previous timespan",saveButton:"Save",taskBeforePredecessorFS:'You moved "{0}" to start before "{1}" finishes and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorFS:'You moved "{0}" away from "{1}" and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskBeforePredecessorSS:'You moved "{0}" to start before "{1}" starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorSS:'You moved "{0}" to start after "{1}" starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskBeforePredecessorFF:'You moved "{0}" to finish before "{1}" finishes and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorFF:'You moved "{0}" to finish after "{1}" finishes and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskBeforePredecessorSF:'You moved "{0}" away from "{1}" to starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',taskAfterPredecessorSF:'You moved "{0}" to finish after "{1}" starts and the two tasks are linked.As the result, the links cannot be honored. Select one action below to perform',okText:"Ok",confirmDelete:"Are you sure you want to Delete Record?",from:"From",to:"To",taskLink:"Task Link",lag:"Lag",start:"Start",finish:"Finish",enterValue:"Enter the value",taskInformation:"Task Information",deleteTask:"Delete Task",deleteDependency:"Delete Dependency",convert:"Convert",save:"Save",above:"Above",below:"Below",child:"Child",milestone:"Milestone",toTask:"To Task",toMilestone:"To Milestone",eventMarkers:"Event markers",leftTaskLabel:"Left task label",rightTaskLabel:"Right task label",timelineCell:"Timeline cell",confirmPredecessorDelete:"Are you sure you want to remove dependency link?",unit:"Unit",work:"Work",taskType:"Task Type",unassignedTask:"Unassigned Task",group:"Group",indent:"Indent",outdent:"Outdent",segments:"Segments",splitTask:"Split Task",mergeTask:"Merge Task",left:"Left",right:"Right"}},t.prototype.removeSortColumn=function(e){this.sortModule.removeSortColumn(e)},t.prototype.actionBeginTask=function(e){this.trigger("actionBegin",e)},t.prototype.scrollToDate=function(e){var t=this.dateValidationModule.getDateFromFormat(e),i=this.dataOperation.getTaskLeft(t,!1);this.ganttChartModule.updateScrollLeft(i)},t.prototype.scrollToTask=function(e){if(-1!==this.ids.indexOf(e)){var t=this.flatData[this.ids.indexOf(e)].ganttProperties.left;this.ganttChartModule.updateScrollLeft(t)}},t.prototype.updateChartScrollOffset=function(e,t){i.i(r.isNullOrUndefined)(e)||(e=this.ganttChartModule.scrollElement.scrollWidth<=e?this.ganttChartModule.scrollElement.scrollWidth:e,this.ganttChartModule.scrollObject.setScrollLeft(e)),i.i(r.isNullOrUndefined)(t)||(t=this.ganttChartModule.scrollElement.scrollHeight<=t?this.ganttChartModule.scrollElement.scrollHeight:t,this.ganttChartModule.scrollObject.setScrollTop(t))},t.prototype.getParentTask=function(e){if(i.i(r.isNullOrUndefined)(e))return null;var t=this.flatData.filter(function(t){return e.uniqueID===t.uniqueID});return t.length>0?t[0]:null},t.prototype.getRootParent=function(e,t){return e.level===t?e:this.getRootParent(this.getParentTask(e.parentItem),t)},t.prototype.filterByColumn=function(e,t,i,r,n,a){this.treeGrid.filterByColumn(e,t,i,r,n,a)},t.prototype.excelExport=function(e,t,i,r){return this.excelExportModule?this.treeGrid.excelExport(e,t,i,r):null},t.prototype.csvExport=function(e,t,i,r){return this.excelExportModule?this.treeGrid.csvExport(e,t,i,r):null},t.prototype.pdfExport=function(e,t,i){return this.pdfExportModule?this.pdfExportModule.export(e,t,i):null},t.prototype.clearFiltering=function(e){this.treeGrid.grid.clearFiltering(e)},t.prototype.removeFilteredColsByField=function(e){this.treeGrid.removeFilteredColsByField(e,!1)},t.prototype.renderWorkingDayCell=function(e){var t="Auto"!==this.taskMode||!!this.includeWeekend,i=t?[]:this.nonWorkingDayIndex,r=this.totalHolidayDates;if(i.length>0&&-1!==i.indexOf(e.date.getDay()))e.isDisabled=!0;else if(r.length>0){var n=new Date(e.date.getTime());n.setHours(0,0,0),-1!==r.indexOf(n.getTime())&&(e.isDisabled=!0)}},t.prototype.previousTimeSpan=function(e){this.timelineModule.performTimeSpanAction("prevTimeSpan","publicMethod",new Date(this.timelineModule.timelineStartDate.getTime()),new Date(this.timelineModule.timelineEndDate.getTime()),e)},t.prototype.nextTimeSpan=function(e){this.timelineModule.performTimeSpanAction("nextTimeSpan","publicMethod",new Date(this.timelineModule.timelineStartDate.getTime()),new Date(this.timelineModule.timelineEndDate.getTime()),e)},t.prototype.updateProjectDates=function(e,t,n,a){this.timelineModule.totalTimelineWidth=0,this.cloneProjectStartDate=e,this.cloneProjectEndDate=t,this.isTimelineRoundOff=n,this.timelineModule.refreshTimelineByTimeSpan(),this.dataOperation.reUpdateGanttDataPosition(),this.timelineModule.updateChartByNewTimeline(),this.ganttChartModule.chartBodyContent.style.width=i.i(r.formatUnit)(this.timelineModule.totalTimelineWidth),this.ganttChartModule.updateLastRowBottomWidth(),"Vertical"!==this.gridLines&&"Both"!==this.gridLines||this.renderChartVerticalLines(),this.taskFields.dependency&&this.ganttChartModule.reRenderConnectorLines(),"beforeAdd"!==a&&this.notify("selectRowByIndex",{})},t.prototype.splitTask=function(e,t){this.isEdit=!0,this.chartRowsModule.splitTask(e,t)},t.prototype.mergeTask=function(e,t){this.chartRowsModule.mergeTask(e,t)},t.prototype.reorderColumns=function(e,t){this.treeGrid.reorderColumns(e,t)},t.prototype.initiateEditAction=function(e){this.isOnEdit=e,this.previousRecords={},this.editedRecords=[]},t.prototype.setRecordValue=function(e,t,n,a){if(this.isOnEdit||this.isOnDelete){this.makeCloneData(e,n,a);var s=a?n.rowUniqueID:n.ganttProperties.rowUniqueID,o=this.getRecordByID(s);o&&-1===this.editedRecords.indexOf(o)&&(this.editedRecords.push(o),this.enableImmutableMode&&this.modifiedRecords.push(o))}t=i.i(r.isUndefined)(t)?null:t,i.i(r.setValue)(e,t,n)},t.prototype.makeCloneData=function(e,t,n){var a,s,o,l=i.i(r.getValue)(e,t);if(n&&(e="ganttProperties."+e),i.i(r.isNullOrUndefined)(this.previousRecords[t.uniqueID])){var d={};this.previousRecords[t.uniqueID]=d}a=this.previousRecords[t.uniqueID],s=i.i(r.getValue)(e,a),i.i(r.isUndefined)(s)&&(o=l instanceof Date?new Date(l.getTime()):i.i(r.isObjectArray)(l)?i.i(r.extend)([],l,[],!0):i.i(r.isObject)(l)?i.i(r.extend)({},{},l,!0):l,i.i(r.isUndefined)(o)?i.i(r.setValue)(e,null,a):i.i(r.setValue)(e,o,a))},t.prototype.closeGanttActions=function(){this.editModule&&(this.editModule.cellEditModule&&this.editModule.cellEditModule.isCellEdit?(this.treeGrid.closeEdit(),this.editModule.cellEditModule.isCellEdit=!1,i.i(r.isNullOrUndefined)(this.toolbarModule)||this.toolbarModule.refreshToolbarItems()):this.editModule.dialogModule&&this.editModule.dialogModule.dialogObj&&this.editModule.dialogModule.dialogObj.visible&&(this.editModule.dialogModule.dialogObj.hide(),this.editModule.dialogModule.dialogClose()))},t.prototype.getTaskByUniqueID=function(e){var t=this.flatData.filter(function(t){return t.uniqueID===e});return t.length>0?t[0]:null},t.prototype.getRecordByID=function(e){return i.i(r.isNullOrUndefined)(e)?null:this.flatData[this.ids.indexOf(e.toString())]},t.prototype.setSplitterPosition=function(e,t){var i={};i[t]=e;var r=this.splitterModule.calculateSplitterPosition(i),n=this.splitterModule.splitterObject.element.querySelectorAll(".e-pane")[0],a=this.splitterModule.splitterObject.element.querySelectorAll(".e-pane")[1];this.splitterModule.splitterPreviousPositionGrid=n.scrollWidth+1+"px",this.splitterModule.splitterPreviousPositionChart=a.scrollWidth+1+"px",this.splitterModule.splitterObject.paneSettings[0].size=r,this.splitterModule.triggerCustomResizedEvent()},t.prototype.expandByIndex=function(e){if("number"==typeof e){var t=this.contructExpandCollapseArgs(null,e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.expandGanttRow(t)}else for(var i=0;i<e.length;i++)if("number"==typeof e[i]){var r=e[i],t=this.contructExpandCollapseArgs(null,r);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.expandGanttRow(t)}},t.prototype.expandByID=function(e){var t=this.contructExpandCollapseArgs(e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.expandGanttRow(t)},t.prototype.collapseByIndex=function(e){var t=this.contructExpandCollapseArgs(null,e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.collapseGanttRow(t)},t.prototype.collapseByID=function(e){var t=this.contructExpandCollapseArgs(e);this.ganttChartModule.isExpandCollapseFromChart=!0,this.ganttChartModule.collapseGanttRow(t)},t.prototype.addRecord=function(e,t,n){if(this.editModule&&this.editSettings.allowAdding)if("ResourceView"===this.viewType){this.editModule.addRowPosition=t,this.editModule.addRowIndex=n;var a=void 0;i.i(r.isNullOrUndefined)(e)||(a=e[this.taskFields.resourceInfo]);var s=void 0,o=void 0;if(!i.i(r.isNullOrUndefined)(a)&&a.length){for(var l=0;l<a.length&&(s="object"==typeof a[l]?a[l][this.resourceFields.id]:a[0],!(o=this.flatData[this.getTaskIds().indexOf("R"+s)]));l++);if(o&&o.childRecords.length||0===o.level){var d=o.childRecords[n];if(d){var p="Above"===t||"Below"===t?t:"Child";"Child"===p?this.editModule.addRecord(e,p,this.getTaskIds().indexOf("R"+s)):this.editModule.addRecord(e,p,this.flatData.indexOf(d))}else this.editModule.addRecord(e,"Child",this.getTaskIds().indexOf("R"+s))}else this.editModule.addRecord(e,"Bottom")}else this.editModule.addRecord(e,"Bottom");this.editModule.addRowPosition=null,this.editModule.addRowIndex=null}else this.editModule.addRecord(e,t,n)},t.prototype.updateRecordByID=function(e){this.editModule&&this.editSettings.allowEditing&&this.editModule.updateRecordByID(e)},t.prototype.updateTaskId=function(e,t){this.editModule&&this.editSettings.allowEditing&&this.editModule.updateTaskId(e,t)},t.prototype.expandAtLevel=function(e){this.enableVirtualization&&(this.isExpandCollapseLevelMethod=!0),this.ganttChartModule.expandAtLevel(e)},t.prototype.indent=function(){this.editModule&&this.editSettings.allowEditing&&this.editModule.indent()},t.prototype.outdent=function(){this.editModule&&this.editSettings.allowEditing&&this.editModule.outdent()},t.prototype.showCriticalPath=function(e){if(this.criticalPathModule){this.criticalPathModule.showCriticalPath(e);var t=this.criticalPathModule;this.criticalPathModule.criticalConnectorLine(t.criticalPathCollection,t.detailPredecessorCollection,!0,t.predecessorCollectionTaskIds)}},t.prototype.getCriticalTasks=function(){return!i.i(r.isNullOrUndefined)(this.criticalPathModule)&&this.enableCriticalPath?this.criticalPathModule.getCriticalTasks():null},t.prototype.zoomIn=function(){this.timelineModule.processZooming(!0)},t.prototype.zoomOut=function(){this.timelineModule.processZooming(!1)},t.prototype.fitToProject=function(){this.timelineModule.processZoomToFit(),this.ganttChartModule.updateScrollLeft(0)},t.prototype.reorderRows=function(e,t,i){this.rowDragAndDropModule.reorderRows(e,t,i)},t.prototype.updateRecordByIndex=function(e,t){if(this.editModule&&this.editSettings.allowEditing){var n=this.taskFields,a=this.updatedRecords.length>0?i.i(r.isNullOrUndefined)(this.updatedRecords[e])?null:this.updatedRecords[e]:null;i.i(r.isNullOrUndefined)(a)||(t[n.id]=a[n.id],this.editModule.updateRecordByID(t))}},t.prototype.addPredecessor=function(e,t){var n=this.getRecordByID(e.toString());this.editModule&&!i.i(r.isNullOrUndefined)(n)&&this.editSettings.allowTaskbarEditing&&this.connectorLineEditModule.addPredecessor(n,t)},t.prototype.removePredecessor=function(e){var t=this.getRecordByID(e.toString());this.editModule&&!i.i(r.isNullOrUndefined)(t)&&this.editSettings.allowTaskbarEditing&&this.connectorLineEditModule.removePredecessor(t)},t.prototype.updatePredecessor=function(e,t){var n=this.getRecordByID(e.toString());this.editModule&&!i.i(r.isNullOrUndefined)(n)&&this.editSettings.allowTaskbarEditing&&this.connectorLineEditModule.updatePredecessor(n,t)},t.prototype.openAddDialog=function(){this.editModule&&this.editModule.dialogModule&&this.editSettings.allowAdding&&this.editModule.dialogModule.openAddDialog()},t.prototype.openEditDialog=function(e){this.editModule&&this.editModule.dialogModule&&this.editSettings.allowEditing&&this.editModule.dialogModule.openEditDialog(e)},t.prototype.contructExpandCollapseArgs=function(e,t){var n,a,s;return i.i(r.isNullOrUndefined)(t)?(a=this.getRecordByID(e.toString()),n=this.getRowByID(e),i.i(r.isNullOrUndefined)(n)||(s=i.i(r.getValue)("rowIndex",n))):i.i(r.isNullOrUndefined)(t)||(n=this.getRowByIndex(t),s=i.i(r.getValue)("rowIndex",n),a=this.currentViewData[s]),{data:a,gridRow:this.treeGrid.getRows()[s],chartRow:n,cancel:!1}},t.prototype.getRowByIndex=function(e){try{var t=this.element.querySelectorAll(".e-chart-row");return i.i(r.isNullOrUndefined)(e)?null:t[e]}catch(e){return null}},t.prototype.getRowByID=function(e){var t=this.getRecordByID(e.toString()),i=this.updatedRecords.indexOf(t);return-1!==i?this.getRowByIndex(i):null},t.prototype.getUnscheduledTaskClass=function(e){return i.i(r.isNullOrUndefined)(e.startDate)&&i.i(r.isNullOrUndefined)(e.endDate)&&i.i(r.isNullOrUndefined)(e.duration)?" "+c._29:i.i(r.isNullOrUndefined)(e.startDate)||i.i(r.isNullOrUndefined)(e.endDate)||i.i(r.isNullOrUndefined)(e.duration)?" "+c._29:""},t.prototype.isUnscheduledTask=function(e){return!!(i.i(r.isNullOrUndefined)(e.startDate)||i.i(r.isNullOrUndefined)(e.endDate)||i.i(r.isNullOrUndefined)(e.duration))},t.prototype.createGanttPopUpElement=function(){var e=this.createElement("div",{className:"e-ganttpopup",styles:"display:none;"}),t=this.createElement("div",{className:"e-content",attrs:{tabIndex:"-1"}});i.i(r.append)([t,this.createElement("div",{className:"e-uptail e-tail"})],e),t.appendChild(this.createElement("span")),i.i(r.append)([t,this.createElement("div",{className:"e-downtail e-tail"})],e),document.getElementById(this.element.id+"GanttChart").appendChild(e)},t.prototype.getPredecessorTextValue=function(e){var t;switch(e){case"SS":t=this.localeObj.getConstant("start")+"-"+this.localeObj.getConstant("start");break;case"FF":t=this.localeObj.getConstant("finish")+"-"+this.localeObj.getConstant("finish");break;case"SF":t=this.localeObj.getConstant("start")+"-"+this.localeObj.getConstant("finish");break;case"FS":t=this.localeObj.getConstant("finish")+"-"+this.localeObj.getConstant("start")}return t},t.prototype.search=function(e){this.filterModule&&(this.searchSettings.key=e,this.dataBind())},t.prototype.getOffsetRect=function(e){var t=e.getBoundingClientRect(),i=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,r=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.clientTop||document.body.clientTop||0,a=document.documentElement.clientLeft||document.body.clientLeft||0,s=t.top+i-n,o=t.left+r-a;return{top:Math.round(s),left:Math.round(o),width:t.width,height:t.height}},t.prototype.expandAll=function(){this.ganttChartModule.expandCollapseAll("expand")},t.prototype.updateDataSource=function(e,t){if(this.isDynamicData=!0,!i.i(r.isNullOrUndefined)(t))for(var n=0,a=Object.keys(t);n<a.length;n++){var s=a[n];switch(s){case"projectStartDate":this.setProperties({projectStartDate:t[s]},!0);break;case"projectEndDate":this.setProperties({projectEndDate:t[s]},!0)}}this.dataSource=e},t.prototype.collapseAll=function(){this.ganttChartModule.expandCollapseAll("collapse")},t.prototype.getGridColumns=function(){return this.treeGrid.getColumns()},t.prototype.getColumnByField=function(e,t){var i=t.filter(function(t){return t.field===e});return i.length>0?i[0]:null},t.prototype.getGanttColumns=function(){return this.ganttColumns},t.prototype.showColumn=function(e,t){this.treeGrid.showColumns(e,t),this.updateTreeColumns()},t.prototype.hideColumn=function(e,t){this.treeGrid.hideColumns(e,t),this.updateTreeColumns()},t.prototype.setScrollTop=function(e){this.ganttChartModule.scrollObject.setScrollTop(e)},t.prototype.cancelEdit=function(){this.isCancelled=!0,this.closeGanttActions()},t.prototype.selectCell=function(e,t){this.selectionModule&&this.selectionModule.selectCell(e,t)},t.prototype.selectCells=function(e){this.selectionModule&&this.selectionModule.selectCells(e)},t.prototype.selectRow=function(e,t){this.selectionModule&&this.selectionModule.selectRow(e,t)},t.prototype.selectRows=function(e){this.selectionModule&&this.selectionModule.selectRows(e)},t.prototype.deleteRecord=function(e){this.editModule&&this.editModule.deleteRecord(e)},t.prototype.enableItems=function(e,t){this.toolbarModule&&this.toolbarModule.enableItems(e,t)},t.prototype.clearSelection=function(){this.selectionModule&&this.selectionModule.clearSelection()},t.prototype.updateDataArgs=function(e){if(!Array.isArray(e.data)){var t=[];t.push(e.data),i.i(r.setValue)("data",t,e)}return e},t.prototype.convertToMilestone=function(e){var t=this.getRecordByID(e);if(!i.i(r.isNullOrUndefined)(t)){var n=i.i(r.extend)({},{},t.taskData,!0),a=this.taskFields;if(n[a.startDate]&&this.setRecordValue(a.startDate,t.ganttProperties.startDate,n,!0),i.i(r.isNullOrUndefined)(a.duration)?(n[a.startDate]=new Date(t.ganttProperties.startDate),n[a.endDate]=new Date(t.ganttProperties.endDate)):n[a.duration]=0,i.i(r.isNullOrUndefined)(a.milestone)||!1===n[a.milestone]&&(n[a.milestone]=!0),i.i(r.isNullOrUndefined)(a.progress)||(n[a.progress]=0),!i.i(r.isNullOrUndefined)(a.child)&&n[a.child]&&(n[a.child]=[]),!i.i(r.isNullOrUndefined)(a.parentID)&&n[a.parentID]&&(n[a.parentID]=null),i.i(r.isNullOrUndefined)(a.segments)||(n[a.segments]=null),!i.i(r.isNullOrUndefined)(this.contextMenuModule)&&this.contextMenuModule.isOpen&&"Milestone"===this.contextMenuModule.item){i.i(r.isNullOrUndefined)(a.dependency)||(n[a.dependency]=null);this.addRecord(n,"Below")}else t.hasChildRecords||t.ganttProperties.isMilestone||this.updateRecordByID(n)}},t.prototype.changeTaskMode=function(e){var t=this.taskFields,n=this.getRecordByID(e[t.id]),a=n.ganttProperties;this.isOnEdit=!0,this.setRecordValue("isAutoSchedule",!a.isAutoSchedule,a,!0),i.i(r.isNullOrUndefined)(this.taskFields.manual)||(this.setRecordValue("taskData."+t.manual,!a.isAutoSchedule,n),this.setRecordValue(t.manual,!a.isAutoSchedule,n)),this.editModule.updateTaskScheduleModes(n);var s={data:n};this.editModule.initiateUpdateAction(s)},t.prototype.getTaskIds=function(){return this.taskIds},t.prototype.setTaskIds=function(e){if("ProjectView"!==this.viewType){var t=e.ganttProperties.taskId;t=0===e.level?"R"+t:"T"+t,this.taskIds.push(t)}},t.prototype.renderTemplates=function(){this.isReact&&this.renderReactTemplates()},t.prototype.resetTemplates=function(){this.isReact&&this.clearTemplate()},S([i.i(r.Property)(!0)],t.prototype,"allowKeyboard",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableImmutableMode",void 0),S([i.i(r.Property)(!0)],t.prototype,"disableHtmlEncode",void 0),S([i.i(r.Property)(!0)],t.prototype,"autoFocusTasks",void 0),S([i.i(r.Property)(!0)],t.prototype,"allowSelection",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowSorting",void 0),S([i.i(r.Property)(!0)],t.prototype,"enablePredecessorValidation",void 0),S([i.i(r.Property)(!1)],t.prototype,"showColumnMenu",void 0),S([i.i(r.Property)()],t.prototype,"columnMenuItems",void 0),S([i.i(r.Property)()],t.prototype,"timezone",void 0),S([i.i(r.Property)(!1)],t.prototype,"collapseAllParentTasks",void 0),S([i.i(r.Property)(!1)],t.prototype,"highlightWeekends",void 0),S([i.i(r.Property)(0)],t.prototype,"treeColumnIndex",void 0),S([i.i(r.Property)([])],t.prototype,"dataSource",void 0),S([i.i(r.Property)("day")],t.prototype,"durationUnit",void 0),S([i.i(r.Property)(null)],t.prototype,"query",void 0),S([i.i(r.Property)(null)],t.prototype,"dateFormat",void 0),S([i.i(r.Property)("auto")],t.prototype,"height",void 0),S([i.i(r.Property)(!1)],t.prototype,"renderBaseline",void 0),S([i.i(r.Property)("Horizontal")],t.prototype,"gridLines",void 0),S([i.i(r.Complex)({},d.j)],t.prototype,"labelSettings",void 0),S([i.i(r.Property)(null)],t.prototype,"taskbarTemplate",void 0),S([i.i(r.Property)(null)],t.prototype,"parentTaskbarTemplate",void 0),S([i.i(r.Property)(null)],t.prototype,"milestoneTemplate",void 0),S([i.i(r.Property)()],t.prototype,"baselineColor",void 0),S([i.i(r.Property)("auto")],t.prototype,"width",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableVirtualization",void 0),S([i.i(r.Property)()],t.prototype,"toolbar",void 0),S([i.i(r.Property)(["Monday","Tuesday","Wednesday","Thursday","Friday"])],t.prototype,"workWeek",void 0),S([i.i(r.Property)(!1)],t.prototype,"includeWeekend",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowUnscheduledTasks",void 0),S([i.i(r.Property)(!1)],t.prototype,"showInlineNotes",void 0),S([i.i(r.Property)(36)],t.prototype,"rowHeight",void 0),S([i.i(r.Property)(null)],t.prototype,"taskbarHeight",void 0),S([i.i(r.Property)(null)],t.prototype,"projectStartDate",void 0),S([i.i(r.Property)(null)],t.prototype,"projectEndDate",void 0),S([i.i(r.Property)(null)],t.prototype,"resourceIDMapping",void 0),S([i.i(r.Property)(null)],t.prototype,"resourceNameMapping",void 0),S([i.i(r.Property)([])],t.prototype,"resources",void 0),S([i.i(r.Property)([])],t.prototype,"segmentData",void 0),S([i.i(r.Property)(null)],t.prototype,"connectorLineBackground",void 0),S([i.i(r.Property)(1)],t.prototype,"connectorLineWidth",void 0),S([i.i(r.Property)([])],t.prototype,"columns",void 0),S([i.i(r.Property)([])],t.prototype,"addDialogFields",void 0),S([i.i(r.Property)([])],t.prototype,"editDialogFields",void 0),S([i.i(r.Property)(-1)],t.prototype,"selectedRowIndex",void 0),S([i.i(r.Property)("hour")],t.prototype,"workUnit",void 0),S([i.i(r.Property)("FixedUnit")],t.prototype,"taskType",void 0),S([i.i(r.Property)("ProjectView")],t.prototype,"viewType",void 0),S([i.i(r.Collection)([{from:8,to:12},{from:13,to:17}],d.b)],t.prototype,"dayWorkingTime",void 0),S([i.i(r.Collection)([],d.i)],t.prototype,"holidays",void 0),S([i.i(r.Collection)([],d.f)],t.prototype,"eventMarkers",void 0),S([i.i(r.Complex)({},d.m)],t.prototype,"taskFields",void 0),S([i.i(r.Complex)({},d.s)],t.prototype,"resourceFields",void 0),S([i.i(r.Complex)({},d.o)],t.prototype,"timelineSettings",void 0),S([i.i(r.Complex)({},d.r)],t.prototype,"sortSettings",void 0),S([i.i(r.Complex)({},d.e)],t.prototype,"editSettings",void 0),S([i.i(r.Complex)({},d.p)],t.prototype,"tooltipSettings",void 0),S([i.i(r.Complex)({},d.k)],t.prototype,"selectionSettings",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowFiltering",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowExcelExport",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowRowDragAndDrop",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowReordering",void 0),S([i.i(r.Property)(!1)],t.prototype,"readOnly",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowResizing",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableContextMenu",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableCriticalPath",void 0),S([i.i(r.Property)()],t.prototype,"contextMenuItems",void 0),S([i.i(r.Property)(!1)],t.prototype,"allowPdfExport",void 0),S([i.i(r.Property)(!1)],t.prototype,"validateManualTasksOnLinking",void 0),S([i.i(r.Property)(!1)],t.prototype,"enableMultiTaskbar",void 0),S([i.i(r.Property)(!1)],t.prototype,"showOverAllocation",void 0),S([i.i(r.Property)("Auto")],t.prototype,"taskMode",void 0),S([i.i(r.Complex)({},d.g)],t.prototype,"filterSettings",void 0),S([i.i(r.Complex)({},d.h)],t.prototype,"searchSettings",void 0),S([i.i(r.Complex)({},d.l)],t.prototype,"splitterSettings",void 0),S([i.i(r.Event)()],t.prototype,"queryTaskbarInfo",void 0),S([i.i(r.Event)()],t.prototype,"beforeExcelExport",void 0),S([i.i(r.Event)()],t.prototype,"excelExportComplete",void 0),S([i.i(r.Event)()],t.prototype,"excelQueryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"excelHeaderQueryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"rowDrag",void 0),S([i.i(r.Event)()],t.prototype,"rowDragStart",void 0),S([i.i(r.Event)()],t.prototype,"rowDragStartHelper",void 0),S([i.i(r.Event)()],t.prototype,"rowDrop",void 0),S([i.i(r.Event)()],t.prototype,"collapsing",void 0),S([i.i(r.Event)()],t.prototype,"collapsed",void 0),S([i.i(r.Event)()],t.prototype,"expanding",void 0),S([i.i(r.Event)()],t.prototype,"expanded",void 0),S([i.i(r.Event)()],t.prototype,"actionBegin",void 0),S([i.i(r.Event)()],t.prototype,"actionComplete",void 0),S([i.i(r.Event)()],t.prototype,"actionFailure",void 0),S([i.i(r.Event)()],t.prototype,"dataStateChange",void 0),S([i.i(r.Event)()],t.prototype,"taskbarEdited",void 0),S([i.i(r.Event)()],t.prototype,"endEdit",void 0),S([i.i(r.Event)()],t.prototype,"cellEdit",void 0),S([i.i(r.Event)()],t.prototype,"load",void 0),S([i.i(r.Event)()],t.prototype,"created",void 0),S([i.i(r.Event)()],t.prototype,"destroyed",void 0),S([i.i(r.Event)()],t.prototype,"taskbarEditing",void 0),S([i.i(r.Event)()],t.prototype,"dataBound",void 0),S([i.i(r.Event)()],t.prototype,"resizeStart",void 0),S([i.i(r.Event)()],t.prototype,"resizing",void 0),S([i.i(r.Event)()],t.prototype,"resizeStop",void 0),S([i.i(r.Event)()],t.prototype,"splitterResizeStart",void 0),S([i.i(r.Event)()],t.prototype,"splitterResizing",void 0),S([i.i(r.Event)()],t.prototype,"splitterResized",void 0),S([i.i(r.Event)()],t.prototype,"columnDragStart",void 0),S([i.i(r.Event)()],t.prototype,"columnDrag",void 0),S([i.i(r.Event)()],t.prototype,"columnDrop",void 0),S([i.i(r.Event)()],t.prototype,"beforeTooltipRender",void 0),S([i.i(r.Event)()],t.prototype,"rowSelecting",void 0),S([i.i(r.Event)()],t.prototype,"rowSelected",void 0),S([i.i(r.Event)()],t.prototype,"rowDeselecting",void 0),S([i.i(r.Event)()],t.prototype,"rowDeselected",void 0),S([i.i(r.Event)()],t.prototype,"cellSelecting",void 0),S([i.i(r.Event)()],t.prototype,"cellSelected",void 0),S([i.i(r.Event)()],t.prototype,"cellDeselecting",void 0),S([i.i(r.Event)()],t.prototype,"cellDeselected",void 0),S([i.i(r.Event)()],t.prototype,"queryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"headerCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"rowDataBound",void 0),S([i.i(r.Event)()],t.prototype,"columnMenuOpen",void 0),S([i.i(r.Event)()],t.prototype,"toolbarClick",void 0),S([i.i(r.Event)()],t.prototype,"columnMenuClick",void 0),S([i.i(r.Event)()],t.prototype,"contextMenuOpen",void 0),S([i.i(r.Event)()],t.prototype,"contextMenuClick",void 0),S([i.i(r.Event)()],t.prototype,"onTaskbarClick",void 0),S([i.i(r.Event)()],t.prototype,"recordDoubleClick",void 0),S([i.i(r.Event)()],t.prototype,"onMouseMove",void 0),S([i.i(r.Event)()],t.prototype,"beforePdfExport",void 0),S([i.i(r.Event)()],t.prototype,"pdfExportComplete",void 0),S([i.i(r.Event)()],t.prototype,"pdfQueryCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"pdfQueryTaskbarInfo",void 0),S([i.i(r.Event)()],t.prototype,"pdfQueryTimelineCellInfo",void 0),S([i.i(r.Event)()],t.prototype,"pdfColumnHeaderQueryCellInfo",void 0),t=S([r.NotifyPropertyChanges],t)}(r.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(3)),a=i(86),s=(i.n(a),i(4)),o=(i.n(s),function(){function e(e){this.parent=e,this.parent.on("destroy",this.destroy,this)}return e.prototype.renderSplitter=function(){var e=this,t=this.calculateSplitterPosition(this.parent.splitterSettings);this.parent.splitterElement=i.i(r.createElement)("div",{className:n._31}),this.parent.treeGridPane=i.i(r.createElement)("div",{className:n._32}),this.parent.chartPane=i.i(r.createElement)("div",{className:n._33}),this.parent.splitterElement.appendChild(this.parent.treeGridPane),this.parent.splitterElement.appendChild(this.parent.chartPane),this.splitterObject=new a.Splitter({height:null,width:this.parent.ganttWidth.toString(),enablePersistence:this.parent.enablePersistence,separatorSize:this.parent.splitterSettings.separatorSize,paneSettings:[{resizable:!0,size:t,min:this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum)},{resizable:!0}],orientation:"Horizontal",resizeStart:function(t){var i=t.pane[0],r=t.pane[1];e.splitterPreviousPositionGrid=i.scrollWidth+1+"px",e.splitterPreviousPositionChart=r.scrollWidth+1+"px";var n=new s.Deferred;return e.parent.trigger("splitterResizeStart",t,function(e){n.resolve(e)}),n},resizing:function(t){e.parent.trigger("splitterResizing",t)},resizeStop:function(t){var n=new s.Deferred;return e.parent.trigger("splitterResized",t,function(t){!0===t.cancel&&(e.splitterObject.paneSettings[0].size=null,e.splitterObject.paneSettings[0].size=e.getSpliterPositionInPercentage(e.splitterPreviousPositionGrid),e.splitterObject.paneSettings[1].size=null,e.splitterObject.paneSettings[1].size=e.getSpliterPositionInPercentage(e.splitterPreviousPositionChart)),i.i(r.isNullOrUndefined)(e.parent.projectEndDate)&&e.parent.timelineModule.updateTimelineAfterZooming(e.parent.timelineModule.timelineEndDate,!0),n.resolve(t)}),n}}),this.parent.element.appendChild(this.parent.splitterElement),this.splitterObject.appendTo(this.parent.splitterElement)},e.prototype.calculateSplitterPosition=function(e){return!i.i(r.isNullOrUndefined)(this.splitterObject)&&this.parent.enablePersistence?this.splitterObject.paneSettings[0].size:"Grid"===e.view?"100%":"Chart"===e.view?"0%":i.i(r.isNullOrUndefined)(e.position)||""===e.position?!i.i(r.isNullOrUndefined)(e.columnIndex)&&e.columnIndex>=0?150*e.columnIndex<this.parent.ganttWidth||!this.parent.element.classList.contains("e-device")?this.getSpliterPositionInPercentage(this.getTotalColumnWidthByIndex(e.columnIndex).toString()+"px"):this.getSpliterPositionInPercentage(130*e.columnIndex+"px"):this.getSpliterPositionInPercentage("250px"):this.getSpliterPositionInPercentage(e.position)},e.prototype.getSpliterPositionInPercentage=function(e){var t=i.i(r.isNullOrUndefined)(e)||""===e?null:e;if(!i.i(r.isNullOrUndefined)(t))if(-1!==e.indexOf("px")){var n=parseInt(e,10);t=n/this.parent.ganttWidth*100<=100?n/this.parent.ganttWidth*100+"%":"25%"}else t=-1===e.indexOf("%")?e+"%":e;return t},e.prototype.getTotalColumnWidthByIndex=function(e){var t=0,i=this.parent.ganttColumns;e=i.length>e?e:i.length;for(var r=0;r<e;r++)t+=parseInt(i[r].width);return t},e.prototype.updateSplitterPosition=function(){this.splitterObject.separatorSize=this.parent.splitterSettings.separatorSize>=4?this.parent.splitterSettings.separatorSize:4;var e=this.calculateSplitterPosition(this.parent.splitterSettings);this.splitterObject.paneSettings[0].min=this.getSpliterPositionInPercentage(this.parent.splitterSettings.minimum),this.splitterObject.dataBind(),this.splitterObject.paneSettings[0].size=e},e.prototype.triggerCustomResizedEvent=function(){var e=this.splitterObject.element.querySelectorAll(".e-pane")[0],t=this.splitterObject.element.querySelectorAll(".e-pane")[1],i={event:null,element:this.splitterObject.element,pane:[e,t],index:[0,1],separator:this.splitterObject.element.querySelector(".e-split-bar"),paneSize:[e.offsetWidth,t.offsetWidth]};this.parent.trigger("splitterResized",i),!0===i.cancel&&(this.splitterObject.paneSettings[0].size=this.getSpliterPositionInPercentage(this.splitterPreviousPositionGrid),this.splitterObject.paneSettings[1].size=this.getSpliterPositionInPercentage(this.splitterPreviousPositionChart))},e.prototype.destroy=function(){this.splitterObject.destroy(),this.parent.off("destroy",this.destroy)},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(5)),a=(i.n(n),i(4)),s=(i.n(a),i(2)),o=i(10),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d=function(e){function t(t){var i=e.call(this,t)||this;return i.recordIndex=0,i.taskIds=[],i.hierarchyData=[],i.addEventListener(),i}return l(t,e),t.prototype.addEventListener=function(){this.parent.on("beforeDataManipulate",this.checkDataBinding.bind(this))},t.prototype.checkDataBinding=function(e){if(e&&(this.parent.flatData=[],this.parent.currentViewData=[],this.parent.updatedRecords=[],this.dataArray=[],this.taskIds=[],this.parent.ids=[],this.recordIndex=0,this.hierarchyData=[],this.parent.predecessorsCollection=[],this.parent.treeGrid.parentData=[],this.parent.taskIds=[]),i.i(r.isNullOrUndefined)(this.parent.dataSource))this.parent.dataSource=[],this.parent.processTimeline(),this.parent.renderGantt(e);else if(this.parent.dataSource instanceof a.DataManager)this.initDataSource(e);else{if(this.parent.dataSource instanceof Object&&i.i(s.i)(this.parent)){var t=i.i(r.getValue)("result",this.parent.dataSource);this.dataArray=t}else this.dataArray=this.parent.dataSource;this.processTimeline(),this.cloneDataSource(),this.parent.renderGantt(e)}},t.prototype.processTimeline=function(){this.parent.processTimeline(),this.parent.enableValidation||(this.parent.dataOperation.calculateProjectDatesForValidatedTasks(),this.parent.timelineModule.validateTimelineProp())},t.prototype.initDataSource=function(e){var t=this,i=this.parent.query instanceof a.Query?this.parent.query:new a.Query;i.requiresCount(),this.parent.dataSource.executeQuery(i).then(function(i){t.dataArray=i.result,t.processTimeline(),t.cloneDataSource(),t.parent.renderGantt(e)}).catch(function(i){t.parent.processTimeline(),t.parent.renderGantt(e),t.parent.trigger("actionFailure",{error:i})})},t.prototype.constructDataSource=function(e){for(var t,n=new a.DataManager(e).executeLocal((new a.Query).group(this.parent.taskFields.parentID)),s=[],o=0;o<n.length;o++){var l=n[o];!i.i(r.isNullOrUndefined)(l.key)&&(t=this.taskIds.indexOf(l.key.toString()))>-1&&!i.i(r.isNullOrUndefined)(l.key)?e[t][this.parent.taskFields.child]=l.items:-1!==t&&s.push.apply(s,l.items)}this.hierarchyData=this.dataReorder(e,s)},t.prototype.cloneDataSource=function(){var e=this.parent.taskFields.id,t=this.parent.taskFields.parentID,n=[];if(i.i(r.isNullOrUndefined)(e)||i.i(r.isNullOrUndefined)(t))n=this.dataArray;else{for(var s=[],o=0;o<this.dataArray.length;o++){var l=this.dataArray[o];s.push(i.i(r.extend)({},{},l,!0)),i.i(r.isNullOrUndefined)(l[e])||this.taskIds.push(l[e].toString())}this.parent.taskFields.child||(this.parent.taskFields.child="Children"),this.constructDataSource(s),n=this.hierarchyData}if(this.parent.taskFields.segmentId&&(this.segmentCollection=new a.DataManager(this.parent.segmentData).executeLocal((new a.Query).group(this.parent.taskFields.segmentId)),this.parent.taskFields.segments||(this.parent.taskFields.segments="Segments")),"ProjectView"!==this.parent.viewType){var d=i.i(r.extend)([],[],this.parent.resources,!0),p=[];if(this.constructResourceViewDataSource(d,n,p),p.length>0){var h={};h[this.parent.resourceFields.id]=0,h[this.parent.resourceFields.name]=this.parent.localeObj.getConstant("unassignedTask"),h[this.parent.taskFields.child]=p,d.push(h)}n=d}this.prepareDataSource(n)},t.prototype.constructResourceViewDataSource=function(e,t,i){for(var r=this,n=0;n<t.length;n++)!function(n){var a=t[n],s=r.parent.taskFields.child,o=a&&a[r.parent.taskFields.resourceInfo],l=r.parent.resourceFields.id;a[s]&&0!==a[s].length||!o||!o.length?a[s]||i.push(a):o.forEach(function(t){for(var i="object"==typeof t?t[l]:t,r=0;r<e.length;r++)if(e[r][l].toString()===i.toString()){e[r][s]?e[r][s].push(a):e[r][s]=[a];break}}),a[r.parent.taskFields.child]&&a[r.parent.taskFields.child].length&&r.constructResourceViewDataSource(e,a[r.parent.taskFields.child],i)}(n)},t.prototype.prepareDataSource=function(e){this.prepareRecordCollection(e,0),"ResourceView"===this.parent.viewType&&this.calculateSharedTaskUniqueIds(),this.parent.taskFields.dependency&&this.parent.predecessorModule&&this.parent.predecessorModule.ensurePredecessorCollection()},t.prototype.calculateSharedTaskUniqueIds=function(){for(var e=this,t=0;t<this.parent.getTaskIds().length;t++)!function(t){var i=[];if(i[0]=e.parent.getTaskIds()[t][0],i[1]=e.parent.getTaskIds()[t].slice(1),"R"!==i[0]){var r=[],n=[];e.parent.flatData.filter(function(e){e.ganttProperties.taskId.toString()===i[1]&&0!==e.level&&(n.push(e.ganttProperties.rowUniqueID),r.push(e))});for(var a=0;a<r.length;a++)r[a].ganttProperties.sharedTaskUniqueIds=n}}(t)},t.prototype.prepareRecordCollection=function(e,t,n){for(var a=this,s=e.length,o=this,l=0;l<s;l++)!function(s){var l=e[s];if(!i.i(r.isNullOrUndefined)(o.parent.taskFields.segmentId)){var d=o.segmentCollection.filter(function(e){return e.key===l[a.parent.taskFields.id]});d.length>0&&(l[o.parent.taskFields.segments]=d[0].items)}var p=o.createRecord(l,t,n,!0);o.parent.enableValidation||o.updateTaskLeftWidth(p),p.index=o.recordIndex++,o.parent.ids[p.index]=p.ganttProperties.rowUniqueID,o.parent.flatData.push(p),o.parent.setTaskIds(p);var h=l[o.parent.taskFields.child];if("ResourceView"===o.parent.viewType&&i.i(r.isNullOrUndefined)(h)&&i.i(r.isNullOrUndefined)(p.parentItem)&&0===p.level){var u=p.ganttProperties,c=p;o.parent.setRecordValue(u.isAutoSchedule?"startDate":"autoStartDate",null,c.ganttProperties,!0),o.parent.setRecordValue(u.isAutoSchedule?"endDate":"autoEndDate",null,c.ganttProperties,!0);var g=c.ganttProperties;o.parent.setRecordValue("isMilestone",!1,g,!0),g.isAutoSchedule&&o.calculateDuration(c),o.updateWorkWithDuration(c);var f=g.work;o.parent.setRecordValue("work",f,g,!0),o.parent.setRecordValue("taskType","FixedDuration",g,!0),i.i(r.isNullOrUndefined)(o.parent.taskFields.type)||o.updateMappingData(c,"type"),o.parent.setRecordValue("progress",Math.floor(0),g,!0),o.parent.setRecordValue("totalProgress",0,g,!0),o.parent.setRecordValue("totalDuration",0,g,!0),g.isAutoSchedule||(o.parent.setRecordValue("autoDuration",o.calculateAutoDuration(g),g,!0),o.updateAutoWidthLeft(c)),o.updateWidthLeft(c),o.updateTaskData(c)}!i.i(r.isNullOrUndefined)(h)&&h.length>0&&o.prepareRecordCollection(h,p.level+1,p)}(l)},t.prototype.addCustomFieldValue=function(e,t){var i=this.parent.ganttColumns,r=i.length;if(r)for(var n=0;n<r;n++){var a=t[i[n].field];void 0===a&&this.parent.setRecordValue(i[n].field,e[i[n].field],t)}},t.prototype.createRecord=function(e,t,a,o){var l=this.parent.taskFields,d=this.parent.resourceFields,p=e[l.progress],h=null,u=null,c=e[l.notes];p=p&&parseFloat(p.toString())?parseFloat(p.toString()):0;var g=e[l.dependency],f=this.getDateFromFormat(e[l.baselineStartDate],!0),m=this.getDateFromFormat(e[l.baselineEndDate],!0),y={},v={},D="Auto"===this.parent.taskMode||"Manual"!==this.parent.taskMode&&!0!==e[l.manual];this.parent.setRecordValue("ganttProperties",v,y),i.i(r.isNullOrUndefined)(e[l.id])?i.i(r.isNullOrUndefined)(e[d.id])||(h=e[d.id],u=e[d.name],this.addTaskData(y,e,!1)):(h=e[l.id],u=e[l.name],this.addTaskData(y,e,o)),this.parent.setRecordValue("taskId",h,v,!0),this.parent.setRecordValue("taskName",u,v,!0),l.parentID&&this.parent.setRecordValue("parentId",e[l.parentID],v,!0),this.addCustomFieldValue(e,y),y.checkboxState="uncheck",this.parent.setRecordValue("isAutoSchedule",D,v,!0),this.parent.setRecordValue("resourceInfo",this.setResourceInfo(e),v,!0),this.parent.setRecordValue("isMilestone",!1,v,!0),this.parent.setRecordValue("indicators",e[l.indicators],v,!0),this.updateResourceName(y),this.calculateScheduledValues(y,e,o),this.parent.setRecordValue("baselineStartDate",this.checkBaselineStartDate(f),v,!0),m&&0===m.getHours()&&86400!==this.parent.defaultEndTime&&this.setTime(this.parent.defaultEndTime,m),(v.baselineStartDate&&m&&v.baselineStartDate.getTime()>m.getTime()||!i.i(r.isNullOrUndefined)(v.baselineStartDate)&&!i.i(r.isNullOrUndefined)(v.startDate)&&v.baselineStartDate.getTime()===v.startDate.getTime()&&!i.i(r.isNullOrUndefined)(m)&&!i.i(r.isNullOrUndefined)(v.endDate)&&m.toLocaleDateString()===v.endDate.toLocaleDateString()&&v.isMilestone)&&(m=v.baselineStartDate),this.parent.setRecordValue("baselineEndDate",this.checkBaselineEndDate(m,v),v,!0),this.parent.setRecordValue("progress",p,v,!0),this.parent.setRecordValue("totalProgress",p,v,!0),this.parent.setRecordValue("predecessorsName",g,v,!0),this.parent.setRecordValue("notes",c,v,!0),this.parent.setRecordValue("cssClass",e[l.cssClass],v,!0),this.parent.setRecordValue("parentItem",this.getCloneParent(a),y);var w=y.parentItem?y.parentItem.uniqueID:null;if(this.parent.setRecordValue("parentUniqueID",w,y),"ResourceView"!==this.parent.viewType||i.i(r.isNullOrUndefined)(l.parentID)||i.i(r.isNullOrUndefined)(y.parentItem)||this.parent.setRecordValue("parentId",y.parentItem.taskId,v,!0),this.parent.setRecordValue("level",t,y),this.parent.setRecordValue("uniqueID",i.i(n.getUid)(this.parent.element.id+"_data_"),y),this.parent.setRecordValue("uniqueID",y.uniqueID,v,!0),this.parent.setRecordValue("childRecords",[],y),this.parent.dataSource instanceof Object&&i.i(s.i)(this.parent)&&!i.i(r.isNullOrUndefined)(l.child)&&this.parent.setRecordValue(l.child,[],y),!i.i(r.isNullOrUndefined)(e[l.child])&&e[l.child].length>0?(this.parent.setRecordValue("hasChildRecords",!0,y),this.parent.setRecordValue("isMilestone",!1,v,!0)):this.parent.setRecordValue("hasChildRecords",!1,y),y.hasChildRecords&&(this.parent.setRecordValue("autoStartDate",y.ganttProperties.startDate,v),this.parent.setRecordValue("autoEndDate",y.ganttProperties.endDate,v),this.parent.setRecordValue("autoDuration",y.ganttProperties.duration,v)),this.parent.setRecordValue("expanded",!y.hasChildRecords||!this.parent.collapseAllParentTasks,y),this.updateExpandStateMappingValue(y,e),o||(this.parent.setRecordValue("width",this.calculateWidth(y),v,!0),this.parent.setRecordValue("left",this.calculateLeft(v),v,!0),this.parent.setRecordValue("progressWidth",this.getProgressWidth(v.width,p),v,!0),v.baselineEndDate&&v.baselineStartDate&&(this.parent.setRecordValue("baselineLeft",this.calculateBaselineLeft(v),v,!0),this.parent.setRecordValue("baselineWidth",this.calculateBaselineWidth(v),v,!0))),i.i(r.isNullOrUndefined)(l.work)&&this.updateWorkWithDuration(y),i.i(r.isNullOrUndefined)(l.manual)||this.parent.dataOperation.updateMappingData(y,"manual"),this.updateTaskData(y),g&&this.parent.predecessorsCollection.push(y),i.i(r.isNullOrUndefined)(a)||(a.childRecords.push(y),this.parent.dataSource instanceof Object&&i.i(s.i)(this.parent)&&!i.i(r.isNullOrUndefined)(this.parent.taskFields.child)&&a[this.parent.taskFields.child].push(y.taskData)),"ProjectView"===this.parent.viewType)this.parent.setRecordValue("rowUniqueID",v.taskId.toString(),v,!0);else{var k=y.uniqueID.replace(this.parent.element.id+"_data_","");"ResourceView"===this.parent.viewType&&"string"==typeof y.ganttProperties.taskId&&(k=v.taskId.toString()),this.parent.setRecordValue("rowUniqueID",k,y),this.parent.setRecordValue("rowUniqueID",k,v,!0),this.parent.setRecordValue("sharedTaskUniqueIds",[],v,!0)}return this.parent.allowUnscheduledTasks&&y.ganttProperties.startDate&&(y.ganttProperties.endDate||y.ganttProperties.duration)&&(this.parent.setRecordValue("segments",this.setSegmentsInfo(y,!0),v,!0),this.parent.dataOperation.updateMappingData(y,"segments"),o||this.updateWidthLeft(y)),y},t.prototype.sortSegmentsData=function(e,t,i){var r=this;return t?e.sort(function(e,t){var i=r.parent.taskFields.startDate;return r.getDateFromFormat(e[i]).getTime()-r.getDateFromFormat(t[i]).getTime()}):e.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()}),e},t.prototype.setSegmentsInfo=function(e,t){var n,a=this.parent.taskFields,s=[],o=0,l=0,d=[];if(!i.i(r.isNullOrUndefined)(this.parent.taskFields.segments)&&(n=t?e.taskData[this.parent.taskFields.segments]:e.ganttProperties.segments,!i.i(r.isNullOrUndefined)(n)&&n.length>1)){this.sortSegmentsData(n,t,e.ganttProperties);for(var p=0;p<n.length;p++){var h=n[p],u=t?h[a.startDate]:h.startDate,c=t?h[a.endDate]:h.endDate,g=t?h[a.duration]:h.duration;if(u=this.getDateFromFormat(u),u=this.checkStartDate(u,e.ganttProperties,!1),i.i(r.isNullOrUndefined)(g)?(c=this.getDateFromFormat(c),c=this.checkEndDate(c,e.ganttProperties,!1),g=this.getDuration(u,c,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone)):c=this.getEndDate(u,g,e.ganttProperties.durationUnit,e.ganttProperties,!1),a.duration){if((l=e.ganttProperties.duration-o)<=0)continue;g=p===n.length-1?l:l>0&&g>l?l:g,c=this.getEndDate(u,g,e.ganttProperties.durationUnit,e.ganttProperties,!1)}else if(!a.duration&&a.endDate&&(c=!i.i(r.isNullOrUndefined)(e.ganttProperties.endDate)&&c.getTime()>e.ganttProperties.endDate.getTime()&&p!==n.length-1?c:e.ganttProperties.endDate,g=this.getDuration(u,c,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone),s.length>0&&c.getTime()<u.getTime()&&c.getTime()<=e.ganttProperties.endDate.getTime())){s[p-1].duration=this.getDuration(s[p-1].startDate,e.ganttProperties.endDate,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone);continue}if(h={},!(u&&c&&u&&g))break;if(o+=g,h.startDate=u,h.endDate=c,h.duration=g,h.width=0,h.left=0,h.segmentIndex=p,s.push(h),i.i(r.isNullOrUndefined)(s[p-1]))h.offsetDuration=0;else{var f=this.getDuration(s[p-1].endDate,s[p].startDate,e.ganttProperties.durationUnit,e.ganttProperties.isAutoSchedule,e.ganttProperties.isMilestone);h.offsetDuration=f,f<1&&(h.startDate=this.getEndDate(s[p-1].endDate,1,e.ganttProperties.durationUnit,e.ganttProperties,!1),h.startDate=this.checkStartDate(h.startDate,e.ganttProperties,!1),h.endDate=this.getEndDate(h.startDate,h.duration,e.ganttProperties.durationUnit,e.ganttProperties,!1),h.endDate=!a.duration&&a.endDate&&h.endDate>e.ganttProperties.endDate?e.ganttProperties.endDate:h.endDate,h.offsetDuration=1)}d.push(this.setSegmentTaskData(h,n[p]))}this.parent.setRecordValue("duration",o,e.ganttProperties,!0),this.parent.setRecordValue("endDate",s[s.length-1].endDate,e.ganttProperties,!0),i.i(r.isNullOrUndefined)(a.endDate)||this.parent.setRecordValue(this.parent.taskFields.endDate,s[s.length-1].endDate,e,!0),this.parent.setRecordValue("taskData."+this.parent.taskFields.segments,d,e)}return s.length>1?this.parent.setRecordValue("segments",s,e.ganttProperties,!0):s=null,s},t.prototype.setSegmentTaskData=function(e,t){var n=this.parent.taskFields,a=i.i(r.extend)({},{},t,!0);return i.i(r.isNullOrUndefined)(n.startDate)||(a[this.parent.taskFields.startDate]=e.startDate),i.i(r.isNullOrUndefined)(n.endDate)||(a[this.parent.taskFields.endDate]=e.endDate),i.i(r.isNullOrUndefined)(n.duration)||(a[this.parent.taskFields.duration]=Number(e.duration)),a},t.prototype.updateWorkWithDuration=function(e){var t=e.ganttProperties.resourceInfo,n=0;if(!i.i(r.isNullOrUndefined)(t)){var a=t.length,s=void 0,o=void 0,l=void 0,d=this.parent.secondsPerDay/3600,p=this.getDurationInDay(e.ganttProperties.duration,e.ganttProperties.durationUnit);for(s=0;s<a;s++)o=t[s][this.parent.resourceFields.unit],l=o>0?d*o/100:d,n+=l*p;"minute"===e.ganttProperties.workUnit&&(n*=60),"day"===e.ganttProperties.workUnit&&(n/=d),n%1!=0&&(n=parseFloat(n.toFixed(2)))}if(e.childRecords.length>0&&this.parent.isOnEdit){for(var h=0,u=0;u<e.childRecords.length;u++)h+=e.childRecords[u].ganttProperties.work;n+=h}this.parent.setRecordValue("work",n,e.ganttProperties,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.work)||this.parent.dataOperation.updateMappingData(e,"work")},t.prototype.getCloneParent=function(e){if(i.i(r.isNullOrUndefined)(e))return null;var t={};return t.uniqueID=e.uniqueID,t.expanded=e.expanded,t.level=e.level,t.index=e.index,t.taskId=e.ganttProperties.rowUniqueID,t},t.prototype.reUpdateResources=function(){if(this.parent.flatData.length>0)for(var e=void 0,t=void 0,i=void 0,r=0;r<this.parent.flatData.length;r++)e=this.parent.flatData[r].taskData,t=this.parent.flatData[r].ganttProperties,i=this.parent.flatData[r],this.parent.setRecordValue("resourceInfo",this.setResourceInfo(e),t,!0),this.updateResourceName(i)},t.prototype.addTaskData=function(e,t,n){var s=this,o=this.parent.taskFields,l=this.parent.dataSource;if(n)if(o.parentID||l instanceof a.DataManager&&l.dataSource.json&&l.dataSource.offline)if(o.parentID){var d=t[o.id],p=this.taskIds.indexOf(d.toString()),h=p>-1?this.dataArray[p]:{};if(!i.i(r.isNullOrUndefined)(this.parent.taskFields.segmentId)){var u=this.segmentCollection.filter(function(e){return e.key===h[s.parent.taskFields.id]});u.length>0&&(h[this.parent.taskFields.segments]=u[0].items)}this.parent.setRecordValue("taskData",h,e)}else this.parent.setRecordValue("taskData",t,e);else this.parent.setRecordValue("taskData",t,e);else this.parent.setRecordValue("taskData",t,e)},t.prototype.updateExpandStateMappingValue=function(e,t){var n,a=this.parent.taskFields.expandState,s=t[a];a&&e.hasChildRecords&&(i.i(r.isNullOrUndefined)(s)?i.i(r.isNullOrUndefined)(s)&&!this.parent.collapseAllParentTasks?n=!0:i.i(r.isNullOrUndefined)(s)&&this.parent.collapseAllParentTasks&&(n=!1):n="true"===s.toString(),this.parent.setRecordValue("taskData."+a,n,e),this.parent.setRecordValue(a,n,e),this.parent.setRecordValue("expanded",n,e))},t.prototype.setValidatedDates=function(e,t){var n=e.ganttProperties,a=this.parent.taskFields,s=t[a.duration],o=this.getDateFromFormat(t[a.startDate],!0),l=this.getDateFromFormat(t[a.endDate],!0);s=i.i(r.isNullOrUndefined)(s)||""===s?null:s,this.parent.setRecordValue("startDate",new Date(o.getTime()),n,!0),i.i(r.isNullOrUndefined)(s)||""===s?this.calculateDuration(e):this.updateDurationValue(s,n),this.parent.setRecordValue("endDate",new Date(l.getTime()),n,!0)},t.prototype.calculateScheduledValues=function(e,t,n){var a=this.parent.taskFields,s=e.ganttProperties,o=t[a.duration];o=i.i(r.isNullOrUndefined)(o)||""===o?null:o;var l,d;s.startDate&&s.endDate?(l=this.getDateFromFormat(s.startDate,!0),d=this.getDateFromFormat(s.endDate,!0)):(l=this.getDateFromFormat(t[a.startDate],!0),d=this.getDateFromFormat(t[a.endDate],!0));var p=a.segments?t[a.segments]||e.taskData[a.segments]:null,h=!!a.milestone&&!!t[a.milestone],u=t[a.durationUnit]?t[a.durationUnit]:"";this.parent.setRecordValue("durationUnit",this.validateDurationUnitMapping(u),s,!0);var c=i.i(r.isNullOrUndefined)(t[a.work])?0:parseFloat(t[a.work]);this.parent.setRecordValue("workUnit",this.validateWorkUnitMapping(this.parent.workUnit),s,!0);var g=t[a.type]?t[a.type]:"",f=this.validateTaskTypeMapping(g);if(this.parent.setRecordValue("taskType",f,s,!0),n&&!this.parent.enableValidation&&l&&d)this.setValidatedDates(e,t);else if(d||l||!i.i(r.isNullOrUndefined)(o)&&""!==o)l?this.calculateDateFromStartDate(l,d,o,e,n):d?this.calculateDateFromEndDate(d,o,e):i.i(r.isNullOrUndefined)(o)||""===o||(this.updateDurationValue(o,s),this.parent.allowUnscheduledTasks?(this.parent.setRecordValue("startDate",null,s,!0),this.parent.setRecordValue("endDate",null,s,!0)):(this.parent.setRecordValue("startDate",this.getProjectStartDate(s,n),s,!0),this.calculateEndDate(e)));else{if(this.parent.allowUnscheduledTasks)return;this.parent.setRecordValue("duration",1,s,!0),this.parent.setRecordValue("startDate",this.getProjectStartDate(s,n),s,!0),this.calculateEndDate(e)}if(i.i(r.isNullOrUndefined)(p)||this.parent.setRecordValue("segments",this.setSegmentsInfo(e,!0),s,!0),0===s.duration&&(this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0)),!i.i(r.isNullOrUndefined)(h)&&h&&(this.parent.setRecordValue("duration",0,s,!0),this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0)),i.i(r.isNullOrUndefined)(a.work))a.type&&s.taskType&&this.parent.dataOperation.updateMappingData(e,"type");else{if(this.parent.setRecordValue("durationUnit",this.parent.durationUnit,s,!0),isNaN(c)||i.i(r.isNullOrUndefined)(c))this.parent.setRecordValue("work",0,s,!0),this.parent.setRecordValue("duration",0,s,!0),this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0);else{switch(this.parent.setRecordValue("work",c,s,!0),f){case"FixedDuration":case"FixedWork":this.updateUnitWithWork(e);break;case"FixedUnit":this.updateDurationWithWork(e)}i.i(r.isNullOrUndefined)(a.type)||this.parent.dataOperation.updateMappingData(e,"type"),0===s.duration?(this.parent.setRecordValue("isMilestone",!0,s,!0),this.parent.setRecordValue("endDate",s.startDate,s,!0)):i.i(r.isNullOrUndefined)(s.startDate)||i.i(r.isNullOrUndefined)(s.duration)||(this.parent.setRecordValue("isMilestone",!1,s,!0),this.calculateEndDate(e))}this.parent.dataOperation.updateMappingData(e,"work")}},t.prototype.updateDurationWithWork=function(e){var t=e.ganttProperties,n=t.resourceInfo;if(!i.i(r.isNullOrUndefined)(n)){var a=i.i(r.isNullOrUndefined)(n)?0:n.length,s=0,o=this.parent.secondsPerDay/3600,l=0,d=void 0,p=void 0;for(p=0;p<a;p++)d=n[p][this.parent.resourceFields.unit],s+=d>0?o*d/100:o;var h=this.getWorkInHour(t.work,t.workUnit);a>0&&(l+=h/s),"minute"===t.durationUnit&&(l=l*o*60),"hour"===t.durationUnit&&(l*=o),l%1!=0&&(l=parseFloat(l.toFixed(2))),i.i(r.isNullOrUndefined)(t.duration)||this.parent.setRecordValue("duration",l,t,!0),this.parent.dataOperation.updateMappingData(e,"duration")}},t.prototype.updateUnitWithWork=function(e){var t=e.ganttProperties,n=t.resourceInfo,a=i.i(r.isNullOrUndefined)(n)?0:n.length,s=this.parent.secondsPerDay/3600;if(0!==a){var o=this.getDurationInDay(e.ganttProperties.duration,e.ganttProperties.durationUnit),l=this.getWorkInHour(t.work,t.workUnit),d=o>0?l/(o*s)*100:0,p=d>0?d/a:100;p%1!=0&&(p=parseFloat(p.toFixed(2)));for(var h=0;h<a;h++)n[h][this.parent.resourceFields.unit]=p;this.updateResourceName(e)}},t.prototype.calculateDateFromEndDate=function(e,t,n){var a=n.ganttProperties;0===e.getHours()&&86400!==this.parent.defaultEndTime&&this.setTime(this.parent.defaultEndTime,e);var s=0===parseInt(t,10)||null;this.parent.setRecordValue("endDate",this.checkEndDate(e,n.ganttProperties,s),a,!0),i.i(r.isNullOrUndefined)(t)||""===t?this.parent.allowUnscheduledTasks?(this.parent.setRecordValue("startDate",null,a,!0),this.parent.setRecordValue("duration",null,a,!0)):(this.parent.setRecordValue("duration",1,a,!0),this.parent.setRecordValue("startDate",this.getStartDate(a.endDate,a.duration,a.durationUnit,a),a,!0)):i.i(r.isNullOrUndefined)(t)||""===t||(this.updateDurationValue(t,a),this.parent.setRecordValue("startDate",this.getStartDate(a.endDate,a.duration,a.durationUnit,a),a,!0))},t.prototype.calculateDateFromStartDate=function(e,t,n,a,s){var o=a.ganttProperties,l=!!(0===parseInt(n,10)||e&&t&&new Date(e.getTime())===new Date(t.getTime()))||null;this.parent.setRecordValue("startDate",this.checkStartDate(e,o,l,s),o,!0),this.parent.isTreeGridRendered&&a&&this.updateTaskData(a),t||!i.i(r.isNullOrUndefined)(n)&&""!==n?(i.i(r.isNullOrUndefined)(n)||t)&&t&&(i.i(r.isNullOrUndefined)(n)||""===n)?(0===t.getHours()&&86400!==this.parent.defaultEndTime&&this.setTime(this.parent.defaultEndTime,t),this.parent.setRecordValue("endDate",this.checkEndDate(t,a.ganttProperties),o,!0),1===this.compareDates(o.startDate,o.endDate)?(this.parent.setRecordValue("endDate",o.startDate,o,!0),this.parent.setRecordValue("isMilestone",!0,o,!0),this.parent.setRecordValue("duration",0,o,!0)):this.calculateDuration(a)):(this.updateDurationValue(n,o),this.calculateEndDate(a)):this.parent.allowUnscheduledTasks?(this.parent.setRecordValue("endDate",null,o,!0),this.parent.setRecordValue("duration",null,o,!0)):(this.parent.setRecordValue("duration",1,o,!0),this.calculateEndDate(a))},t.prototype.getProgressWidth=function(e,t){return e*t/100},t.prototype.calculateWidth=function(e,t){var n=e.ganttProperties,a=t?n.autoStartDate:n.startDate,s=t?n.autoEndDate:n.endDate;return i.i(r.isNullOrUndefined)(a)&&i.i(r.isNullOrUndefined)(s)&&(a=this.getValidStartDate(n,t),s=this.getValidEndDate(n,t)),i.i(r.isNullOrUndefined)(a)||i.i(r.isNullOrUndefined)(s)?3:!n.isMilestone||e.hasChildRecords&&!n.isAutoSchedule?this.getTaskWidth(a,s):0},t.prototype.getTaskbarHeight=function(){var e=this.parent.rowHeight,t=this.parent.taskbarHeight;return t<e?t:e},t.prototype.calculateLeft=function(e,t){var n=null,a=-300,s=t?e.autoStartDate:e.startDate,o=t?e.autoEndDate:e.endDate,l=(t?e.autoDuration:e.duration,e.isMilestone);return s?n=new Date(s.getTime()):o?(n=new Date(o.getTime()),l=!0):n=this.getValidStartDate(e),i.i(r.isNullOrUndefined)(n)||(a=this.getTaskLeft(n,l)),a},t.prototype.calculateAutoLeft=function(e){return this.getTaskLeft(e.autoStartDate,e.isMilestone)},t.prototype.calculateAutoDuration=function(e){return this.getDuration(e.autoStartDate,e.autoEndDate,e.durationUnit,!1,e.isMilestone)},t.prototype.calculateAutoWidth=function(e){return this.getTaskWidth(e.autoStartDate,e.autoEndDate)},t.prototype.calculateBaselineLeft=function(e){var t=this.getDateFromFormat(e.baselineStartDate),i=this.getDateFromFormat(e.baselineEndDate);return t&&i?this.getTaskLeft(t,e.isMilestone):0},t.prototype.calculateBaselineWidth=function(e){var t=this.getDateFromFormat(e.baselineStartDate),i=this.getDateFromFormat(e.baselineEndDate);return t&&i&&t.getTime()!==i.getTime()?this.getTaskWidth(t,i):0},t.prototype.getTaskWidth=function(e,t){var i=new Date(e.getTime()),r=new Date(t.getTime());return"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(i)===this.parent.defaultStartTime&&i.setHours(0,0,0,0),this.getSecondsInDecimal(r)===this.parent.defaultEndTime&&r.setHours(24),this.getSecondsInDecimal(r)===this.parent.defaultStartTime&&r.setHours(0,0,0,0)),i.getTime()===r.getTime()?this.parent.perDayWidth:this.getTimeDifference(i,r)/864e5*this.parent.perDayWidth},t.prototype.getTaskLeft=function(e,t){var i=new Date(e.getTime());"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(i)===this.parent.defaultStartTime?i.setHours(0,0,0,0):t&&this.getSecondsInDecimal(i)===this.parent.defaultEndTime&&i.setHours(24));var r=this.parent.timelineModule.timelineStartDate;return r?(i.getTime()-r.getTime())/864e5*this.parent.perDayWidth:0},t.prototype.getSplitTaskWidth=function(e,t,i){var r=new Date(e.getTime()),n=new Date(this.getEndDate(r,t,i.ganttProperties.durationUnit,i.ganttProperties,!1).getTime());return"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(r)===this.parent.defaultStartTime&&r.setHours(0,0,0,0),this.getSecondsInDecimal(n)===this.parent.defaultEndTime&&n.setHours(24),this.getSecondsInDecimal(n)===this.parent.defaultStartTime&&n.setHours(0,0,0,0)),this.getTimeDifference(r,n)/864e5*this.parent.perDayWidth},t.prototype.getSplitTaskLeft=function(e,t){var i=new Date(e.getTime());return"Day"===("None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier)&&(this.getSecondsInDecimal(i)===this.parent.defaultStartTime&&i.setHours(0,0,0,0),this.getSecondsInDecimal(t)===this.parent.defaultStartTime&&t.setHours(0,0,0,0)),t?(i.getTime()-t.getTime())/864e5*this.parent.perDayWidth:0},t.prototype.updateMappingData=function(e,t){var n=this.parent.columnMapping,a=e.ganttProperties;if(!i.i(r.isNullOrUndefined)(n[t])||"taskType"===t||"segments"===t)if("predecessorName"===t);else if("resourceInfo"===t){var s=a.resourceInfo,o=this.parent.resourceFields,l=[],d=[];if(!i.i(r.isNullOrUndefined)(s))for(var p=0;p<s.length;p++){l.push(s[p][o.id]);var h=s[p][o.name],u=s[p][o.unit];100!==u&&(h+="["+u+"%]"),d.push(h)}this.parent.setRecordValue("resourceNames",d.join(","),a,!0),this.updateTaskDataResource(e),this.parent.setRecordValue(n[t],d.join(","),e)}else"startDate"===t||"endDate"===t?this.setRecordDate(e,a[t],n[t]):"duration"===t?this.setRecordDuration(e,n[t]):"work"===t?(this.parent.setRecordValue("taskData."+n[t],this.getWorkString(a.work,a.workUnit),e),this.parent.setRecordValue(n[t],a[t],e)):"type"===t?(this.parent.setRecordValue("taskData."+n[t],a[t],e),this.parent.setRecordValue(n[t],a[t],e)):"manual"===t?(this.parent.setRecordValue("taskData."+n[t],!a.isAutoSchedule,e),this.parent.setRecordValue(n[t],!a.isAutoSchedule,e)):"segments"===t?this.parent.setRecordValue("taskData."+this.parent.taskFields.segments,this.segmentTaskData(e),e):(this.parent.setRecordValue("taskData."+n[t],a[t],e),this.parent.setRecordValue(n[t],a[t],e))},t.prototype.segmentTaskData=function(e){var t=e.ganttProperties.segments,n=this.parent.taskFields;if(i.i(r.isNullOrUndefined)(t))return null;for(var a=i.i(r.extend)([],[],e.taskData[n.segments],!0),s=0;s<t.length;s++)(this.parent.isEdit||this.parent.editModule&&this.parent.editModule.dialogModule&&i.i(r.getValue)("isEdit",this.parent.editModule.dialogModule)||this.parent.contextMenuModule&&i.i(r.getValue)("isEdit",this.parent.contextMenuModule))&&(a[s]={}),i.i(r.isNullOrUndefined)(n.startDate)||(a[s][this.parent.taskFields.startDate]=t[s].startDate),i.i(r.isNullOrUndefined)(n.endDate)||(a[s][this.parent.taskFields.endDate]=t[s].endDate),i.i(r.isNullOrUndefined)(n.duration)||(a[s][this.parent.taskFields.duration]=Number(t[s].duration));return a},t.prototype.updateTaskDataResource=function(e){var t=e.ganttProperties.resourceInfo,n=e.taskData[this.parent.taskFields.resourceInfo],a=this.parent.resourceFields;if(i.i(r.isNullOrUndefined)(n))e.taskData[this.parent.taskFields.resourceInfo]=t;else if(t.length){for(var s=0;s<t.length;s++){for(var o=!1,l=0;l<n.length;l++)if("number"==typeof n[l]||"string"==typeof n[l]){if(parseInt(n[l],10)===parseInt(t[s][a.id],10)){n[l]=t[s],o=!0;break}}else if(n[l][a.id]===t[s][a.id]&&"number"!=typeof n[l]){n[l]=i.i(r.extend)({},n[l],t[s],!0),o=!0;break}o||n.push(t[s])}for(var d=[],p=0;p<n.length;p++)!function(e){t.filter(function(t){t[a.id]===n[e][a.id]&&d.push(n[e])})}(p);this.parent.setRecordValue("taskData."+this.parent.taskFields.resourceInfo,d,e)}else this.parent.setRecordValue("taskData."+this.parent.taskFields.resourceInfo,[],e)},t.prototype.setRecordDate=function(e,t,n){var a="string"==typeof t?new Date(t):t;i.i(r.isNullOrUndefined)(t)||(t=new Date(a.getTime())),this.parent.setRecordValue(n,t,e),i.i(r.isNullOrUndefined)(t)||(t=new Date(a.getTime())),this.parent.isLoad||this.parent.isDynamicData||this.parent.setRecordValue("taskData."+n,t,e),this.parent.isDynamicData=!1},t.prototype.getDurationInDay=function(e,t){return"day"===t?e:"hour"===t?e/(this.parent.secondsPerDay/3600):e/(this.parent.secondsPerDay/60)},t.prototype.setRecordDuration=function(e,t){var n=e.ganttProperties.duration,a=e.ganttProperties.durationUnit;if(i.i(r.isNullOrUndefined)(n))this.parent.setRecordValue(t,n,e),this.parent.setRecordValue("taskData."+t,n,e);else{this.parent.setRecordValue(t,e.ganttProperties.duration,e);var s=i.i(r.getValue)(t,e.taskData);isNaN(s)&&i.i(r.isNullOrUndefined)(this.parent.taskFields.durationUnit)&&!i.i(r.isNullOrUndefined)(s)?this.parent.setRecordValue("taskData."+t,this.getDurationString(n,a),e):"string"==typeof s?this.parent.setRecordValue("taskData."+t,n.toString(),e):this.parent.setRecordValue("taskData."+t,n,e)}this.parent.taskFields.durationUnit&&(e.taskData[this.parent.taskFields.durationUnit]=e.ganttProperties.durationUnit)},t.prototype.getWorkInHour=function(e,t){return"day"===t?e*(this.parent.secondsPerDay/3600):"minute"===t?e/60:e},t.prototype.updateTaskData=function(e){var t=this.parent.taskFields,n=e.ganttProperties;if(!i.i(r.isNullOrUndefined)(e.taskData)){var a=e.taskData;if(t.id&&(this.parent.setRecordValue("taskData."+t.id,n.taskId,e),this.parent.setRecordValue(t.id,n.taskId,e)),t.name&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.name,n.taskName,e),this.parent.setRecordValue(t.name,n.taskName,e)),t.startDate&&this.setRecordDate(e,n.startDate,t.startDate),t.endDate&&this.setRecordDate(e,n.endDate,t.endDate),t.duration&&this.setRecordDuration(e,t.duration),t.durationUnit&&(a[t.durationUnit]=n.durationUnit),t.progress&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.progress,n.progress,e),this.parent.setRecordValue(t.progress,n.progress,e)),t.baselineStartDate&&this.setRecordDate(e,n.baselineStartDate,t.baselineStartDate),t.baselineEndDate&&this.setRecordDate(e,n.baselineEndDate,t.baselineEndDate),t.notes&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.notes,n.notes,e),this.parent.setRecordValue(t.notes,n.notes,e)),t.cssClass&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.cssClass,n.cssClass,e),this.parent.setRecordValue(t.cssClass,n.cssClass,e)),t.indicators&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.indicators,n.indicators,e),this.parent.setRecordValue(t.indicators,n.indicators,e)),t.parentID){var s="ProjectView"===this.parent.viewType?n.parentId:a[t.parentID];this.parent.setRecordValue("taskData."+t.parentID,s,e),this.parent.setRecordValue(t.parentID,n.parentId,e)}t.work&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.work,this.getWorkString(n.work,n.workUnit),e),this.parent.setRecordValue(t.work,n.work,e)),t.type&&(this.parent.isLoad||this.parent.setRecordValue("taskData."+t.type,n.taskType,e),this.parent.setRecordValue(t.type,n.taskType,e))}},t.prototype.setResourceInfo=function(e){var t;if(i.i(r.isNullOrUndefined)(e[this.parent.taskFields.resourceInfo]))return t;t=e[this.parent.taskFields.resourceInfo];var n;n=i.i(r.isNullOrUndefined)(this.parent.editModule)||i.i(r.isNullOrUndefined)(this.parent.editModule.dialogModule)||!this.parent.editModule.dialogModule.isAddNewResource?this.parent.resources:this.parent.editModule.dialogModule.ganttResources;for(var a=this.parent.resourceFields.id,s=this.parent.resourceFields.unit,o=this.parent.resourceFields.group,l=[],d=0;d<t.length;d++)!function(e){var d=n.filter(function(i){return"object"==typeof t[e]&&t[e][a]===i[a]||t[e]===i[a]}),p=i.i(r.extend)({},d[0]);l.push(p),i.i(r.isNullOrUndefined)(s)||i.i(r.isNullOrUndefined)(t[e][s])||(p[s]=t[e][s]),i.i(r.isNullOrUndefined)(o)||i.i(r.isNullOrUndefined)(t[e][o])||(p[o]=t[e][o])}(d);return this.updateResourceUnit(l),l},t.prototype.updateResourceUnit=function(e){var t=this.parent.resourceFields.unit;if(!i.i(r.isNullOrUndefined)(t)){var n=e.length,a=void 0;for(a=0;a<n;a++)i.i(r.isNullOrUndefined)(e[a][t])&&(e[a][t]=100)}},t.prototype.updateResourceName=function(e){var t=e.ganttProperties.resourceInfo,n=[],a=this.parent.taskFields;if(t){var s=t.length,o=i.i(r.extend)([],[],e.taskData[this.parent.taskFields.resourceInfo],!0);this.parent.setRecordValue("taskData."+this.parent.taskFields.resourceInfo,[],e);for(var l=0;l<s;l++){var d=t[l],p=d[this.parent.resourceFields.name],h=d[this.parent.resourceFields.unit];if(100!==h&&(p+="["+h+"%]"),n.push(p),e.taskData){var u=a.resourceInfo;o[l],e.taskData[u].push(o[l])}}this.parent.setRecordValue("resourceNames",n.join(","),e.ganttProperties,!0),this.parent.setRecordValue(this.parent.taskFields.resourceInfo,n.join(","),e,!0),this.updateTaskDataResource(e)}},t.prototype.dataReorder=function(e,t){for(var i=[];e.length>0&&t.length>0;){var r=t.indexOf(e[0]);-1===r?e.shift():(i.push(e.shift()),t.splice(r,1))}return i},t.prototype.validateDurationUnitMapping=function(e){var t=e;return t="minute"===t||"minutes"===t||"m"===t||"min"===t?"minute":"hour"===t||"hours"===t||"h"===t||"hr"===t?"hour":"day"===t||"days"===t||"d"===t?"day":this.parent.durationUnit.toLocaleLowerCase()},t.prototype.validateTaskTypeMapping=function(e){var t=e;return t="FixedDuration"===t?"FixedDuration":"FixedUnit"===t?"FixedUnit":"FixedWork"===t?"FixedWork":this.parent.taskType},t.prototype.validateWorkUnitMapping=function(e){var t=e;return t="minute"===t?"minute":"hour"===t?"hour":"day"===t?"day":this.parent.workUnit.toLocaleLowerCase()},t.prototype.updateDurationValue=function(e,t){var n=this.getDurationValue(e);isNaN(i.i(r.getValue)("duration",n))||this.parent.setRecordValue("duration",i.i(r.getValue)("duration",n),t,!0),i.i(r.isNullOrUndefined)(i.i(r.getValue)("durationUnit",n))||this.parent.setRecordValue("durationUnit",i.i(r.getValue)("durationUnit",n),t,!0)},t.prototype.reUpdateGanttData=function(){if(this.parent.flatData.length>0){var e=void 0,t=void 0;this.parent.secondsPerDay=this.getSecondsPerDay();for(var n=0;n<this.parent.flatData.length;n++)e=this.parent.flatData[n].taskData,t=this.parent.flatData[n],i.i(r.isNullOrUndefined)(this.parent.taskFields.duration)||this.setRecordDuration(t,this.parent.taskFields.duration),this.calculateScheduledValues(t,e,!1);this.updateGanttData()}},t.prototype._isInStartDateRange=function(e,t,i){var r=!1;return e.getTime()>=t.getTime()&&e.getTime()<i.getTime()&&(r=!0),r},t.prototype._isInEndDateRange=function(e,t,i){var r=!1;return e.getTime()>t.getTime()&&e.getTime()<=i.getTime()&&(r=!0),r},t.prototype.updateOverlappingValues=function(e){var t,i=e.childRecords,r=[];if(i.length<=1)return void(e.ganttProperties.workTimelineRanges=[]);i=this.setSortedChildTasks(e),this.updateOverlappingIndex(i);for(var n=1;n<i.length;n++){t=i[n];for(var a=new Date(t.ganttProperties.startDate.getTime()),s=new Date(t.ganttProperties.endDate.getTime()),o=[],l=0;l<n;l++){var d=i[l].ganttProperties.startDate,p=i[l].ganttProperties.endDate,h={};(this._isInStartDateRange(a,d,p)||this._isInEndDateRange(s,d,p))&&(d.getTime()>a.getTime()&&d.getTime()<s.getTime()&&p.getTime()>a.getTime()&&p.getTime()>s.getTime()||a.getTime()===d.getTime()&&s.getTime()<=p.getTime()?(h.from=d,h.to=s):a.getTime()===d.getTime()&&s.getTime()>p.getTime()?(h.from=d,h.to=p):a.getTime()>d.getTime()&&s.getTime()>=p.getTime()?(h.from=a,h.to=p):a.getTime()>d.getTime()&&s.getTime()<p.getTime()&&(h.from=a,h.to=s),o.push(h))}r.push.apply(r,this.mergeRangeCollections(o))}this.parent.setRecordValue("workTimelineRanges",this.mergeRangeCollections(r,!0),e.ganttProperties,!0),this.calculateRangeLeftWidth(e.ganttProperties.workTimelineRanges)},t.prototype.updateOverlappingIndex=function(e){for(var t=0;t<e.length;t++)e[t].ganttProperties.eOverlapIndex=t},t.prototype.calculateRangeLeftWidth=function(e){for(var t=0;t<e.length;t++)e[t].left=this.getTaskLeft(e[t].from,!1),e[t].width=this.getTaskWidth(e[t].from,e[t].to)},t.prototype.mergeRangeCollections=function(e,t){for(var i,r,n,s,o=[],l={},d={},p=new a.DataManager(e).executeLocal((new a.Query).sortBy(this.parent.taskFields.startDate,"Ascending")),h=0;h<p.length;h++)0!==o.length||0!==h?(l=o[o.length-1],i=l.from,r=l.to,d=p[h],n=d.from,s=d.to,i.getTime()===n.getTime()&&r.getTime()>=s.getTime()||i.getTime()<n.getTime()&&r.getTime()>=s.getTime()||(i.getTime()<=n.getTime()&&r.getTime()>=n.getTime()&&r.getTime()<s.getTime()||r.getTime()<n.getTime()&&this.checkStartDate(r).getTime()===n.getTime()?l.to=s:r.getTime()<n.getTime()&&this.checkStartDate(r).getTime()!==n.getTime()&&o.push(p[h]))):o.push(p[h]);return t&&(o=this.splitRangeCollection(o)),o},t.prototype.setSortedChildTasks=function(e){return new a.DataManager(e.childRecords).executeLocal((new a.Query).sortBy(this.parent.taskFields.startDate,"Ascending"))},t.prototype.splitRangeCollection=function(e,t,i){var r;return r=this.parent.timelineModule.isSingleTier?"None"!==this.parent.timelineModule.bottomTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier:this.parent.timelineModule.bottomTier,"Week"===r||"Month"===r||"Year"===r?e:"Day"===r?this.getRangeWithWeek(e,t,i):0===this.parent.workingTimeRanges[0].from&&86400===this.parent.workingTimeRanges[0].to?this.getRangeWithWeek(e,t,i):this.getRangeWithDay(e,t,i)},t.prototype.getRangeWithDay=function(e,t,i){for(var r=[],n=0;n<e.length;n++)r.push.apply(r,this.splitRangeForDayMode(e[n],t,i));return r},t.prototype.splitRangeForDayMode=function(e,t,n){var a=t||"from",s=n||"to",o=new Date(e[a]),l=new Date(e[s]),d=[],p={};if(o.getTime()<l.getTime())do{for(var h=new Date(o.getTime()),u=new Date(o.getTime()),c=0,g=this.parent.dataOperation.getSecondsInDecimal(o),f=-1,m=0;m<this.parent.workingTimeRanges.length;m++){var y=this.parent.workingTimeRanges[m];if(g>=y.from&&g<=y.to){f=m;break}}-1!==f&&(c=Math.round(this.parent.workingTimeRanges[f].to-g),u.setSeconds(u.getSeconds()+c));u.getTime()<l.getTime()?(p={},e.task&&(p.task=i.i(r.extend)([],e.task)),p[a]=h,p[s]=u,p.isSplit=!0,d.push(p)):(p={},e.task&&(p.task=i.i(r.extend)([],e.task)),p[a]=h,p[s]=l,p.isSplit=!0,d.push(p)),o=this.checkStartDate(u)}while(o.getTime()<l.getTime());else d.push(e);return d},t.prototype.getRangeWithWeek=function(e,t,i){for(var r=[],n=0;n<e.length;n++)r.push.apply(r,this.splitRangeForWeekMode(e[n],t,i));return r},t.prototype.splitRangeForWeekMode=function(e,t,n){var a=t||"from",s=n||"to",o=new Date(e[a]),l=new Date(e[a]),d=new Date(e[s]),p=!1,h=[],u={};if(l.setDate(l.getDate()+1),l.getTime()<d.getTime()){do{if(this.parent.dataOperation.isOnHolidayOrWeekEnd(l,null)){var c=new Date(l.getTime());c.setDate(l.getDate()-1),this.setTime(this.parent.defaultEndTime,c),u={},u[a]=o,u.isSplit=!0,u[s]=c,e.task&&(u.task=i.i(r.extend)([],e.task,!0)),o.getTime()!==c.getTime()&&h.push(u),o=this.checkStartDate(c),l=new Date(o.getTime()),p=!0}else l.setDate(l.getDate()+1)}while(l.getTime()<d.getTime());p?o.getTime()!==d.getTime()&&(u={},e.task&&(u.task=i.i(r.extend)([],e.task,!0)),u[a]=o,u[s]=d,u.isSplit=!0,h.push(u)):h.push(e)}else h.push(e);return h},t.prototype.updateGanttData=function(){for(var e=this.parent.flatData,t=e.length,i=0;i<t;i++){var r=e[i];this.updateTaskLeftWidth(r)}},t.prototype.updateTaskLeftWidth=function(e){var t=e.ganttProperties;e.hasChildRecords||this.updateWidthLeft(e),this.parent.setRecordValue("baselineLeft",this.calculateBaselineLeft(t),t,!0),this.parent.setRecordValue("baselineWidth",this.calculateBaselineWidth(t),t,!0);var i,r=[];e.parentItem&&(i=this.parent.getParentTask(e.parentItem),r=i.childRecords),i&&r.indexOf(e)===r.length-1&&!e.hasChildRecords&&this.parent.enableValidation?this.updateParentItems(i):i&&!this.parent.enableValidation&&this.updateWidthLeft(i)},t.prototype.reUpdateGanttDataPosition=function(){for(var e=this.parent.flatData,t=e.length,i=0;i<t;i++){var r=e[i],n=r.ganttProperties;this.updateWidthLeft(r),"Auto"!==this.parent.taskMode&&r.hasChildRecords&&this.updateAutoWidthLeft(r),this.parent.setRecordValue("baselineLeft",this.calculateBaselineLeft(n),n,!0),this.parent.setRecordValue("baselineWidth",this.calculateBaselineWidth(n),n,!0),this.parent.dataOperation.updateTaskData(r)}},t.prototype.updateWidthLeft=function(e){var t=e.ganttProperties;if(!i.i(r.isNullOrUndefined)(t.segments)&&t.segments.length>0){for(var n=t.segments,a=!0,s=this.splitTasksDuration(n)*this.parent.perDayWidth,o=this.parent.dataOperation.getProgressWidth(s,t.progress),l=0;l<n.length;l++){var d=n[l];if(0===l&&!i.i(r.isNullOrUndefined)(t.startDate)&&d.startDate.getTime()!==t.startDate.getTime()){d.startDate=t.startDate;var p=this.parent.dataOperation.getEndDate(d.startDate,d.duration,t.durationUnit,t,!1);d.endDate=this.parent.dataOperation.checkEndDate(p,t,!1),this.parent.chartRowsModule.incrementSegments(n,0,e)}if(d.width=this.getSplitTaskWidth(d.startDate,d.duration,e),d.showProgress=!1,d.progressWidth=-1,0!==l){var h=new Date(t.startDate.getTime());d.left=this.getSplitTaskLeft(d.startDate,h)}o>0&&o>d.width?(o-=d.width,d.progressWidth=d.width,d.showProgress=!1):a&&(d.progressWidth=o,d.showProgress=!0,o-=d.width,a=!1)}this.parent.setRecordValue("segments",t.segments,t,!0),this.parent.dataOperation.updateMappingData(e,"segments")}this.parent.setRecordValue("width",this.parent.dataOperation.calculateWidth(e),t,!0),this.parent.setRecordValue("left",this.parent.dataOperation.calculateLeft(t),t,!0),this.parent.setRecordValue("progressWidth",this.parent.dataOperation.getProgressWidth(t.isAutoSchedule||!e.hasChildRecords?t.width:t.autoWidth,t.progress),t,!0)},t.prototype.updateAutoWidthLeft=function(e){var t=e.ganttProperties;this.parent.setRecordValue("autoWidth",this.calculateWidth(e,!0),t,!0),this.parent.setRecordValue("autoLeft",this.calculateLeft(t,!0),t,!0)},t.prototype.getParentProgress=function(e){var t=0,n={};switch(e.ganttProperties.durationUnit){case"hour":t=e.ganttProperties.duration/(this.parent.secondsPerDay/3600);break;case"minute":t=e.ganttProperties.duration/(this.parent.secondsPerDay/60);break;default:t=e.ganttProperties.duration}return e.hasChildRecords?(i.i(r.setValue)("totalProgress",e.ganttProperties.totalProgress,n),i.i(r.setValue)("totalDuration",e.ganttProperties.totalDuration,n)):(i.i(r.setValue)("totalProgress",e.ganttProperties.progress*t,n),i.i(r.setValue)("totalDuration",t,n)),n},t.prototype.resetDependency=function(e){var t=this.parent.taskFields.dependency;if(!i.i(r.isNullOrUndefined)(t)){var n=e.ganttProperties;this.parent.setRecordValue("predecessor",[],n,!0),this.parent.setRecordValue("predecessorsName",null,n,!0),this.parent.setRecordValue("taskData."+t,null,e),this.parent.setRecordValue(t,null,e)}},t.prototype.updateParentItems=function(e,t){var n=t?e:this.parent.getParentTask(e),a=!1,o=n.ganttProperties;if(n.childRecords.length>0){for(var l=o.isAutoSchedule?o.startDate:o.autoStartDate,d=o.isAutoSchedule?o.endDate:o.autoEndDate,p=n.childRecords,h=p.length,u=0,c={},g=null,f=null,m=0,y=0,v=0,D=void 0,w=0;w<h;w++)if(D=p[w],this.parent.isOnDelete&&D.isDelete)1===h&&"ProjectView"===this.parent.viewType&&(a=!0);else{var k=this.getValidStartDate(D.ganttProperties);!n.hasChildRecords||o.isAutoSchedule||i.i(r.isNullOrUndefined)(D.ganttProperties.autoStartDate)||(k=D.ganttProperties.autoStartDate);var S=this.getValidEndDate(D.ganttProperties);!n.hasChildRecords||o.isAutoSchedule||i.i(r.isNullOrUndefined)(D.ganttProperties.autoEndDate)||(S=D.ganttProperties.autoEndDate),i.i(r.isNullOrUndefined)(g)&&(g=this.getDateFromFormat(k)),i.i(r.isNullOrUndefined)(f)&&(f=this.getDateFromFormat(S)),i.i(r.isNullOrUndefined)(S)||1!==this.compareDates(S,f)||(f=this.getDateFromFormat(S)),i.i(r.isNullOrUndefined)(k)||-1!==this.compareDates(k,g)||(g=this.getDateFromFormat(k)),!D.ganttProperties.isMilestone&&i.i(s.c)(D.ganttProperties)?(c=this.getParentProgress(D),y+=i.i(r.getValue)("totalProgress",c),u+=i.i(r.getValue)("totalDuration",c)):m++,v+=D.ganttProperties.work}if(!a){0!==this.compareDates(l,g)&&this.parent.setRecordValue(o.isAutoSchedule?"startDate":"autoStartDate",g,n.ganttProperties,!0),0!==this.compareDates(d,f)&&this.parent.setRecordValue(o.isAutoSchedule?"endDate":"autoEndDate",f,n.ganttProperties,!0);var T=void 0;T=this.parent.isOnDelete&&D.isDelete?h-m-1:h-m;var b=T>0&&u>0?y/u:0,P=n.ganttProperties,C=!(0!==T||!g||!f||g.getTime()!==f.getTime());this.parent.setRecordValue("isMilestone",C,P,!0),P.isAutoSchedule&&this.calculateDuration(n),this.updateWorkWithDuration(n);var M=P.work;M=this.parent.isOnEdit?M:M+v,this.parent.setRecordValue("work",M,P,!0),this.parent.setRecordValue("taskType","FixedDuration",P,!0),i.i(r.isNullOrUndefined)(this.parent.taskFields.type)||this.updateMappingData(n,"type"),this.parent.setRecordValue("progress",Math.floor(b),P,!0),this.parent.setRecordValue("totalProgress",y,P,!0),this.parent.setRecordValue("totalDuration",u,P,!0),P.isAutoSchedule||(this.parent.setRecordValue("autoDuration",this.calculateAutoDuration(P),P,!0),this.updateAutoWidthLeft(n)),this.updateWidthLeft(n),this.updateTaskData(n)}}a&&1===n.childRecords.length&&0===n.ganttProperties.duration&&(this.parent.setRecordValue("isMilestone",!0,n.ganttProperties,!0),this.updateWidthLeft(n),this.updateTaskData(n));var R=this.parent.getParentTask(n.parentItem);R&&this.updateParentItems(R),a=!1},t}(o.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(6),n=(i.n(r),i(0)),a=(i.n(n),i(4)),s=(i.n(a),i(19)),o=i(2),l=function(){function e(e){var t=this;this.previousScroll={top:0,left:0},this.queryCellInfo=function(e){t.parent.trigger("queryCellInfo",e)},this.headerCellInfo=function(e){t.parent.trigger("headerCellInfo",e)},this.rowDataBound=function(e){t.parent.trigger("rowDataBound",e)},this.columnMenuOpen=function(e){t.parent.notify("columnMenuOpen",e),t.parent.trigger("columnMenuOpen",e)},this.columnMenuClick=function(e){t.parent.trigger("columnMenuClick",e)},this.objectEqualityChecker=function(e,i){if(e){for(var r=Object.keys(e),n=!0,a=["Children","childRecords","taskData","uniqueID","parentItem","parentUniqueID","ganttProperties"],s=0;s<r.length;s++){if((e[r[s]]instanceof Date?new Date(e[r[s]]).getTime():e[r[s]])!==(i[r[s]]instanceof Date?new Date(i[r[s]]).getTime():i[r[s]])&&-1===a.indexOf(r[s])){t.parent.modifiedRecords.push(i),n=!1;break}}return n}return!1},this.parent=e,this.parent.treeGrid=new r.TreeGrid,this.parent.treeGrid.allowSelection=!1,this.parent.treeGrid.allowKeyboard=this.parent.allowKeyboard,this.parent.treeGrid.enableImmutableMode=this.parent.enableImmutableMode,this.treeGridColumns=[],this.validateGanttColumns(),this.addEventListener()}return e.prototype.addEventListener=function(){this.parent.on("renderPanels",this.createContainer,this),this.parent.on("chartScroll",this.updateScrollTop,this),this.parent.on("destroy",this.destroy,this),this.parent.treeGrid.on("renderReactTemplate",this.renderReactTemplate,this)},e.prototype.renderReactTemplate=function(e){this.parent.portals=e,this.parent.renderTemplates()},e.prototype.createContainer=function(){this.treeGridElement=i.i(n.createElement)("div",{id:"treeGrid"+this.parent.element.id,className:"e-gantt-tree-grid"});var e=i.i(n.createElement)("div",{className:"e-gantt-temp-header"});this.parent.treeGridPane.appendChild(this.treeGridElement),this.treeGridElement.appendChild(e),this.parent.treeGridPane.classList.add("e-temp-content")},e.prototype.renderTreeGrid=function(){this.composeProperties(),this.bindEvents();this.parent.treeGrid.root=this.parent.root?this.parent.root:this.parent,this.parent.treeGrid.appendTo(this.treeGridElement),this.wireEvents()},e.prototype.composeProperties=function(){if(this.parent.treeGrid.showColumnMenu=this.parent.showColumnMenu,this.parent.treeGrid.enableCollapseAll=this.parent.collapseAllParentTasks,this.parent.treeGrid.columnMenuItems=this.parent.columnMenuItems,this.parent.treeGrid.childMapping=i.i(n.isNullOrUndefined)(this.parent.taskFields.child)?"":this.parent.taskFields.child,this.parent.treeGrid.treeColumnIndex=this.parent.treeColumnIndex,this.parent.treeGrid.columns=this.treeGridColumns,this.parent.dataSource instanceof Object&&i.i(o.i)(this.parent)){this.parent.treeGrid.hasChildMapping="isParent";var e=i.i(n.getValue)("count",this.parent.dataSource);this.parent.treeGrid.dataSource={result:this.parent.flatData,count:e}}else this.parent.treeGrid.hasChildMapping=null,this.parent.treeGrid.dataSource=this.parent.flatData;this.parent.treeGrid.expandStateMapping=this.parent.taskFields.expandState;this.parent.treeGrid.isGantt=!0,this.parent.treeGrid.rowHeight=this.parent.rowHeight,this.parent.treeGrid.gridLines=this.parent.gridLines,0===this.parent.searchSettings.fields.length&&""===this.parent.searchSettings.key||(this.parent.treeGrid.searchSettings=this.parent.searchSettings);this.parent.treeGrid.isJsComponent=!0;var t=0;i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||i.i(n.isNullOrUndefined)(this.parent.toolbarModule.element)||(t=this.parent.toolbarModule.element.offsetHeight),this.parent.treeGrid.height=this.parent.ganttHeight-t-46},e.prototype.getContentDiv=function(){return this.treeGridElement.querySelector(".e-content")},e.prototype.getHeaderDiv=function(){return this.treeGridElement.querySelector(".e-headercontent")},e.prototype.getScrollbarWidth=function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar";var t=document.createElement("div");e.appendChild(t),this.parent.element.appendChild(e);var i=e.offsetWidth-t.offsetWidth;return e.parentNode.removeChild(e),i},e.prototype.ensureScrollBar=function(){var e=this.getContentDiv(),t=this.getHeaderDiv(),i=this.getScrollbarWidth(),r=/Android|Mac|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);0!==i?e.style.cssText+="width: calc(100% + "+(i+1)+"px);":e.classList.add("e-gantt-scroll-padding"),0===i&&r&&(t.style.cssText+="width: calc(100% + 17px);")},e.prototype.bindEvents=function(){this.parent.treeGrid.dataBound=this.dataBound.bind(this),this.parent.treeGrid.collapsing=this.collapsing.bind(this),this.parent.treeGrid.collapsed=this.collapsed.bind(this),this.parent.treeGrid.expanding=this.expanding.bind(this),this.parent.treeGrid.expanded=this.expanded.bind(this),this.parent.treeGrid.actionBegin=this.actionBegin.bind(this),this.parent.treeGrid.actionComplete=this.treeActionComplete.bind(this),this.parent.treeGrid.created=this.created.bind(this),this.parent.treeGrid.actionFailure=this.actionFailure.bind(this),this.parent.treeGrid.queryCellInfo=this.queryCellInfo.bind(this),this.parent.treeGrid.headerCellInfo=this.headerCellInfo.bind(this),this.parent.treeGrid.rowDataBound=this.rowDataBound.bind(this),this.parent.treeGrid.columnMenuOpen=this.columnMenuOpen.bind(this),this.parent.treeGrid.columnMenuClick=this.columnMenuClick.bind(this),this.parent.treeGrid.beforeDataBound=this.beforeDataBound.bind(this),this.parent.treeGrid.dataStateChange=this.dataStateChange.bind(this)},e.prototype.beforeDataBound=function(e){this.parent.updatedRecords=this.parent.virtualScrollModule&&this.parent.enableVirtualization?i.i(n.getValue)("virtualScrollModule.visualData",this.parent.treeGrid):i.i(n.getValue)("result",e),this.parent.virtualScrollModule&&this.parent.enableVirtualization&&this.parent.updateContentHeight(e),i.i(n.setValue)("contentModule.objectEqualityChecker",this.objectEqualityChecker,this.parent.treeGrid.grid)},e.prototype.dataBound=function(e){this.ensureScrollBar(),this.parent.treeDataBound(e),this.prevCurrentView=i.i(n.extend)([],[],this.parent.currentViewData,!0)},e.prototype.dataStateChange=function(e){e.action&&"refresh"===e.action.requestType&&(this.parent.treeGrid.dataSource={result:i.i(n.getValue)("result",this.parent.treeGrid.dataSource),count:i.i(n.getValue)("count",this.parent.treeGrid.dataSource)}),this.parent.trigger("dataStateChange",e)},e.prototype.collapsing=function(e){new a.Deferred;if(!this.parent.ganttChartModule.isExpandCollapseFromChart){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.collapseGanttRow(t),i.i(n.setValue)("cancel",i.i(n.getValue)("cancel",t),e)}},e.prototype.expanding=function(e){new a.Deferred;if(!this.parent.ganttChartModule.isExpandCollapseFromChart){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.expandGanttRow(t),i.i(n.setValue)("cancel",i.i(n.getValue)("cancel",t),e)}},e.prototype.collapsed=function(e){if(!this.parent.ganttChartModule.isExpandCollapseFromChart&&!this.parent.isExpandCollapseLevelMethod){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.collapsedGanttRow(t)}},e.prototype.expanded=function(e){if(!this.parent.ganttChartModule.isExpandCollapseFromChart&&!this.parent.isExpandCollapseLevelMethod&&!e.data.length){var t=this.createExpandCollapseArgs(e);this.parent.ganttChartModule.expandedGanttRow(t)}},e.prototype.actionBegin=function(e){this.parent.notify("actionBegin",e),null!==i.i(n.getValue)("doubleClickTarget",this.parent.treeGrid.editModule)&&i.i(n.setValue)("doubleClickTarget",null,this.parent.treeGrid.editModule),this.parent.trigger("actionBegin",e)},e.prototype.created=function(e){this.updateKeyConfigSettings()},e.prototype.actionFailure=function(e){this.parent.trigger("actionFailure",e)},e.prototype.createExpandCollapseArgs=function(e){var t,r=i.i(n.getValue)("data",e),a=i.i(n.getValue)("row",e);return t=this.parent.ganttChartModule.getChartRows()[this.parent.currentViewData.indexOf(r)],{data:r,gridRow:a,chartRow:t,cancel:!1}},e.prototype.treeActionComplete=function(e){var t=i.i(n.extend)({},e);if("sorting"===i.i(n.getValue)("requestType",e))this.parent.notify("updateModel",{}),i.i(n.deleteObject)(t,"isFrozen");else if("filtering"===i.i(n.getValue)("requestType",e)){this.parent.notify("updateModel",{});var r=this.parent.element.querySelector(".e-treegrid");r.focus()}else if("save"===i.i(n.getValue)("type",e)&&this.parent.editModule&&this.parent.editModule.cellEditModule){var a=i.i(n.getValue)("data",e);i.i(n.isNullOrUndefined)(a)||i.i(n.isNullOrUndefined)(this.parent.getTaskByUniqueID(a.uniqueID))||(this.parent.getTaskByUniqueID(a.uniqueID).taskData[this.parent.taskFields.duration]=a.taskData[this.parent.taskFields.duration],i.i(n.isNullOrUndefined)(a.taskData[this.parent.taskFields.resourceInfo])||(this.parent.getTaskByUniqueID(a.uniqueID).taskData[this.parent.taskFields.resourceInfo]=a.taskData[this.parent.taskFields.resourceInfo])),this.parent.editModule.cellEditModule.initiateCellEdit(e,this.currentEditRow),this.currentEditRow={}}"filterafteropen"===i.i(n.getValue)("requestType",e)&&this.parent.notify("actionComplete",e),"searching"===i.i(n.getValue)("requestType",e)&&this.parent.notify("actionComplete",e),i.i(n.isNullOrUndefined)(i.i(n.getValue)("batchChanges",e))||i.i(n.isNullOrUndefined)(this.parent.toolbarModule)||this.parent.toolbarModule.refreshToolbarItems(),this.parent.isCancelled&&(i.i(n.setValue)("requestType","cancel",t),i.i(n.setValue)("action","CellEditing",t),this.parent.isCancelled=!1),"refresh"===i.i(n.getValue)("requestType",e)&&i.i(n.isNullOrUndefined)(i.i(n.getValue)("type",e))&&this.parent.addDeleteRecord&&(-1!=this.parent.selectedRowIndex?(this.parent.selectRow(this.parent.selectedRowIndex),this.parent.selectedRowIndex>this.parent.currentViewData.length-1&&(this.parent.selectedRowIndex=-1)):this.parent.selectRow(0),this.parent.addDeleteRecord=!1),this.parent.trigger("actionComplete",t)},e.prototype.updateKeyConfigSettings=function(){delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.delete,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.insert,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.upArrow,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.downArrow,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.ctrlHome,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.ctrlEnd,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.enter,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.tab,delete this.parent.treeGrid.grid.keyboardModule.keyConfigs.shiftTab,delete this.parent.treeGrid.keyboardModule.keyConfigs.enter,delete this.parent.treeGrid.keyboardModule.keyConfigs.upArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.downArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlShiftUpArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlShiftDownArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlUpArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.ctrlDownArrow,delete this.parent.treeGrid.keyboardModule.keyConfigs.tab,delete this.parent.treeGrid.keyboardModule.keyConfigs.shiftTab},e.prototype.wireEvents=function(){var e=this.parent.treeGrid.element.querySelector(".e-content");e&&n.EventHandler.add(e,"scroll",this.scrollHandler,this),this.parent.isAdaptive&&n.EventHandler.add(this.parent.treeGridPane,"click",this.treeGridClickHandler,this)},e.prototype.unWireEvents=function(){var e=this.parent.treeGrid.element&&this.parent.treeGrid.element.querySelector(".e-content");e&&n.EventHandler.remove(e,"scroll",this.scrollHandler),this.parent.isAdaptive&&n.EventHandler.remove(this.parent.treeGridPane,"click",this.treeGridClickHandler)},e.prototype.scrollHandler=function(e){var t=this.parent.treeGrid.element.querySelector(".e-content");t.scrollTop!==this.previousScroll.top&&this.parent.notify("grid-scroll",{top:t.scrollTop}),this.previousScroll.top=t.scrollTop,this.parent.contextMenuModule&&this.parent.contextMenuModule.isOpen&&this.parent.contextMenuModule.contextMenu.close()},e.prototype.validateGanttColumns=function(){var e=this.parent,t=e.columns.length,r=this.parent.taskFields;this.parent.columnMapping={},this.parent.columnByField={},this.parent.customColumns=[];for(var a=["id","name","startDate","endDate","duration","dependency","progress","baselineStartDate","baselineEndDate","resourceInfo","notes","work","manual","type"],s=this,o=0;o<t;o++)!function(t){var i={};"string"==typeof e.columns[t]?i.field=e.columns[t]:i=e.columns[t];var n=[];if(a.length>0&&(n=a.filter(function(e){return i.field===r[e]})),0===n.length)return i.field===s.parent.resourceFields.group?"continue":(s.parent.customColumns.push(i.field),i.headerText=i.headerText?i.headerText:i.field,i.width=i.width?i.width:150,i.editType=i.editType?i.editType:"stringedit",i.type=i.type?i.type:"string",s.bindTreeGridColumnProperties(i,!0),"continue");var o=a.indexOf(n[0]);a.splice(o,1),s.createTreeGridColumn(i,!0),s.parent.columnMapping[n[0]]=i.field}(o);for(var l=0;l<a.length;l++){var d={};i.i(n.isNullOrUndefined)(r[a[l]])||(d.field=r[a[l]],this.createTreeGridColumn(d,0===t),this.parent.columnMapping[a[l]]=d.field)}if("ProjectView"!==this.parent.viewType){var d={};this.composeUniqueIDColumn(d),this.createTreeGridColumn(d,!0)}},e.prototype.createTreeGridColumn=function(e,t){var r=this.parent.taskFields;if(e.disableHtmlEncode=i.i(n.isNullOrUndefined)(e.disableHtmlEncode)?this.parent.disableHtmlEncode:e.disableHtmlEncode,r.id!==e.field&&(e.clipMode=e.clipMode?e.clipMode:"EllipsisWithTooltip"),r.id===e.field)this.composeIDColumn(e);else if(r.name===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("name"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"stringedit",e.type=e.type?e.type:"string";else if(r.startDate===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("startDate"),e.editType=e.editType?e.editType:-1!==this.parent.getDateFormat().toLowerCase().indexOf("hh")?"datetimepickeredit":"datepickeredit",e.format=e.format?e.format:{type:"date",format:this.parent.getDateFormat()},e.width=e.width?e.width:150,e.edit={params:{renderDayCell:this.parent.renderWorkingDayCell.bind(this.parent)}};else if(r.endDate===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("endDate"),e.format=e.format?e.format:{type:"date",format:this.parent.getDateFormat()},e.editType=e.editType?e.editType:-1!==this.parent.getDateFormat().toLowerCase().indexOf("hh")?"datetimepickeredit":"datepickeredit",e.width=e.width?e.width:150,e.edit={params:{renderDayCell:this.parent.renderWorkingDayCell.bind(this.parent)}};else if(r.duration===e.field)e.width=e.width?e.width:150,e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("duration"),e.valueAccessor=e.valueAccessor?e.valueAccessor:i.i(n.isNullOrUndefined)(e.edit)?this.durationValueAccessor.bind(this):null,e.editType=e.editType?e.editType:"stringedit",e.type="string";else if(r.progress===e.field)this.composeProgressColumn(e);else if(r.dependency===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("dependency"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"stringedit",e.type="string",e.allowFiltering=!1!==e.allowFiltering;else if(r.resourceInfo===e.field)this.composeResourceColumn(e);else if(r.notes===e.field)e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("notes"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"stringedit",this.parent.showInlineNotes||e.template||(e.template='<div class="e-ganttnotes-info"><span class="e-icons e-notes-info"></span></div>');else if(r.baselineStartDate===e.field||r.baselineEndDate===e.field){var s=r.baselineEndDate===e.field?"baselineEndDate":"baselineStartDate";e.width=e.width?e.width:150,e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant(s),e.format=e.format?e.format:{type:"date",format:this.parent.getDateFormat()},e.editType=e.editType?e.editType:-1!==this.parent.getDateFormat().toLowerCase().indexOf("hh")?"datetimepickeredit":"datepickeredit"}else r.work===e.field?(e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("work"),e.width=e.width?e.width:150,e.valueAccessor=e.valueAccessor?e.valueAccessor:this.workValueAccessor.bind(this),e.editType=e.editType?e.editType:"numericedit"):r.type===e.field?(e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("taskType"),e.width=e.width?e.width:150,e.editType="dropdownedit",e.valueAccessor=e.valueAccessor?e.valueAccessor:this.taskTypeValueAccessor.bind(this)):r.manual===e.field&&"Custom"===this.parent.taskMode&&(e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("taskMode"),e.width=e.width?e.width:120,e.editType=e.editType?e.editType:"dropdownedit",e.valueAccessor=e.valueAccessor?e.valueAccessor:this.modeValueAccessor.bind(this),e.edit={params:{query:new a.Query,dataSource:[{id:1,text:this.parent.localeObj.getConstant("manual"),value:!0},{id:2,text:this.parent.localeObj.getConstant("auto"),value:!1}],fields:{text:"text",value:"value"}}});this.bindTreeGridColumnProperties(e,t)},e.prototype.composeResourceColumn=function(e){e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("resourceName"),e.width=e.width?e.width:150,e.type="string",e.valueAccessor=e.valueAccessor?e.valueAccessor:this.resourceValueAccessor.bind(this),e.allowFiltering=!1!==e.allowFiltering},e.prototype.getResourceIds=function(e){var t=i.i(n.getValue)(this.parent.taskFields.resourceInfo,e.taskData),r=[];if(i.i(n.isNullOrUndefined)(t))return t;for(var a=0;a<t.length;a++)r.push("object"==typeof t[a]?t[a][this.parent.resourceFields.id]:t[a]);return r},e.prototype.composeIDColumn=function(e){var t,r="ProjectView"===this.parent.viewType,a=this.parent.dataSource.length;e.isPrimaryKey=!!r,e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("id"),e.width=e.width?e.width:100;for(var s=0;s<a;s++)if(!i.i(n.isNullOrUndefined)(this.parent.dataSource[s][this.parent.taskFields.id])){t=this.parent.dataSource[s][this.parent.taskFields.id];break}"string"==typeof t?("ResourceView"===this.parent.viewType?e.allowEditing=!!e.allowEditing&&e.allowEditing:e.allowEditing=!e.allowEditing||e.allowEditing,e.editType=e.editType?e.editType:"stringedit"):(e.allowEditing=!!e.allowEditing&&e.allowEditing,e.editType=e.editType?e.editType:"numericedit"),e.valueAccessor=r?null:this.idValueAccessor.bind(this)},e.prototype.composeUniqueIDColumn=function(e){e.field="rowUniqueID",e.isPrimaryKey=!0,e.headerText="UniqueID",e.allowEditing=!1,e.visible=!1},e.prototype.composeProgressColumn=function(e){e.headerText=e.headerText?e.headerText:this.parent.localeObj.getConstant("progress"),e.width=e.width?e.width:150,e.editType=e.editType?e.editType:"numericedit"},e.prototype.bindTreeGridColumnProperties=function(e,t){for(var i={},r={},n=0,a=Object.keys(e);n<a.length;n++){var o=a[n];i[o]=r[o]=e[o]}this.parent.columnByField[r.field]=r,this.parent.ganttColumns.push(new s.a(r)),t&&this.treeGridColumns.push(i)},e.prototype.durationValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":this.parent.dataOperation.getDurationString(a.duration,a.durationUnit)},e.prototype.resourceValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":a.resourceNames},e.prototype.workValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":this.parent.dataOperation.getWorkString(a.work,a.workUnit)},e.prototype.taskTypeValueAccessor=function(e,t,r){var a=t.ganttProperties;return i.i(n.isNullOrUndefined)(a)?"":a.taskType},e.prototype.modeValueAccessor=function(e,t,i){return t[e]?"Manual":"Auto"},e.prototype.idValueAccessor=function(e,t,i){return 0===t.level?"R-"+t.ganttProperties.taskId:"T-"+t.ganttProperties.taskId},e.prototype.updateScrollTop=function(e){var t;t=i.i(n.getValue)("top",e)>this.parent.flatData.length*this.parent.rowHeight?i.i(n.getValue)("top",e)-document.getElementsByClassName("e-chart-scroll-container e-content")[0].offsetHeight:i.i(n.getValue)("top",e),this.treeGridElement.querySelector(".e-content").scrollTop=t,this.previousScroll.top=this.treeGridElement.querySelector(".e-content").scrollTop},e.prototype.treeGridClickHandler=function(e){this.parent.notify("treeGridClick",e)},e.prototype.removeEventListener=function(){this.parent.off("renderPanels",this.createContainer),this.parent.off("chartScroll",this.updateScrollTop),this.parent.off("destroy",this.destroy),this.parent.treeGrid.off("reactTemplateRender",this.renderReactTemplate)},e.prototype.destroy=function(){this.removeEventListener(),this.unWireEvents(),this.parent.treeGrid.element&&this.parent.treeGrid.destroy()},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(1),n=(i.n(r),i(7)),a=i(0),s=(i.n(a),i(5)),o=(i.n(s),i(2)),l=function(){function e(e){this.parent=e}return e.prototype.processGridExport=function(e,t,r){this.flatData=e,this.gantt=t,this.exportValueFormatter=new d(this.parent.locale),this.exportProps=r,this.rowIndex=0,this.colIndex=0,this.columns=this.parent.treeGrid.columns,this.gantt.treeColumnIndex=this.parent.treeColumnIndex,this.gantt.rowHeight=i.i(o.a)(this.parent.rowHeight),this.gantt.style.cellPadding.left=0,this.gantt.style.cellPadding.right=0,this.ganttStyle=this.gantt.ganttStyle,this.gantt.borderColor=this.ganttStyle.chartGridLineColor,this.processHeaderContent(),this.processGanttContent(),this.processTimeline(),this.processTaskbar(),this.processPredecessor()},e.prototype.processHeaderContent=function(){var e=this;this.rowIndex++,this.row=this.gantt.rows.addRow();var t=0;this.columns.forEach(function(i){e.isColumnVisible(i)&&(e.processColumnHeader(i,t),t++)})},e.prototype.processColumnHeader=function(e,t){this.gantt.columns.add(1);var n=this.gantt.columns.getColumn(t);this.parent.treeColumnIndex===t&&(n.isTreeColumn=!0);var a=parseInt(e.width,10);n.width=i.i(o.a)(a),this.totalColumnWidth+=n.width,n.headerText=e.headerText,n.field=e.field;var s=this.row.cells.getCell(t);s.value=e.headerText,s.isHeaderCell=!0;var l=this.parent.timelineModule.isSingleTier?45:60;this.copyStyles(this.ganttStyle.columnHeader,s,!1),this.row.height=i.i(o.a)(l),e.headerTextAlign&&(s.style.format.alignment=r.PdfTextAlignment[e.headerTextAlign]);var d={cell:s,style:s.style,value:s.value,column:e};this.parent.pdfColumnHeaderQueryCellInfo&&this.parent.trigger("pdfColumnHeaderQueryCellInfo",d),s.value=d.value},e.prototype.isColumnVisible=function(e){var t=e.visible||this.exportProps.includeHiddenColumn,r=!!i.i(a.isNullOrUndefined)(e.template);return t&&r},e.prototype.processGanttContent=function(){var e=this;0===this.flatData.length?this.renderEmptyGantt():this.flatData.forEach(function(t){e.row=e.gantt.rows.addRow(),t.hasChildRecords?(e.gantt.rows.getRow(e.rowIndex).isParentRow=!0,e.processRecordRow(t)):e.processRecordRow(t),e.rowIndex++})},e.prototype.processTimeline=function(){var e=this.parent.timelineModule;this.gantt.chartHeader.topTierHeight=this.gantt.chartHeader.bottomTierHeight=this.parent.timelineModule.isSingleTier?45:30,this.gantt.chartHeader.topTierCellWidth=e.topTierCellWidth,this.gantt.chartHeader.bottomTierCellWidth=e.bottomTierCellWidth,this.gantt.chartHeader.topTier=i.i(a.extend)([],[],e.topTierCollection,!0),this.gantt.chartHeader.bottomTier=i.i(a.extend)([],[],e.bottomTierCollection,!0),this.gantt.chartHeader.width=e.totalTimelineWidth,this.gantt.chartHeader.height=this.gantt.rows.getRow(0).height,this.gantt.timelineStartDate=new Date(e.timelineStartDate.getTime())},e.prototype.processPredecessor=function(){var e=this;(i.i(a.isNullOrUndefined)(this.exportProps.showPredecessorLines)||this.exportProps.showPredecessorLines)&&(this.parent.pdfExportModule.isPdfExport=!0,this.parent.predecessorModule.createConnectorLinesCollection(),this.parent.updatedConnectorLineCollection.forEach(function(t){var r=e.gantt.predecessor.add();r.parentLeft=t.parentLeft,r.childLeft=t.childLeft,r.parentWidth=t.parentWidth,r.childWidth=t.childWidth,r.parentIndex=t.parentIndex,r.childIndex=t.childIndex,r.rowHeight=t.rowHeight,r.type=t.type,r.milestoneParent=t.milestoneParent,r.milestoneChild=t.milestoneChild,r.lineWidth=e.parent.connectorLineWidth>5?i.i(o.a)(5):i.i(o.a)(e.parent.connectorLineWidth),t.isCritical?r.connectorLineColor=e.ganttStyle.criticalConnectorLineColor:r.connectorLineColor=e.ganttStyle.connectorLineColor,r.connectorLineColor=e.ganttStyle.connectorLineColor,e.gantt.predecessorCollection.push(r)}),this.parent.pdfExportModule.isPdfExport=!1)},e.prototype.processRecordRow=function(e){var t=this;this.colIndex=0,this.row.level=e.level,this.columns.forEach(function(i){t.isColumnVisible(i)&&(t.processRecordCell(e,i,t.row),t.colIndex++)})},e.prototype.processRecordCell=function(e,t,s){var o=s.cells.getCell(this.colIndex),l=this.parent.taskFields,d=e.ganttProperties;"datepickeredit"===t.editType||"datetimepickeredit"===t.editType?o.value=e[t.field]:t.field===l.duration?o.value=this.parent.getDurationString(d.duration,d.durationUnit):t.field===l.resourceInfo?o.value=d.resourceNames:t.field===l.work?o.value=this.parent.getWorkString(d.work,d.workUnit):o.value=i.i(a.isNullOrUndefined)(e[t.field])?"":e[t.field].toString(),o.isHeaderCell=!1,o.style.padding=new n.i,this.copyStyles(this.ganttStyle.cell,o,s.isParentRow),this.colIndex!==this.parent.treeColumnIndex?o.style.format.alignment=r.PdfTextAlignment[t.textAlign]:o.style.format.paragraphIndent=10*o.row.level;var p={data:e,value:o.value,column:t,style:o.style,cell:o};p.value=this.exportValueFormatter.formatCellValue(p),this.parent.pdfQueryCellInfo&&this.parent.trigger("pdfQueryCellInfo",p),o.value=p.value},e.prototype.processTaskbar=function(){var e=this;this.flatData.forEach(function(t){var n=e.gantt.taskbar.add(),s=t.ganttProperties;n.left=s.left,n.width=s.width,n.left<0&&(n.width=n.width+n.left,n.left=0),n.progress=s.progress,n.isScheduledTask=i.i(o.c)(s),o.c?i.i(a.isNullOrUndefined)(s.endDate)&&i.i(a.isNullOrUndefined)(s.duration)?n.unscheduledTaskBy="startDate":i.i(a.isNullOrUndefined)(s.startDate)&&i.i(a.isNullOrUndefined)(s.duration)?n.unscheduledTaskBy="endDate":(n.unscheduledTaskBy="duration",n.unscheduleStarteDate=e.parent.dateValidationModule.getValidStartDate(t.ganttProperties),n.unscheduleEndDate=e.parent.dateValidationModule.getValidEndDate(t.ganttProperties)):(n.unscheduleStarteDate=null,n.unscheduleEndDate=null),n.startDate=s.startDate,n.endDate=s.endDate,n.height=e.parent.chartRowsModule.taskBarHeight,n.isMilestone=s.isMilestone,n.milestoneColor=new r.PdfColor(e.ganttStyle.taskbar.milestoneColor),n.isParentTask=t.hasChildRecords,s.isMilestone&&(n.height=s.width),t[e.parent.labelSettings.leftLabel]&&(n.leftTaskLabel.value=t[e.parent.labelSettings.leftLabel].toString()),t[e.parent.labelSettings.rightLabel]&&(n.rightTaskLabel.value=t[e.parent.labelSettings.rightLabel].toString()),t[e.parent.labelSettings.taskLabel]&&(n.taskLabel=t[e.parent.labelSettings.taskLabel].toString());var l=s.isMilestone?Math.floor(e.parent.chartRowsModule.taskBarHeight/2)+33:33;n.rightTaskLabel.left=s.left+s.width+l,n.fontFamily=e.ganttStyle.fontFamily,n.progressWidth=s.progressWidth,n.labelColor=new r.PdfColor(e.ganttStyle.label.fontColor),n.progressFontColor=new r.PdfColor(e.ganttStyle.taskbar.progressFontColor),n.isParentTask?(n.taskColor=new r.PdfColor(e.ganttStyle.taskbar.parentTaskColor),n.taskBorderColor=new r.PdfColor(e.ganttStyle.taskbar.parentTaskBorderColor),n.progressColor=new r.PdfColor(e.ganttStyle.taskbar.parentProgressColor)):t.isCritical?(n.taskColor=new r.PdfColor(e.ganttStyle.taskbar.criticalTaskColor),n.progressColor=new r.PdfColor(e.ganttStyle.taskbar.criticalProgressColor),n.taskBorderColor=new r.PdfColor(e.ganttStyle.taskbar.criticalTaskBorderColor)):(n.taskColor=new r.PdfColor(e.ganttStyle.taskbar.taskColor),n.progressColor=new r.PdfColor(e.ganttStyle.taskbar.progressColor),n.taskBorderColor=new r.PdfColor(e.ganttStyle.taskbar.taskBorderColor)),n.gridLineColor=new r.PdfColor(e.ganttStyle.chartGridLineColor),e.gantt.taskbarCollection.push(n);var d={};d.progressFontColor=n.progressFontColor,d.taskColor=n.taskColor,d.taskBorderColor=n.taskBorderColor,d.progressColor=n.progressColor,d.milestoneColor=n.milestoneColor;var p={taskbar:d,data:t};e.parent.pdfQueryTaskbarInfo&&(e.parent.trigger("pdfQueryTaskbarInfo",p),n.progressFontColor=p.taskbar.progressFontColor,n.taskColor=p.taskbar.taskColor,n.taskBorderColor=p.taskbar.taskBorderColor,n.progressColor=p.taskbar.progressColor,n.milestoneColor=p.taskbar.milestoneColor)})},e.prototype.getHorizontalAlignment=function(e,t){switch(void 0===t&&(t=new r.PdfStringFormat),e){case"Right":t.alignment=r.PdfTextAlignment.Right;break;case"Center":t.alignment=r.PdfTextAlignment.Center;break;case"Justify":t.alignment=r.PdfTextAlignment.Justify;break;case"Left":t.alignment=r.PdfTextAlignment.Left}return t},e.prototype.getVerticalAlignment=function(e,t,i){switch(void 0===t&&(t=new r.PdfStringFormat,t=this.getHorizontalAlignment(i,t)),e){case"Bottom":t.lineAlignment=r.PdfVerticalAlignment.Bottom;break;case"Middle":t.lineAlignment=r.PdfVerticalAlignment.Middle;break;case"Top":t.lineAlignment=r.PdfVerticalAlignment.Top}return t},e.prototype.getFontFamily=function(e){switch(e){case"TimesRoman":return 2;case"Courier":return 1;case"Symbol":return 3;case"ZapfDingbats":return 4;default:return 0}},e.prototype.getFont=function(e){if(e.font)return e.font;var t=i.i(a.isNullOrUndefined)(e.style.fontSize)?9.75:.75*e.style.fontSize,n=i.i(a.isNullOrUndefined)(e.style.fontFamily)?r.PdfFontFamily.TimesRoman:this.getFontFamily(e.style.fontFamily),s=r.PdfFontStyle.Regular;return!i.i(a.isNullOrUndefined)(e.style.bold)&&e.style.bold&&(s|=r.PdfFontStyle.Bold),!i.i(a.isNullOrUndefined)(e.style.italic)&&e.style.italic&&(s|=r.PdfFontStyle.Italic),!i.i(a.isNullOrUndefined)(e.style.underline)&&e.style.underline&&(s|=r.PdfFontStyle.Underline),!i.i(a.isNullOrUndefined)(e.style.strikeout)&&e.style.strikeout&&(s|=r.PdfFontStyle.Strikeout),new r.PdfStandardFont(n,t,s)},e.prototype.renderEmptyGantt=function(){var e=this.gantt.rows.addRow();e.cells.getCell(0).isHeaderCell=!1,e.height=i.i(o.a)(this.parent.rowHeight),this.copyStyles(this.ganttStyle.columnHeader,e.cells.getCell(0),e.isParentRow);var t=this.columns.length;this.mergeCells(0,0,t)},e.prototype.mergeCells=function(e,t,i){this.gantt.rows.getRow(e).cells.getCell(t).columnSpan=i},e.prototype.copyStyles=function(e,t,i){t.style.fontColor=new r.PdfColor(e.fontColor),t.style.backgroundColor=new r.PdfColor(e.backgroundColor),t.style.borderColor=new r.PdfColor(e.borderColor),t.style.fontSize=e.fontSize,t.style.fontStyle=e.fontStyle,t.style.format=Object.assign(new r.PdfStringFormat,e.format),t.style.borders=new n.f,t.style.borders.all=new r.PdfPen(t.style.borderColor),t.style.padding=new n.i;var a=0;a=t.isHeaderCell?this.parent.timelineModule.isSingleTier?22.5:30:this.parent.rowHeight/2,t.style.padding.top=a-e.fontSize,t.style.padding.bottom=a-e.fontSize,t.style.padding.left=10,t.style.padding.right=10},e.prototype.initializePdf=function(e){this.pdfDoc=e;var t=[],n=this.pdfDoc.pageSettings.width-82;if(this.totalColumnWidth>this.pdfDoc.pageSettings.width-82?this.gantt.style.allowHorizontalOverflow=!0:n/this.columns.length<t[0]&&(this.gantt.columns.getColumn(0).width=t[0]),this.exportProps.enableFooter||i.i(a.isNullOrUndefined)(this.exportProps.enableFooter)){var s=new r.RectangleF(0,0,e.pageSettings.width,35),o=new r.PdfPen(this.ganttStyle.chartGridLineColor),l=new r.PdfPageTemplateElement(s),d=new r.PdfSolidBrush(this.ganttStyle.footer.backgroundColor);l.graphics.drawRectangle(o,d,0,0,e.pageSettings.width,35);var p=new r.PdfStandardFont(this.ganttStyle.fontFamily,this.ganttStyle.footer.fontSize,this.ganttStyle.footer.fontStyle),h=new r.PdfSolidBrush(this.ganttStyle.footer.fontColor),u=new r.PdfPageNumberField(p),c=new r.PdfPageCountField(p,h),g=new r.PdfCompositeField(p,h,"Page {0}",u,c);g.stringFormat=this.ganttStyle.footer.format,g.bounds=s,g.draw(l.graphics,new r.PointF(0,0)),e.template.bottom=l}},e}(),d=function(){function e(e){this.valueFormatter=new s.ValueFormatter(e),this.internationalization=new a.Internationalization(e)}return e.prototype.returnFormattedValue=function(e,t){return!i.i(a.isNullOrUndefined)(e.value)&&e.value?this.valueFormatter.getFormatFunction(t)(e.value):""},e.prototype.formatCellValue=function(e){if(e.isForeignKey&&(e.value=i.i(a.getValue)(e.column.foreignKeyValue,i.i(s.getForeignData)(e.column,{},e.value)[0])),"number"===e.column.type&&void 0!==e.column.format&&""!==e.column.format)return e.value?this.internationalization.getNumberFormat({format:e.column.format})(e.value):"";if("boolean"===e.column.type)return e.value?"true":"false";if("date"!==e.column.type&&"datetime"!==e.column.type&&"time"!==e.column.type||void 0===e.column.format)return(i.i(a.isNullOrUndefined)(e.column.type)||i.i(a.isNullOrUndefined)(e.value))&&i.i(a.isNullOrUndefined)(e.value)?"":e.value.toString();if("string"==typeof e.value&&(e.value=new Date(e.value)),"string"==typeof e.column.format){var t=void 0;return t="date"===e.column.type?{type:"date",format:e.column.format}:"time"===e.column.type?{type:"time",format:e.column.format}:{type:"dateTime",format:e.column.format},this.returnFormattedValue(e,t)}if(e.column.format instanceof Object&&void 0===e.column.format.type)return e.value.toString();var r=void 0;return r="date"===e.column.type?{type:e.column.format.type,format:e.column.format.format,skeleton:e.column.format.skeleton}:"time"===e.column.type?{type:"time",format:e.column.format.format,skeleton:e.column.format.skeleton}:{type:"dateTime",format:e.column.format.format,skeleton:e.column.format.skeleton},this.returnFormattedValue(e,r)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return r});var r=function(){function e(){this.mKeys=[],this.mValues=[]}return e.prototype.size=function(){return this.mKeys.length},e.prototype.add=function(e,t){if(void 0===e||null===e||void 0===t||null===t)throw new ReferenceError("Provided key or value is not valid.");if(this.mKeys.indexOf(e)<0)return this.mKeys.push(e),this.mValues.push(t),1;throw new RangeError("An item with the same key has already been added.")},e.prototype.keys=function(){return this.mKeys},e.prototype.values=function(){return this.mValues},e.prototype.getValue=function(e){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");var t=this.mKeys.indexOf(e);if(t<0)throw new RangeError("No item with the specified key has been added.");return this.mValues[t]},e.prototype.setValue=function(e,t){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");var i=this.mKeys.indexOf(e);i<0?(this.mKeys.push(e),this.mValues.push(t)):this.mValues[i]=t},e.prototype.remove=function(e){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");var t=this.mKeys.indexOf(e);if(t<0)throw new RangeError("No item with the specified key has been added.");return this.mKeys.splice(t,1),this.mValues.splice(t,1),!0},e.prototype.containsKey=function(e){if(void 0===e||null===e)throw new ReferenceError("Provided key is not valid.");return!(this.mKeys.indexOf(e)<0)},e.prototype.clear=function(){this.mKeys=[],this.mValues=[]},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return a});var r=i(1),n=(i.n(r),function(){function e(){var e=new r.PdfPen(new r.PdfColor(0,0,0));e.dashStyle=r.PdfDashStyle.Solid;var t=new r.PdfPen(new r.PdfColor(0,0,0));t.dashStyle=r.PdfDashStyle.Solid;var i=new r.PdfPen(new r.PdfColor(0,0,0));i.dashStyle=r.PdfDashStyle.Solid;var n=new r.PdfPen(new r.PdfColor(0,0,0));n.dashStyle=r.PdfDashStyle.Solid,this.leftPen=e,this.rightPen=t,this.topPen=i,this.bottomPen=n}return Object.defineProperty(e.prototype,"left",{get:function(){return this.leftPen},set:function(e){this.leftPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.rightPen},set:function(e){this.rightPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.topPen},set:function(e){this.topPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.bottomPen},set:function(e){this.bottomPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"all",{set:function(e){this.leftPen=this.rightPen=this.topPen=this.bottomPen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isAll",{get:function(){return this.leftPen===this.rightPen&&this.leftPen===this.topPen&&this.leftPen===this.bottomPen},enumerable:!0,configurable:!0}),Object.defineProperty(e,"default",{get:function(){return new e},enumerable:!0,configurable:!0}),e}()),a=function(){function e(e,t,i,r){this.hasLeftPad=!1,this.hasRightPad=!1,this.hasTopPad=!1,this.hasBottomPad=!1,void 0===e?(this.leftPad=this.rightPad=5.76,this.bottomPad=this.topPad=.5):(this.leftPad=e,this.rightPad=t,this.topPad=i,this.bottomPad=r,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0)}return Object.defineProperty(e.prototype,"left",{get:function(){return this.leftPad},set:function(e){this.leftPad=e,this.hasLeftPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.rightPad},set:function(e){this.rightPad=e,this.hasRightPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.topPad},set:function(e){this.topPad=e,this.hasTopPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.bottomPad},set:function(e){this.bottomPad=e,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"all",{set:function(e){this.leftPad=this.rightPad=this.topPad=this.bottomPad=e,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),e}()},function(e,t,i){"use strict";i.d(t,"b",function(){return d}),i.d(t,"c",function(){return p}),i.d(t,"a",function(){return u});var r=i(18),n=i(0),a=(i.n(n),i(1)),s=(i.n(a),function(){function e(e){this.cellWidth=0,this.cellHeight=0,this.finishedDrawingCell=!0,i.i(n.isNullOrUndefined)(e)?(this.rowSpan=1,this.columnSpan=1):this.row=e,this.style={}}return Object.defineProperty(e.prototype,"height",{get:function(){return 0===this.cellHeight&&(this.cellHeight=this.measureHeight()),this.cellHeight},set:function(e){this.cellHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 0===this.cellWidth&&(this.cellWidth=this.measureWidth()),Math.round(this.cellWidth)},set:function(e){this.cellWidth=e},enumerable:!0,configurable:!0}),e.prototype.measureWidth=function(){var e=0,t=new a.PdfStringLayouter;if("string"==typeof this.value){var i=new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,this.style.fontStyle);this.row.treegrid.ganttStyle.font&&(i=this.row.treegrid.ganttStyle.font);e+=t.layout(this.value,i,this.style.format,new a.SizeF(Number.MAX_VALUE,Number.MAX_VALUE),!1,new a.SizeF(0,0)).actualSize.width,e+=2*(this.style.borders.left.width+this.style.borders.right.width)}return void 0!==this.row.treegrid.style.cellPadding.left&&this.row.treegrid.style.cellPadding.hasLeftPad&&(e+=this.row.treegrid.style.cellPadding.left),void 0!==this.row.treegrid.style.cellPadding.right&&this.row.treegrid.style.cellPadding.hasRightPad&&(e+=this.row.treegrid.style.cellPadding.right),e+=this.row.treegrid.style.cellSpacing},e.prototype.measureHeight=function(){var e=this.row.treegrid.rowHeight,t=0,r=this.calculateWidth();r-=this.row.treegrid.style.cellPadding.right+this.row.treegrid.style.cellPadding.left,r-=this.style.borders.left.width+this.style.borders.right.width;var s=new a.PdfStringLayouter;if("string"==typeof this.value||"string"==typeof this.remainingString){var o=this.value;this.finishedDrawingCell||(o=i.i(n.isNullOrUndefined)(this.remainingString)||""===this.remainingString?this.value:this.remainingString);var l=new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,this.style.fontStyle);this.row.treegrid.ganttStyle.font&&(l=this.row.treegrid.ganttStyle.font);t+=s.layout(o,l,this.style.format,new a.SizeF(r,0),!1,new a.SizeF(0,0)).actualSize.height,t+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}return t+=this.row.treegrid.style.cellPadding.top+this.row.treegrid.style.cellPadding.bottom,t+=this.row.treegrid.style.cellSpacing,t>e?t:e},e.prototype.calculateWidth=function(){for(var e=this.row.cells.indexOf(this),t=this.columnSpan,i=0,r=0;r<t;r++)i+=this.row.treegrid.columns.getColumn(e+r).width;return this.row.treegrid.columns.getColumn(e).isTreeColumn&&(i-=10*this.row.level),i},e.prototype.draw=function(e,t,i,r){var n=null;if(i){for(var s=this.row.cells.indexOf(this),o=s+1;o<=s+this.columnSpan;o++)this.row.cells.getCell(o).isCellMergeContinue=!1,this.row.cells.getCell(o).isRowMergeContinue=!1;this.columnSpan=1}if((this.isCellMergeContinue||this.isRowMergeContinue)&&this.isCellMergeContinue&&this.row.treegrid.style.allowHorizontalOverflow)return this.row.rowOverflowIndex>0&&this.row.cells.indexOf(this)!==this.row.rowOverflowIndex+1||0===this.row.rowOverflowIndex&&this.isCellMergeContinue,n;this.drawCellBackground(e,t);var l=new a.PdfSolidBrush(this.style.fontColor),d=null;d=this.row.isParentRow?new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,a.PdfFontStyle.Bold):new a.PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily,this.style.fontSize,this.style.fontStyle),this.row.treegrid.ganttStyle.font&&(d=this.row.treegrid.ganttStyle.font);var p=t;if(this.isHeaderCell||(p.x=p.x,p.width=p.width),p.height>=e.clientSize.height&&(this.row.treegrid.allowRowBreakAcrossPages?(p.height-=p.y,t.height-=t.y):(p.height=e.clientSize.height,t.height=e.clientSize.height)),p=this.adjustContentLayoutArea(p),"string"==typeof this.value||"string"==typeof this.remainingString){var h=null;this.finishedDrawingCell?(h=""===this.remainingString?this.remainingString:this.value,e.drawString(h,d,null,l,p.x+r,p.y,p.width-r-10,p.height-10,this.style.format)):e.drawString(this.remainingString,d,null,l,p.x+r,p.y,this.style.format),n=e.stringLayoutResult}return null!=this.style.borders&&this.drawCellBorder(e,t),n},e.prototype.drawCellBackground=function(e,t){var i=new a.PdfSolidBrush(this.style.backgroundColor);null!=i&&(e.save(),e.drawRectangle(i,t.x,t.y,t.width,t.height),e.restore())},e.prototype.adjustContentLayoutArea=function(e){var t=new a.RectangleF(new a.PointF(e.x,e.y),new a.SizeF(e.width,e.height)),i=this.style.padding;if(this.value instanceof r.a){var n=this.value.size;this.style.format.alignment===a.PdfTextAlignment.Center?(t.x+=i.left+(t.width-n.width)/2,t.y+=i.top+(t.height-n.height)/2):this.style.format.alignment===a.PdfTextAlignment.Left?(t.x+=i.left,t.y+=i.top):this.style.format.alignment===a.PdfTextAlignment.Right&&(t.x+=i.left+(t.width-n.width),t.y+=i.top)}else t.x+=i.left,t.y+=i.top;return t},e.prototype.drawCellBorder=function(e,t){if(this.row.treegrid.style.borderOverlapStyle===a.PdfBorderOverlapStyle.Inside&&(t.x+=this.style.borders.left.width,t.y+=this.style.borders.top.width,t.width-=this.style.borders.right.width,t.height-=this.style.borders.bottom.width),this.style.borders.isAll&&this.isHeaderCell)return e.drawRectangle(this.style.borders.left,t.x,t.y,t.width,t.height),void e.restore();var i=new a.PointF(t.x,t.y+t.height),r=new a.PointF(t.x,t.y),n=this.style.borders.left;this.style.borders.left.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore(),i=new a.PointF(t.x+t.width,t.y),r=new a.PointF(t.x+t.width,t.y+t.height),n=this.style.borders.right,t.x+t.width>e.clientSize.width-n.width/2&&(i=new a.PointF(e.clientSize.width-n.width/2,t.y),r=new a.PointF(e.clientSize.width-n.width/2,t.y+t.height)),this.style.borders.right.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore(),i=new a.PointF(t.x,t.y),r=new a.PointF(t.x+t.width,t.y),n=this.style.borders.top,this.style.borders.top.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore(),i=new a.PointF(t.x+t.width,t.y+t.height),r=new a.PointF(t.x,t.y+t.height),n=this.style.borders.bottom,t.y+t.height>e.clientSize.height-n.width/2&&(i=new a.PointF(t.x+t.width,e.clientSize.height-n.width/2),r=new a.PointF(t.x,e.clientSize.height-n.width/2)),this.style.borders.bottom.dashStyle===a.PdfDashStyle.Solid&&(n.lineCap=a.PdfLineCap.Square),e.drawLine(n,i,r),e.restore()},e}()),o=function(){function e(e){this.treegridRow=e,this.cells=[]}return e.prototype.getCell=function(e){if(e<0||e>=this.count)throw new Error("IndexOutOfRangeException");return this.cells[e]},Object.defineProperty(e.prototype,"count",{get:function(){return this.cells.length},enumerable:!0,configurable:!0}),e.prototype.add=function(e){if(void 0===e){var t=new s;return this.add(t),e}e.row=this.treegridRow,this.cells.push(e)},e.prototype.indexOf=function(e){return this.cells.indexOf(e)},e}(),l=function(){function e(e){this.treegridRowOverflowIndex=0,this.rowHeight=0,this.rowWidth=0,this._isParentRow=!1,this.intendLevel=0,this.pdfTreeGrid=e}return Object.defineProperty(e.prototype,"cells",{get:function(){return i.i(n.isNullOrUndefined)(this.treegridCells)&&(this.treegridCells=new o(this)),this.treegridCells},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isParentRow",{get:function(){return this._isParentRow},set:function(e){this._isParentRow=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treegrid",{get:function(){return this.pdfTreeGrid},set:function(e){this.pdfTreeGrid=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowBreakHeight",{get:function(){return void 0===this.treegridRowBreakHeight&&(this.treegridRowBreakHeight=0),this.treegridRowBreakHeight},set:function(e){this.treegridRowBreakHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowOverflowIndex",{get:function(){return this.treegridRowOverflowIndex},set:function(e){this.treegridRowOverflowIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this.intendLevel},set:function(e){this.intendLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return 0===this.rowHeight&&(this.rowHeight=this.measureHeight()),this.rowHeight},set:function(e){this.rowHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 0===this.rowWidth&&(this.rowWidth=this.measureWidth()),this.rowWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowIndex",{get:function(){return this.treegrid.rows.rowCollection.indexOf(this)},enumerable:!0,configurable:!0}),e.prototype.measureWidth=function(){for(var e=this.treegrid.columns.columns,t=0,i=0;i<e.length;i++){t+=e[i].width}return t},e.prototype.measureHeight=function(){for(var e=this.cells.getCell(0).height,t=0;t<this.cells.count;t++){var i=this.cells.getCell(t);e=1===i.columnSpan||1===i.rowSpan?Math.max(e,i.height):Math.min(e,i.height),i.height=e}return e},e}(),d=function(){function e(e){this.rows=[],this.treegrid=e}return Object.defineProperty(e.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rowCollection",{get:function(){return this.rows},enumerable:!0,configurable:!0}),e.prototype.addRow=function(e){if(void 0===e){var t=new l(this.treegrid);return this.addRow(t),t}if(0===e.cells.count)for(var i=0;i<this.treegrid.columns.count;i++)e.cells.add(new s);this.rows.push(e)},e.prototype.getRow=function(e){return this.rows[e]},e}(),p=function(){function e(e){this.rows=[],this.treegrid=e,this.rows=[]}return e.prototype.getHeader=function(e){return this.rows[e]},Object.defineProperty(e.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),e.prototype.add=function(e){this.rows.push(e)},e.prototype.indexOf=function(e){return this.rows.indexOf(e)},e}(),h=function(){function e(e){this.columnWidth=0,this.treeColumnIndex=!1,this._headerText="",this._field="",this.treegrid=e}return Object.defineProperty(e.prototype,"headerText",{get:function(){return this._headerText},set:function(e){this._headerText=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"field",{get:function(){return this._field},set:function(e){this._field=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.columnWidth},set:function(e){this.columnWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTreeColumn",{get:function(){return this.treeColumnIndex},set:function(e){this.treeColumnIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"format",{get:function(){return null==this.stringFormat&&(this.stringFormat=new a.PdfStringFormat),this.stringFormat},set:function(e){this.stringFormat=e},enumerable:!0,configurable:!0}),e}(),u=function(){function e(e){this.internalColumns=[],this.columnWidth=0,this.treegrid=e,this.internalColumns=[]}return e.prototype.add=function(e){for(var t=0;t<e;t++){this.internalColumns.push(new h(this.treegrid));for(var i=0;i<this.treegrid.rows.count;i++){var r=this.treegrid.rows.getRow(i),n=new s;n.value="",r.cells.add(n)}}},Object.defineProperty(e.prototype,"count",{get:function(){return this.internalColumns.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return 0===this.columnWidth&&(this.columnWidth=this.measureColumnsWidth()),this.columnWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this.internalColumns},enumerable:!0,configurable:!0}),e.prototype.getColumn=function(e){if(e>=0&&e<=this.columns.length)return this.columns[e];throw Error("can not get the column from the index: "+e)},e.prototype.measureColumnsWidth=function(){var e=0;this.treegrid.measureColumnsWidth();for(var t=0,i=this.internalColumns.length;t<i;t++)e+=this.internalColumns[t].width;return e},e.prototype.getDefaultWidths=function(e){for(var t=[],i=this.count,r=0;r<this.count;r++)t[r]=this.internalColumns[r].width,this.internalColumns[r].width>0?(e-=this.internalColumns[r].width,i--):t[r]=0;for(var r=0;r<this.count;r++){var n=e/i;t[r]<=0&&(t[r]=n)}return t},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(1),n=(i.n(r),i(7)),a=i(11),s=(function(){function e(){}}(),function(){function e(){this.cellSpacing=0,this.borderOverlapStyle=r.PdfBorderOverlapStyle.Overlap,this.allowHorizontalOverflow=!1,this.horizontalOverflowType=a.a.LastPage,this.cellPadding=new n.i}return e}())},function(e,t,i){"use strict";i.d(t,"b",function(){return l}),i.d(t,"a",function(){return p});var r=i(0),n=(i.n(r),i(7)),a=i(11),s=i(1),o=(i.n(s),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),l=function(e){function t(t){var i=e.call(this,t)||this;return i.columnRanges=[],i.repeatRowIndex=-1,i.currentBounds=new s.RectangleF(0,0,0,0),i}return o(t,e),Object.defineProperty(t.prototype,"treegrid",{get:function(){return this.elements},enumerable:!0,configurable:!0}),t.prototype.layoutInternal=function(e){if(i.i(r.isNullOrUndefined)(e))throw Error("Argument Null Expection");this.currentPage=e.page;var t=e.format;if(null!==this.currentPage&&(this.currentPageBounds=this.currentPage.getClientSize()),this.currentGraphics=this.currentPage.graphics,null!==t&&t.break===s.PdfLayoutBreakType.FitColumnsToPage?this.currentBounds=new s.RectangleF(new s.PointF(e.bounds.x,e.bounds.y),new s.SizeF(this.treegrid.columns.width,this.currentGraphics.clientSize.height)):this.currentBounds=new s.RectangleF(new s.PointF(e.bounds.x,e.bounds.y),this.currentGraphics.clientSize),0===this.treegrid.rows.count)throw Error("Please add row or header into grid");return this.currentBounds.width=e.bounds.width>0?e.bounds.width:this.currentBounds.width-this.treegrid.rows.getRow(0).cells.getCell(0).style.borders.left.width/2,this.startLocation=new s.PointF(e.bounds.x,e.bounds.y),e.bounds.height>0&&(this.currentBounds.height=e.bounds.height),this.treegrid.style.allowHorizontalOverflow||this.treegrid.isFitToWidth?(this.treegrid.measureColumnsWidth(this.currentBounds),this.columnRanges.push([0,this.treegrid.columns.count-1])):(this.treegrid.measureColumnsWidth(),this.determineColumnDrawRanges()),this.layoutOnPage(e)},t.prototype.determineColumnDrawRanges=function(){for(var e=0,t=0,i=0,r=this.currentGraphics.clientSize.width-this.currentBounds.x,n=0;n<this.treegrid.columns.count;n++)if((i+=this.treegrid.columns.getColumn(n).width)>=r){for(var a=0,s=e;s<=n&&!((a+=this.treegrid.columns.getColumn(s).width)>r);s++)t=s;this.columnRanges.push([e,t]),e=t+1,i=t<=n?this.treegrid.columns.getColumn(n).width:0}this.columnRanges.push([e,this.treegrid.columns.count-1])},t.prototype.getFormat=function(e){return e},t.prototype.layoutOnPage=function(e){for(var t=this.getFormat(e.format),i=null,r=new n.h,o=e.page,l=0;l<this.columnRanges.length;l++){var d=this.columnRanges[l];this.cellStartIndex=d[0],this.cellEndIndex=d[1];for(var p=this.treegrid.rows.count,h=0,u=!1,c=0;c<p;c++){var g=this.treegrid.rows.getRow(c);h++;var f=this.currentBounds.y;null===this.currentPage||r.containsKey(this.currentPage)||r.add(this.currentPage,d);var m=this.drawRow(g);for(f===this.currentBounds.y?(u=!0,this.repeatRowIndex=this.treegrid.rows.rowCollection.indexOf(g)):(u=!1,this.repeatRowIndex=-1);!m.isFinish&&null!==o;)if(this.treegrid.allowRowBreakAcrossPages)this.currentPage=this.getNextPageFormat(t),this.treegrid.enableHeader&&this.drawHeader(),this.checkBounds(t),m=this.drawRow(g);else{if(!this.treegrid.allowRowBreakAcrossPages&&h<length){this.currentPage=this.getNextPageFormat(t),this.treegrid.enableHeader&&this.drawHeader();break}if(h>=length)break}!m.isFinish&&null!==o&&t.layout!==s.PdfLayoutType.OnePage&&u&&(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageFormat(t),this.treegrid.enableHeader&&this.drawHeader(),this.startLocation.y=this.currentBounds.y,t.paginateBounds===new s.RectangleF(0,0,0,0)&&(this.currentBounds.x+=this.startLocation.x),this.currentBounds.x===n.f.default.left.width/2&&(this.currentBounds.y+=this.startLocation.x),this.drawRow(g),null===this.currentPage||r.containsKey(this.currentPage)||r.add(this.currentPage,d))}this.columnRanges.indexOf(d)<this.columnRanges.length-1&&null!==o&&t.layout!==s.PdfLayoutType.OnePage&&(this.currentPage=this.getNextPageFormat(t),this.checkBounds(t))}return i=this.getLayoutResult(),this.treegrid.style.allowHorizontalOverflow&&this.treegrid.style.horizontalOverflowType===a.a.NextPage&&this.reArrangePages(r),i},t.prototype.checkBounds=function(e){var t=new s.PointF(n.f.default.right.width/2,n.f.default.top.width/2);e.paginateBounds===new s.RectangleF(0,0,0,0)&&this.startLocation===t&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y)},t.prototype.drawHeader=function(){this.drawRow(this.treegrid.rows.getRow(0))},t.prototype.reArrangePages=function(e){for(var t=this.currentPage.document,i=[],r=e.keys(),n=0;n<r.length;n++){var a=r[n];a.section=null,i.push(a),t.pages.remove(a)}for(var n=0;n<e.size();n++)for(var s=e.size()/this.columnRanges.length,o=n;o<e.size();o+=s){var a=i[o];-1===t.pages.indexOf(a)&&t.pages.add(a)}},t.prototype.getNextPageFormat=function(e){var t=this.currentPage.section,i=null,r=t.indexOf(this.currentPage);return i=r===t.count-1?t.add():t.getPages()[r+1],this.currentGraphics=i.graphics,this.currentBounds=new s.RectangleF(new s.PointF(0,0),i.getClientSize()),i},t.prototype.getLayoutResult=function(){var e=new s.RectangleF(this.startLocation,new s.SizeF(this.currentBounds.width,this.currentBounds.y-this.startLocation.y));return new d(this.currentPage,e)},t.prototype.checkIfDefaultFormat=function(e){var t=new s.PdfStringFormat;return e.alignment===t.alignment&&e.characterSpacing===t.characterSpacing&&e.clipPath===t.clipPath&&e.firstLineIndent===t.firstLineIndent&&e.horizontalScalingFactor===t.horizontalScalingFactor&&e.lineAlignment===t.lineAlignment&&e.lineLimit===t.lineLimit&&e.lineSpacing===t.lineSpacing&&e.measureTrailingSpaces===t.measureTrailingSpaces&&e.noClip===t.noClip&&e.paragraphIndent===t.paragraphIndent&&e.rightToLeft===t.rightToLeft&&e.subSuperScript===t.subSuperScript&&e.wordSpacing===t.wordSpacing&&e.wordWrap===t.wordWrap},t.prototype.drawRow=function(e,t,n){if(i.i(r.isNullOrUndefined)(t)){var a=new s.RowLayoutResult;return n=e.rowBreakHeight>0?e.rowBreakHeight:e.height,n>this.currentPageBounds.height?this.treegrid.allowRowBreakAcrossPages?(a.isFinish=!0,this.drawRowWithBreak(a,e,n)):(a.isFinish=!1,this.drawRow(e,a,n)):this.currentBounds.y+n>this.currentPageBounds.height||this.currentBounds.y+n>this.currentBounds.height?this.repeatRowIndex>-1&&this.repeatRowIndex===e.rowIndex?this.treegrid.allowRowBreakAcrossPages?(a.isFinish=!0,this.drawRowWithBreak(a,e,n)):(a.isFinish=!1,this.drawRow(e,a,n)):a.isFinish=!1:(a.isFinish=!0,this.drawRow(e,a,n)),a}var o=new s.PointF(this.currentBounds.x,this.currentBounds.y);t.bounds=new s.RectangleF(o,new s.SizeF(0,0));var l=0;n=this.reCalculateHeight(e,n);for(var d=this.cellStartIndex;d<=this.cellEndIndex;d++){var p=e.cells.getCell(d),h=this.treegrid.columns.getColumn(d);h.isTreeColumn&&(l=10*e.level);var u=d>this.cellEndIndex+1&&p.columnSpan>1;if(!u)for(var c=1;c<p.columnSpan;c++)e.cells.getCell(d+c).isCellMergeContinue=!0;var g=new s.SizeF(h.width,n);!this.checkIfDefaultFormat(h.format)&&this.checkIfDefaultFormat(p.style.format)&&(p.style.format=h.format),p.draw(this.currentGraphics,new s.RectangleF(o,g),u,l),e.treegrid.style.allowHorizontalOverflow&&(p.columnSpan>this.cellEndIndex||d+p.columnSpan>this.cellEndIndex+1)&&this.cellEndIndex<e.cells.count-1&&(e.rowOverflowIndex=this.cellEndIndex),o.x+=h.width,l=0}return this.currentBounds.y+=n,t.bounds=new s.RectangleF(new s.PointF(t.bounds.x,t.bounds.y),new s.SizeF(o.x,o.y)),null},t.prototype.drawRowWithBreak=function(e,t,i){var r=new s.PointF(this.currentBounds.x,this.currentBounds.y);e.bounds=new s.RectangleF(r,new s.SizeF(0,0));var n=0;this.treegridHeight=this.currentBounds.height,t.rowBreakHeight=this.currentBounds.y+i-this.currentBounds.height;for(var a=0;a<t.cells.count;a++){var o=t.cells.getCell(a);o.measureHeight()===i&&null===o.value&&(t.rowBreakHeight=this.currentBounds.y+i-this.currentBounds.height)}for(var l=this.cellStartIndex;l<=this.cellEndIndex;l++){var d=this.treegrid.columns.getColumn(l);d.isTreeColumn&&(n=10*t.level);var o=t.cells.getCell(l),p=o.columnSpan+l>this.cellEndIndex+1&&o.columnSpan>1;if(!p)for(var h=1;h<o.columnSpan;h++)t.cells.getCell(l+h).isCellMergeContinue=!0;var u=this.treegridHeight>0?this.treegridHeight:this.currentBounds.height,c=new s.SizeF(d.width,u);!this.checkIfDefaultFormat(d.format)&&this.checkIfDefaultFormat(o.style.format)&&(o.style.format=d.format),o.draw(this.currentGraphics,new s.RectangleF(r,c),p,n),e.isFinish=e.isFinish?o.finishedDrawingCell:e.isFinish,r.x+=d.width,n=0,this.currentBounds.y+=this.treegridHeight>0?this.treegridHeight:i,e.bounds=new s.RectangleF(new s.PointF(e.bounds.x,e.bounds.y),new s.SizeF(r.x,r.y))}},t.prototype.reCalculateHeight=function(e,t){for(var n=0,a=this.cellStartIndex;a<=this.cellEndIndex;a++)i.i(r.isNullOrUndefined)(e.cells.getCell(a).remainingString)&&""!==e.cells.getCell(a).remainingString||(n=Math.max(n,e.cells.getCell(a).measureHeight()));return Math.max(t,n)},t}(s.ElementLayouter),d=function(e){function t(t,i){return e.call(this,t,i)||this}return o(t,e),t}(s.PdfLayoutResult),p=function(e){function t(t){return void 0===t?e.call(this)||this:e.call(this,t)||this}return o(t,e),t}(s.PdfLayoutFormat)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(1),n=(i.n(r),i(2)),a=i(0),s=(i.n(a),this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}),o=function(){function e(e,t){this.parent=e,this.pdfGantt=t}return e.prototype.add=function(){return new e(this.parent)},e.prototype.drawPredecessor=function(e){this.pdfGantt=e;var t,a,o=e.result.page.section.getPages(),l=e.taskbarCollection[this.parentIndex],d=e.taskbarCollection[this.childIndex],p=new r.PdfPage,h=new r.PdfPage,u="",c=0,g=0;if(d&&l){switch(this.type){case"FS":if(!(d.startPage>-1&&l.endPage>-1))return;p=o[l.endPage],h=o[d.startPage],t=e.pdfPageDetail[l.endPage-e.chartPageIndex],a=e.pdfPageDetail[d.startPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.parentLeft<this.childLeft&&this.childLeft>this.parentLeft+this.parentWidth+25?"FSType1":"FSType2":this.parentLeft<this.childLeft&&this.childLeft>this.parentLeft+this.parentWidth+25?"FSType3":"FSType4";break;case"SF":if(!(d.endPage>-1&&l.startPage>-1))return;p=o[l.startPage],h=o[d.endPage],t=e.pdfPageDetail[l.endPage-e.chartPageIndex],a=e.pdfPageDetail[d.startPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.parentLeft>this.childLeft+this.childWidth?"SFType1":"SFType2":this.parentLeft>this.childLeft+this.childWidth?"SFType3":"SFType4";break;case"FF":if(!(d.endPage>-1&&l.endPage>-1))return;p=o[l.endPage],h=o[d.endPage],t=e.pdfPageDetail[l.endPage-e.chartPageIndex],a=e.pdfPageDetail[d.endPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.childLeft+this.childWidth>=this.parentLeft+this.parentWidth?"FFType1":"FFType2":this.childLeft+this.childWidth>=this.parentLeft+this.parentWidth?"FFType3":"FFType4";break;case"SS":if(!(d.startPage>-1&&l.startPage>-1))return;p=o[l.startPage],h=o[d.startPage],t=e.pdfPageDetail[l.startPage-e.chartPageIndex],a=e.pdfPageDetail[d.startPage-e.chartPageIndex],u=this.parentIndex<this.childIndex?this.parentLeft>=this.childLeft?"SSType1":"SSType2":this.parentLeft>=this.childLeft?"SSType3":"SSType4"}var f=Math.round((this.parent.rowHeight-1)/2);f=i.i(n.a)(f);var m=void 0,y=void 0,v=void 0,D=void 0,w=void 0,k=void 0;m=y=v=D=w=k=new r.PointF;var S=s({},l.taskStartPoint),T=s({},d.taskStartPoint);c=S.y+t.startPoint.y,g=T.y+a.startPoint.y;var b=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth),c+f),P=new r.PointF(i.i(n.a)(this.parentLeft)-1,c+f),C=new r.PointF(i.i(n.a)(this.childLeft-20),g+f),M=new r.PointF(i.i(n.a)(this.childLeft-6-this.lineWidth)-1,g+f),R=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+6+this.lineWidth)+1,g+f);switch(u){case"FSType1":case"FSType3":m=b,y=new r.PointF(i.i(n.a)(this.childLeft-20),c+f),v=C,D=M,this.connectLines(p,h,m,y,v,D,d,f);break;case"FSType2":m=b,y=new r.PointF(m.x+10,c+f),v=new r.PointF(m.x+10,g+2),D=new r.PointF(i.i(n.a)(this.childLeft-20),g+2),w=C,k=M,this.connectLines(p,h,m,y,v,D,d,f,w,k);break;case"FSType4":m=b,y=new r.PointF(m.x+10,c+f),v=new r.PointF(m.x+10,c+2),D=new r.PointF(i.i(n.a)(this.childLeft-20),c+2),w=C,k=M,this.connectLines(p,h,m,y,v,D,d,f,w,k);break;case"FFType1":case"FFType3":m=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth)+1,c+f),y=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),c+f),v=new r.PointF(y.x,g+f),D=R,this.connectLines(p,h,m,y,v,D,d,f);break;case"FFType2":case"FFType4":m=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth)+1,c+f),y=new r.PointF(i.i(n.a)(this.parentLeft+this.parentWidth+20),c+f),v=new r.PointF(y.x,g+f),D=R,this.connectLines(p,h,m,y,v,D,d,f);break;case"SSType1":case"SSType3":m=P,y=new r.PointF(i.i(n.a)(this.childLeft-20),c+f),v=new r.PointF(y.x,g+f),D=M,this.connectLines(p,h,m,y,v,D,d,f);break;case"SSType2":case"SSType4":m=P,y=new r.PointF(i.i(n.a)(this.parentLeft-20),c+f),v=new r.PointF(y.x,g+f),D=M,this.connectLines(p,h,m,y,v,D,d,f);break;case"SFType1":case"SFType3":m=P,y=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),c+f),v=new r.PointF(y.x,g+f),D=R,this.connectLines(p,h,m,y,v,D,d,f);break;case"SFType2":m=P,y=new r.PointF(i.i(n.a)(this.parentLeft-20),c+f),v=new r.PointF(y.x,g+2),D=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),g+2),w=new r.PointF(D.x,g+f),k=R,this.connectLines(p,h,m,y,v,D,d,f,w,k);break;case"SFType4":m=P,y=new r.PointF(i.i(n.a)(this.parentLeft-20),c+f),v=new r.PointF(y.x,c+2),D=new r.PointF(i.i(n.a)(this.childLeft+this.childWidth+20),c+2),w=new r.PointF(D.x,g+f),k=R,this.connectLines(p,h,m,y,v,D,d,f,w,k)}}},e.prototype.connectLines=function(e,t,r,n,s,o,l,d,p,h){this.drawLine(e,r,n),this.drawLine(e,n,s),this.drawLine(e,s,o),i.i(a.isNullOrUndefined)(p)||i.i(a.isNullOrUndefined)(h)||(this.drawLine(e,o,p),this.drawLine(e,p,h)),this.drawArrow(t,l,d)},e.prototype.contains=function(e,t,i){return e.x<=t&&t<e.x+e.width&&e.y<=i&&i<e.y+e.height},e.prototype.findPageIndex=function(e){for(var t=-1,i=0;i<this.pdfGantt.pdfPageDetail.length;i++){var n=this.pdfGantt.pdfPageDetail[i],a=new r.RectangleF(n.startPoint.x,n.startPoint.y,n.width,n.height);if(this.contains(a,e.x,e.y)){t=i;break}}return t},e.prototype.drawLine=function(e,t,a){var o=this.pdfGantt.result.page.section.getPages(),l=e.graphics,d=s({},a),p=s({},a),h=s({},a),u=this.pdfGantt.pdfPageDetail[e.section.indexOf(e)-this.pdfGantt.chartPageIndex],c=new r.RectangleF(u.startPoint.x,u.startPoint.y,u.width,u.height),g=this.contains(c,t.x,t.y),f=this.contains(c,a.x,a.y),m=-1;if(t=new r.PointF(t.x,t.y),a=new r.PointF(a.x,a.y),!g&&!f||f&&!g)(m=this.findPageIndex(t))>-1&&(u=this.pdfGantt.pdfPageDetail[m],p=t,d=a,this.drawLine(o[m+this.pdfGantt.chartPageIndex],p,d));else if(!f&&g){var y=c.x,v=c.x+c.width,D=c.y+c.height,w=c.y;y>a.x?(h.x=a.x=y-1,p.x=y-1):v<a.x?(h.x=a.x=v,p.x=v,h.x+=1):D<a.y?(h.y=a.y=D,p.y=D,h.y+=1,this.pdfGantt.enableHeader&&(p.y+=this.parent.timelineModule.isSingleTier?i.i(n.a)(45):i.i(n.a)(62))):w>a.y&&(p.y=h.y=w-1,a.y=w,this.pdfGantt.enableHeader&&(h.y+=this.parent.timelineModule.isSingleTier?i.i(n.a)(45):i.i(n.a)(62),a.y+=this.parent.timelineModule.isSingleTier?i.i(n.a)(45):i.i(n.a)(62))),m=this.findPageIndex(h),-1!==m&&this.drawLine(o[m+this.pdfGantt.chartPageIndex],p,d)}if(g){t=new r.PointF(t.x,t.y),a=new r.PointF(a.x,a.y),t.x=t.x+u.pageStartX-u.startPoint.x,t.y=t.y-u.startPoint.y,a.x=a.x+u.pageStartX-u.startPoint.x,a.y=a.y-u.startPoint.y;var k=new r.PdfSolidBrush(this.connectorLineColor),S=new r.PdfPen(k,i.i(n.a)(this.lineWidth));l.drawLine(S,t,a)}},e.prototype.drawArrow=function(e,t,a){var s,o=this.pdfGantt.pdfPageDetail[e.section.indexOf(e)-this.pdfGantt.chartPageIndex],l=new r.RectangleF(new r.PointF(o.startPoint.x,o.startPoint.y),new r.SizeF(o.width,o.height)),d=new r.PointF,p=e.section.getPages(),h=6+this.lineWidth;if(d="FS"===this.type||"SS"===this.type?new r.PointF(i.i(n.a)(this.childLeft)-1,t.taskStartPoint.y+o.startPoint.y):new r.PointF(i.i(n.a)(this.childLeft+this.childWidth)+1,t.taskStartPoint.y+o.startPoint.y),!this.contains(l,d.x,d.y)){var u=this.findPageIndex(d);u>-1&&(o=this.pdfGantt.pdfPageDetail[u],e=p[u+this.pdfGantt.chartPageIndex])}var c=e.graphics;d.x=d.x-o.startPoint.x+o.pageStartX,d.y=d.y-o.startPoint.y;var g=new r.PointF(d.x,d.y+a);s="FS"===this.type||"SS"===this.type?new r.PointF(g.x-i.i(n.a)(h),g.y-i.i(n.a)(h)):new r.PointF(g.x+i.i(n.a)(h),g.y-i.i(n.a)(h));var f=new r.PointF(s.x,s.y+i.i(n.a)(2*h)),m=new r.PdfSolidBrush(this.connectorLineColor),y=new r.PdfPen(m,i.i(n.a)(this.lineWidth));c.drawLine(y,g,s),c.drawLine(y,s,f),c.drawLine(y,f,g)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return u});var r=i(58),n=i(0),a=(i.n(n),i(1)),s=(i.n(a),i(18)),o=i(59),l=i(2),d=i(56),p=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),h=this&&this.__assign||function(){return h=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},h.apply(this,arguments)},u=function(e){function t(t){var i=e.call(this)||this;return i.exportProps={},i.parent=t,i.chartHeader=new o.a(i),i.predecessor=new d.a(t,i),i.headerDetails=[],i.pdfPageDetail=[],i.taskbarCollection=[],i.predecessorCollection=[],i}return p(t,e),Object.defineProperty(t.prototype,"taskbar",{get:function(){return i.i(n.isNullOrUndefined)(this.taskbars)&&(this.taskbars=new r.a(this.parent)),this.taskbars},enumerable:!0,configurable:!0}),t.prototype.drawChart=function(e){this.result=e,this.totalPages=this.result.page.section.count,this.perColumnPages=this.totalPages/this.layouter.columnRanges.length,this.calculateRange(),this.drawGantttChart(),this.drawPageBorder()},t.prototype.calculateRange=function(){for(var e=this.layouter.columnRanges[this.layouter.columnRanges.length-1],t=0,r=!0,s=0,o=0,d=0,p=i.i(l.a)(this.chartHeader.width),h=this.parent.timelineModule,u=e[0];u<=e[1];u++)t+=this.layouter.treegrid.columns.getColumn(u).width;for(t+=.5,t+100<this.result.page.getClientSize().width?(o=this.result.page.getClientSize().width-t,this.chartPageIndex=this.startPageIndex=this.totalPages-this.perColumnPages,r=!1,this.startPoint=new a.PointF(t,0)):(this.result.page.section.add(),this.chartPageIndex=this.startPageIndex=this.totalPages,r=!0,this.startPoint=new a.PointF(d,0));Math.round(d)<Math.round(p);){r?s=this.result.page.getClientSize().width:(s=o,r=!0);var c={},g=[],f=i.i(l.a)(this.chartHeader.bottomTierCellWidth),m=0;0!==this.chartHeader.bottomTierCellWidth&&(m=Math.floor(s/f)*f),g[0]=d,p-d<=m?(g[1]=p,c.totalWidth=i.i(l.b)(p-d)):(g[1]=d+m,c.totalWidth=i.i(l.b)(m)),c.startPoint=g[0],c.endPoint=g[1],0===this.parent.cloneProjectStartDate.getHours()&&0===this.parent.cloneProjectStartDate.getMinutes()&&0===this.parent.cloneProjectStartDate.getSeconds()&&this.parent.cloneProjectStartDate.setHours(8);var y=this.parent.dataOperation.getDateFromFormat(this.parent.cloneProjectStartDate),v=i.i(n.isNullOrUndefined)(h.customTimelineSettings.bottomTier.count)?h.customTimelineSettings.topTier.count:h.customTimelineSettings.bottomTier.count;switch("None"===h.customTimelineSettings.bottomTier.unit?h.customTimelineSettings.topTier.unit:h.customTimelineSettings.bottomTier.unit){case"Minutes":c.startDate=new Date(y.getTime());var D=Math.floor(i.i(l.b)(c.startPoint)/this.chartHeader.bottomTierCellWidth);c.startDate.setMinutes(c.startDate.getMinutes()+D*v),c.startDate.setSeconds(c.startDate.getSeconds()+1),c.endDate=new Date(c.startDate.getTime());var w=Math.floor(i.i(l.b)(c.endPoint-c.startPoint)/this.chartHeader.bottomTierCellWidth);c.endDate.setMinutes(c.endDate.getMinutes()+w*v);break;case"Hour":c.startDate=new Date(y.getTime());var k=Math.floor(i.i(l.b)(c.startPoint)/this.chartHeader.bottomTierCellWidth);c.startDate.setHours(c.startDate.getHours()+k*v),c.startDate.setMinutes(c.startDate.getMinutes()+1),c.endDate=new Date(c.startDate.getTime());var S=Math.floor(i.i(l.b)(c.endPoint-c.startPoint)/this.chartHeader.bottomTierCellWidth);c.endDate.setHours(c.endDate.getHours()+S*v);break;case"Day":c.startDate=new Date(y.getTime());var T=Math.round(c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth));c.startDate.setDate(c.startDate.getDate()+T*v);var b=Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+b*v);break;case"Week":c.startDate=new Date(y.getTime());var P=c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth)*7;c.startDate.setDate(c.startDate.getDate()+P*v);var C=7*Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+C*v);break;case"Month":c.startDate=new Date(y.getTime());var M=c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth)*31;c.startDate.setDate(c.startDate.getDate()+M*v);var R=31*Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+R*v);break;case"Year":c.startDate=new Date(y.getTime());var x=c.startPoint/i.i(l.a)(this.chartHeader.bottomTierCellWidth)*365;c.startDate.setDate(c.startDate.getDate()+x*v);var O=365*Math.round((c.endPoint-c.startPoint)/i.i(l.a)(this.chartHeader.bottomTierCellWidth))-1;c.endDate=new Date(c.startDate.getTime()),c.endDate.setDate(c.startDate.getDate()+O*v)}this.headerDetails.push(c),d+=m}},t.prototype.drawPageBorder=function(){for(var e=this.result.page.section.getPages(),t=0;t<e.length;t++){var i=e[t],r=i.graphics,n=i.getClientSize(),s=new a.PdfPen(new a.PdfColor(206,206,206));r.drawRectangle(s,0,0,n.width,n.height)}},t.prototype.drawGantttChart=function(){var e,t=this,r=this.startPoint,n=new a.PointF,s=0,o=0,d=0,p=0;this.headerDetails.forEach(function(u,c){var g=t.result.page.section.getPages()[t.startPageIndex];t.chartHeader.drawTimeline(g,t.startPoint,u),r.y=r.y+i.i(l.a)(t.parent.timelineModule.isSingleTier?45:60),s=r.x,d=i.i(l.a)(t.parent.timelineModule.isSingleTier?45:60),t.headerDetails[t.headerDetails.indexOf(u)].startIndex=t.startPageIndex,t.headerDetails[t.headerDetails.indexOf(u)].pageStartPoint=r;for(var f=0;f<t.taskbarCollection.length;f++){var m=t.taskbarCollection[f],y=t.rows.getRow(f+1).height,v=t.result.page.section.getPages()[t.startPageIndex];m.drawTaskbar(v,r,u,o,y,t.taskbarCollection[f])&&(t.enableHeader?r.y=i.i(l.a)(t.parent.timelineModule.isSingleTier?45:60):r.y=0,t.startPageIndex++,e={},e.height=d,e.pageStartX=s,e.startPoint=h({},n),e.width=i.i(l.a)(u.totalWidth),t.pdfPageDetail.push(e),n.y+=e.height,t.enableHeader?d=t.chartHeader.height:(r.y=0,d=0)),r.y+=y,d+=y,p+=y}t.headerDetails[c].endIndex=t.startPageIndex,o+=u.totalWidth,e={},e.height=d,e.pageStartX=s,e.startPoint=h({},n),e.width=i.i(l.a)(u.totalWidth),t.pdfPageDetail.push(e),n.x+=e.width,n.y=0,t.enableHeader?d=t.chartHeader.height:r.y=0,t.headerDetails.indexOf(u)!==t.headerDetails.length-1&&(t.result.page.section.add(),t.startPageIndex=t.result.page.section.count-1,r=t.startPoint=new a.PointF(0,0))});for(var u=0;u<this.predecessorCollection.length;u++){this.predecessorCollection[u].drawPredecessor(this)}},t}(s.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(1),n=(i.n(r),i(2)),a=i(0),s=(i.n(a),this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}),o=function(){function e(e){this.leftTaskLabel={},this.rightTaskLabel={},this.startPage=-1,this.endPage=-1,this.parent=e}return e.prototype.add=function(){return new e(this.parent)},e.prototype.GetNextPage=function(e){var t=e.section,i=t.indexOf(e);return i===t.count-1?t.add():t.getPages()[i+1]},e.prototype.drawTaskbar=function(e,t,o,l,d,p){var h=e.graphics,u=!1,c=e.getClientSize();t.y+d>c.height&&(e=this.GetNextPage(e),h=e.graphics,t.y=0,this.parent.pdfExportModule.gantt.enableHeader&&(this.parent.pdfExportModule.gantt.chartHeader.drawPageTimeline(e,t,o),t.y=i.i(n.a)(this.parent.timelineModule.isSingleTier?45:60)),u=!0),this.drawLeftLabel(e,t,o,l);var g=new r.PdfStandardFont(this.fontFamily,9,r.PdfFontStyle.Regular);!i.i(a.isNullOrUndefined)(this.parent.pdfExportModule.helper.exportProps.ganttStyle)&&this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(g=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var f=new r.PdfSolidBrush(this.progressFontColor),m=new r.PdfStringFormat;m.lineAlignment=r.PdfVerticalAlignment.Middle,m.alignment=r.PdfTextAlignment.Right;var y,v=!1;/^[a-zA-Z]/.test(this.taskLabel)&&(v=!0,m.alignment=r.PdfTextAlignment.Left);var D=-1;if(p.isMilestone)this.drawMilestone(e,t,o,l);else{var w=new r.PdfPen(p.taskBorderColor),k=new r.PdfSolidBrush(p.taskColor),S=new r.PdfPen(p.progressColor),T=new r.PdfSolidBrush(p.progressColor),b=i.i(n.a)((this.parent.rowHeight-this.height)/2);D=e.section.indexOf(e);var P=i.i(a.isNullOrUndefined)(this.unscheduleStarteDate)?this.startDate:this.unscheduleStarteDate,C=i.i(a.isNullOrUndefined)(this.unscheduleEndDate)?this.endDate:this.unscheduleEndDate;if(o.startDate<=P&&C<=o.endDate)this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0),this.isScheduledTask||"duration"===this.unscheduledTaskBy?(h.drawRectangle(w,k,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(p.width),i.i(n.a)(p.height)),this.isScheduledTask&&(h.drawRectangle(S,T,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(p.progressWidth),i.i(n.a)(p.height)),i.i(a.isNullOrUndefined)(this.parent.labelSettings.taskLabel)||i.i(a.isNullOrUndefined)(this.taskLabel)||(y=this.progressWidth,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left-l),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m)))):this.drawUnscheduledTask(h,t,l,b),this.isCompleted=!0,this.startPage=D,this.endPage=D;else if(o.startDate<=P&&o.endDate>=P&&C>=o.endDate){this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0);var M=0;if(v||(this.width=this.width-(o.totalWidth-(this.left-l))),M=o.totalWidth-(this.left-l),this.isScheduledTask||"duration"===this.unscheduledTaskBy){if(h.drawRectangle(w,k,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(M),i.i(n.a)(p.height)),this.isScheduledTask){var R=0;R=this.progressWidth<=M?this.progressWidth:M,h.drawRectangle(S,T,t.x+i.i(n.a)(this.left-l)+.5,t.y+b,i.i(n.a)(R),i.i(n.a)(p.height)),this.progressWidth-=R,this.parent.labelSettings.taskLabel&&!i.i(a.isNullOrUndefined)(this.taskLabel)&&(y=R,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left-l),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m))}}else this.drawUnscheduledTask(h,t,l,b);this.left=0,this.isCompleted=!1,this.startPage=D}else if(C<=o.endDate&&o.startDate<=C&&!this.isCompleted)this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0),h.drawRectangle(w,k,t.x+i.i(n.a)(p.left+.5),t.y+b,i.i(n.a)(p.width),i.i(n.a)(p.height)),this.isScheduledTask&&(h.drawRectangle(S,T,t.x+i.i(n.a)(p.left+.5),t.y+b,i.i(n.a)(p.progressWidth),i.i(n.a)(p.height)),i.i(a.isNullOrUndefined)(this.taskLabel)||(y=this.progressWidth,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m))),this.isCompleted=!0,this.endPage=D;else if(P<o.startDate&&C>o.endDate){if(this.isStartPoint||(this.taskStartPoint=s({},t),this.isStartPoint=!0),h.drawRectangle(w,k,t.x+i.i(n.a)(p.left)+.5,t.y+b,i.i(n.a)(o.totalWidth),i.i(n.a)(p.height)),this.isScheduledTask){var R=0;R=this.progressWidth<=o.totalWidth?this.progressWidth:o.totalWidth,h.drawRectangle(S,T,t.x+i.i(n.a)(p.left)+.5,t.y+b,i.i(n.a)(R),i.i(n.a)(p.height)),this.progressWidth-=R,i.i(a.isNullOrUndefined)(this.taskLabel)||(y=R,v&&(y=this.width),h.drawString(this.taskLabel.toString(),g,null,f,t.x+i.i(n.a)(this.left),t.y+b,i.i(n.a)(y),i.i(n.a)(this.height),m))}this.isCompleted=!1,this.width-=o.totalWidth}}return this.drawRightLabel(e,t,o,l),u},e.prototype.drawRightLabel=function(e,t,s,o){var l,d=e.graphics;l=this.rightTaskLabel.isLeftCalculated?this.rightTaskLabel.left:i.i(n.a)(this.rightTaskLabel.left);var p=l-i.i(n.a)(o)+t.x;if(s.startPoint<=l&&l<s.endPoint&&!i.i(a.isNullOrUndefined)(this.rightTaskLabel.value)&&!this.rightTaskLabel.isCompleted){var h=this.getWidth(this.rightTaskLabel.value,s.endPoint-l,15),u=new r.PdfStandardFont(this.fontFamily,9);!i.i(a.isNullOrUndefined)(this.parent.pdfExportModule.helper.exportProps.ganttStyle)&&this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(u=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var c=(i.i(n.a)(this.parent.rowHeight)-h.actualSize.height)/2,g=new r.PointF(p,t.y+c),f=new r.SizeF(h.actualSize.width,h.actualSize.height),m=new r.RectangleF(g,f),y=new r.PdfStringFormat;if(y.alignment=r.PdfTextAlignment.Right,y.lineAlignment=r.PdfVerticalAlignment.Middle,h.actualSize.width>0){var v=new r.PdfSolidBrush(this.labelColor);d.drawString(h.lines[0].text,u,null,v,m.x,m.y,h.actualSize.width,h.actualSize.height,y),null!==h.remainder?(this.rightTaskLabel.value=h.remainder,this.rightTaskLabel.left=s.endPoint,this.rightTaskLabel.isLeftCalculated=!0):this.rightTaskLabel.isCompleted=!0}else this.rightTaskLabel.left=s.endPoint}},e.prototype.drawLeftLabel=function(e,t,s,o){var l,d=e.graphics;if(!i.i(a.isNullOrUndefined)(this.leftTaskLabel.value)){var p=0;if(p=this.left,this.leftTaskLabel.isLeftCalculated)l=this.leftTaskLabel.left;else{var h=this.getWidth(this.leftTaskLabel.value,Number.MAX_VALUE,15),u=this.isMilestone?Math.floor(this.parent.chartRowsModule.taskBarHeight/2)+33:33;l=i.i(n.a)(p-u)-h.actualSize.width,this.leftTaskLabel.left=l,this.leftTaskLabel.isLeftCalculated=!0}var c=l-i.i(n.a)(o)+t.x;if(s.startPoint<=l&&l<s.endPoint&&!i.i(a.isNullOrUndefined)(this.leftTaskLabel.value)&&!this.leftTaskLabel.isCompleted){var h=this.getWidth(this.leftTaskLabel.value,s.endPoint-l,15),g=new r.PdfStandardFont(this.fontFamily,9);!i.i(a.isNullOrUndefined)(this.parent.pdfExportModule.helper.exportProps.ganttStyle)&&this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(g=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var f=(i.i(n.a)(this.parent.rowHeight)-h.actualSize.height)/2,m=new r.PointF(c,t.y+f),y=new r.SizeF(h.actualSize.width,h.actualSize.height),v=new r.RectangleF(m,y),D=new r.PdfStringFormat;if(D.alignment=r.PdfTextAlignment.Right,D.lineAlignment=r.PdfVerticalAlignment.Middle,h.actualSize.width>0){var w=new r.PdfSolidBrush(this.labelColor);d.drawString(h.lines[0].text,g,null,w,v.x,v.y,h.actualSize.width,h.actualSize.height,D),null!==h.remainder?(this.leftTaskLabel.value=h.remainder,this.leftTaskLabel.left=s.endPoint):this.leftTaskLabel.isCompleted=!0}else this.leftTaskLabel.left=s.endPoint}}},e.prototype.getWidth=function(e,t,n){var s=new r.PdfStandardFont(this.fontFamily,9);!i.i(a.isNullOrUndefined)(this.parent.pdfExportModule.helper.exportProps.ganttStyle)&&this.parent.pdfExportModule.helper.exportProps.ganttStyle.font&&(s=this.parent.pdfExportModule.helper.exportProps.ganttStyle.font);var o=new r.PdfStringLayouter,l=new r.PdfStringFormat;return l.alignment=r.PdfTextAlignment.Left,l.wordWrap=r.PdfWordWrapType.Character,l.lineAlignment=r.PdfVerticalAlignment.Middle,o.layout(e,s,l,new r.SizeF(t,n),!1,new r.SizeF(t,n))},e.prototype.drawUnscheduledTask=function(e,t,a,s){var o=new r.PdfSolidBrush(this.taskColor);e.drawRectangle(o,t.x+i.i(n.a)(this.left-a),t.y+s,i.i(n.a)(3),i.i(n.a)(this.height))},e.prototype.drawMilestone=function(e,t,a,o){if(a.startDate<=this.startDate&&this.startDate<=a.endDate){var l=e.graphics,d=e.section.indexOf(e);this.taskStartPoint=s({},t);var p=new r.PdfPen(this.milestoneColor),h=i.i(n.a)((this.parent.rowHeight-this.height)/2),u=new r.PdfSolidBrush(this.milestoneColor);l.save();var c=Math.floor(.6*this.parent.chartRowsModule.taskBarHeight);l.translateTransform(t.x+i.i(n.a)(this.left-o),t.y+h-.7*this.parent.chartRowsModule.taskBarHeight/2),l.rotateTransform(45),l.drawRectangle(p,u,0,0,i.i(n.a)(c),i.i(n.a)(c)),l.restore(),this.endPage=this.startPage=d}},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(1),n=(i.n(r),i(0)),a=(i.n(n),i(2)),s=function(){function e(e){this.width=0,this.gantt=e,this.parent=e.parent,this.topTierPoint=new r.PointF,this.bottomTierPoint=new r.PointF,this.topTierIndex=0,this.bottomTierIndex=0,this.prevTopTierIndex=0,this.prevBottomTierIndex=0}return e.prototype.drawTimeline=function(e,t,n){var s=Math.floor(n.totalWidth),o=0;for(this.topTierPoint.x=t.x,this.topTierPoint.y=t.y,this.prevTopTierIndex=this.topTierIndex,this.prevBottomTierIndex=this.bottomTierIndex;s>0;){var l=this.topTier[this.topTierIndex];if(this.topTier.length>this.topTierIndex){var d=!1;this.topTier[this.topTierIndex].isFinished||(s>=l.width?(o=l.width,l.isFinished=!0,l.completedWidth=o,d=!0):(o=s,d=!1,l.isFinished=!1,l.width=l.width-s,l.completedWidth=o)),this.triggerQueryTimelinecell(e,this.topTierPoint.x,this.topTierPoint.y,this.topTierHeight,o,l.value,!0),this.topTierPoint.x+=i.i(a.a)(o),s-=o,d&&this.topTierIndex++}else s=0}s=Math.floor(n.totalWidth);var p=this.parent.timelineModule.isSingleTier?0:this.topTierHeight;for(this.bottomTierPoint=new r.PointF(t.x,i.i(a.a)(t.y+p));s>0;){var h=this.bottomTier[this.bottomTierIndex];if(this.bottomTier.length>this.bottomTierIndex){var d=!0,u=h.width;s<u&&(u=s,d=!1,h.completedWidth=u),this.triggerQueryTimelinecell(e,this.bottomTierPoint.x,this.bottomTierPoint.y,this.bottomTierHeight,u,h.value,!1),this.bottomTierPoint.x=this.bottomTierPoint.x+i.i(a.a)(u),s-=u,h.completedWidth=u,d&&this.bottomTierIndex++}else s=0}},e.prototype.drawPageTimeline=function(e,t,r){this.topTierPoint=i.i(n.extend)({},{},t,!0);for(var s=this.prevTopTierIndex;s<=this.topTierIndex;s++)if(this.topTier.length>s){var o=this.topTier[s];o.completedWidth>0&&(this.triggerQueryTimelinecell(e,this.topTierPoint.x,this.topTierPoint.y,this.topTierHeight,o.completedWidth,o.value,!0),this.topTierPoint.x+=i.i(a.a)(o.completedWidth))}this.bottomTierPoint.x=t.x,this.bottomTierPoint.y=i.i(a.a)(t.y+this.topTierHeight);for(var s=this.prevBottomTierIndex;s<=this.bottomTierIndex;s++)if(this.bottomTier.length>s){var l=this.bottomTier[s];l.completedWidth>0&&(this.triggerQueryTimelinecell(e,this.bottomTierPoint.x,this.bottomTierPoint.y,this.bottomTierHeight,l.width,l.value,!1),this.bottomTierPoint.x=this.bottomTierPoint.x+i.i(a.a)(l.width))}},e.prototype.triggerQueryTimelinecell=function(e,t,s,o,l,d,p){var h=e.graphics,u={},c=this.gantt.ganttStyle;u.borderColor=new r.PdfColor(c.timeline.borderColor),u.fontColor=new r.PdfColor(c.timeline.fontColor),u.fontSize=c.timeline.fontSize,u.fontStyle=c.timeline.fontStyle,u.backgroundColor=new r.PdfColor(c.timeline.backgroundColor),c.timeline.padding&&(u.padding=c.timeline.padding);var g=new r.PdfStringFormat;i.i(n.isNullOrUndefined)(c.timeline.format)?p?(g.lineAlignment=r.PdfVerticalAlignment.Middle,g.alignment=r.PdfTextAlignment.Left):(g.lineAlignment=r.PdfVerticalAlignment.Middle,g.alignment=r.PdfTextAlignment.Center,g.wordWrap=r.PdfWordWrapType.Character):g=c.timeline.format,u.format=g;var f={timelineCell:u,value:d};this.parent.pdfQueryTimelineCellInfo&&this.parent.trigger("pdfQueryTimelineCellInfo",f);var m=f.timelineCell,y=new r.PdfPen(f.timelineCell.borderColor),v=new r.PdfSolidBrush(f.timelineCell.backgroundColor);h.drawRectangle(y,v,t,s,i.i(a.a)(l),i.i(a.a)(o));var D=new r.PdfStandardFont(c.fontFamily,m.fontSize,m.fontStyle);c.font&&(D=c.font);var w=new r.PdfSolidBrush(f.timelineCell.fontColor),k=c.timeline.padding?f.timelineCell.padding.left:0,S=c.timeline.padding?f.timelineCell.padding.top:0;h.drawString(f.value,D,null,w,t+k,s+S,i.i(a.a)(l),i.i(a.a)(o),m.format)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"type",void 0),a([i.i(r.Property)(null)],t.prototype,"headerText",void 0),a([i.i(r.Property)([])],t.prototype,"fields",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"from",void 0),a([i.i(r.Property)(null)],t.prototype,"to",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"type",void 0),a([i.i(r.Property)(null)],t.prototype,"headerText",void 0),a([i.i(r.Property)([])],t.prototype,"fields",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(!1)],t.prototype,"allowEditing",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowAdding",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowDeleting",void 0),a([i.i(r.Property)("Auto")],t.prototype,"mode",void 0),a([i.i(r.Property)("Top")],t.prototype,"newRowPosition",void 0),a([i.i(r.Property)(!1)],t.prototype,"showDeleteConfirmDialog",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowTaskbarEditing",void 0),a([i.i(r.Property)(!1)],t.prototype,"allowNextRowEdit",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"day",void 0),a([i.i(r.Property)(null)],t.prototype,"label",void 0),a([i.i(r.Property)(null)],t.prototype,"cssClass",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(5)),a=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),s=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),s([i.i(r.Collection)([],n.Predicate)],t.prototype,"columns",void 0),s([i.i(r.Property)("Menu")],t.prototype,"type",void 0),s([i.i(r.Property)()],t.prototype,"operators",void 0),s([i.i(r.Property)(!1)],t.prototype,"ignoreAccent",void 0),s([i.i(r.Property)("Parent")],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"from",void 0),a([i.i(r.Property)(null)],t.prototype,"to",void 0),a([i.i(r.Property)(null)],t.prototype,"label",void 0),a([i.i(r.Property)(null)],t.prototype,"cssClass",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"rightLabel",void 0),a([i.i(r.Property)(null)],t.prototype,"leftLabel",void 0),a([i.i(r.Property)(null)],t.prototype,"taskLabel",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"id",void 0),a([i.i(r.Property)(null)],t.prototype,"name",void 0),a([i.i(r.Property)(null)],t.prototype,"unit",void 0),a([i.i(r.Property)(null)],t.prototype,"group",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)([])],t.prototype,"fields",void 0),a([i.i(r.Property)(!1)],t.prototype,"ignoreCase",void 0),a([i.i(r.Property)("contains")],t.prototype,"operator",void 0),a([i.i(r.Property)("")],t.prototype,"key",void 0),a([i.i(r.Property)("Parent")],t.prototype,"hierarchyMode",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)("Row")],t.prototype,"mode",void 0),a([i.i(r.Property)("Flow")],t.prototype,"cellSelectionMode",void 0),a([i.i(r.Property)("Single")],t.prototype,"type",void 0),a([i.i(r.Property)(!1)],t.prototype,"persistSelection",void 0),a([i.i(r.Property)(!1)],t.prototype,"enableToggle",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return o});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)()],t.prototype,"field",void 0),a([i.i(r.Property)()],t.prototype,"direction",void 0),t}(r.ChildProperty),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Collection)([],s)],t.prototype,"columns",void 0),a([i.i(r.Property)(!0)],t.prototype,"allowUnsort",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"position",void 0),a([i.i(r.Property)(-1)],t.prototype,"columnIndex",void 0),a([i.i(r.Property)(4)],t.prototype,"separatorSize",void 0),a([i.i(r.Property)(null)],t.prototype,"minimum",void 0),a([i.i(r.Property)("Default")],t.prototype,"view",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(null)],t.prototype,"id",void 0),a([i.i(r.Property)(null)],t.prototype,"name",void 0),a([i.i(r.Property)(null)],t.prototype,"parentID",void 0),a([i.i(r.Property)(null)],t.prototype,"startDate",void 0),a([i.i(r.Property)(null)],t.prototype,"endDate",void 0),a([i.i(r.Property)(null)],t.prototype,"dependency",void 0),a([i.i(r.Property)(null)],t.prototype,"progress",void 0),a([i.i(r.Property)(null)],t.prototype,"child",void 0),a([i.i(r.Property)(null)],t.prototype,"milestone",void 0),a([i.i(r.Property)(null)],t.prototype,"duration",void 0),a([i.i(r.Property)(null)],t.prototype,"durationUnit",void 0),a([i.i(r.Property)(null)],t.prototype,"cssClass",void 0),a([i.i(r.Property)(null)],t.prototype,"baselineStartDate",void 0),a([i.i(r.Property)(null)],t.prototype,"baselineEndDate",void 0),a([i.i(r.Property)(null)],t.prototype,"resourceInfo",void 0),a([i.i(r.Property)(null)],t.prototype,"expandState",void 0),a([i.i(r.Property)(null)],t.prototype,"indicators",void 0),a([i.i(r.Property)(null)],t.prototype,"notes",void 0),a([i.i(r.Property)(null)],t.prototype,"work",void 0),a([i.i(r.Property)(null)],t.prototype,"manual",void 0),a([i.i(r.Property)(null)],t.prototype,"type",void 0),a([i.i(r.Property)(null)],t.prototype,"segments",void 0),a([i.i(r.Property)(null)],t.prototype,"segmentId",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return o});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)("")],t.prototype,"format",void 0),a([i.i(r.Property)("None")],t.prototype,"unit",void 0),a([i.i(r.Property)(1)],t.prototype,"count",void 0),a([i.i(r.Property)(null)],t.prototype,"formatter",void 0),t}(r.ChildProperty),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)("Week")],t.prototype,"timelineViewMode",void 0),a([i.i(r.Complex)({},s)],t.prototype,"topTier",void 0),a([i.i(r.Complex)({},s)],t.prototype,"bottomTier",void 0),a([i.i(r.Property)(33)],t.prototype,"timelineUnitSize",void 0),a([i.i(r.Property)(0)],t.prototype,"weekStartDay",void 0),a([i.i(r.Property)(null)],t.prototype,"weekendBackground",void 0),a([i.i(r.Property)(!0)],t.prototype,"showTooltip",void 0),a([i.i(r.Property)(!0)],t.prototype,"updateTimescaleView",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),a=this&&this.__decorate||function(e,t,i,r){var n,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(s=(a<3?n(s):a>3?n(t,i,s):n(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([i.i(r.Property)(!0)],t.prototype,"showTooltip",void 0),a([i.i(r.Property)()],t.prototype,"taskbar",void 0),a([i.i(r.Property)()],t.prototype,"baseline",void 0),a([i.i(r.Property)()],t.prototype,"connectorLine",void 0),a([i.i(r.Property)()],t.prototype,"editing",void 0),t}(r.ChildProperty)},function(e,t,i){"use strict";i.d(t,"a",function(){return d});var r=i(0),n=(i.n(r),i(2)),a=i(4),s=(i.n(a),i(3)),o=i(10),l=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),d=function(e){function t(t){var i=e.call(this,t)||this;return i.taskBarHeight=0,i.milestoneHeight=0,i.milesStoneRadius=0,i.baselineTop=0,i.baselineHeight=8,i.touchLeftConnectorpoint="",i.touchRightConnectorpoint="",i.dropSplit=!1,i.refreshedTr=[],i.refreshedData=[],i.isUpdated=!0,i.parent=t,i.initPublicProp(),i.addEventListener(),i}return l(t,e),t.prototype.initPublicProp=function(){this.ganttChartTableBody=null},t.prototype.addEventListener=function(){this.parent.on("renderPanels",this.createChartTable,this),this.parent.on("dataReady",this.initiateTemplates,this),this.parent.on("destroy",this.destroy,this)},t.prototype.refreshChartByTimeline=function(){this.taskTable.style.width=i.i(r.formatUnit)(this.parent.timelineModule.totalTimelineWidth);var e=i.i(r.getValue)("prevProjectStartDate",this.parent.dataOperation),t=!1;e&&(t=e.getTime()===this.parent.cloneProjectStartDate.getTime()),this.isUpdated=!!(this.parent.isFromOnPropertyChange&&t&&i.i(r.getValue)("mutableData",this.parent.treeGrid.grid.contentModule)),this.refreshGanttRows(),this.isUpdated=!0},t.prototype.createChartTable=function(){this.taskTable=i.i(r.createElement)("table",{className:s._35+" "+s._36,id:"GanttTaskTable"+this.parent.element.id,styles:"z-index: 2;position: absolute;width:"+this.parent.timelineModule.totalTimelineWidth+"px;",attrs:{cellspacing:"0.25px"}});var e=i.i(r.createElement)("colgroup"),t=i.i(r.createElement)("col",{styles:"width:"+this.parent.timelineModule.totalTimelineWidth+"px;"});e.appendChild(t),this.taskTable.appendChild(e),this.ganttChartTableBody=i.i(r.createElement)("tbody",{id:this.parent.element.id+"GanttTaskTableBody"}),this.taskTable.appendChild(this.ganttChartTableBody),this.parent.ganttChartModule.chartBodyContent.appendChild(this.taskTable)},t.prototype.initiateTemplates=function(){this.taskTable.style.width=i.i(r.formatUnit)(this.parent.timelineModule.totalTimelineWidth),this.initChartHelperPrivateVariable(),this.initializeChartTemplate()},t.prototype.renderChartRows=function(){this.createTaskbarTemplate(),this.parent.isGanttChartRendered=!0},t.prototype.getIndicatorNode=function(e){var t='<label class="'+s._37+" "+s._38+'"style="line-height:'+this.parent.rowHeight+"px;left:"+this.getIndicatorleft(e.date)+'px;"><i class="'+e.iconClass+'"></i> </label>';return this.createDivElement(t)},t.prototype.getIndicatorleft=function(e){return e=this.parent.dateValidationModule.getDateFromFormat(e),this.parent.dataOperation.getTaskLeft(e,!1)},t.prototype.getChildTaskbarNode=function(e,t){var n=null,a=this.templateData;if(this.childTaskbarTemplateFunction)n=this.childTaskbarTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"TaskbarTemplate",this.getTemplateID("TaskbarTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var o="",l="",d=void 0,p=void 0;a.ganttProperties.startDate&&a.ganttProperties.endDate&&a.ganttProperties.duration&&(d=this.createDivElement('<div class="'+s.T+" "+s._7+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="width:'+a.ganttProperties.width+"px;height:"+this.taskBarHeight+'px;"></div>'),p=this.createDivElement('<div class="'+s._40+" "+s._6+" "+(a.ganttProperties.isAutoSchedule?"":s._41)+'" style="border-style:'+(a.ganttProperties.progressWidth?"solid;":"none;")+"width:"+a.ganttProperties.progressWidth+"px;height:100%;border-top-right-radius:"+this.getBorderRadius(a.ganttProperties)+"px;border-bottom-right-radius:"+this.getBorderRadius(a.ganttProperties)+'px;"></div>'));var h=i.i(r.createElement)("div");if(this.taskLabelTemplateFunction&&!i.i(r.isNullOrUndefined)(p)&&p.length>0){var u=this.taskLabelTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"TaskLabelTemplate",this.getTemplateID("TaskLabelTemplate"),!1,void 0,p[0]);u&&u.length>0&&(h.appendChild(u[0]),o=h.innerHTML)}else o=this.getTaskLabel(this.parent.labelSettings.taskLabel),o="isCustomTemplate"===o?this.parent.labelSettings.taskLabel:o;-1===o.indexOf("null")&&("isCustomTemplate"!==this.getTaskLabel(this.parent.labelSettings.taskLabel)||this.isTemplate(this.parent.labelSettings.taskLabel)||(o=""),l=isNaN(parseInt(o))?'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px; text-align: left;display:inline-block;width:"+(a.ganttProperties.width-10)+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>":'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px;"+("ResourceView"===this.parent.viewType?"text-align: left;":"")+ +("ResourceView"===this.parent.viewType?"display:inline-flex;":"")+ +("ResourceView"===this.parent.viewType?a.ganttProperties.width-10:"")+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>");var c=!i.i(r.isNullOrUndefined)(a.ganttProperties.segments)&&a.ganttProperties.segments.length>0?this.splitTaskbar(a,o):a.ganttProperties.startDate&&a.ganttProperties.endDate&&a.ganttProperties.duration?l:!a.ganttProperties.startDate||a.ganttProperties.endDate||a.ganttProperties.duration?!a.ganttProperties.endDate||a.ganttProperties.startDate||a.ganttProperties.duration?!a.ganttProperties.duration||a.ganttProperties.startDate||a.ganttProperties.endDate?"":'<div class="'+s._40+" "+s._7+" "+s._45+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="left:'+a.ganttProperties.left+"px; width:"+a.ganttProperties.width+"px; height:"+this.taskBarHeight+'px;"></div>':'<div class="'+s._40+" "+s._7+" "+s._44+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="left:'+a.ganttProperties.left+"px; height:"+this.taskBarHeight+'px;"></div>':'<div class="'+s._40+" "+s._7+" "+s._43+" "+(a.ganttProperties.isAutoSchedule?"":s._39)+'"style="left:'+a.ganttProperties.left+"px; height:"+this.taskBarHeight+'px;"></div>';if(a.ganttProperties.startDate&&a.ganttProperties.endDate&&a.ganttProperties.duration&&(i.i(r.isNullOrUndefined)(a.ganttProperties.segments)||!i.i(r.isNullOrUndefined)(a.ganttProperties.segments)&&0===a.ganttProperties.segments.length)){if(""!==c&&!i.i(r.isNullOrUndefined)(p)&&p.length>0){var g=this.createDivElement(c)[0],f=this.parent.labelSettings.taskLabel;f&&f.elementRef&&g.appendChild(h),p[0].appendChild(g),""!==p[0].querySelectorAll(".e-task-label")[0].textContent&&!this.isTemplate(f)&&p[0].querySelectorAll(".e-task-label")[0].children[0]&&p[0].querySelectorAll(".e-task-label")[0].children[0].remove(),""==p[0].querySelectorAll(".e-task-label")[0].textContent&&f&&!f.elementRef&&""!==h.innerHTML&&(p[0].querySelectorAll(".e-task-label")[0].textContent=f)}!i.i(r.isNullOrUndefined)(d)&&d.length>0&&d[0].appendChild([].slice.call(p)[0]),n=d}else n=this.createDivElement(c)}return n},t.prototype.splitTaskbar=function(e,t){for(var i="",r=0;r<e.ganttProperties.segments.length;r++){var n=e.ganttProperties.segments[r],a=void 0;a=n.showProgress?"initial":"hidden";var o=0===r?"e-segment-first":r===e.ganttProperties.segments.length-1?"e-segment-last":"e-segment-inprogress";i+='<div class="'+s.T+" "+o+" "+s._7+' e-segmented-taskbar"style="width:'+n.width+"px;position: absolute; left:"+n.left+"px;height:"+this.taskBarHeight+"px; overflow:"+a+';" data-segment-index = "'+r+'" aria-label = "'+this.generateSpiltTaskAriaLabel(n,e.ganttProperties)+'"> '+this.getSplitTaskbarLeftResizerNode()+'<div class="'+s._40+" "+s._6+' " style="border-style:'+(n.progressWidth?"solid;":"none;")+"display:"+(n.progressWidth>=0?"block;":"none;")+"width:"+n.progressWidth+"px;height:100%;border-top-right-radius:"+this.getSplitTaskBorderRadius(n)+"px;border-bottom-right-radius:"+this.getSplitTaskBorderRadius(n)+'px;"><span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px;display:"+(n.showProgress?"inline;":"none;")+"height:"+this.taskBarHeight+'px;">'+t+"</span></div>"+this.getSplitTaskbarRightResizerNode(n)+(n.showProgress?this.getSplitProgressResizerNode(n):"")+"</div></div>"}return i},t.prototype.getSplitTaskbarLeftResizerNode=function(){var e=-(this.parent.isAdaptive?12:2);return'<div class="'+s.U+" "+s._46+'" style="left:'+e+"px;height:"+this.taskBarHeight+'px;"></div>'},t.prototype.getSplitTaskbarRightResizerNode=function(e){var t=this.parent.isAdaptive?-2:-10;return'<div class="'+s.W+" "+s._46+'" style="left:'+(e.width+t)+"px;height:"+this.taskBarHeight+'px;"></div>'},t.prototype.getSplitProgressResizerNode=function(e){return'<div class="'+s.Y+'" style="left:'+(e.progressWidth-6)+"px;margin-top:"+(this.taskBarHeight-4)+'px;"><div class="'+s._47+'"><div class="'+s._48+'"></div><div class="'+s._49+'"></div></div>'},t.prototype.getSegmentIndex=function(e,t){var n=-1,a=t.ganttProperties,s=a.segments;if(!i.i(r.isNullOrUndefined)(s)){s.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()});for(var o=s.length,l=0;l<o;l++){var d=s[l];if(e.getTime()===a.startDate.getTime())this.dropSplit=!0,n=0;else if(e.getTime()===d.startDate.getTime()){this.dropSplit=!0;var p=d.startDate;p.setDate(p.getDate()+1),p=d.startDate=this.parent.dataOperation.checkStartDate(p,a,!1),d.startDate=p;var h=d.endDate;h=this.parent.dataOperation.getEndDate(p,d.duration,a.durationUnit,a,!1),d.endDate=h,l===s.length-1&&this.parent.setRecordValue("endDate",h,a,!0),this.incrementSegments(s,l,t),n=d.segmentIndex}else d.endDate=this.parent.dataOperation.getEndDate(d.startDate,d.duration,a.durationUnit,a,!1),e.getTime()>=d.startDate.getTime()&&e.getTime()<=d.endDate.getTime()&&(n=d.segmentIndex);this.parent.setRecordValue("segments",a.segments,a,!0)}}return-1===n&&(this.dropSplit=!0),n},t.prototype.mergeTask=function(e,t){var i=t.length,r=this.parent.taskFields,n=this.parent.flatData.filter(function(t){return t[r.id]===e?t:null})[0],a=n.ganttProperties.segments;t=t.sort(function(e,t){return t.firstSegmentIndex-e.firstSegmentIndex});for(var s=0;s<i;s++){var o=a[t[s].firstSegmentIndex],l=a[t[s].secondSegmentIndex],d=o.duration+l.duration,p=this.parent.dataOperation.getEndDate(o.startDate,d,n.ganttProperties.durationUnit,n.ganttProperties,!1),h={startDate:o.startDate,endDate:p,duration:d},u=t[s].firstSegmentIndex;a.splice(u,2,h),this.parent.setRecordValue("segments",a,n.ganttProperties,!0),this.parent.dataOperation.updateMappingData(n,"segments"),1===a.length?(this.parent.setRecordValue("endDate",p,n.ganttProperties,!0),this.parent.setRecordValue("EndDate",p,n,!0),this.parent.setRecordValue("segments",null,n.ganttProperties,!0),this.parent.dataOperation.updateMappingData(n,"segments")):n.ganttProperties.endDate!==a[a.length-1].endDate&&this.parent.setRecordValue("endDate",a[a.length-1].endDate,n.ganttProperties,!0)}this.refreshChartAfterSegment(n,"mergeSegment")},t.prototype.refreshChartAfterSegment=function(e,t){this.parent.setRecordValue("segments",this.parent.dataOperation.setSegmentsInfo(e,!1),e.ganttProperties,!0),this.parent.dataOperation.updateMappingData(e,"segments"),this.parent.dataOperation.updateWidthLeft(e),this.parent.predecessorModule&&this.parent.taskFields.dependency?(this.parent.predecessorModule.updatedRecordsDateByPredecessor(),this.parent.connectorLineModule.removePreviousConnectorLines(this.parent.flatData),this.parent.connectorLineEditModule.refreshEditedRecordConnectorLine(this.parent.flatData),e.parentItem&&this.parent.getParentTask(e.parentItem).ganttProperties.isAutoSchedule&&this.parent.isInPredecessorValidation&&this.parent.dataOperation.updateParentItems(e.parentItem),this.refreshRecords(this.parent.currentViewData)):this.refreshRow(this.parent.currentViewData.indexOf(e));var n=this.ganttChartTableBody.querySelectorAll("tr")[this.parent.currentViewData.indexOf(e)],a={requestType:t,rowData:e};this.triggerQueryTaskbarInfoByIndex(n,e),this.parent.selectionModule.clearSelection();var s=a.rowData.taskData[this.parent.taskFields.segments];if(this.parent.timezone&&null!=s)for(var o=0;o<s.length;o++)s[o][this.parent.taskFields.startDate]=this.parent.dateValidationModule.remove(a.rowData.ganttProperties.segments[o].startDate,this.parent.timezone),this.parent.taskFields.endDate&&(s[o][this.parent.taskFields.endDate]=this.parent.dateValidationModule.remove(a.rowData.ganttProperties.segments[o].endDate,this.parent.timezone));this.parent.trigger("actionComplete",a),i.i(r.setValue)("isEdit",!1,this.parent.contextMenuModule),i.i(r.setValue)("isEdit",!1,this.parent)},t.prototype.splitTask=function(e,t){var n=this.parent.taskFields,a=t,s=this.parent.flatData.filter(function(t){return t[n.id]===e?t:null})[0],o=s.ganttProperties;this.dropSplit=!1;var l=-1,d=o.segments;if(i.i(r.isNullOrUndefined)(t.length)||t.length<0){var p=this.parent.dataOperation.checkStartDate(a,o,!1);if(p.getTime()!==o.startDate.getTime()&&o.isAutoSchedule){if(i.i(r.isNullOrUndefined)(d)||(l=this.getSegmentIndex(p,s)),!1===this.dropSplit&&a.getTime()>o.startDate.getTime()&&a.getTime()<o.endDate.getTime()){d=-1!==l?d:[];var h=-1!==l?d[l].startDate:new Date(o.startDate.getTime()),u=-1!==l?d[l].endDate:new Date(o.endDate.getTime()),c=this.parent.dataOperation.getDuration(h,u,o.durationUnit,o.isAutoSchedule,o.isMilestone);this.parent.setRecordValue("segments",this.splitSegmentedTaskbar(h,u,a,l,d,s,c),o,!0),-1!==l&&this.incrementSegments(d,l+1,s),this.parent.setRecordValue("endDate",d[d.length-1].endDate,o,!0),this.parent.taskFields.endDate&&this.parent.dataOperation.updateMappingData(s,"endDate")}this.refreshChartAfterSegment(s,"splitTaskbar")}}else t.sort(function(e,t){return e.getTime()-t.getTime()}),this.parent.setRecordValue("segments",this.constructSegments(t,s.ganttProperties),s.ganttProperties,!0),this.refreshChartAfterSegment(s,"splitTask")},t.prototype.constructSegments=function(e,t){for(var i,r,n,a=[],s=new Date,o=0;o<e.length+1&&(s=0===o?t.startDate:s,s=this.parent.dataOperation.checkStartDate(s,t,!1),r=o!==e.length?new Date(e[o].getTime())>t.endDate?t.endDate:new Date(e[o].getTime()):t.endDate,r=this.parent.dataOperation.checkEndDate(r,t,!1),n=this.parent.dataOperation.getDuration(s,r,t.durationUnit,t.isAutoSchedule,t.isMilestone),r.getTime()>=s.getTime()&&(i={startDate:s,endDate:r,duration:n},a.push(i)),o!==e.length);o++)s=new Date(e[o].getTime()),s.setDate(e[o].getDate()+1);return a},t.prototype.splitSegmentedTaskbar=function(e,t,i,r,n,a,s){var o=a.ganttProperties,l=this.parent.nonWorkingDayIndex.indexOf(i.getDay()),d=-1===l?0:0===l?1:2;e=this.parent.dataOperation.checkStartDate(e,o,!1);var p=new Date(i.getTime());p=this.parent.dataOperation.checkEndDate(p,o,!1);for(var h=0;h<2;h++){var u={startDate:e,endDate:p,duration:this.parent.dataOperation.getDuration(e,p,o.durationUnit,o.isAutoSchedule,o.isMilestone),offsetDuration:1},c=this.parent.nonWorkingDayIndex.indexOf(p.getDay());-1!==r&&(n.splice(r,1),r=-1),n.push(u);var g=this.parent.timelineModule.customTimelineSettings.bottomTier.unit;if("Hour"===g||"Minutes"===g){e=new Date(i.getTime()),e=this.parent.dataOperation.checkStartDate(e,o,!1);var f=this.parent.timelineModule.customTimelineSettings.bottomTier.count,m=this.parent.timelineModule.customTimelineSettings.bottomTier.unit,y=this.parent.timelineModule.getIncrement(e,f,m),v=e.getTime()+y;e.setTime(v+d),p=new Date(t.getTime()),y=this.parent.timelineModule.getIncrement(p,f,m),v=p.getTime()+y,p.setTime(v+d)}else e=new Date(i.getTime()),e.setDate(e.getDate()+1+d),this.setTime(this.parent.defaultStartTime,e),e=this.parent.dataOperation.checkStartDate(e,o,!1),p=new Date(t.getTime()),p.setDate(p.getDate()+1);if(-1!==c){var D=s-u.duration;p=this.parent.dataOperation.getEndDate(e,D,o.durationUnit,o,!1)}else p=this.parent.dataOperation.checkEndDate(p,o,!1)}return n.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()}),n},t.prototype.incrementSegments=function(e,t,i){for(var r=i.ganttProperties,n=t+1;n<e.length;n++){var a=e[n],s=0!==n?new Date(e[n-1].endDate.getTime()):new Date(a.startDate.getTime());s=this.parent.dataOperation.getEndDate(s,a.offsetDuration,r.durationUnit,r,!1),s=this.parent.dataOperation.checkStartDate(s,r,!1),a.startDate=s;var o=a.endDate=this.parent.dataOperation.getEndDate(s,a.duration,r.durationUnit,r,!1);a.endDate=o,n===e.length-1&&(this.parent.setRecordValue("endDate",o,r,!0),this.parent.taskFields.endDate&&this.parent.dataOperation.updateMappingData(i,"endDate"))}e.sort(function(e,t){return e.startDate.getTime()-t.startDate.getTime()}),this.parent.setRecordValue("segments",e,r,!0),this.parent.dataOperation.updateMappingData(i,"segments")},t.prototype.getMilestoneNode=function(e,t){var n=null,a=this.templateData;if(this.milestoneTemplateFunction)n=this.milestoneTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"MilestoneTemplate",this.getTemplateID("MilestoneTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var o='<div class="'+s._50+'" style="position:absolute;"><div class="'+s._51+" "+(a.ganttProperties.startDate||a.ganttProperties.endDate?"":s._52)+'" style="border-right-width:'+this.milesStoneRadius+"px;border-left-width:"+this.milesStoneRadius+"px;border-bottom-width:"+this.milesStoneRadius+'px;"></div><div class="'+s._53+" "+(a.ganttProperties.startDate||a.ganttProperties.endDate?"":s._54)+'" style="top:'+this.milesStoneRadius+"px;border-right-width:"+this.milesStoneRadius+"px; border-left-width:"+this.milesStoneRadius+"px; border-top-width:"+this.milesStoneRadius+'px;"></div></div>';n=this.createDivElement(o)}return n},t.prototype.getTaskBaselineNode=function(){var e=this.templateData,t='<div class="'+s._55+' " role="term" style="margin-top:'+this.baselineTop+"px;left:"+e.ganttProperties.baselineLeft+"px;width:"+e.ganttProperties.baselineWidth+"px;height:"+this.baselineHeight+"px;"+(this.baselineColor?"background-color: "+this.baselineColor+";":"")+'"></div>';return this.createDivElement(t)},t.prototype.getMilestoneBaselineNode=function(){var e=this.templateData,t=this.parent.renderBaseline?5:2,i='<div class="'+s._56+' " style="left:'+(e.ganttProperties.baselineLeft-this.milesStoneRadius)+"px;margin-top:"+(-Math.floor(this.parent.rowHeight-this.milestoneMarginTop)+t)+'px"><div class="'+s._57+'"><div class="'+s._57+" "+s._58+'" style="top:'+-this.milestoneHeight+"px;border-right:"+this.milesStoneRadius+"px solid transparent;border-left:"+this.milesStoneRadius+"px solid transparent;border-top:0pxsolid transparent;border-bottom-width:"+this.milesStoneRadius+"px;border-bottom-style: solid;"+(this.baselineColor?"border-bottom-color: "+this.baselineColor+";":"")+'"></div><div class="'+s._57+" "+s._59+'" style="top:'+(this.milesStoneRadius-this.milestoneHeight)+"px;border-right:"+this.milesStoneRadius+"px solid transparent;border-left:"+this.milesStoneRadius+"px solid transparent;border-bottom:0pxsolid transparent;border-top-width:"+this.milesStoneRadius+"px;border-top-style: solid;"+(this.baselineColor?"border-top-color: "+this.baselineColor+";":"")+'"></div></div></div>';return this.createDivElement(i)},t.prototype.getLeftLabelNode=function(e){var t=this.leftLabelContainer();""!==this.generateTaskLabelAriaLabel("left")&&t[0].setAttribute("aria-label",this.generateTaskLabelAriaLabel("left"));var n=null;if(this.leftTaskLabelTemplateFunction)n=this.leftTaskLabelTemplateFunction(i.i(r.extend)({index:e},this.templateData),this.parent,"LeftLabelTemplate",this.getTemplateID("LeftLabelTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var a=this.parent.labelSettings.leftLabel,o=this.getTaskLabel(a);o&&(o="isCustomTemplate"===o?a:o,n=this.getLableText(o,s._60))}return n&&n.length>0&&("null"===n[0].data&&(n[0].data=""),t[0].appendChild([].slice.call(n)[0])),t},t.prototype.getLableText=function(e,t){var n=this.parent.renderBaseline?(this.parent.rowHeight-this.taskBarHeight)/2:this.taskBarMarginTop,a=i.i(r.createElement)("div",{className:t,styles:"height:"+this.taskBarHeight+"px;margin-top:"+n+"px;"}),o=i.i(r.createElement)("span",{className:s._37});o[this.parent.disableHtmlEncode?"textContent":"innerHTML"]=e,a.appendChild(o);var l=i.i(r.createElement)("div");return l.appendChild(a),l.childNodes},t.prototype.getRightLabelNode=function(e){var t=this.rightLabelContainer();""!==this.generateTaskLabelAriaLabel("right")&&t[0].setAttribute("aria-label",this.generateTaskLabelAriaLabel("right"));var n=null;if(this.rightTaskLabelTemplateFunction)n=this.rightTaskLabelTemplateFunction(i.i(r.extend)({index:e},this.templateData),this.parent,"RightLabelTemplate",this.getTemplateID("RightLabelTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var a=this.parent.labelSettings.rightLabel,o=this.getTaskLabel(a);o&&(o="isCustomTemplate"===o?a:o,n=this.getLableText(o,s._61))}return n&&n.length>0&&("null"===n[0].data&&(n[0].data=""),t[0].appendChild([].slice.call(n)[0])),t},t.prototype.getManualTaskbar=function(){var e=this.templateData,t=this.taskBarHeight/2-1,i=e.ganttProperties.startDate&&e.ganttProperties.endDate&&e.ganttProperties.duration?'<div class="'+s.P+'" style="width:'+e.ganttProperties.width+"px;height:"+t/5+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div>':e.ganttProperties.startDate||e.ganttProperties.endDate||!e.ganttProperties.duration?'<div class="'+s.P+" "+(e.ganttProperties.startDate?s._43:s._44)+'" style="width:'+e.ganttProperties.width+"px;height:"+2*t+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div>':'<div class="'+s.P+" "+s._62+'" style="width:'+e.ganttProperties.width+"px;height:"+(t/5+1)+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div>',r='<div class="'+s.O+'"style=left:'+(e.ganttProperties.left-e.ganttProperties.autoLeft)+"px;width:"+e.ganttProperties.width+"px;height:"+t+"px;>"+i+(e.ganttProperties.startDate&&e.ganttProperties.endDate&&e.ganttProperties.duration||e.ganttProperties.duration?'<div class="e-gantt-manualparenttaskbar-left" style="height:'+t+"px;border-left-width:"+t/5+"px; border-bottom:"+t/5+'px solid transparent;"></div><div class="e-gantt-manualparenttaskbar-right" style=left:'+(e.ganttProperties.width-t/5)+"px;height:"+t+"px;border-right-width:"+t/5+"px;border-bottom:"+t/5+"px solid transparent;></div></div>":""),n='<div class="'+s.S+'" style="position:absolute;left:'+(e.ganttProperties.left-e.ganttProperties.autoLeft-this.milestoneHeight/2)+"px;width:"+2*this.milesStoneRadius+'px;"><div class="'+s.Q+'" style="border-right-width:'+this.milesStoneRadius+"px;border-left-width:"+this.milesStoneRadius+"px;border-bottom-width:"+this.milesStoneRadius+'px;"></div><div class="'+s.R+'" style="top:'+this.milesStoneRadius+"px;border-right-width:"+this.milesStoneRadius+"px; border-left-width:"+this.milesStoneRadius+"px; border-top-width:"+this.milesStoneRadius+'px;"></div></div>';return this.createDivElement(0===e.ganttProperties.width?n:r)},t.prototype.getParentTaskbarNode=function(e,t){var n=null,a=this.templateData;if(this.parentTaskbarTemplateFunction)n=this.parentTaskbarTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"ParentTaskbarTemplate",this.getTemplateID("ParentTaskbarTemplate"),!1,void 0,t[0],this.parent.treeGrid.root);else{var o="",l=void 0,d=this.taskBarHeight/5,p=this.createDivElement('<div class="'+s._63+" "+this.getExpandClass(a)+" "+s._8+'" style="width:'+(a.ganttProperties.isAutoSchedule?a.ganttProperties.width:a.ganttProperties.autoWidth)+"px;height:"+(a.ganttProperties.isAutoSchedule?this.taskBarHeight:3*d)+"px;margin-top:"+(a.ganttProperties.isAutoSchedule?"":2*d)+'px;"></div>'),h=this.createDivElement('<div class="'+s._64+" "+this.getExpandClass(a)+" "+s._9+'" style="border-style:'+(a.ganttProperties.progressWidth?"solid;":"none;")+"width:"+a.ganttProperties.progressWidth+"px;border-top-right-radius:"+this.getBorderRadius(a)+"px;border-bottom-right-radius:"+this.getBorderRadius(a)+'px;height:100%;"></div>'),u=i.i(r.createElement)("div");if(this.taskLabelTemplateFunction){var c=this.taskLabelTemplateFunction(i.i(r.extend)({index:e},a),this.parent,"TaskLabelTemplate",this.getTemplateID("TaskLabelTemplate"),!1,void 0,h[0]);c&&c.length>0&&(u.appendChild(c[0]),o=u.innerHTML)}else o=this.getTaskLabel(this.parent.labelSettings.taskLabel),o="isCustomTemplate"===o?this.parent.labelSettings.taskLabel:o;if(-1===o.indexOf("null")){"isCustomTemplate"!==this.getTaskLabel(this.parent.labelSettings.taskLabel)||this.isTemplate(this.parent.labelSettings.taskLabel)||(o=""),l=isNaN(parseInt(o))?'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px; text-align: left;display:inline-block;width:"+(a.ganttProperties.width-10)+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>":'<span class="'+s._42+'" style="line-height:'+(this.taskBarHeight-1)+"px;"+("ResourceView"===this.parent.viewType?"display:inline-flex;":"")+("ResourceView"===this.parent.viewType?"width:"+(a.ganttProperties.width-10):"")+"px; height:"+(this.taskBarHeight-1)+"px;"+("ResourceView"===this.parent.viewType?"display: inline-flex;":"")+("ResourceView"===this.parent.viewType?"width:"+(a.ganttProperties.width-10):"")+"px; height:"+this.taskBarHeight+'px;">'+o+"</span>";var g=this.createDivElement(l)[0],f=this.parent.labelSettings.taskLabel;f&&f.elementRef&&g.appendChild(u),h[0].appendChild(g),""!==h[0].querySelectorAll(".e-task-label")[0].textContent&&!this.isTemplate(f)&&h[0].querySelectorAll(".e-task-label")[0].children[0]&&h[0].querySelectorAll(".e-task-label")[0].children[0].remove(),""==h[0].querySelectorAll(".e-task-label")[0].textContent&&f&&!f.elementRef&&""!==u.innerHTML&&(h[0].querySelectorAll(".e-task-label")[0].textContent=f)}var m='<div class="'+s._65+'" style="position:absolute;"><div class="'+s._66+'" style="border-right-width:'+this.milesStoneRadius+"px;border-left-width:"+this.milesStoneRadius+"px;border-bottom-width:"+this.milesStoneRadius+'px;"></div><div class="'+s._67+'" style="top:'+this.milesStoneRadius+"px;border-right-width:"+this.milesStoneRadius+"px; border-left-width:"+this.milesStoneRadius+"px; border-top-width:"+this.milesStoneRadius+'px;"></div></div>';p[0].appendChild([].slice.call(h)[0]),n=a.ganttProperties.isMilestone?this.createDivElement(a.ganttProperties.isAutoSchedule?m:""):p}return n},t.prototype.getTableTrNode=function(){var e=i.i(r.createElement)("table"),t="Horizontal"===this.parent.gridLines||"Both"===this.parent.gridLines?"e-chart-row-border":"";return e.innerHTML='<tr class="'+this.getRowClassName(this.templateData)+" "+s._3+'"style="display:'+this.getExpandDisplayProp(this.templateData)+";height:"+this.parent.rowHeight+'px;"><td class="'+s._30+" "+t+'"style="width:'+this.parent.timelineModule.totalTimelineWidth+'px;"></td></tr>',e.childNodes},t.prototype.initializeChartTemplate=function(){i.i(r.isNullOrUndefined)(this.parent.parentTaskbarTemplate)||(this.parentTaskbarTemplateFunction=this.templateCompiler(this.parent.parentTaskbarTemplate)),!i.i(r.isNullOrUndefined)(this.parent.labelSettings.leftLabel)&&this.isTemplate(this.parent.labelSettings.leftLabel)&&(this.leftTaskLabelTemplateFunction=this.templateCompiler(this.parent.labelSettings.leftLabel)),!i.i(r.isNullOrUndefined)(this.parent.labelSettings.rightLabel)&&this.isTemplate(this.parent.labelSettings.rightLabel)&&(this.rightTaskLabelTemplateFunction=this.templateCompiler(this.parent.labelSettings.rightLabel)),!i.i(r.isNullOrUndefined)(this.parent.labelSettings.taskLabel)&&this.isTemplate(this.parent.labelSettings.taskLabel)&&(this.taskLabelTemplateFunction=this.templateCompiler(this.parent.labelSettings.taskLabel)),i.i(r.isNullOrUndefined)(this.parent.taskbarTemplate)||(this.childTaskbarTemplateFunction=this.templateCompiler(this.parent.taskbarTemplate)),i.i(r.isNullOrUndefined)(this.parent.milestoneTemplate)||(this.milestoneTemplateFunction=this.templateCompiler(this.parent.milestoneTemplate))},t.prototype.createDivElement=function(e){var t=i.i(r.createElement)("div");return t.innerHTML=e,t.childNodes},t.prototype.isTemplate=function(e){for(var t=!1,i=0;i<this.parent.ganttColumns.length;i++)if(e===this.parent.ganttColumns[i].field){t=!0;break}return t="string"!=typeof e||0===e.indexOf("#")||e.indexOf("<")>-1||e.indexOf("$")>-1||!t},t.prototype.getTemplateID=function(e){return this.parent.element.id+e},t.prototype.leftLabelContainer=function(){var e='<div class="'+(this.leftTaskLabelTemplateFunction?s._68:s._4)+' " tabindex="-1" role="term" style="height:'+(this.parent.rowHeight-2)+"px;width:"+this.taskNameWidth(this.templateData)+'"></div>';return this.createDivElement(e)},t.prototype.taskbarContainer=function(){var e=this.templateData,t=!(!this.parent.editModule||!this.parent.editSettings.allowTaskbarEditing||"ParentResizing"!==this.parent.editModule.taskbarEditModule.taskBarEditAction),i='<div class="'+s.F+" "+this.parent.getUnscheduledTaskClass(e.ganttProperties)+" "+(e.ganttProperties.cssClass?e.ganttProperties.cssClass:"")+'" tabindex="-1" role="term" style="'+(e.ganttProperties.isMilestone&&!t?"width:"+this.milestoneHeight+"px;height:"+this.milestoneHeight+"px;margin-top:"+this.milestoneMarginTop+"px;left:"+(e.ganttProperties.left-this.milestoneHeight/2)+"px;":"width:"+e.ganttProperties.width+"px;margin-top:"+this.taskBarMarginTop+"px;left:"+(!e.hasChildRecords||e.ganttProperties.isAutoSchedule?e.ganttProperties.left:e.ganttProperties.autoLeft)+"px;height:"+this.taskBarHeight+"px;cursor:"+(e.ganttProperties.isAutoSchedule?"move;":"auto;"))+'"></div>';return this.createDivElement(i)},t.prototype.rightLabelContainer=function(){var e='<div class="'+(this.rightTaskLabelTemplateFunction?s._69:s._5)+'" tabindex="-1" role="term" style="left:'+this.getRightLabelLeft(this.templateData)+"px; height:"+(this.parent.rowHeight-2)+'px;"></div>';return this.createDivElement(e)},t.prototype.childTaskbarLeftResizer=function(){var e=-(this.parent.isAdaptive?12:2),t='<div class="'+s.U+" "+s._46+'"style="left:'+e+"px;height:"+this.taskBarHeight+'px;"></div>';return this.createDivElement(t)},t.prototype.childTaskbarRightResizer=function(){var e=this.parent.isAdaptive?-2:-10,t='<div class="'+s.W+" "+s._46+'"style="left:'+(this.templateData.ganttProperties.width+e)+"px;height:"+this.taskBarHeight+'px;"></div>';return this.createDivElement(t)},t.prototype.childTaskbarProgressResizer=function(){var e='<div class="'+s.Y+'"style="left:'+(this.templateData.ganttProperties.progressWidth-6)+"px;margin-top:"+(this.taskBarHeight-4)+'px;"><div class="'+s._47+'"><div class="'+s._48+'"></div><div class="'+s._49+'"></div></div>';return this.createDivElement(e)},t.prototype.getLeftPointNode=function(){var e,t=this.templateData,i=-((this.parent.isAdaptive?14:2)+this.connectorPointWidth),r=-(this.connectorPointWidth+2),n=Math.floor(this.milesStoneRadius-this.connectorPointWidth/2);e=!this.templateData.ganttProperties.isAutoSchedule&&this.templateData.hasChildRecords?"":"margin-top:"+this.connectorPointMargin+"px";var a='<div class="'+s._70+'" style="'+(t.ganttProperties.isMilestone?"margin-top:"+n+"px;left:"+r+"px;":e+";left:"+i+"px;")+'"><div class="'+s.G+" "+this.parent.getUnscheduledTaskClass(t.ganttProperties)+'" style="width: '+this.connectorPointWidth+"px;height: "+this.connectorPointWidth+'px;">'+this.touchLeftConnectorpoint+"</div></div>";return this.createDivElement(a)},t.prototype.getRightPointNode=function(){var e,t=this.templateData,i=this.parent.isAdaptive?10:-2,r=Math.floor(this.milesStoneRadius-this.connectorPointWidth/2);e=!this.templateData.ganttProperties.isAutoSchedule&&this.templateData.hasChildRecords?"":"margin-top:"+this.connectorPointMargin+"px";var n='<div class="'+s._10+'" style="'+(t.ganttProperties.isMilestone?"left:"+(this.milestoneHeight-2)+"px;margin-top:"+r+"px;":"left:"+(t.ganttProperties.width+i)+"px;"+e+";")+'"><div class="'+s.H+" "+this.parent.getUnscheduledTaskClass(t.ganttProperties)+'" style="width:'+this.connectorPointWidth+"px;height:"+this.connectorPointWidth+'px;">'+this.touchRightConnectorpoint+"</div></div>";return this.createDivElement(n)},t.prototype.getTaskLabel=function(e){var t=this.parent.ganttColumns.length,n=null;if(i.i(r.isNullOrUndefined)(e)||""===e)n="";else if(e===this.parent.taskFields.resourceInfo)n=this.getResourceName(this.templateData);else{for(var a=0;a<t;a++)if(e===this.parent.ganttColumns[a].field){n=this.getFieldValue(this.templateData[e]).toString();break}if(i.i(r.isNullOrUndefined)(n))return"isCustomTemplate"}return n},t.prototype.getExpandDisplayProp=function(e){return e=this.templateData,this.parent.getExpandStatus(e)?"table-row":"none"},t.prototype.getRowClassName=function(e){e=this.templateData;var t="gridrowtaskId",i=e.parentItem;return i&&(t+=i.taskId.toString()),t+="level",t+=e.level.toString()},t.prototype.getBorderRadius=function(e){e=this.templateData;var t=e.ganttProperties.width-e.ganttProperties.progressWidth;return t<=4?4-t:0},t.prototype.getSplitTaskBorderRadius=function(e){var t=e.width-e.progressWidth;return t<=4?4-t:0},t.prototype.taskNameWidth=function(e){e=this.templateData;var t,i=e.ganttProperties;return t=e.ganttProperties.isMilestone?e.ganttProperties.left-this.parent.getTaskbarHeight()/2:e.hasChildRecords&&!i.isAutoSchedule?this.parent.allowUnscheduledTasks?i.left<i.autoLeft?i.left:i.autoLeft:i.autoStartDate.getTime()<i.startDate.getTime()?i.autoLeft:i.left:e.ganttProperties.left,t<0&&(t=0),t+"px"},t.prototype.getRightLabelLeft=function(e){e=this.templateData;var t,i,r,n=e.ganttProperties;return e.ganttProperties.isMilestone?e.ganttProperties.left+this.parent.getTaskbarHeight()/2:e.hasChildRecords&&!n.isAutoSchedule?(this.parent.allowUnscheduledTasks?(t=n.left<n.autoLeft?n.left:n.autoLeft,r=n.autoWidth):(t=n.autoStartDate.getTime()<n.startDate.getTime()?n.autoLeft:n.left,i=n.autoEndDate.getTime()<n.endDate.getTime()?this.parent.dataOperation.getTaskLeft(n.endDate,n.isMilestone):this.parent.dataOperation.getTaskLeft(n.autoEndDate,n.isMilestone),r=i-t),t+r):e.ganttProperties.left+e.ganttProperties.width},t.prototype.getExpandClass=function(e){return e=this.templateData,e.expanded?s._71:!e.expanded&&e.hasChildRecords?s._72:""},t.prototype.getFieldValue=function(e){return i.i(r.isNullOrUndefined)(e)?"":e},t.prototype.getResourceName=function(e){e=this.templateData;var t=null;if(!i.i(r.isNullOrUndefined)(e.ganttProperties.resourceInfo)){var n=e.ganttProperties.resourceInfo.length;if(n>0){for(var a=0;a<n;a++){var s=e.ganttProperties.resourceInfo[a][this.parent.resourceFields.name],o=e.ganttProperties.resourceInfo[a][this.parent.resourceFields.unit];100!==o&&(s+="["+o+"%]"),i.i(r.isNullOrUndefined)(t)?t=s:t+=" , "+s}return t}return""}return""},t.prototype.initChartHelperPrivateVariable=function(){var e=this.parent.renderBaseline?.45:.62,t=this.parent.renderBaseline?4:2,n=this.parent.renderBaseline?1.13:.82;if(this.baselineColor=i.i(r.isNullOrUndefined)(this.parent.baselineColor)||""===this.parent.baselineColor?null:this.parent.baselineColor,this.taskBarHeight=i.i(r.isNullOrUndefined)(this.parent.taskbarHeight)||this.parent.taskbarHeight>=this.parent.rowHeight?Math.floor(this.parent.rowHeight*e):this.parent.taskbarHeight,this.parent.renderBaseline){var a=void 0;a=this.taskBarHeight+this.baselineHeight<=this.parent.rowHeight?this.taskBarHeight:this.taskBarHeight-(this.baselineHeight+1),this.taskBarHeight=a}this.milestoneHeight=Math.floor(this.taskBarHeight*n),this.taskBarMarginTop=Math.floor((this.parent.rowHeight-this.taskBarHeight)/t),this.milestoneMarginTop=Math.floor((this.parent.rowHeight-this.milestoneHeight)/2),this.milesStoneRadius=Math.floor(this.milestoneHeight/2),this.baselineTop=-(Math.floor(this.parent.rowHeight-(this.taskBarHeight+this.taskBarMarginTop))-4),this.connectorPointWidth=this.parent.isAdaptive?Math.round(this.taskBarHeight/2):8,this.connectorPointMargin=Math.floor(this.taskBarHeight/2-this.connectorPointWidth/2)},t.prototype.refreshGanttRows=function(){if(this.parent.currentViewData=this.parent.treeGrid.getCurrentViewRecords().slice(),this.createTaskbarTemplate(),"ResourceView"===this.parent.viewType&&this.parent.showOverAllocation){for(var e=0;e<this.parent.currentViewData.length;e++){var t=this.parent.currentViewData[e];t.childRecords.length>0&&(this.parent.setRecordValue("workTimelineRanges",this.parent.dataOperation.mergeRangeCollections(t.ganttProperties.workTimelineRanges,!0),t.ganttProperties,!0),this.parent.dataOperation.calculateRangeLeftWidth(t.ganttProperties.workTimelineRanges))}this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData)}},t.prototype.createTaskbarTemplate=function(){var e=[].slice.call(this.ganttChartTableBody.querySelectorAll("tr"));this.ganttChartTableBody.innerHTML="";var t=[],n=this.parent.treeGridModule.prevCurrentView;if(this.refreshedTr=[],this.refreshedData=[],this.parent.enableImmutableMode&&n&&n.length>0&&this.isUpdated){for(var a={},s=[],o=this.parent.treeGrid.getPrimaryKeyFieldNames()[0],l=0;l<n.length;l++)s[l]=e[l],a[n[l][o]]=l;for(var d=0;d<this.parent.currentViewData.length;d++){var p=a[this.parent.currentViewData[d][o]],h=this.parent.modifiedRecords.indexOf(this.parent.currentViewData[d]);if(i.i(r.isNullOrUndefined)(p)||-1!==h){var u=this.getGanttChartRow(d,this.parent.currentViewData[d]);this.ganttChartTableBody.appendChild(u),this.refreshedTr.push(this.ganttChartTableBody.querySelectorAll("tr")[d]),this.refreshedData.push(this.parent.currentViewData[d])}else this.ganttChartTableBody.appendChild(s[p]);this.ganttChartTableBody.querySelectorAll("tr")[d].setAttribute("aria-rowindex",d.toString())}}else for(var l=0;l<this.parent.currentViewData.length;l++){var c=this.parent.currentViewData[l];"ResourceView"===this.parent.viewType&&!c.expanded&&this.parent.enableMultiTaskbar&&t.push(c);var u=this.getGanttChartRow(l,c);this.ganttChartTableBody.appendChild(u),this.parent.enableImmutableMode&&(this.refreshedTr.push(this.ganttChartTableBody.querySelectorAll("tr")[l]),this.refreshedData.push(this.parent.currentViewData[l])),this.parent.selectionModule&&this.parent.allowSelection&&this.parent.selectionModule.maintainSelectedRecords(parseInt(u.getAttribute("aria-rowindex"),10))}if(this.parent.renderTemplates(),this.triggerQueryTaskbarInfo(),this.parent.modifiedRecords=[],t.length)for(var g=0;g<t.length;g++)t[g].hasChildRecords&&(this.parent.isGanttChartRendered=!0,this.parent.chartRowsModule.refreshRecords([t[g]]));this.parent.renderTemplates()},t.prototype.getGanttChartRow=function(e,t){this.templateData=t;var a=null,s=this.getTableTrNode(),o=this.getLeftLabelNode(e),l=this.taskbarContainer();l[0].setAttribute("aria-label",this.generateAriaLabel(this.templateData)),l[0].setAttribute("rowUniqueId",this.templateData.ganttProperties.rowUniqueID);var d=this.getLeftPointNode();if((this.templateData.ganttProperties.isAutoSchedule&&"ProjectView"==this.parent.viewType||!this.templateData.hasChildRecords)&&l[0].appendChild([].slice.call(d)[0]),this.templateData.hasChildRecords){var p=this.getParentTaskbarNode(e,l);if(!this.templateData.ganttProperties.isAutoSchedule){var h=this.getManualTaskbar();h[0].appendChild([].slice.call(d)[0]);var u=this.getRightPointNode();h[0].appendChild([].slice.call(u)[0]),l[0].appendChild([].slice.call(h)[0])}p&&p.length>0&&l[0].appendChild([].slice.call(p)[0]),this.parent.renderBaseline&&this.templateData.ganttProperties.baselineStartDate&&this.templateData.ganttProperties.baselineEndDate&&(a=i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineStartDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.startDate)||this.templateData.ganttProperties.baselineStartDate.getTime()!==this.templateData.ganttProperties.startDate.getTime()||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineEndDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.endDate)||this.templateData.ganttProperties.baselineEndDate.toLocaleDateString()!==this.templateData.ganttProperties.endDate.toLocaleDateString()||!this.templateData.ganttProperties.isMilestone?this.getTaskBaselineNode():this.getMilestoneBaselineNode())}else if(this.templateData.ganttProperties.isMilestone){var c=this.getMilestoneNode(e,l);c&&c.length>0&&l[0].appendChild([].slice.call(c)[0]),this.parent.renderBaseline&&this.templateData.ganttProperties.baselineStartDate&&this.templateData.ganttProperties.baselineEndDate&&(a=i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineStartDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.startDate)||this.templateData.ganttProperties.baselineStartDate.getTime()!==this.templateData.ganttProperties.startDate.getTime()||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineEndDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.endDate)||this.templateData.ganttProperties.baselineEndDate.toLocaleDateString()!==this.templateData.ganttProperties.endDate.toLocaleDateString()||!this.templateData.ganttProperties.isMilestone?this.getTaskBaselineNode():this.getMilestoneBaselineNode())}else{var g=i.i(n.c)(this.templateData.ganttProperties),f=null,m=null,y=null;if(!i.i(r.isNullOrUndefined)(g)){(g||this.templateData.ganttProperties.duration)&&g&&(i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.segments)||this.templateData.ganttProperties.segments.length<=0)&&(f=this.childTaskbarProgressResizer(),y=this.childTaskbarLeftResizer(),m=this.childTaskbarRightResizer());var v=this.getChildTaskbarNode(e,l);if(y&&l[0].appendChild([].slice.call(y)[0]),v&&v.length>0)if(this.templateData.ganttProperties.segments&&this.templateData.ganttProperties.segments.length>0){var D=this.templateData.ganttProperties.segments.length,w=null;w=this.createDivElement('<div class="e-gantt-split-container-line"></div>'),l[0].appendChild([].slice.call(w)[0]);for(var k=0;k<D;k++)l[0].appendChild([].slice.call(v)[0])}else l[0].appendChild([].slice.call(v)[0]);f&&l[0].appendChild([].slice.call(f)[0]),m&&l[0].appendChild([].slice.call(m)[0])}this.parent.renderBaseline&&this.templateData.ganttProperties.baselineStartDate&&this.templateData.ganttProperties.baselineEndDate&&(a=i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineStartDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.startDate)||this.templateData.ganttProperties.baselineStartDate.getTime()!==this.templateData.ganttProperties.startDate.getTime()||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.baselineEndDate)||i.i(r.isNullOrUndefined)(this.templateData.ganttProperties.endDate)||this.templateData.ganttProperties.baselineEndDate.toLocaleDateString()!==this.templateData.ganttProperties.endDate.toLocaleDateString()||!this.templateData.ganttProperties.isMilestone?this.getTaskBaselineNode():this.getMilestoneBaselineNode())}if(this.templateData.ganttProperties.isAutoSchedule&&"ProjectView"==this.parent.viewType||!this.templateData.hasChildRecords){var u=this.getRightPointNode();l[0].appendChild([].slice.call(u)[0])}var S=this.getRightLabelNode(e);if(s[0].childNodes[0].childNodes[0].appendChild([].slice.call(o)[0]),s[0].childNodes[0].childNodes[0].appendChild([].slice.call(l)[0]),this.templateData.ganttProperties.indicators&&this.templateData.ganttProperties.indicators.length>0)for(var T=void 0,b=void 0,P=void 0,C=this.templateData.ganttProperties.indicators,M=0;M<C.length;M++){if(T=this.getIndicatorNode(C[M]),T[0].setAttribute("aria-label",C[M].name),C[M].name.indexOf("$")>-1||C[M].name.indexOf("#")>-1)b=this.templateCompiler(C[M].name),P=b(i.i(r.extend)({index:e},this.templateData),this.parent,"indicatorLabelText");else{var R=i.i(r.createElement)("Text");R.innerHTML=C[M].name,P=R.childNodes}T[0].appendChild([].slice.call(P)[0]),T[0].title=i.i(r.isNullOrUndefined)(C[M].tooltip)?"":C[M].tooltip,s[0].childNodes[0].childNodes[0].appendChild([].slice.call(T)[0])}S&&S.length>0&&s[0].childNodes[0].childNodes[0].appendChild([].slice.call(S)[0]),i.i(r.isNullOrUndefined)(a)||s[0].childNodes[0].childNodes[0].appendChild([].slice.call(a)[0]);var x=s[0].childNodes[0];return this.setAriaRowIndex(t,x),x},t.prototype.setAriaRowIndex=function(e,t){var n=this.parent.treeGrid.getCurrentViewRecords(),a=this.parent.virtualScrollModule&&this.parent.enableVirtualization?i.i(r.getValue)("virtualScrollModule.visualData",this.parent.treeGrid):n,s=a.indexOf(e);t.setAttribute("aria-rowindex",s.toString())},t.prototype.triggerQueryTaskbarInfo=function(){if(this.parent.queryTaskbarInfo)for(var e,t,n=this.parent.enableImmutableMode?this.refreshedTr.length:this.ganttChartTableBody.querySelectorAll("tr").length,a=0;a<n;a++){e=this.parent.enableImmutableMode?this.refreshedTr[a]:this.ganttChartTableBody.querySelectorAll("tr")[a],t=this.refreshedData.length>0?this.refreshedData[a]:this.parent.currentViewData[a];var s=!i.i(r.isNullOrUndefined)(t.ganttProperties.segments)&&t.ganttProperties.segments.length;if(s>0)for(var o=0;o<s;o++){var l=e.getElementsByClassName("e-segmented-taskbar"),d=l[o];this.triggerQueryTaskbarInfoByIndex(d,t)}else e&&this.triggerQueryTaskbarInfoByIndex(e,t)}},t.prototype.triggerQueryTaskbarInfoByIndex=function(e,t){var n=this,a=!i.i(r.isNullOrUndefined)(t.ganttProperties.segments)&&t.ganttProperties.segments.length>0?e:e.querySelector("."+s.F),o={data:t,rowElement:e,taskbarElement:a,taskbarType:t.hasChildRecords?"ParentTask":t.ganttProperties.isMilestone?"Milestone":"ChildTask"},l=this.getClassName(o);if("Milestone"===o.taskbarType)o.milestoneColor=a.querySelector(l[0])?getComputedStyle(a.querySelector(l[0])).borderBottomColor:null,o.baselineColor=e.querySelector(l[1])?getComputedStyle(e.querySelector(l[1])).borderBottomColor:null;else{var d=a.querySelector(l[0]),p=a.querySelector(l[1]);o.taskbarBgColor=i.i(r.isNullOrUndefined)(d)?null:a.classList.contains(s._7)?getComputedStyle(a).backgroundColor:getComputedStyle(a.querySelector(l[0])).backgroundColor,o.taskbarBorderColor=i.i(r.isNullOrUndefined)(d)?null:a.classList.contains(s._7)?getComputedStyle(a).backgroundColor:getComputedStyle(a.querySelector(l[0])).borderColor,o.progressBarBgColor=i.i(r.isNullOrUndefined)(p)?null:a.classList.contains(s._6)?getComputedStyle(a).backgroundColor:getComputedStyle(a.querySelector(l[1])).backgroundColor,o.baselineColor=e.querySelector("."+s._55)?getComputedStyle(e.querySelector("."+s._55)).backgroundColor:null,o.taskLabelColor=a.querySelector("."+s._42)?getComputedStyle(a.querySelector("."+s._42)).color:null}o.rightLabelColor=e.querySelector("."+s._5)&&e.querySelector("."+s._5).querySelector("."+s._37)?getComputedStyle(e.querySelector("."+s._5).querySelector("."+s._37)).color:null,o.leftLabelColor=e.querySelector("."+s._4)&&e.querySelector("."+s._4).querySelector("."+s._37)?getComputedStyle(e.querySelector("."+s._4).querySelector("."+s._37)).color:null,this.parent.trigger("queryTaskbarInfo",o,function(e){n.updateQueryTaskbarInfoArgs(e,void 0,void 0)})},t.prototype.updateQueryTaskbarInfoArgs=function(e,t,i){var r=e.rowElement,n=e.taskbarElement,a=this.getClassName(e);"Milestone"===e.taskbarType?(n.querySelector(a[0])&&getComputedStyle(n.querySelector(a[0])).borderBottomColor!==e.milestoneColor&&(n.querySelector(a[0]).style.borderBottomColor=e.milestoneColor,n.querySelector("."+s._53).style.borderTopColor=e.milestoneColor),r.querySelector(a[1])&&getComputedStyle(r.querySelector(a[1])).borderTopColor!==e.baselineColor&&(r.querySelector(a[1]).style.borderBottomColor=e.baselineColor,r.querySelector("."+s._59).style.borderTopColor=e.baselineColor)):(n.querySelector(a[0])&&getComputedStyle(n.querySelector(a[0])).backgroundColor!==e.taskbarBgColor&&(n.querySelector(a[0]).style.backgroundColor=e.taskbarBgColor),n.querySelector(a[0])&&getComputedStyle(n.querySelector(a[0])).borderColor!==e.taskbarBorderColor&&(n.querySelector(a[0]).style.borderColor=e.taskbarBorderColor),n.querySelector(a[1])&&getComputedStyle(n.querySelector(a[1])).backgroundColor!==e.progressBarBgColor&&(n.querySelector(a[1]).style.backgroundColor=e.progressBarBgColor),n.classList.contains(s._7)&&getComputedStyle(n).backgroundColor!==e.taskbarBgColor&&(n.style.backgroundColor=e.taskbarBgColor),n.classList.contains(s._7)&&getComputedStyle(n).borderColor!==e.taskbarBorderColor&&(n.style.borderColor=e.taskbarBorderColor),n.classList.contains(s._6)&&getComputedStyle(n).backgroundColor!==e.progressBarBgColor&&(n.style.backgroundColor=e.progressBarBgColor),n.querySelector("."+s._42)&&getComputedStyle(n.querySelector("."+s._42)).color!==e.taskLabelColor&&(n.querySelector("."+s._42).style.color=e.taskLabelColor),r.querySelector("."+s._55)&&getComputedStyle(r.querySelector("."+s._55)).backgroundColor!==e.baselineColor&&(r.querySelector("."+s._55).style.backgroundColor=e.baselineColor)),r.querySelector("."+s._4)&&r.querySelector("."+s._4).querySelector("."+s._37)&&getComputedStyle(r.querySelector("."+s._4).querySelector("."+s._37)).color!==e.leftLabelColor&&(r.querySelector("."+s._4).querySelector("."+s._37).style.color=e.leftLabelColor),r.querySelector("."+s._5)&&r.querySelector("."+s._5).querySelector("."+s._37)&&getComputedStyle(r.querySelector("."+s._5).querySelector("."+s._37)).color!==e.rightLabelColor&&(r.querySelector("."+s._5).querySelector("."+s._37).style.color=e.rightLabelColor)},t.prototype.getClassName=function(e){var t=[];return t.push("."+("ParentTask"===e.taskbarType?s._8:"ChildTask"===e.taskbarType?s._7:s._51)),t.push("."+("ParentTask"===e.taskbarType?s._9:"ChildTask"===e.taskbarType?s._6:s._58)),t},t.prototype.templateCompiler=function(e){if(!i.i(r.isNullOrUndefined)(e)&&""!==e)try{return document.querySelectorAll(e).length?i.i(r.compile)(document.querySelector(e).innerHTML.trim(),this.parent):i.i(r.compile)(e,this.parent)}catch(t){return i.i(r.compile)(e,this.parent)}return null},t.prototype.refreshRow=function(e,t){var n=this.ganttChartTableBody.childNodes[e],a=this.parent.currentViewData[e];if(-1!==e&&a){var s=a;"ResourceView"===this.parent.viewType&&s.hasChildRecords&&!s.expanded&&this.parent.enableMultiTaskbar?n.replaceChild(this.getResourceParent(s).childNodes[0],n.childNodes[0]):n.replaceChild(this.getGanttChartRow(e,s).childNodes[0],n.childNodes[0]),this.parent.renderTemplates(),"ResourceView"===this.parent.viewType&&s.hasChildRecords&&this.parent.showOverAllocation&&(t?this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData):(this.parent.dataOperation.updateOverlappingValues(s),this.parent.ganttChartModule.renderRangeContainer([s])));var o=!i.i(r.isNullOrUndefined)(s.ganttProperties.segments)&&s.ganttProperties.segments.length;if(o>0)for(var l=0;l<o;l++){var d=n.getElementsByClassName("e-segmented-taskbar"),p=d[l];this.triggerQueryTaskbarInfoByIndex(p,s)}else this.triggerQueryTaskbarInfoByIndex(n,s);var h="ProjectView"===this.parent.viewType?s.ganttProperties.taskId:s.ganttProperties.rowUniqueID;this.parent.treeGrid.grid.setRowData(h,s);var u=this.parent.ganttChartModule.tempNextElement;this.parent.ganttChartModule.isEditableElement&&u&&(this.parent.treeGrid.grid.focusModule.focus(),i.i(r.addClass)([this.parent.treeGrid.getRows()[n.ariaRowIndex].children[this.parent.ganttChartModule.childrenIndex]],"e-focused"),this.parent.ganttChartModule.tempNextElement=null);this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[e].getAttribute("data-uid")).data=s}},t.prototype.getResourceParent=function(e){var t=this.parent.ganttChartModule.getChartRows();if(this.parent.initialChartRowElements)for(var n=0;n<this.parent.initialChartRowElements.length;n++)i.i(r.isNullOrUndefined)(t[n])||i.i(r.isNullOrUndefined)(t[n].childNodes[0].childNodes[1].childNodes[2])||i.i(r.isNullOrUndefined)(this.parent.initialChartRowElements[n].childNodes[0].childNodes[1].childNodes[2])||(t[n].childNodes[0].childNodes[1].childNodes[2].innerHTML=this.parent.initialChartRowElements[n].childNodes[0].childNodes[1].childNodes[2].innerHTML);this.templateData=e;var a=this.getTableTrNode(),o=this.leftLabelContainer(),l=i.i(r.createElement)("div",{className:"e-collapse-parent"});a[0].childNodes[0].childNodes[0].appendChild(l);var d=this.parent.dataOperation.setSortedChildTasks(e);this.parent.dataOperation.updateOverlappingIndex(d);for(var p=0;p<t.length;p++)if(t[p].classList.contains("gridrowtaskId"+e.ganttProperties.rowUniqueID+"level"+(e.level+1))){var h=t[p].querySelector(".e-taskbar-main-container");i.i(r.addClass)([h],"collpse-parent-border");var u=t[p].querySelector("."+s.F).getAttribute("rowUniqueId"),c=this.parent.getRecordByID(u),g=c.ganttProperties.eOverlapIndex.toString(),f=h.cloneNode(!0);f.style.zIndex=g,a[0].childNodes[0].childNodes[0].childNodes[0].appendChild(f)}return a[0].childNodes[0].childNodes[0].appendChild([].slice.call(o)[0]),a[0].childNodes[0]},t.prototype.refreshRecords=function(e,t){if(this.parent.isGanttChartRendered){if(this.parent.renderTemplates(),"ResourceView"===this.parent.viewType&&this.parent.enableMultiTaskbar){var i=[];i=new a.DataManager(e).executeLocal((new a.Query).sortBy("expanded","Descending")),e=i}for(var r=0;r<e.length;r++){var n=this.parent.currentViewData.indexOf(e[r]);this.refreshRow(n,t)}this.parent.ganttChartModule.updateLastRowBottomWidth()}},t.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off("renderPanels",this.createChartTable),this.parent.off("dataReady",this.initiateTemplates),this.parent.off("destroy",this.destroy))},t.prototype.destroy=function(){this.removeEventListener()},t.prototype.generateAriaLabel=function(e){e=this.templateData;var t="",i=this.parent.localeObj.getConstant("name"),r=this.parent.localeObj.getConstant("startDate"),n=this.parent.localeObj.getConstant("endDate"),a=this.parent.localeObj.getConstant("duration"),s=e.ganttProperties.taskName,o=e.ganttProperties.startDate,l=e.ganttProperties.endDate,d=e.ganttProperties.duration;return e.ganttProperties.isMilestone?t=i+" "+s+" "+r+" "+this.parent.getFormatedDate(o):(s&&(t+=i+" "+s+" "),o&&(t+=r+" "+this.parent.getFormatedDate(o)+" "),l&&(t+=n+" "+this.parent.getFormatedDate(l)+" "),d&&(t+=a+" "+this.parent.getDurationString(d,e.ganttProperties.durationUnit))),t},t.prototype.generateBaselineAriaLabel=function(e){e=this.templateData;var t="",i=this.parent.localeObj.getConstant("name"),r=this.parent.localeObj.getConstant("startDate"),n=this.parent.localeObj.getConstant("endDate"),a=e.ganttProperties.taskName,s=e.ganttProperties.baselineStartDate,o=e.ganttProperties.baselineEndDate;return t+="Baseline ",t+=i+" "+a+" ",t+=r+" "+this.parent.getFormatedDate(s)+" ",t+=n+" "+this.parent.getFormatedDate(o)+" "},t.prototype.generateSpiltTaskAriaLabel=function(e,t){var i="",r=this.parent.localeObj.getConstant("startDate"),n=this.parent.localeObj.getConstant("endDate"),a=this.parent.localeObj.getConstant("duration"),s=e.startDate,o=e.endDate,l=e.duration;return s&&(i+=r+" "+this.parent.getFormatedDate(s)+" "),o&&(i+=n+" "+this.parent.getFormatedDate(o)+" "),l&&(i+=a+" "+this.parent.getDurationString(l,t.durationUnit)),i},t.prototype.generateTaskLabelAriaLabel=function(e){var t="";return"left"===e&&this.parent.labelSettings.leftLabel&&!this.leftTaskLabelTemplateFunction?t+=this.parent.localeObj.getConstant("leftTaskLabel")+" "+this.getTaskLabel(this.parent.labelSettings.leftLabel):"right"===e&&this.parent.labelSettings.rightLabel&&!this.rightTaskLabelTemplateFunction&&(t+=this.parent.localeObj.getConstant("rightTaskLabel")+" "+this.getTaskLabel(this.parent.labelSettings.rightLabel)),t},t}(o.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(3)),a=i(2),s=function(){function e(e){this.expandedRecords=[],this.parent=e,this.dependencyViewContainer=i.i(r.createElement)("div",{className:n._34}),this.initPublicProp()}return e.prototype.getconnectorLineGap=function(e){return e.milestoneChild?this.parent.chartRowsModule.milestoneMarginTop/2+this.parent.chartRowsModule.milestoneHeight/2:this.parent.chartRowsModule.taskBarMarginTop/2+this.parent.chartRowsModule.taskBarHeight/2},e.prototype.initPublicProp=function(){this.lineColor=this.parent.connectorLineBackground,this.lineStroke=this.parent.connectorLineWidth>4?4:this.parent.connectorLineWidth,this.createConnectorLineTooltipTable()},e.prototype.getTaskbarMidpoint=function(e){return Math.floor(e?this.parent.chartRowsModule.milestoneMarginTop+this.parent.chartRowsModule.milestoneHeight/2:this.parent.chartRowsModule.taskBarMarginTop+this.parent.chartRowsModule.taskBarHeight/2)+1},e.prototype.createConnectorLineObject=function(e,t,n){var s,o={};s=this.parent.pdfExportModule&&this.parent.pdfExportModule.isPdfExport?this.parent.pdfExportModule.helper.exportProps.exportType&&"CurrentViewData"===this.parent.pdfExportModule.helper.exportProps.exportType?this.expandedRecords:this.parent.flatData:this.expandedRecords;var l=s.indexOf(e),d=s.indexOf(t),p=e.ganttProperties,h=t.ganttProperties,u=this.parent.virtualScrollModule&&this.parent.enableVirtualization?this.parent.currentViewData:this.parent.getExpandedRecords(this.parent.currentViewData);if(o.parentIndexInCurrentView=u.indexOf(e),o.childIndexInCurrentView=u.indexOf(t),!(this.parent.virtualScrollModule&&this.parent.enableVirtualization)&&(-1===o.parentIndexInCurrentView||-1===o.childIndexInCurrentView)||-1===o.parentIndexInCurrentView&&-1===o.childIndexInCurrentView)return null;o.parentLeft=p.isMilestone?p.left-this.parent.chartRowsModule.milestoneHeight/2:p.left,o.childLeft=h.isMilestone?h.left-this.parent.chartRowsModule.milestoneHeight/2:h.left,o.parentWidth=0===p.width||p.isMilestone?Math.floor(this.parent.chartRowsModule.milestoneHeight):p.width,o.childWidth=0===h.width||h.isMilestone?Math.floor(this.parent.chartRowsModule.milestoneHeight):h.width,o.parentIndex=l,o.childIndex=d;var c=!i.i(r.isNullOrUndefined)(this.parent.ganttChartModule.getChartRows())&&this.parent.ganttChartModule.getChartRows()[0]&&this.parent.ganttChartModule.getChartRows()[0].getBoundingClientRect().height;o.rowHeight=c&&!isNaN(c)?c:this.parent.rowHeight,o.type=n.type;var g="ResourceView"===this.parent.viewType?p.taskId:p.rowUniqueID,f="ResourceView"===this.parent.viewType?h.taskId:h.rowUniqueID;return o.connectorLineId="parent"+g+"child"+f,o.milestoneParent=!!p.isMilestone,o.milestoneChild=!!h.isMilestone,i.i(r.isNullOrUndefined)(i.i(a.c)(p))||i.i(r.isNullOrUndefined)(i.i(a.c)(h))?null:o},e.prototype.renderConnectorLines=function(e){for(var t="",i=[],r=0;r<e.length;r++)t+=this.getConnectorLineTemplate(e[r]),i.push(e[r]);this.dependencyViewContainer.innerHTML=t;for(var n=this.parent.connectorLineModule.dependencyViewContainer.childNodes,a=0;a<n.length;a++)for(var s=n[a].childNodes,o=0;o<s.length;o++){var l="Connector Line "+this.parent.connectorLineModule.generateAriaLabel(i[a]);s[o].setAttribute("aria-label",l)}this.parent.ganttChartModule.chartBodyContent.appendChild(this.dependencyViewContainer)},e.prototype.getParentPosition=function(e){if(e.parentIndex<e.childIndex){if("FF"===e.type)return e.childLeft+e.childWidth>=e.parentLeft+e.parentWidth?"FFType2":"FFType1";if(e.parentLeft<e.childLeft&&e.childLeft>e.parentLeft+e.parentWidth+25){if("FS"===e.type)return"FSType1";if("SF"===e.type)return"SFType1";if("SS"===e.type)return"SSType2";if("FF"===e.type)return"FFType2"}else if(e.parentLeft<e.childLeft&&e.childLeft<e.parentLeft+e.parentWidth||e.parentLeft===e.childLeft||e.parentLeft>e.childLeft){if(e.parentLeft>e.childLeft+e.childWidth+25&&"SF"===e.type)return"SFType2";if(e.parentLeft>e.childLeft){if("SS"===e.type)return"SSType1";if("SF"===e.type)return"SFType1";if("FF"===e.type)return"FFType1"}else if(e.childLeft+e.childWidth>e.parentLeft+e.parentWidth&&"FF"===e.type)return"FFType2";if("FS"===e.type)return"FSType2";if("SS"===e.type)return"SSType2";if("FF"===e.type)return"FFType1";if("SF"===e.type)return"SFType1"}else if(e.parentLeft<e.childLeft){if("FS"===e.type)return"FSType2";if("FF"===e.type)return"FFType2";if("SS"===e.type)return"SSType2";if("SF"===e.type)return"SFType1"}}else if(e.parentIndex>e.childIndex)if(e.parentLeft<e.childLeft&&e.childLeft>e.parentLeft+e.parentWidth){if("FS"===e.type)return 30>=e.childLeft-(e.milestoneParent?e.parentLeft+e.parentWidth+4:e.parentLeft+e.parentWidth)?"FSType3":"FSType4";if(e.parentLeft<e.childLeft||e.childLeft+e.childWidth>e.parentLeft+e.parentWidth){if("SS"===e.type)return"SSType4";if("FF"===e.type)return"FFType4";if("SF"===e.type)return"SFType4"}else if(e.childLeft+e.childWidth>e.parentLeft+e.parentWidth&&"FF"===e.type)return"FFType4"}else if(e.parentLeft<e.childLeft&&e.childLeft<e.parentLeft+e.parentWidth||e.parentLeft===e.childLeft||e.parentLeft>e.childLeft){if(e.childLeft+e.childWidth<=e.parentLeft+e.parentWidth){if("FF"===e.type)return"FFType3";if("SF"===e.type)return e.childLeft+e.childWidth+25<e.parentLeft?"SFType3":"SFType4";if("SS"===e.type)return e.childLeft<=e.parentLeft?"SSType3":"SSType4"}else if(e.childLeft+e.childWidth>e.parentLeft+e.parentWidth){if("FF"===e.type)return"FFType4";if("SF"===e.type)return"SFType4";if("SS"===e.type)return e.childLeft<=e.parentLeft?"SSType3":"SSType4"}if("FS"===e.type)return"FSType3"}else if(e.parentLeft<e.childLeft){if("FS"===e.type)return"FSType3";if("SS"===e.type)return"SSType4";if("FF"===e.type)return"FFType4";if("SF"===e.type)return"SFType4"}return null},e.prototype.getHeightValue=function(e){return e.parentIndex*e.rowHeight>e.childIndex*e.rowHeight?e.parentIndex*e.rowHeight-e.childIndex*e.rowHeight:e.childIndex*e.rowHeight-e.parentIndex*e.rowHeight},e.prototype.getInnerElementWidthSSType2=function(e){return e.parentLeft===e.childLeft?10:e.childLeft-e.parentLeft},e.prototype.getInnerElementLeftSSType2=function(e){return e.parentLeft===e.childLeft?e.parentLeft-20:e.parentLeft-10},e.prototype.getInnerChildWidthSSType2=function(e){return e.parentLeft+e.parentWidth<e.childLeft?10:e.parentLeft===e.childLeft?20:e.parentLeft+e.parentWidth>=e.childLeft?10:e.childLeft-e.parentLeft},e.prototype.getBorderStyles=function(e,t){return"border-"+e+"-width:"+t+"px;border-"+e+"-style:solid;"+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"border-"+e+"-color:"+this.lineColor+";")},e.prototype.getConnectorLineTemplate=function(e){var t=this.getInnerChildWidthSSType2(e),a=this.getInnerElementWidthSSType2(e),s=this.getInnerElementLeftSSType2(e),o=this.getHeightValue(e),l=!!e.milestoneParent,d=!!e.milestoneChild,p="",h=this.parent.virtualScrollModule&&this.parent.enableVirtualization,u=this.getPosition(e,this.getParentPosition(e),o),c=0;this.parent.renderBaseline&&(c=e.milestoneParent&&e.milestoneChild?0:e.milestoneParent?-5:e.milestoneChild?5:0);var g=h?u.height:o+c,f=0,m=0;if(this.parent.currentViewData[e.parentIndex]&&this.parent.currentViewData[e.childIndex]){var y=this.parent.currentViewData[e.parentIndex].hasChildRecords,v=this.parent.currentViewData[e.childIndex].hasChildRecords,D=this.parent.currentViewData[e.parentIndex].ganttProperties.isAutoSchedule,w=this.parent.currentViewData[e.childIndex].ganttProperties.isAutoSchedule,k=!0;(y&&D&&!v||v&&w&&!y||y&&D&&w&&v||!y&&!v)&&(k=!1),k&&(y&&!D&&v&&!w?m=-11:y&&!D&&v&&!w||(e.childIndex>e.parentIndex?!y&&v?f=-11:(f=11,m=-11):y&&!v?f=-11:(f=11,m=-11)),this.parent.currentViewData[e.parentIndex].ganttProperties.isMilestone?e.parentIndex>e.childIndex?(m=-5,f=10):"SS"!==e.type&&"FF"!==e.type||(m=-5):this.parent.currentViewData[e.childIndex].ganttProperties.isMilestone&&(e.parentIndex>e.childIndex?(m=5,f=-10):"SS"!==e.type&&"FF"!==e.type||(m=5)))}if(this.getParentPosition(e)){p='<div id="ConnectorLine'+e.connectorLineId+'" style="background-color:black">';var S='<div class="'+n._1+'" tabindex="-1" style="',T='<div class="'+n._15+'" style="'+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"outline-color:"+this.lineColor+";"),b='<div class="'+n._16+'" style="'+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"outline-color:"+this.lineColor+";"),P='<div class="'+n._17+'" style="'+(i.i(r.isNullOrUndefined)(this.lineColor)?"":"outline-color:"+this.lineColor+";"),C=P+(d?"left:0px;":"")+this.getBorderStyles("right",10)+"top:"+(-5-this.lineStroke+(this.lineStroke-1))+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',M=this.getBorderStyles("left",10)+"top:"+-6+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',R=this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>'+T+"top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-(this.lineStroke-1))+'position:relative;"></div>',x=P+"left:"+(e.childLeft+e.childWidth-e.parentLeft+10)+"px;"+this.getBorderStyles("right",10),O="top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>';"FSType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType1">',S+=T,S=S+"left:"+(l?-1:0)+"px;width:"+(l?e.childLeft-(e.parentLeft+e.parentWidth+10)+this.lineStroke-10+1:e.childLeft-(e.parentLeft+e.parentWidth+10)+this.lineStroke-10)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10)-10)+"px;width:0px;"+this.getBorderStyles("right",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10)-10)+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10))+"px;"+this.getBorderStyles("left",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FSType2"===this.getParentPosition(e)&&(S=S+"left:"+e.parentLeft+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType2">',S+=T,S=S+"left:"+(l?e.parentWidth-1:e.parentWidth)+"px;width:"+(l?11:10)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth+10-this.lineStroke)+"px;"+this.getBorderStyles("left",this.lineStroke)+"width:0px;"+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+20))+"px;width:"+(e.parentLeft+e.parentWidth-e.childLeft+30)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+20))+"px;width:0px;"+this.getBorderStyles("top",this.getconnectorLineGap(e)-this.lineStroke)+this.getBorderStyles("left",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+20))+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:"+(e.parentWidth-(e.parentLeft+e.parentWidth-e.childLeft+10))+"px;"+this.getBorderStyles("left",10)+"border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+"px;top:"+(-6-this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FSType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft-20)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType3">',S+=b,S=S+"left:10px;"+this.getBorderStyles("left",10)+"border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+"px;top:"+-6+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+"width:10px;"+this.getBorderStyles("top",this.lineStroke)+"position:relative;top:"+-(6+(5+this.lineStroke)+Math.round(this.lineStroke/2))+'px;"></div>',S+=T,S=S+"width:"+this.lineStroke+"px;"+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-this.lineStroke+1)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div>',S+=T,S=S+"width:"+(e.parentLeft+e.parentWidth-e.childLeft+30)+"px;"+this.getBorderStyles("top",this.lineStroke)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div>',S+=T,S=S+"left:"+(e.parentLeft+e.parentWidth-e.childLeft+(30-this.lineStroke))+"px;width:0px;height:"+(this.getconnectorLineGap(e)-this.lineStroke)+"px;"+this.getBorderStyles("left",this.lineStroke)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div>',S+=T,S=S+(l?"left:"+(e.parentLeft+e.parentWidth-e.childLeft+(18-this.lineStroke))+"px;width:"+(12+this.lineStroke)+"px;":"left:"+(e.parentLeft+e.parentWidth-e.childLeft+20)+"px;width:10px;")+this.getBorderStyles("top",this.lineStroke)+"position:relative;top:"+-(13+2*(this.lineStroke-1))+'px;"></div></div>'),"FSType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FSType4">',S+=b,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth+10))+"px;"+this.getBorderStyles("left",10)+"top:"+-6+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft-(e.parentLeft+e.parentWidth)-20)+"px;top:"+-(6+(5+this.lineStroke)+Math.round(this.lineStroke/2))+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;left:"+(e.childLeft-(e.parentLeft+e.parentWidth)-20)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke+1)+'position:relative;"></div>',S+=T,S=S+(l?"left:-1px;":"")+"top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(l?e.childLeft-(e.parentLeft+e.parentWidth+20)+1+this.lineStroke:e.childLeft-(e.parentLeft+e.parentWidth+20)+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SSType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft-10)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType4">',S+=b,S=S+"left:"+(e.childLeft-e.parentLeft)+"px;"+M,S+=T,S=S+"top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;width:"+(e.childLeft-e.parentLeft)+"px;"+R,S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SSType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft-20)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType3">',S+=b,S=S+"left:10px;"+M,S+=T,S=S+"top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;width:10px;"+R,S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(e.parentLeft-e.childLeft+21)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SSType2"===this.getParentPosition(e)&&(S=S+"left:"+s+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType2">',S+=T,S=S+"width:"+(t+1)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:"+a+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:"+a+"px;"+this.getBorderStyles("left",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"SSType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft-20)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SSType1">',S+=T,S=S+"width:"+(e.parentLeft-e.childLeft+21)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:10px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=b,S=S+"left:10px;"+this.getBorderStyles("left",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FFType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType1">',S+=T,S=S+"left:"+(l?e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)-1:e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth))+"px;width:"+(l?21+this.lineStroke:20+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+20)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(d?4:10)+"px;width:"+(d?e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+(16+this.lineStroke):e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+(10+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=P,S=S+(d?"left:0px;":"")+this.getBorderStyles("right",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FFType2"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType2">',S+=T,S=S+(l?"left:-1px;":"")+"width:"+(l?e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(21+this.lineStroke):e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(20+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+20)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(d?e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+4:e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+10)+"px;width:"+(d?16+this.lineStroke:10+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=P,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth))+"px;"+this.getBorderStyles("right",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),"FFType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType3">',S+=C,S+=T,S=S+(d?"left:4px;width:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+16):"left:10px;width:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+10))+"px;top:"+-(6+(5+this.lineStroke)+this.lineStroke/2)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)+20)+"px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke+1)+'position:relative;"></div>',S+=T,S=S+(l?"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth)-1)+"px;width:21":"left:"+(e.parentLeft+e.parentWidth-(e.childLeft+e.childWidth))+"px;width:20")+"px;top:"+-(13+2*(this.lineStroke-1))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"FFType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft+e.parentWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="FFType4">',S+=P,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth))+"px;"+this.getBorderStyles("right",10)+"top:"+(-5-this.lineStroke+(this.lineStroke-1))+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+(d?"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+4)+"px;width:"+(16+this.lineStroke):"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+10)+"px;width:"+(10+this.lineStroke))+"px;"+O,S+=T,S=S+"left:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+20)+"px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke+1)+'position:relative;"></div>',S+=T,S=S+(l?"left:-1px;width:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(21+this.lineStroke)):"width:"+(e.childLeft+e.childWidth-(e.parentLeft+e.parentWidth)+(20+this.lineStroke)))+"px;top:"+-(13+2*(this.lineStroke-1))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SFType4"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft-10)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType4">',S=S+x+"top:"+(-5-this.lineStroke+(this.lineStroke-1))+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div>',S+=T,S=S+"left:"+(d?e.childLeft+e.childWidth-e.parentLeft+(14+this.lineStroke)+"px;width:16":e.childLeft+e.childWidth-e.parentLeft+20+"px;width:"+(10+this.lineStroke))+"px;"+O,S+=T,S=S+"left:"+(e.childLeft+e.childWidth-e.parentLeft+30)+"px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-(this.lineStroke-1))+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(e.childLeft+e.childWidth-e.parentLeft+(30+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"top:"+-(13+2*(this.lineStroke-1))+"px;width:11px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SFType3"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.childIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType3">',S+=C,S+=T,S=S+(d?"left:4px;width:"+(16+this.lineStroke):"left:10px;width:"+(10+this.lineStroke))+"px;top:"+-(13+2*(this.lineStroke-1)-1)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:20px;top:"+-(13+2*(this.lineStroke-1))+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-(this.lineStroke-1))+'position:relative;"></div>',S+=T,S=S+"left:20px;top:"+-(13+2*(this.lineStroke-1))+"px;width:"+(e.parentLeft-(e.childLeft+e.childWidth+20)+this.lineStroke)+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div></div>'),"SFType1"===this.getParentPosition(e)&&(S=S+"left:"+(e.parentLeft-10)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(d)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType1">',S+=T,S=S+"width:11px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"width:"+(e.childLeft+e.childWidth-e.parentLeft+(30+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.childLeft+e.childWidth-e.parentLeft+30)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",this.getconnectorLineGap(e)-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+(d?"left:"+(e.childLeft+e.childWidth-e.parentLeft+15)+"px;width:"+(15+this.lineStroke):"left:"+(e.childLeft+e.childWidth-e.parentLeft+20)+"px;width:"+(10+this.lineStroke))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S=S+x+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;position:relative;"></div></div>'),"SFType2"===this.getParentPosition(e)&&(S=S+"left:"+(e.childLeft+e.childWidth)+"px;top:"+(h?u.top:e.parentIndex*e.rowHeight+m+this.getTaskbarMidpoint(l)-(this.lineStroke-1)-c)+"px;width:1px;height:"+g+'px;position:absolute" data-connectortype="SFType2">',S+=T,S=S+"left:"+(e.parentLeft-(e.childLeft+e.childWidth)-10)+"px;width:11px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=T,S=S+"left:"+(e.parentLeft-(e.childLeft+e.childWidth)-10)+"px;width:0px;"+this.getBorderStyles("left",this.lineStroke)+this.getBorderStyles("top",g+f-this.lineStroke)+'position:relative;"></div>',S+=T,S=S+(d?"left:4px;width:"+(e.parentLeft-(e.childLeft+e.childWidth)-(14-this.lineStroke)):"left:10px;width:"+(e.parentLeft-(e.childLeft+e.childWidth)-(20-this.lineStroke)))+"px;"+this.getBorderStyles("top",this.lineStroke)+'position:relative;"></div>',S+=P,S=S+"left:0px;"+this.getBorderStyles("right",10)+"top:"+(-6-this.lineStroke)+"px;border-bottom-width:"+(5+this.lineStroke)+"px;border-top-width:"+(5+this.lineStroke)+'px;width:0;height:0;position:relative;"></div></div>'),p+=S,p+="</div>"}return p},e.prototype.getPosition=function(e,t,i){var r=0,n=0;if(this.parent.virtualScrollModule&&this.parent.enableVirtualization){var a=!!e.milestoneParent,s=!!e.milestoneChild,o=this.getTaskbarMidpoint(a)-(this.lineStroke-1),l=this.getTaskbarMidpoint(s)-(this.lineStroke-1),d=-1!==e.parentIndexInCurrentView,p=-1!==e.childIndexInCurrentView,h=this.parent.currentViewData.length-1;"SSType1"===t||"SSType2"===t||"FFType1"===t||"FFType2"===t||"SFType2"===t?(r=d?e.parentIndexInCurrentView*e.rowHeight+o:0,n=d&&p?i:p?e.childIndexInCurrentView*e.rowHeight+o:h*e.rowHeight+o):"SSType3"===t||"SSType4"===t||"FSType4"===t||"FFType3"===t||"FFType4"===t||"SFType4"===t||"SFType3"===t?(r=p?e.childIndexInCurrentView*e.rowHeight+l:0,n=d&&p?i:d?e.parentIndexInCurrentView*e.rowHeight+l:h*e.rowHeight+l):"FSType3"===t?(r=p?e.childIndexInCurrentView*e.rowHeight+o:0,n=d&&p?i:d?e.parentIndexInCurrentView*e.rowHeight+l:h*e.rowHeight+o):"SFType1"!==t&&"FSType1"!==t&&"FSType2"!==t||(r=d?e.parentIndexInCurrentView*e.rowHeight+l:0,n=d&&p?i:p?e.childIndexInCurrentView*e.rowHeight+l:h*e.rowHeight+l)}return{top:r,height:n}},e.prototype.createConnectorLineTooltipTable=function(){this.tooltipTable=i.i(r.createElement)("table",{className:".e-tooltiptable",styles:"margin-top:0px",attrs:{cellspacing:"2px",cellpadding:"2px"}});var e=i.i(r.createElement)("tbody");e.innerHTML="",this.tooltipTable.appendChild(e)},e.prototype.getConnectorLineTooltipInnerTd=function(e,t,i,r){var n='<tr id="fromPredecessor"><td >'+this.parent.localeObj.getConstant("from")+"</td><td> ";return n=n+e+" </td><td> "+this.parent.localeObj.getConstant(t)+" </td> </tr>",n=n+'<tr id="toPredecessor"><td>'+this.parent.localeObj.getConstant("to")+"</td><td> "+i,n=n+" </td><td> "+this.parent.localeObj.getConstant(r)+" </td></tr></tbody><table>"},e.prototype.generateAriaLabel=function(e){var t=e.type,i=this.expandedRecords,r=i[e.parentIndex].ganttProperties.taskName,n=i[e.childIndex].ganttProperties.taskName,a=this.parent.localeObj.getConstant("start"),s=this.parent.localeObj.getConstant("finish");return"FS"===t?r+" "+s+" to "+n+" "+a:"FF"===t?r+" "+s+" to "+n+" "+s:"SS"===t?r+" "+a+" to "+n+" "+a:r+" "+a+" to "+n+" "+s},e.prototype.getRecordByID=function(e){return i.i(r.isNullOrUndefined)(e)?null:"ResourceView"===this.parent.viewType?this.parent.flatData[this.parent.getTaskIds().indexOf("T"+e.toString())]:this.parent.flatData[this.parent.ids.indexOf(e.toString())]},e.prototype.removePreviousConnectorLines=function(e){var t;t=!0===i.i(r.isObject)(e);for(var n=t?Object.keys(e).length:e.length,a=Object.keys(e),s=0;s<n;s++){var o=void 0;if(t){o=e[a[s]]}else o=e[s];var l=o.ganttProperties&&o.ganttProperties.predecessor;if(l&&l.length>0)for(var d=0;d<l.length;d++){var p="parent"+l[d].from+"child"+l[d].to;this.removeConnectorLineById(p)}}},e.prototype.removeConnectorLineById=function(e){var t=this.parent.connectorLineModule.dependencyViewContainer.querySelector("#ConnectorLine"+e);i.i(r.isNullOrUndefined)(t)||i.i(r.remove)(t)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return s});var r=i(0),n=(i.n(r),i(8)),a=(i.n(n),i(3)),s=function(){function e(e,t){this.parent=e,this.taskbarEdit=t}return e.prototype.createTooltip=function(e,t,i){var r=this;this.toolTipObj=new n.Tooltip({opensOn:e,position:"TopRight",mouseTrail:t,cssClass:a._14,target:i||null,animation:{open:{effect:"None"},close:{effect:"None"}}}),this.toolTipObj.beforeRender=function(e){var t={data:r.taskbarEdit.taskBarEditRecord,args:e,content:r.toolTipObj.content};r.parent.trigger("beforeTooltipRender",t)},this.toolTipObj.afterOpen=function(e){r.updateTooltipPosition(e)},this.toolTipObj.isStringTemplate=!0,this.toolTipObj.appendTo(this.parent.chartPane)},e.prototype.updateTooltipPosition=function(e){var t=this.parent.getOffsetRect(this.parent.chartPane),i=t.left+this.parent.chartPane.offsetWidth,r=e.element.offsetLeft;i<r+e.element.offsetWidth&&(r+=i-(r+e.element.offsetWidth)),e.element.style.left=r+"px",e.element.style.visibility="visible"},e.prototype.showHideTaskbarEditTooltip=function(e,t){e&&this.parent.tooltipSettings.showTooltip?(this.createTooltip("Custom",!1),this.parent.tooltipModule.toolTipObj.close(),this.updateTooltip(t),"ConnectorPointLeftDrag"===this.taskbarEdit.connectorSecondAction?this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector("."+a.G)):"ConnectorPointRightDrag"===this.taskbarEdit.connectorSecondAction?this.toolTipObj.open(this.taskbarEdit.connectorSecondElement.querySelector("."+a.H)):this.toolTipObj.open(this.taskbarEdit.taskBarEditElement)):i.i(r.isNullOrUndefined)(this.toolTipObj)||(this.toolTipObj.destroy(),this.toolTipObj=null)},e.prototype.updateTooltip=function(e){var t=this.taskbarEdit.taskBarEditRecord.ganttProperties,n=-1===e?t.width:t.segments[e].width,a=-1===e?t.progressWidth:t.segments[e].progressWidth,s=-1===e?t.left:t.left+t.segments[e].left;i.i(r.isNullOrUndefined)(this.toolTipObj)||("ConnectorPointLeftDrag"===this.taskbarEdit.taskBarEditAction||"ConnectorPointRightDrag"===this.taskbarEdit.taskBarEditAction?(this.toolTipObj.content=this.getTooltipText(e),this.toolTipObj.offsetY=-3):(this.toolTipObj.content=this.getTooltipText(e),this.toolTipObj.refresh(this.taskbarEdit.taskBarEditElement),"LeftResizing"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=-n:"RightResizing"===this.taskbarEdit.taskBarEditAction||"ParentResizing"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=0:"ProgressResizing"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=-(n-a):"MilestoneDrag"===this.taskbarEdit.taskBarEditAction?this.toolTipObj.offsetX=-this.parent.chartRowsModule.milestoneHeight/2:n>5&&(this.toolTipObj.offsetX=-(n+s-this.taskbarEdit.tooltipPositionX))))},e.prototype.getTooltipText=function(e){var t="",n=this.parent.globalize,a=this.taskbarEdit.taskBarEditRecord.ganttProperties;if(!i.i(r.isNullOrUndefined)(a.segments)&&a.segments.length>0&&-1!==e&&"ProgressResizing"!==this.taskbarEdit.taskBarEditAction&&(a=a.segments[e]),this.parent.tooltipSettings.editing){var s=this.parent.tooltipModule.templateCompiler(this.parent.tooltipSettings.editing,this.parent,this.taskbarEdit.taskBarEditRecord,"TooltipEditingTemplate");i.i(r.getValue)("tooltipEle",this.toolTipObj)&&this.parent.renderTemplates(),t=s[0]}else{var o=void 0,l=void 0,d=void 0;switch(i.i(r.isNullOrUndefined)(a.startDate)||(o='<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("startDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+n.formatDate(a.startDate,{format:this.parent.getDateFormat()})+"</td></tr>"),i.i(r.isNullOrUndefined)(a.endDate)||(l='<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("endDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+n.formatDate(a.endDate,{format:this.parent.getDateFormat()})+"</td></tr>"),i.i(r.isNullOrUndefined)(a.duration)||(d='<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("duration")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getDurationString(a.duration,a.durationUnit)+"</td></tr>"),this.taskbarEdit.taskBarEditAction){case"ProgressResizing":t='<table class = "e-gantt-tooltiptable"><tbody>'+('<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("progress")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+a.progress+"</td></tr>")+"</tbody></table>";break;case"LeftResizing":t='<table class = "e-gantt-tooltiptable"><tbody>'+o+d+"</tbody></table>";break;case"RightResizing":case"ParentResizing":t='<table class = "e-gantt-tooltiptable"><tbody>'+l+d+"</tbody></table>";break;case"ChildDrag":case"ParentDrag":case"MilestoneDrag":case"ManualParentDrag":var p="",h="";i.i(r.isNullOrUndefined)(this.taskbarEdit.taskBarEditRecord.ganttProperties.startDate)||(p=o),i.i(r.isNullOrUndefined)(this.taskbarEdit.taskBarEditRecord.ganttProperties.endDate)||(h=l),t='<table class = "e-gantt-tooltiptable"><tbody>'+p+h+"</tbody></table>";break;case"ConnectorPointLeftDrag":case"ConnectorPointRightDrag":t=this.parent.connectorLineModule.tooltipTable,i.i(r.isNullOrUndefined)(this.toolTipObj)&&(this.parent.connectorLineModule.tooltipTable.innerHTML=this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.parent.editModule.taskbarEditModule.taskBarEditRecord.ganttProperties.taskName,this.parent.editModule.taskbarEditModule.fromPredecessorText,"",""))}}return t},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(3)),a=function(){function e(e){this.parent=e,this.eventMarkersContainer=null}return e.prototype.renderEventMarkers=function(){this.parent.eventMarkers&&this.parent.eventMarkers.length>0?(this.parent.ganttChartModule.chartBodyContent.contains(this.eventMarkersContainer)||(this.eventMarkersContainer=i.i(r.createElement)("div",{className:n.v}),this.eventMarkersContainer.setAttribute("role","term"),this.parent.ganttChartModule.chartBodyContent.appendChild(this.eventMarkersContainer)),this.eventMarkersContainer.innerHTML="",this.getEventMarkersElements(this.eventMarkersContainer)):this.removeContainer()},e.prototype.removeContainer=function(){this.eventMarkersContainer&&(i.i(r.remove)(this.eventMarkersContainer),this.eventMarkersContainer=null)},e.prototype.getEventMarkersElements=function(e){for(var t,a,s,o,l=0;l<this.parent.eventMarkers.length;l++){if(t=this.parent.dataOperation.getTaskLeft(this.parent.dateValidationModule.getDateFromFormat(this.parent.eventMarkers[l].day,!0),!1),a=i.i(r.createElement)("div",{className:n.w,styles:"left:"+t+"px; height:100%;",id:"stripline"+l}),this.parent.eventMarkers[l].label){s=i.i(r.createElement)("div",{className:n.x});s[this.parent.disableHtmlEncode?"textContent":"innerHTML"]=this.parent.eventMarkers[l].label,a.appendChild(s),o=i.i(r.createElement)("div",{className:"e-gantt-right-arrow"}),a.appendChild(o)}this.parent.eventMarkers[l].cssClass&&a.classList.add(this.parent.eventMarkers[l].cssClass),a.setAttribute("tabindex","-1"),i.i(r.isNullOrUndefined)(this.parent.eventMarkers[l].day)||a.setAttribute("aria-label",this.parent.localeObj.getConstant("eventMarkers")+" "+("string"==typeof this.parent.eventMarkers[l].day?this.parent.eventMarkers[l].day:this.parent.getFormatedDate(this.parent.eventMarkers[l].day))+" "+this.parent.eventMarkers[l].label),e.appendChild(a)}},e.prototype.updateContainerHeight=function(){this.eventMarkersContainer&&(this.eventMarkersContainer.style.height=i.i(r.formatUnit)(this.parent.getContentHeight()))},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var r=i(0),n=(i.n(r),i(3)),a=function(){function e(e){this.weekendWidthUpdated=!1,this.parent=e,this.nonworkingContainer=null,this.holidayContainer=null,this.weekendContainer=null}return e.prototype.createNonworkingContainer=function(){this.parent.ganttChartModule.chartBodyContent.contains(this.nonworkingContainer)||(this.nonworkingContainer=i.i(r.createElement)("div",{className:n.y}),this.parent.ganttChartModule.chartBodyContent.appendChild(this.nonworkingContainer))},e.prototype.renderHolidays=function(){this.parent.holidays&&this.parent.holidays.length>0?(this.createNonworkingContainer(),this.nonworkingContainer.contains(this.holidayContainer)||(this.holidayContainer=i.i(r.createElement)("div",{className:n.z}),this.nonworkingContainer.appendChild(this.holidayContainer)),this.holidayContainer.innerHTML=this.getHolidaysElement().innerHTML):this.holidayContainer&&this.holidayContainer.parentNode&&(i.i(r.remove)(this.holidayContainer),this.nonworkingContainer&&0===this.nonworkingContainer.childNodes.length&&i.i(r.remove)(this.nonworkingContainer))},e.prototype.getHolidaysElement=function(){var e,t,a=i.i(r.createElement)("div"),s=this.parent.contentHeight,o=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(o=this.parent.toolbarModule.element.offsetHeight);for(var l=this.parent.ganttHeight-o-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight,d=0;d<this.parent.holidays.length;d++){this.parent.holidays[d].from&&this.parent.holidays[d].to?(e=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].from),t=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].to),t.setDate(t.getDate()+1),e.setHours(0,0,0,0),t.setHours(0,0,0,0)):this.parent.holidays[d].from?(e=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].from),e.setHours(0,0,0,0)):this.parent.holidays[d].to&&(e=this.parent.dateValidationModule.getDateFromFormat(this.parent.holidays[d].to),e.setHours(0,0,0,0));var p=this.parent.holidays[d].from&&this.parent.holidays[d].to?this.parent.dataOperation.getTaskWidth(e,t):this.parent.perDayWidth,h=this.parent.dataOperation.getTaskLeft(e,!1),u=i.i(r.createElement)("div",{className:n.A,styles:"left:"+h+"px; width:"+p+"px; height:100%;"}),c=l<s?l/2:s/2,g=i.i(r.createElement)("span",{className:n.B,styles:"top:"+c+"px;left:"+p/2+"px;"});g[this.parent.disableHtmlEncode?"textContent":"innerHTML"]=this.parent.holidays[d].label?this.parent.holidays[d].label:"",u.appendChild(g),this.parent.holidays[d].cssClass&&u.classList.add(this.parent.holidays[d].cssClass),a.appendChild(u)}return a},e.prototype.renderWeekends=function(){this.parent.highlightWeekends?(this.createNonworkingContainer(),this.nonworkingContainer.contains(this.weekendContainer)||(this.weekendContainer=i.i(r.createElement)("div",{className:n.C}),this.nonworkingContainer.appendChild(this.weekendContainer)),this.weekendContainer.innerHTML=this.getWeekendElements().innerHTML):this.weekendContainer&&(i.i(r.remove)(this.weekendContainer),this.nonworkingContainer&&0===this.nonworkingContainer.childNodes.length&&i.i(r.remove)(this.nonworkingContainer))},e.prototype.getWeekendElements=function(){var e=i.i(r.createElement)("div"),t=new Date(this.parent.timelineModule.timelineStartDate.getTime()),a=new Date(this.parent.timelineModule.timelineEndDate.getTime()),s=this.parent.nonWorkingDayIndex,o=!0;do{if(-1!==s.indexOf(t.getDay())){var l=this.parent.dataOperation.getTaskLeft(t,!1),d=this.parent.perDayWidth;if(o){var p=new Date(t.getTime()),h=new Date(p.getTime());h.setDate(h.getDate()+1),h.setHours(0,0,0,0),d=this.parent.dataOperation.getTaskWidth(p,h),o=!1}var u=new Date(t);u.setDate(u.getDate()+1),u.getTimezoneOffset()==this.parent.timelineModule.timelineStartDate.getTimezoneOffset()||this.weekendWidthUpdated||"Hour"==this.parent.timelineModule.bottomTier&&1===this.parent.timelineSettings.bottomTier.count&&(d-=this.parent.timelineSettings.timelineUnitSize,this.weekendWidthUpdated=!0);var c=i.i(r.createElement)("div",{className:n.D,styles:"left:"+l+"px;width:"+d+"px;height:100%;"});e.appendChild(c)}t.setDate(t.getDate()+1),t.setHours(0,0,0,0)}while(t<a);return e},e.prototype.updateHolidayLabelHeight=function(){var e=this.parent.getContentHeight(),t=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(t=this.parent.toolbarModule.element.offsetHeight);for(var a=this.parent.ganttHeight-t-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight,s=a<e?a/2:e/2,o=this.holidayContainer.querySelectorAll("."+n.B),l=0;l<o.length;l++)o[l].style.top=i.i(r.formatUnit)(s)},e.prototype.updateContainerHeight=function(){var e=this.parent.getContentHeight();this.holidayContainer&&(this.holidayContainer.style.height=i.i(r.formatUnit)(e),this.updateHolidayLabelHeight()),this.weekendContainer&&(this.weekendContainer.style.height=i.i(r.formatUnit)(e))},e.prototype.removeContainers=function(){this.holidayContainer&&i.i(r.remove)(this.holidayContainer),this.weekendContainer&&i.i(r.remove)(this.weekendContainer),this.nonworkingContainer&&i.i(r.remove)(this.nonworkingContainer)},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var r=i(0),n=(i.n(r),i(3)),a=i(4),s=(i.n(a),this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},s.apply(this,arguments)}),o=function(){function e(e){this.isZoomIn=!1,this.isZooming=!1,this.isZoomToFit=!1,this.topTierCollection=[],this.bottomTierCollection=[],this.parent=e,this.initProperties()}return e.prototype.initProperties=function(){this.timelineStartDate=null,this.timelineEndDate=null,this.totalTimelineWidth=0,this.customTimelineSettings=null,this.parent.isTimelineRoundOff=!this.isZoomToFit&&!!i.i(r.isNullOrUndefined)(this.parent.projectStartDate),this.parent.enablePersistence&&(this.parent.timelineSettings=this.parent.currentZoomingLevel)},e.prototype.validateTimelineProp=function(){this.roundOffDays(),this.processTimelineProperty(),this.timelineWidthCalculation()},e.prototype.refreshTimeline=function(){this.initProperties(),this.processTimelineUnit(),this.parent.dataOperation.calculateProjectDates(),this.parent.isFromOnPropertyChange||this.parent.updateProjectDates(this.parent.cloneProjectStartDate,this.parent.cloneProjectEndDate,this.parent.isTimelineRoundOff)},e.prototype.refreshTimelineByTimeSpan=function(){this.validateTimelineProp(),this.parent.ganttChartModule.chartTimelineContainer.innerHTML="",this.createTimelineSeries()},e.prototype.updateChartByNewTimeline=function(){this.parent.chartRowsModule.refreshChartByTimeline(),this.parent.notify("refreshDayMarkers",{})},e.prototype.processZooming=function(e){this.isZoomToFit=!1,i.i(r.isNullOrUndefined)(this.parent.zoomingProjectStartDate)||(this.parent.cloneProjectStartDate=this.parent.cloneProjectStartDate.getTime()<this.parent.zoomingProjectStartDate.getTime()?this.parent.cloneProjectStartDate:this.parent.zoomingProjectStartDate,this.parent.cloneProjectEndDate=this.parent.cloneProjectEndDate.getTime()>this.parent.zoomingProjectEndDate.getTime()?this.parent.cloneProjectEndDate:this.parent.zoomingProjectEndDate),this.parent.zoomingProjectStartDate=null,this.parent.zoomingProjectEndDate=null;var t=this.checkCurrentZoomingLevel();this.isZoomIn=e,this.isZooming=!0;var n=e?t+1:t-1;this.parent.toolbarModule&&(e?n===this.parent.zoomingLevels[this.parent.zoomingLevels.length-1].level?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!1):this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!0):n===this.parent.zoomingLevels[0].level?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!1):this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!0)),n=this.parent.zoomingLevels.findIndex(function(e){return e.level===n});var a=this.parent.zoomingLevels[n],s={requestType:e?"beforeZoomIn":"beforeZoomOut",timeline:a,cancel:!1};this.parent.trigger("actionBegin",s),s.cancel||(a=s.timeline,this.changeTimelineSettings(a))},e.prototype.changeTimelineSettings=function(e){var t=this,n=this.isSingleTier?"None"===this.customTimelineSettings.topTier.unit?"topTier":"bottomTier":null;Object.keys(this.customTimelineSettings).forEach(function(a){if(a!==n)t.customTimelineSettings[a]="object"!=typeof e[a]||i.i(r.isNullOrUndefined)(e[a])?e[a]:s({},e[a]);else{var o="topTier"===a?"bottomTier":"topTier";t.customTimelineSettings[o]=s({},e.bottomTier)}}),this.parent.isTimelineRoundOff=!this.isZoomToFit&&!!i.i(r.isNullOrUndefined)(this.parent.projectStartDate),this.processTimelineUnit(),this.parent.updateProjectDates(this.parent.cloneProjectStartDate,this.parent.cloneProjectEndDate,this.parent.isTimelineRoundOff);var a=this.parent.criticalPathModule;if(this.parent.enableCriticalPath&&a&&a.criticalConnectorLine(a.criticalPathCollection,a.detailPredecessorCollection,!0,a.predecessorCollectionTaskIds),this.isZooming||this.isZoomToFit){var o={requestType:this.isZoomIn?"AfterZoomIn":this.isZoomToFit?"AfterZoomToProject":"AfterZoomOut",timeline:this.parent.currentZoomingLevel};this.parent.trigger("actionComplete",o)}},e.prototype.processZoomToFit=function(){this.isZoomToFit=!0,this.isZooming=!1,this.parent.zoomingProjectStartDate||(this.parent.zoomingProjectStartDate=this.parent.cloneProjectStartDate,this.parent.zoomingProjectEndDate=this.parent.cloneProjectEndDate),this.parent.dataOperation.calculateProjectDates(),this.parent.zoomingProjectStartDate>this.parent.cloneProjectStartDate&&(this.parent.cloneProjectStartDate=new Date(this.parent.allowUnscheduledTasks?this.parent.zoomingProjectStartDate:this.parent.cloneProjectStartDate));var e,t,n,a=this.parent.cloneProjectEndDate.getTime()-this.parent.cloneProjectStartDate.getTime(),s=a/864e5,o=this.parent.ganttChartModule.chartElement.offsetWidth,l=o/s,d=this.parent.zoomingLevels.slice(),p=d.sort(function(e,t){return e.perDayWidth<t.perDayWidth?1:-1});if(0!==l){for(var h=0;h<p.length;h++){if(t=p[h],h===p.length-1){e=p[h];break}if(n=p[h+1],l>=t.perDayWidth){e=p[h];break}if(l<t.perDayWidth&&l>n.perDayWidth){e=p[h+1];break}}var u=i.i(r.extend)({},{},e,!0);this.roundOffDateToZoom(this.parent.cloneProjectStartDate,!0,l,u.bottomTier.unit,e),this.roundOffDateToZoom(this.parent.cloneProjectEndDate,!1,l,u.bottomTier.unit,e);var c=this.calculateNumberOfTimelineCells(u),g=this.parent.ganttChartModule.scrollElement.offsetHeight-17,f=this.parent.ganttChartModule.chartBodyContent.offsetHeight,m=f<=g?0:17;u.timelineUnitSize=Math.abs(o-m)/c;var y={requestType:"beforeZoomToProject",timeline:u};this.parent.toolbarModule&&this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin",this.parent.controlId+"_zoomout"],!0),this.parent.trigger("actionBegin",y),this.changeTimelineSettings(u)}},e.prototype.bottomTierCellWidthCalc=function(e,t,i){var r;switch(e){case"Minutes":r=6e4*t.bottomTier.count;break;case"Hour":r=36e5*t.bottomTier.count;break;case"Week":r=6048e5*t.bottomTier.count;break;case"Day":r=864e5*t.bottomTier.count;break;case"Month":var n=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();r=t.bottomTier.count*(86400*n*1e3);break;case"Year":var a=i.getFullYear()%400==0||i.getFullYear()%100!=0&&i.getFullYear()%4==0?366:365;r=t.bottomTier.count*(86400*a*1e3)}return r},e.prototype.roundOffDateToZoom=function(e,t,i,r,n){var a=this.bottomTierCellWidthCalc(r,n,e);t?e.setTime(e.getTime()-a):e.setTime(e.getTime()+a)},e.prototype.calculateNumberOfTimelineCells=function(e){var t=Math.abs((this.parent.cloneProjectEndDate.getTime()-this.parent.cloneProjectStartDate.getTime())/864e5),i=e.bottomTier.count,r=e.bottomTier.unit;return"Day"===r?t/i:"Week"===r?t/i/7:"Month"===r?t/i/28:"Year"===r?t/i/336:"Hour"===r?t*(24/i):t*(1440/i)},e.prototype.processTimelineUnit=function(){var e=["timelineViewMode","timelineUnitSize","weekStartDay","weekendBackground"],t={topTier:["unit","format","count","formatter"],bottomTier:["unit","format","count","formatter"]},i=["Year","Month","Week","Day","Hour","Minutes"];this.customTimelineSettings=this.customTimelineSettings?this.customTimelineSettings:this.extendFunction(this.parent.timelineSettings,e,t),-1===i.indexOf(this.customTimelineSettings.topTier.unit)&&-1===i.indexOf(this.customTimelineSettings.bottomTier.unit)?(this.customTimelineSettings.topTier.unit=-1!==i.indexOf(this.customTimelineSettings.timelineViewMode)?this.customTimelineSettings.timelineViewMode:"Week",this.customTimelineSettings.bottomTier.unit=5!==i.indexOf(this.customTimelineSettings.topTier.unit)?i[i.indexOf(this.customTimelineSettings.topTier.unit)+1]:"None"):-1!==i.indexOf(this.customTimelineSettings.topTier.unit)&&-1!==i.indexOf(this.customTimelineSettings.bottomTier.unit)&&i.indexOf(this.customTimelineSettings.topTier.unit)>i.indexOf(this.customTimelineSettings.bottomTier.unit)?this.customTimelineSettings.bottomTier.unit=this.customTimelineSettings.topTier.unit:(this.customTimelineSettings.topTier.unit=-1===i.indexOf(this.customTimelineSettings.topTier.unit)?"None":this.customTimelineSettings.topTier.unit,this.customTimelineSettings.bottomTier.unit=-1===i.indexOf(this.customTimelineSettings.bottomTier.unit)?"None":this.customTimelineSettings.bottomTier.unit),this.topTier=this.customTimelineSettings.topTier.unit,this.bottomTier=this.customTimelineSettings.bottomTier.unit,this.previousIsSingleTier=this.isSingleTier,this.isSingleTier="None"===this.topTier||"None"===this.bottomTier},e.prototype.processTimelineProperty=function(){this.customTimelineSettings.topTier.count="None"===this.topTier?1:this.validateCount(this.customTimelineSettings.topTier.unit,this.customTimelineSettings.topTier.count,"topTier"),this.customTimelineSettings.bottomTier.count="None"===this.customTimelineSettings.bottomTier.unit?1:this.validateCount(this.customTimelineSettings.bottomTier.unit,this.customTimelineSettings.bottomTier.count,"bottomTier"),this.customTimelineSettings.bottomTier.format=this.validateFormat(this.customTimelineSettings.bottomTier.unit,this.customTimelineSettings.bottomTier.format),this.customTimelineSettings.topTier.format=this.validateFormat(this.topTier,this.customTimelineSettings.topTier.format),this.customTimelineSettings.weekStartDay=this.customTimelineSettings.weekStartDay>=0&&this.customTimelineSettings.weekStartDay<=6?this.customTimelineSettings.weekStartDay:0,this.checkCurrentZoomingLevel()},e.prototype.calculateZoomingLevelsPerDayWidth=function(){for(var e=this.parent.zoomingLevels,t=0;t<e.length;t++){var i=this.getPerDayWidth(e[t].timelineUnitSize,e[t].bottomTier.count,e[t].bottomTier.unit);e[t].perDayWidth=i}},e.prototype.checkCurrentZoomingLevel=function(){var e="None"!==this.customTimelineSettings.bottomTier.unit?this.customTimelineSettings.bottomTier.count:this.customTimelineSettings.topTier.count,t="None"!==this.customTimelineSettings.bottomTier.unit?this.customTimelineSettings.bottomTier.unit:this.customTimelineSettings.topTier.unit,i=this.getCurrentZoomingLevel(t,e);return this.parent.toolbarModule&&(i===this.parent.zoomingLevels[this.parent.zoomingLevels.length-1].level?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!1):i===this.parent.zoomingLevels[0].level&&this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!1)),this.parent.currentZoomingLevel=this.parent.zoomingLevels[i],i},e.prototype.getCurrentZoomingLevel=function(e,t){var i,r,n,a,s;this.parent.zoomingLevels.length||(this.parent.zoomingLevels=this.parent.getZoomingLevels());var o=this.parent.zoomingLevels.filter(function(t){return t.bottomTier.unit===e});if(0===o.length){var l=this.getClosestUnit(e,"",!1);o=this.parent.zoomingLevels.filter(function(e){return e.bottomTier.unit===l})}for(var d=o.sort(function(e,t){return e.bottomTier.count<t.bottomTier.count?1:-1}),p=0;p<d.length;p++){if(s=d[p],p===d.length-1){i=d[p].level;break}if(a=d[p+1],t>=s.bottomTier.count){r=d[p],n=d.filter(function(e){return e.bottomTier.count===r.bottomTier.count}),i=n.length>1?this.checkCollectionsWidth(n):n[0].level;break}if(t<s.bottomTier.count&&t>a.bottomTier.count){r=d[p+1],n=d.filter(function(e){return e.bottomTier.count===r.bottomTier.count}),i=n.length>1?this.checkCollectionsWidth(n):n[0].level;break}}return i},e.prototype.getClosestUnit=function(e,t,i){var r=["Year","Month","Week","Day","Hour","Minutes"],n=r.indexOf(e);return 0===n&&(i=!0),e=this.isZoomIn||i?r[n+1]:r[n-1],0===this.parent.zoomingLevels.filter(function(t){return t.bottomTier.unit===e}).length?("Year"===e&&(i=!0),t=e,this.getClosestUnit(e,t,i)):e},e.prototype.checkCollectionsWidth=function(e){for(var t,i,r,n=e,a=this.customTimelineSettings.timelineUnitSize,s=n.sort(function(e,t){return e.timelineUnitSize<t.timelineUnitSize?1:-1}),o=0;o<s.length;o++){if(r=s[o],o===s.length-1){t=s[o].level;break}if(i=s[o+1],a>=r.timelineUnitSize){t=s[o].level;break}if(a<r.timelineUnitSize&&a>i.timelineUnitSize){t=s[o+1].level;break}}return t},e.prototype.updateTimelineHeaderHeight=function(){if(this.parent.timelineModule.isSingleTier?(i.i(r.addClass)([this.parent.ganttChartModule.chartTimelineContainer],n._27),this.parent.treeGrid.element&&(i.i(r.addClass)(this.parent.treeGrid.element.querySelectorAll(".e-headercell"),n._27),i.i(r.addClass)(this.parent.treeGrid.element.querySelectorAll(".e-columnheader"),n._27))):(i.i(r.removeClass)([this.parent.ganttChartModule.chartTimelineContainer],n._27),this.parent.treeGrid.element&&(i.i(r.removeClass)(this.parent.treeGrid.element.querySelectorAll(".e-headercell"),n._27),i.i(r.removeClass)(this.parent.treeGrid.element.querySelectorAll(".e-columnheader"),n._27))),this.previousIsSingleTier!==this.isSingleTier){var e=0;i.i(r.isNullOrUndefined)(this.parent.toolbarModule)||i.i(r.isNullOrUndefined)(this.parent.toolbarModule.element)||(e=this.parent.toolbarModule.element.offsetHeight),this.parent.ganttChartModule.scrollObject.setHeight(this.parent.ganttHeight-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight-e),this.parent.treeGrid.height=this.parent.ganttHeight-e-this.parent.ganttChartModule.chartTimelineContainer.offsetHeight}},e.prototype.createTimelineSeries=function(){var e,t,a,s,o,l=this.isSingleTier?1:2,d="None"===this.topTier?"bottomTier":"topTier";this.updateTimelineHeaderHeight(),this.topTierCollection=[],this.bottomTierCollection=[];for(var p=0;p<l;p++)s=i.i(r.createElement)("table",{className:n._73,styles:"display: block;"}),o=i.i(r.createElement)("thead",{className:n._74,styles:"display:block; border-collapse:collapse"}),e=i.i(r.createElement)("tr",{innerHTML:this.createTimelineTemplate(d)}),t=i.i(r.createElement)("th"),a=i.i(r.createElement)("div",{styles:"width: 20px"}),t.appendChild(a),e.appendChild(t),o.appendChild(e),s.appendChild(o),this.parent.ganttChartModule.chartTimelineContainer.appendChild(s),d="bottomTier",e=null},e.prototype.validateCount=function(e,t,n){var a,s=!i.i(r.isNullOrUndefined)(t)&&parseInt(t.toString(),10)>0?parseInt(t.toString(),10):1,o=Math.abs(this.timelineRoundOffEndDate.getTime()-this.timelineStartDate.getTime());switch(e){case"Year":a=Math.round(o/864e5/336),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Month":a=Math.round(o/864e5/28),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Week":a=Math.round(o/864e5/7),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Day":a=Math.round(o/864e5),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Hour":a=Math.round(o/36e5),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s));break;case"Minutes":a=Math.round(o/6e4),s=s<=a?s:a>0?a:1,"None"!==this.topTier&&"bottomTier"===n&&(s=this.validateBottomTierCount(e,s))}return t!==s&&this.isZooming&&this.parent.toolbarModule&&("bottomTier"===n||this.isSingleTier)&&(this.isZoomIn?this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomin"],!1):this.parent.toolbarModule.enableItems([this.parent.controlId+"_zoomout"],!1)),s},e.prototype.validateBottomTierCount=function(e,t){var i;switch(e){case"Year":i=t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Month":i="Year"===this.topTier?t<=12*this.customTimelineSettings.topTier.count?t:12*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Week":i="Year"===this.topTier?t<=48*this.customTimelineSettings.topTier.count?t:48*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=4*this.customTimelineSettings.topTier.count?t:4*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Day":i="Year"===this.topTier?t<=336*this.customTimelineSettings.topTier.count?t:336*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=28*this.customTimelineSettings.topTier.count?t:28*this.customTimelineSettings.topTier.count:"Week"===this.topTier?t<=7*this.customTimelineSettings.topTier.count?t:7*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Hour":i="Year"===this.topTier?t<=8064*this.customTimelineSettings.topTier.count?t:8064*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=672*this.customTimelineSettings.topTier.count?t:672*this.customTimelineSettings.topTier.count:"Week"===this.topTier?t<=7*this.customTimelineSettings.topTier.count*24?t:7*this.customTimelineSettings.topTier.count*24:"Day"===this.topTier?t<=24*this.customTimelineSettings.topTier.count?t:24*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count;break;case"Minutes":i="Year"===this.topTier?t<=483840*this.customTimelineSettings.topTier.count?t:483840*this.customTimelineSettings.topTier.count:"Month"===this.topTier?t<=40320*this.customTimelineSettings.topTier.count?t:40320*this.customTimelineSettings.topTier.count:"Week"===this.topTier?t<=7*this.customTimelineSettings.topTier.count*24*60?t:7*this.customTimelineSettings.topTier.count*24*60:"Day"===this.topTier?t<=24*this.customTimelineSettings.topTier.count*60?t:24*this.customTimelineSettings.topTier.count*60:"Hour"===this.topTier?t<=60*this.customTimelineSettings.topTier.count?t:60*this.customTimelineSettings.topTier.count:t<=this.customTimelineSettings.topTier.count?t:this.customTimelineSettings.topTier.count}return i},e.prototype.validateFormat=function(e,t){var i;switch(e){case"Week":i=t||"MMM dd, yyyy";break;case"Day":case"None":i=t||"";break;case"Hour":i=t||"H";break;case"Month":i=t||"MMM yyyy";break;case"Year":i=t||"yyyy";break;case"Minutes":i=t||"m"}return i},e.prototype.extendFunction=function(e,t,i){for(var r=this,n={},a=0;a<t.length;a++)n[t[a]]=e[t[a]];return i&&Object.keys(i).forEach(function(t){n[t]=r.extendFunction(e[t],i[t],null)}),n},e.prototype.formatDateHeader=function(e,t){var i,r=new Date(t.getTime());return""===e?(i=this.parent.globalize.formatDate(r,{format:"E"}),i="zh"===this.parent.locale?i.slice(1):i.slice(0,1)):i=this.parent.globalize.formatDate(r,{format:e}),i},e.prototype.customFormat=function(e,t,n,a,s){return(s="string"==typeof s?i.i(r.getValue)(s,window):s)(e,t,n,a)},e.prototype.createTimelineTemplate=function(e){var t,i,r=!1,n=this.parent,a="",s="",o="topTier"===e?n.timelineModule.customTimelineSettings.topTier.unit:n.timelineModule.customTimelineSettings.bottomTier.unit,l="topTier"===e?n.timelineModule.customTimelineSettings.topTier.count:n.timelineModule.customTimelineSettings.bottomTier.count,d=new Date(this.parent.timelineModule.timelineStartDate.toString()),p=new Date(this.timelineRoundOffEndDate.toString()),h=[];do{var u={};u.startDate=new Date(d.getTime()),"Month"===o&&"bottomTier"===e&&1!=l&&0===h.length&&(r=!0),s=this.getHeaterTemplateString(new Date(d.toString()),o,e,!1,l,u,r),h.push(new Date(d.toString())),r?i=this.calculateQuarterEndDate(d,l).getTime():(t=this.getIncrement(d,l,o),i=d.getTime()+t),r=!1,d.setTime(i),5===d.getHours()&&2===l&&"bottomTier"===e&&"Hour"===this.parent.timelineSettings.bottomTier.unit&&d.setTime(d.getTime()-36e5),d>=p&&(s=this.getHeaterTemplateString(h[h.length-1],o,e,!0,l,u)),a+=s;var c="topTier"===e?this.topTierCollection:this.bottomTierCollection;u.endDate=new Date(d.getTime()),c.push(u)}while(d<p);return a},e.prototype.updateTimelineAfterZooming=function(e,t){var n,a,s,o=document.getElementsByClassName("e-chart-scroll-container e-content")[0];if(!i.i(r.isNullOrUndefined)(o)){var l=o.offsetWidth,d=o.offsetHeight,p=document.getElementsByClassName("e-chart-rows-container")[0].offsetHeight;if(n=Math.abs(this.timelineStartDate.getTime()-e.getTime()),n/=864e5,a="None"===this.bottomTier?this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize,this.customTimelineSettings.topTier.count,this.topTier):this.getPerDayWidth(this.customTimelineSettings.timelineUnitSize,this.customTimelineSettings.bottomTier.count,this.bottomTier),s=d<p?a*n+17:a*n,l>=s){var h=l-s;h=Math.round(h/a),e.setDate(e.getDate()+h),this.parent.timelineModule.timelineEndDate=e,t&&this.parent.updateProjectDates(this.timelineStartDate,this.timelineEndDate,this.parent.isTimelineRoundOff)}}},e.prototype.getTimelineRoundOffEndDate=function(e){var t="None"===this.topTier?this.bottomTier:this.topTier,n=new Date(e.toString());return this.parent.isTimelineRoundOff&&("Hour"===t?n.setMinutes(60):"Minutes"===t?n.setSeconds(60):n.setHours(24,0,0,0)),(this.isZooming||this.parent.isLoad||this.parent.isFromOnPropertyChange)&&i.i(r.isNullOrUndefined)(this.parent.projectEndDate)&&this.updateTimelineAfterZooming(n,!1),n},e.prototype.getIncrement=function(e,t,i){var r,n=new Date(e.getTime()),a=new Date(e.getTime());switch(i){case"Year":n=e,a=new Date(e.getFullYear()+(t-1),11,31),r=a.getTime()-n.getTime()+864e5;break;case"Month":n=e,a=new Date(e.getFullYear(),e.getMonth()+t,1),r=a.getTime()-n.getTime();break;case"Week":var s=this.parent.timelineModule.customTimelineSettings.weekStartDay,o=e.getDay()<s?s-e.getDay():6-e.getDay()+s;t=o>0?t-1:0,a.setHours(24,0,0,0),o=e.getDay()<s&&o>0?o-1:o,a.setDate(a.getDate()+(o+7*t)),r=a.getTime()-n.getTime();break;case"Day":a.setHours(24,0,0,0),r=a.getTime()-n.getTime()+864e5*(t-1);break;case"Hour":a.setMinutes(60),a.setSeconds(0),r=a.getTime()-n.getTime()+36e5*(t-1),r=this.checkDate(n,a,r,t);break;case"Minutes":a.setSeconds(60),r=a.getTime()-n.getTime()+6e4*(t-1)}return r},e.prototype.checkDate=function(e,t,i,r){var n=new Date(e.getTime());if(n.setTime(n.getTime()+i),1!==r&&(n.getTime()-t.getTime())/36e5!=r&&e.getTimezoneOffset()!==n.getTimezoneOffset()){var a=r-(n.getTime()-t.getTime())/36e5;this.parent.isInDst(n)?this.parent.isInDst(n)&&2!==r&&(i-=36e5*a):i+=36e5*a}return i},e.prototype.isWeekendHeaderCell=function(e,t,i){return!("Day"!==e&&"Hour"!==e&&"Minutes"!==e||1!==this.customTimelineSettings[t].count&&"Hour"!==e&&"Minutes"!==e||-1===this.parent.nonWorkingDayIndex.indexOf(i.getDay()))},e.prototype.calculateQuarterEndDate=function(e,t){var i=e.getMonth();return 3===t?i>=0&&i<=2?new Date(e.getFullYear(),3,1):i>=3&&i<=5?new Date(e.getFullYear(),6,1):i>=6&&i<=8?new Date(e.getFullYear(),9,1):new Date(e.getFullYear()+1,0,1):i>=0&&i<=5?new Date(e.getFullYear(),6,1):new Date(e.getFullYear()+1,0,1)},e.prototype.getHeaterTemplateString=function(e,t,a,s,o,l,d){var p,h="",u="",c="topTier"===a?this.parent.timelineModule.customTimelineSettings.topTier.format:this.parent.timelineModule.customTimelineSettings.bottomTier.format,g="topTier"===a?this.parent.timelineModule.customTimelineSettings.topTier.formatter:this.parent.timelineModule.customTimelineSettings.bottomTier.formatter,f=i.i(r.isNullOrUndefined)(g)?this.parent.globalize.formatDate(e,{format:this.parent.getDateFormat()}):this.customFormat(e,c,a,t,g);p=this.getIncrement(e,o,t)/864e5*this.parent.perDayWidth;var m=p;p=s||d?s?this.calculateWidthBetweenTwoDate(t,e,this.timelineRoundOffEndDate):this.calculateWidthBetweenTwoDate(t,e,this.calculateQuarterEndDate(e,o)):p;var y=this.isWeekendHeaderCell(t,a,e),v="topTier"===a?" e-gantt-top-cell-text":"",D=i.i(r.isNullOrUndefined)(g)?this.formatDateHeader(c,e):this.customFormat(e,c,a,t,g);return u+=this.parent.timelineModule.isSingleTier?'<th class="'+n._75+" ":'<th class="'+n._76,u+=y?" "+n._77:"",u+='" tabindex="-1" aria-label= "'+this.parent.localeObj.getConstant("timelineCell")+" "+f,u+='" style="width:'+p+"px;",u+=y&&this.customTimelineSettings.weekendBackground?"background-color:"+this.customTimelineSettings.weekendBackground+";":"",u+='"><div class="'+n._78+v+'" style="width:'+(p-1)+"px;"+(this.parent.timelineSettings.showTooltip?'"title="'+f:""),u+='">'+D+"</div>",h+=u,h+="</th>",!this.isSingleTier&&"topTier"!==a||s?(this.isSingleTier||"topTier"===a)&&s&&(this.totalTimelineWidth=this.totalTimelineWidth-m+p):this.totalTimelineWidth=this.totalTimelineWidth+p,l.value=D,l.isWeekend=y,l.width=m,h},e.prototype.calculateWidthBetweenTwoDate=function(e,t,i){return(i.getTime()-t.getTime())/864e5*this.parent.perDayWidth},e.prototype.timelineWidthCalculation=function(){var e=this.customTimelineSettings.timelineUnitSize,t=this.customTimelineSettings.bottomTier.count,i=this.customTimelineSettings.topTier.count;this.bottomTierCellWidth=e,"None"===this.bottomTier?this.parent.perDayWidth=this.getPerDayWidth(e,i,this.topTier):this.parent.perDayWidth=this.getPerDayWidth(e,t,this.bottomTier),this.topTierCellWidth="None"!==this.bottomTier?"Week"===this.topTier?7*this.parent.perDayWidth:"Hour"===this.topTier?this.parent.perDayWidth/24:"Minutes"===this.topTier?this.parent.perDayWidth/1440:this.parent.perDayWidth:e,this.topTierCellWidth=this.isSingleTier?this.topTierCellWidth:this.topTierCellWidth*i},e.prototype.getPerDayWidth=function(e,t,i){var r;switch(i){case"Year":r=e/t/336;break;case"Month":r=e/t/28;break;case"Week":r=e/t/7;break;case"Day":r=e/t;break;case"Hour":r=24/t*e;break;case"Minutes":r=1440/t*e}return r},e.prototype.roundOffDays=function(){var e=this.parent.cloneProjectStartDate,t=this.parent.cloneProjectEndDate,i="None"===this.topTier?this.bottomTier:this.topTier;if(this.parent.isTimelineRoundOff){if("Year"===i)e=new Date(e.getFullYear(),0,1),t=new Date(t.getFullYear(),11,31);else if("Month"===i)e=new Date(e.getFullYear(),e.getMonth(),1),t=new Date(t.getFullYear(),t.getMonth()+1,0);else if("Week"===i){var r=this.parent.timelineModule.customTimelineSettings.weekStartDay,n=e.getDay()<r?e.getDate()-(7-r+e.getDay()):e.getDate()-e.getDay()+r;e.setDate(n);var a=t.getDate()-t.getDay(),s=a+6+r;t.setDate(s)}"Hour"===i?e.setMinutes(0):"Minutes"===i?e.setSeconds(0):e.setHours(0,0,0,0)}this.timelineStartDate=e,this.timelineEndDate=t,this.timelineRoundOffEndDate=this.getTimelineRoundOffEndDate(this.timelineEndDate)},e.prototype.updateScheduleDatesByToolBar=function(e,t,i,r){if("Year"===e&&("prevTimeSpan"===t?i=0===i.getMonth()?new Date(i.getFullYear()-1,0,1):new Date(i.getFullYear(),0,1):r=11===r.getMonth()?new Date(r.getFullYear()+1,0,1):new Date(r.getFullYear(),12,1)),"Month"===e&&("prevTimeSpan"===t?i=1===i.getDate()?new Date(i.getFullYear(),i.getMonth()-1,1):new Date(i.getFullYear(),i.getMonth(),1):r=new Date(r.getFullYear(),r.getMonth()+1,1)),"Week"===e){var n=this.parent.timelineModule.customTimelineSettings.weekStartDay,a=void 0;"prevTimeSpan"===t?(a=i.getDay()<n?7-(n-i.getDay()):i.getDay()-n,i.setHours(0,0,0,0),0===a?i.setDate(i.getDate()-7):i.setDate(i.getDate()-a)):(a=r.getDay()<n?n-r.getDay():7-r.getDay()+n,r.setHours(0,0,0,0),0===a?r.setDate(r.getDate()+6):r.setDate(r.getDate()+a))}"Day"===e&&("prevTimeSpan"===t?0===i.getHours()?i.setTime(i.getTime()-864e5):i.setHours(0):0===r.getHours()?r.setTime(r.getTime()+864e5):r.setHours(24)),"Hour"===e&&("prevTimeSpan"===t?0===i.getMinutes()?i.setTime(i.getTime()-36e5):i.setMinutes(0):0===r.getMinutes()?r.setTime(r.getTime()+36e5):r.setMinutes(60)),"Minutes"===e&&("prevTimeSpan"===t?0===i.getSeconds()?i.setTime(i.getTime()-6e4):i.setSeconds(0):0===r.getSeconds()?r.setTime(r.getTime()+6e4):r.setSeconds(60)),this.parent.cloneProjectStartDate=i,this.parent.cloneProjectEndDate=r},e.prototype.updateTimeLineOnEditing=function(e,t){if(e[0].length>=1)for(var n=0;n<e.length;n++){var s=e[n],o=s.filter(function(e){return!i.i(r.isNullOrUndefined)(e.ganttProperties.startDate)}),l=s.filter(function(e){return!i.i(r.isNullOrUndefined)(e.ganttProperties.endDate)}),d=o.length>0?new Date(a.DataUtil.aggregates.min(o,"ganttProperties.startDate")):null,p=l.length>0?new Date(a.DataUtil.aggregates.max(l,"ganttProperties.endDate")):null,h=new Date(this.parent.dataOperation.checkStartDate(this.timelineStartDate).getTime()),u=new Date(this.parent.dataOperation.checkEndDate(this.timelineEndDate).getTime()),c=i.i(r.isNullOrUndefined)(d)?null:this.parent.dataOperation.getTaskLeft(d,!1),g=i.i(r.isNullOrUndefined)(p)?null:this.parent.dataOperation.getTaskLeft(p,!1),f=this.parent.dataOperation.getTaskLeft(h,!1),m=this.parent.dataOperation.getTaskLeft(u,!1),y=void 0;!i.i(r.isNullOrUndefined)(c)&&(c<this.bottomTierCellWidth||c<=f)?(y="prevTimeSpan",d=d>this.timelineStartDate?this.timelineStartDate:d):d=this.timelineStartDate,!i.i(r.isNullOrUndefined)(g)&&(g>=this.totalTimelineWidth-this.bottomTierCellWidth||g>=m)?(y="prevTimeSpan"===y?"both":"nextTimeSpan",p=p<this.timelineEndDate?this.timelineEndDate:p):p=this.timelineEndDate,y?this.performTimeSpanAction(y,t,d,p):i.i(r.isNullOrUndefined)(s[0].ganttProperties.segments)||this.parent.dataOperation.updateWidthLeft(s[0]);break}},e.prototype.performTimeSpanAction=function(e,t,n,a,s){s=i.i(r.isNullOrUndefined)(s)?"None"===this.parent.timelineModule.topTier?this.parent.timelineModule.bottomTier:this.parent.timelineModule.topTier:s;var o=new Date(this.parent.cloneProjectStartDate.getTime()),l=new Date(this.parent.cloneProjectEndDate.getTime());"publicMethod"!==t&&"both"===e?(this.updateScheduleDatesByToolBar(s,"prevTimeSpan",n,a),this.updateScheduleDatesByToolBar(s,"nextTimeSpan",new Date(this.parent.cloneProjectStartDate.getTime()),a)):this.updateScheduleDatesByToolBar(s,e,n,a);var d=this.timeSpanActionEvent("actionBegin",e,t);if(d.cancel)this.parent.cloneProjectStartDate=o,this.parent.cloneProjectEndDate=l;else{if(this.parent.updateProjectDates(d.projectStartDate,d.ProjectEndDate,d.isTimelineRoundOff,t),"prevTimeSpan"===e&&"publicMethod"===t)this.parent.ganttChartModule.updateScrollLeft(0);else if("nextTimeSpan"===e&&"publicMethod"===t)this.parent.ganttChartModule.updateScrollLeft(this.parent.timelineModule.totalTimelineWidth);else if("nextTimeSpan"===e&&"TaskbarEditing"===t){var p=document.getElementsByClassName("e-chart-scroll-container e-content")[0].scrollLeft;this.parent.element.querySelector(".e-timeline-header-container").scrollLeft=p}this.parent.timelineModule.timeSpanActionEvent("actionComplete",e,t)}},e.prototype.timeSpanActionEvent=function(e,t,i){var r={};return r.projectStartDate=new Date(this.parent.cloneProjectStartDate.getTime()),r.ProjectEndDate=new Date(this.parent.cloneProjectEndDate.getTime()),r.requestType="publicMethod"===i?t:"beforeAdd"===i?"TimelineRefreshOnAdd":"TaskbarEditing"===i?"TimelineRefreshOnEdit":t,"actionBegin"===e&&(r.isTimelineRoundOff=this.parent.isTimelineRoundOff,r.cancel=!1),r.action="TimescaleUpdate",this.parent.trigger(e,r),r},e}()},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var r=i(8),n=(i.n(r),i(2)),a=i(3),s=i(0),o=(i.n(s),i(4)),l=(i.n(o),function(){function e(e){this.parent=e,this.createTooltip(),this.parent.on("destroy",this.destroy,this)}return e.prototype.createTooltip=function(){this.toolTipObj=new r.Tooltip,this.toolTipObj.target=".e-header-cell-label, .e-gantt-child-taskbar,.e-gantt-parent-taskbar, .e-gantt-milestone, .e-gantt-unscheduled-taskbar.e-event-markers, .e-baseline-bar, .e-event-markers,.e-connector-line-container, .e-indicator-span, .e-notes-info, .e-gantt-manualparent-milestone,.e-taskbar-left-resizer, .e-taskbar-right-resizer, .e-baseline-gantt-milestone, .e-gantt-manualparenttaskbar",this.toolTipObj.position="BottomCenter",this.toolTipObj.openDelay=700,this.toolTipObj.enableHtmlSanitizer=!1,this.toolTipObj.cssClass=a._14,this.toolTipObj.animation={open:{effect:"None",delay:0},close:{effect:"None",delay:0}},this.toolTipObj.afterOpen=this.updateTooltipPosition.bind(this),this.toolTipObj.showTipPointer=!1,this.toolTipObj.beforeRender=this.tooltipBeforeRender.bind(this),this.toolTipObj.afterClose=this.tooltipCloseHandler.bind(this),this.toolTipObj.isStringTemplate=!0,this.toolTipObj.appendTo(this.parent.element)},e.prototype.tooltipBeforeRender=function(e){var t=this.parent;if(t.isOnEdit)return void(e.cancel=!0);var r,l=i.i(s.closest)(e.target,"div."+a.F);r=i.i(s.isNullOrUndefined)(l)?i.i(n.j)(e.target,a._30):e.target;var d,p={data:{},args:e,cancel:!1,content:""};if(e.target.classList.contains("e-header-cell-label"))t.timelineSettings.showTooltip?p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("timeline",d,t,e):e.cancel=!0;else if(t.tooltipSettings.showTooltip)if(r&&(p.data=t.ganttChartModule.getRecordByTaskBar(r),d=p.data),e.target.classList.contains("e-gantt-child-taskbar")||e.target.classList.contains("e-gantt-parent-taskbar")||e.target.classList.contains("e-gantt-milestone")||e.target.classList.contains("e-gantt-unscheduled-taskbar")||e.target.classList.contains("e-taskbar-left-resizer")||e.target.classList.contains("e-taskbar-right-resizer")||e.target.classList.contains("e-gantt-manualparenttaskbar")&&t.tooltipSettings.taskbar){var h=void 0;t.tooltipSettings.taskbar&&(h=t.tooltipModule.templateCompiler(t.tooltipSettings.taskbar,t,d,"TooltipTaskbarTemplate")),p.content=this.toolTipObj.content=h?h[0]:t.tooltipModule.getTooltipContent(d.ganttProperties.isMilestone?"milestone":"taskbar",d,t,e)}else if(e.target.classList.contains("e-baseline-bar")||e.target.classList.contains("e-baseline-gantt-milestone")){var u=void 0;t.tooltipSettings.baseline&&(u=t.tooltipModule.templateCompiler(t.tooltipSettings.baseline,t,d,"TooltipBaselineTemplate")),p.content=this.toolTipObj.content=u?u[0]:t.tooltipModule.getTooltipContent(d.ganttProperties.isMilestone?"milestone":"baseline",d,t,e)}else if(e.target.classList.contains("e-event-markers"))p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("marker",d,t,e);else if(e.target.classList.contains("e-connector-line-container")){var c=void 0;t.tooltipModule.predecessorTooltipData=t.tooltipModule.getPredecessorTooltipData(e),p.data=this.predecessorTooltipData,t.tooltipSettings.connectorLine&&(c=t.tooltipModule.templateCompiler(t.tooltipSettings.connectorLine,t,t.tooltipModule.predecessorTooltipData,"TooltipConnectorLineTemplate")),p.content=this.toolTipObj.content=c?c[0]:t.tooltipModule.getTooltipContent("connectorLine",d,t,e)}else if(e.target.classList.contains("e-indicator-span"))p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("indicator",d,t,e),i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0);else if(e.target.classList.contains("e-notes-info")){var g=this.parent.ganttChartModule.getRecordByTarget(e.event);p.content=this.toolTipObj.content=g.ganttProperties.notes,i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0)}else e.target.classList.contains("e-gantt-manualparenttaskbar")?(p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("manualtaskbar",d,t,e),i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0)):e.target.classList.contains("e-gantt-manualparent-milestone")&&(p.content=this.toolTipObj.content=t.tooltipModule.getTooltipContent("manualmilestone",d,t,e),i.i(s.isNullOrUndefined)(p.content)&&(e.cancel=!0));else e.cancel=!0;if(!1===e.cancel){var f=new o.Deferred;return t.trigger("beforeTooltipRender",p,function(t){f.resolve(t),t.cancel&&(e.cancel=!0)}),this.toolTipObj.content=p.content,this.parent.isAdaptive||"mouseover"!==e.event.type||(this.currentTarget=e.target,s.EventHandler.add(this.currentTarget,"mousemove",this.mouseMoveHandler.bind(this))),this.parent.renderTemplates(),f}},e.prototype.tooltipCloseHandler=function(e){this.tooltipMouseEvent=null,this.parent.isAdaptive||s.EventHandler.remove(this.currentTarget,"mousemove",this.mouseMoveHandler),this.currentTarget=null},e.prototype.mouseMoveHandler=function(e){this.tooltipMouseEvent=e},e.prototype.updateTooltipPosition=function(e){if(e.element.style.visibility="visible",!i.i(s.isNullOrUndefined)(this.tooltipMouseEvent)&&!e.target.classList.contains("e-notes-info")){var t=this.getPointorPosition(this.tooltipMouseEvent),r=this.parent.getOffsetRect(this.parent.chartPane),n=r.top+this.parent.chartPane.offsetHeight,a=r.left+this.parent.chartPane.offsetWidth,o=t.x,l=t.y;if(a<o+e.element.offsetWidth+10)for(;a<o+e.element.offsetWidth+10;)o=a-e.element.offsetWidth-10,e.element.style.left=o+"px";else o+=10,e.element.style.left=o+"px";window.innerHeight<e.element.offsetHeight+l&&(l=l-e.element.offsetHeight-10),n<l+e.element.offsetHeight+20?l=l-e.element.offsetHeight-10:l+=10,e.element.style.top=l+"px"}},e.prototype.getPointorPosition=function(e){var t,r;return i.i(s.isNullOrUndefined)(i.i(s.getValue)("pageX",e))&&i.i(s.isNullOrUndefined)(i.i(s.getValue)("pageY",e))?i.i(s.isNullOrUndefined)(i.i(s.getValue)("clientX",e))&&i.i(s.isNullOrUndefined)(i.i(s.getValue)("clientY",e))||(t=i.i(s.getValue)("clientX",e)+document.body.scrollLeft+document.documentElement.scrollLeft,r=i.i(s.getValue)("clientY",e)+document.body.scrollTop+document.documentElement.scrollTop):(t=i.i(s.getValue)("pageX",e),r=i.i(s.getValue)("pageY",e)),{x:t,y:r}},e.prototype.getTooltipContent=function(e,t,r,n){var a,o,l;switch(t&&(o=t.ganttProperties,l=i.i(s.isNullOrUndefined)(o.taskName)?"":'<tr class = "e-gantt-tooltip-rowcell"><td colspan="3">'+(this.parent.disableHtmlEncode?o.taskName.replace(/</g,"&lt;").replace(/>/g,"&gt;"):o.taskName)+"</td></tr>"),e){case"milestone":var d=void 0;n.target.className.includes("e-baseline-gantt-milestone")&&!i.i(s.isNullOrUndefined)(o.baselineStartDate)?d=o.baselineStartDate:i.i(s.isNullOrUndefined)(o.startDate)||(d=o.startDate);a='<table class = "e-gantt-tooltiptable"><tbody>'+l+(i.i(s.isNullOrUndefined)(d)?"":'<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(d,this.parent.getDateFormat())+"</td></tr>")+"</tbody></table>";break;case"taskbar":var p=!(t.hasChildRecords&&!o.isAutoSchedule);a='<table class = "e-gantt-tooltiptable"><tbody>'+l+(o.startDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant(p?"startDate":"subTasksStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(p?o.startDate:o.autoStartDate,this.parent.getDateFormat())+"</td></tr>":"")+(o.endDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant(p?"endDate":"subTasksEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(p?o.endDate:o.autoEndDate,this.parent.getDateFormat())+"</td></tr>":"")+(i.i(s.isNullOrUndefined)(o.duration)?"":'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("duration")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getDurationString(p?o.duration:o.autoDuration,o.durationUnit)+"</td></tr>")+(i.i(s.isNullOrUndefined)(o.progress)?"":'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("progress")+"</td><td>:</td><td>"+o.progress+"</td></tr>")+"</tbody></table>";break;case"baseline":a='<table class = "e-gantt-tooltiptable"><tbody>'+l+'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("baselineStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.baselineStartDate,this.parent.getDateFormat())+'</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("baselineEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.baselineEndDate,this.parent.getDateFormat())+"</td></tr></tbody></table>";break;case"marker":var h=r.tooltipModule.getMarkerTooltipData(n),u=h.label?h.label:"";a='<table class = "e-gantt-tooltiptable"><tbody><tr><td>'+this.parent.getFormatedDate(this.parent.dateValidationModule.getDateFromFormat(h.day),this.parent.getDateFormat())+"</td></tr><tr><td>"+u+"</td></tr></tbody></table>";break;case"connectorLine":a='<table class = "e-gantt-tooltiptable"><tbody><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("from")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+r.tooltipModule.predecessorTooltipData.fromName+" ("+r.tooltipModule.predecessorTooltipData.fromId+')</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("to")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+r.tooltipModule.predecessorTooltipData.toName+" ("+r.tooltipModule.predecessorTooltipData.toId+')</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("taskLink")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+r.tooltipModule.predecessorTooltipData.linkText+'</td></tr><tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("lag")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+r.tooltipModule.predecessorTooltipData.offsetString+"</td></tr></tbody></table>";break;case"indicator":n.target.title.length&&(a='<table class = "e-gantt-tooltiptable"><tbody><tr>'+n.target.title+"</tr></tbody></table>");break;case"timeline":a='<table class = "e-gantt-tooltiptable"><tbody><tr>'+n.target.title+"</tr></tbody></table>";break;case"manualtaskbar":var c=o.autoStartDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(o.autoStartDate,this.parent.getDateFormat())+"</td></tr>":"",g=o.autoEndDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.autoEndDate,this.parent.getDateFormat())+"</td></tr>":"",f=i.i(s.isNullOrUndefined)(o.duration)?"":'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("duration")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getDurationString(o.duration,o.durationUnit)+"</td></tr>";a='<table class = "e-gantt-tooltiptable"><tbody>'+l+(o.startDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("startDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(o.startDate,this.parent.getDateFormat())+"</td></tr>":"")+c+(o.endDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("endDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.endDate,this.parent.getDateFormat())+"</td></tr>":"")+g+f+"</tbody></table>";break;case"manualmilestone":var m=o.autoStartDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksStartDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value"> '+this.parent.getFormatedDate(o.autoStartDate,this.parent.getDateFormat())+"</td></tr>":"",y=o.autoEndDate?'<tr><td class = "e-gantt-tooltip-label">'+this.parent.localeObj.getConstant("subTasksEndDate")+'</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.autoEndDate,this.parent.getDateFormat())+"</td></tr>":"";a='<table class = "e-gantt-tooltiptable"><tbody>'+l+('<tr><td class = "e-gantt-tooltip-label"> Date</td><td>:</td><td class = "e-gantt-tooltip-value">'+this.parent.getFormatedDate(o.startDate,this.parent.getDateFormat())+"</tr>")+m+y+"</tbody></table>"}return a},e.prototype.getMarkerTooltipData=function(e){var t=e.target.id.match(/\d+/g);return this.parent.eventMarkers[Number(t)]},e.prototype.getPredecessorTooltipData=function(e){var t=e.target.parentElement.id,i=t.match(/ConnectorLineparent(.*)child(.*)/);i.shift();var r,n;"ResourceView"===this.parent.viewType?(r=this.parent.flatData[this.parent.getTaskIds().indexOf("T"+i[0])],n=this.parent.flatData[this.parent.getTaskIds().indexOf("T"+i[1])]):(r=this.parent.flatData[this.parent.ids.indexOf(i[0])],n=this.parent.flatData[this.parent.ids.indexOf(i[1])]);var a=r.ganttProperties.predecessor.filter(function(e){return e.to===i[1]});return{fromId:"ResourceView"===this.parent.viewType?r.ganttProperties.taskId:r.ganttProperties.rowUniqueID,toId:"ResourceView"===this.parent.viewType?n.ganttProperties.taskId:n.ganttProperties.rowUniqueID,fromName:r.ganttProperties.taskName,toName:n.ganttProperties.taskName,linkType:a[0].type,linkText:this.parent.getPredecessorTextValue(a[0].type),offset:a[0].offset,offsetUnit:a[0].offsetUnit,offsetString:this.parent.getDurationString(a[0].offset,a[0].offsetUnit)}},e.prototype.templateCompiler=function(e,t,r,n){var a=t.chartRowsModule.templateCompiler(e),o=t.chartRowsModule.getTemplateID(n);return a(i.i(s.extend)({index:0},r),t,n,o,!0)},e.prototype.destroy=function(){this.toolTipObj.destroy()},e}())},function(e,t,i){"use strict";i.d(t,"a",function(){return n});var r=i(0),n=(i.n(r),function(){function e(e){this.parent=e}return e.prototype.renderWrapper=function(){this.wrapper=i.i(r.createElement)("div",{className:"e-virtualtable",styles:"position: absolute; transform: translate(0px, 0px);"}),this.parent.ganttChartModule.scrollElement.appendChild(this.wrapper),this.virtualTrack=i.i(r.createElement)("div",{className:"e-virtualtrack",styles:"position: relative; pointer-events: none; width: 100%;"}),this.parent.ganttChartModule.scrollElement.appendChild(this.virtualTrack),this.wrapper.appendChild(this.parent.ganttChartModule.chartBodyContent)},e.prototype.appendChildElements=function(e){this.wrapper.appendChild(e)},e.prototype.adjustTable=function(){var e=this.parent.treeGrid.getContent().querySelector(".e-content").querySelector(".e-virtualtable");this.parent.ganttChartModule.virtualRender.wrapper.style.transform=e.style.transform},e}())},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(22);i.d(t,"Gantt",function(){return r.a}),i.d(t,"PdfHorizontalOverflowType",function(){return r.b}),i.d(t,"parentsUntil",function(){return r.c}),i.d(t,"isScheduledTask",function(){return r.d}),i.d(t,"isCountRequired",function(){return r.e}),i.d(t,"getSwapKey",function(){return r.f}),i.d(t,"isRemoteData",function(){return r.g}),i.d(t,"getTaskData",function(){return r.h}),i.d(t,"updateDates",function(){return r.i}),i.d(t,"formatString",function(){return r.j}),i.d(t,"getIndex",function(){return r.k}),i.d(t,"pixelToPoint",function(){return r.l}),i.d(t,"pointToPixel",function(){return r.m}),i.d(t,"getUid",function(){return r.n}),i.d(t,"load",function(){return r.o}),i.d(t,"rowDataBound",function(){return r.p}),i.d(t,"queryCellInfo",function(){return r.q}),i.d(t,"toolbarClick",function(){return r.r}),i.d(t,"keyPressed",function(){return r.s}),i.d(t,"Edit",function(){return r.t}),i.d(t,"Reorder",function(){return r.u}),i.d(t,"Resize",function(){return r.v}),i.d(t,"Filter",function(){return r.w}),i.d(t,"Sort",function(){return r.x}),i.d(t,"Dependency",function(){return r.y}),i.d(t,"Selection",function(){return r.z}),i.d(t,"Toolbar",function(){return r.A}),i.d(t,"DayMarkers",function(){return r.B}),i.d(t,"CriticalPath",function(){return r.C}),i.d(t,"ContextMenu",function(){return r.D}),i.d(t,"ExcelExport",function(){return r.E}),i.d(t,"ColumnMenu",function(){return r.F}),i.d(t,"RowDD",function(){return r.G}),i.d(t,"PdfExport",function(){return r.H}),i.d(t,"VirtualScroll",function(){return r.I}),i.d(t,"Column",function(){return r.J}),i.d(t,"DayWorkingTime",function(){return r.K}),i.d(t,"AddDialogFieldSettings",function(){return r.L}),i.d(t,"EditDialogFieldSettings",function(){return r.M}),i.d(t,"EditSettings",function(){return r.N}),i.d(t,"EventMarker",function(){return r.O}),i.d(t,"FilterSettings",function(){return r.P}),i.d(t,"SearchSettings",function(){return r.Q}),i.d(t,"Holiday",function(){return r.R}),i.d(t,"LabelSettings",function(){return r.S}),i.d(t,"SelectionSettings",function(){return r.T}),i.d(t,"SplitterSettings",function(){return r.U}),i.d(t,"TaskFields",function(){return r.V}),i.d(t,"TimelineTierSettings",function(){return r.W}),i.d(t,"TimelineSettings",function(){return r.X}),i.d(t,"TooltipSettings",function(){return r.Y}),i.d(t,"SortDescriptor",function(){return r.Z}),i.d(t,"SortSettings",function(){return r._0}),i.d(t,"ResourceFields",function(){return r._1})},function(e,t){e.exports=p},function(e,t){e.exports=h},function(e,t){e.exports=u}])});