UNPKG

@grapecity-software/spread-sheets-ganttsheet

Version:

SpreadJS GanttSheet Plugin

12 lines 293 kB
/*!
 * 
 * SpreadJS Library 18.2.0
 *
 * Copyright(c) GrapeCity Software inc.  All rights reserved.
 *
 * Licensed under the SpreadJS Commercial License.
 * info.xa@grapecity.com
 * https://www.grapecity.com.cn/developer/spreadjs
 *
 */
!function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("@grapecity-software/spread-sheets")):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-sheets"],t):"object"==typeof exports?exports.Spread=t(require("@grapecity-software/spread-sheets")):t(GC)}((function(t){!function(){"use strict";var n,i={"./dist/plugins/gantt/celltypes/complete.js":function(t,n,i){var e,s,r,u,o,h,a=this&&this.qKr||(c=function(t,n){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},c(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}c(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),c;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskCompleteCellType=void 0,e=i("Core"),s=i("./dist/plugins/gantt/celltypes/numberInput.base.js"),r=Math.floor,u=Math.ceil,o=Math.round,h=function(t){function n(){var n=t.call(this)||this;return n.typeName="100",n}return a(n,t),n.prototype.getChangedValue=function(t){var n=t.sheet,i=t.row,e=t.col,s=t.isReservedOnButton,h=n.getValue(i,e);return"Up"===s?h=(5*r(o(100*h)/5)+5)/100:"Down"===s&&(h=(5*u(o(100*h)/5)-5)/100),h<0&&(h=0),h},n}(s.NumberInputCellType),n.TaskCompleteCellType=h,e.CellTypes.ti[100]=h},"./dist/plugins/gantt/celltypes/date.js":function(t,n,i){var e,s,r,u,o,h,a,c=this&&this.qKr||(f=function(t,n){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},f(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}f(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),f;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskDateCellType=void 0,e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/gantt.ns.js"),u=new e.Common.ResourceManager(r.SR,"GanttSheet"),o=u.getResource.bind(u),h=function(t){function n(n,i,e){var s=t.call(this,n)||this;return s.sAi=i,s.rAi=e,s}return c(n,t),n.prototype.parse=function(n){var i,e,s,r,u=t.prototype.parse.call(this,n);if(u instanceof Date)if(0===u.getHours()&&0===u.getMinutes()&&0===u.getSeconds()&&0===u.getMilliseconds())try{i=this.sAi,e=n+" ".concat(i.hour,":").concat(i.minute),(s=t.prototype.parse.call(this,e))instanceof Date&&(u=s)}catch(t){}else 1899===u.getFullYear()&&11===u.getMonth()&&30===u.getDate()&&(r=this.rAi,u.setFullYear(r.getFullYear()),u.setMonth(r.getMonth()),u.setDate(r.getDate()));return u},n}(e.Formatter.GeneralFormatter),a=function(t){function n(n){var i=t.call(this)||this;return i.typeName="101",i.hAi=!!n,i}return c(n,t),Object.defineProperty(n.prototype,"forStartDate",{get:function(){return this.hAi},set:function(t){this.hAi=t},enumerable:!1,configurable:!0}),n.prototype.getDefaultTime=function(t){return this.hAi?{hour:8,minute:0}:{hour:17,minute:0}},n.prototype.getDefaultDate=function(t){return new Date},n.prototype.parse=function(t,n,i){var s,r,u,h,a="string"==typeof n?n:o().DEFAULT_DATE_TIME_FORMAT,c=new e.Formatter.GeneralFormatter(a),f=c.parse(t);if(f instanceof Date&&0===f.getHours()&&0===f.getMinutes()&&0===f.getSeconds()&&0===f.getMilliseconds())try{s=this.getDefaultTime(i),r=t+" ".concat(s.hour,":").concat(s.minute),(u=c.parse(r))instanceof Date&&(f=u)}catch(t){}else 1899===f.getFullYear()&&11===f.getMonth()&&30===f.getDate()&&(h=this.getDefaultDate(i),f.setFullYear(h.getFullYear()),f.setMonth(h.getMonth()),f.setDate(h.getDate()));return f},n.prototype.format=function(t,n,i,s){var r="string"==typeof n?n:o().DEFAULT_DATE_TIME_FORMAT,u=new e.Formatter.GeneralFormatter(r);return u.format(t)},n.prototype.je=function(t,n,i,e){var s=n.formatter,r="string"==typeof s?s:o().DEFAULT_DATE_TIME_FORMAT,u=this.getDefaultTime(e),a=this.getDefaultDate(e);return t.Ii=new h(r,u,a),this.format(i,r,null,e)},n}(s.CellTypes.Text),n.TaskDateCellType=a,s.CellTypes.ti[101]=a},"./dist/plugins/gantt/celltypes/duration.js":function(t,n,i){var e,s,r,u,o=this&&this.qKr||(h=function(t,n){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},h(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}h(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),h;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskDurationCellType=void 0,e=i("Core"),s=i("./dist/plugins/gantt/project/calendar.js"),u=function(t){function n(n){void 0===n&&(n=!0);var i=t.call(this,n)||this;return i.typeName="102",i}return o(n,t),n.prototype.oAi=function(t){if(t&&t.sheet&&t.sheet.NMi)return t.sheet.NMi.project},n.prototype.cAi=function(t){return t.row},n.prototype.parse=function(t,n,i){var e=this.oAi(i);return e?e.parseDuration(t):t},n.prototype.format=function(t,n,i,e){var s=this.oAi(e);return s?s.formatDuration(t):t},n.prototype.je=function(t,n,i,e){var s=this.oAi(e);return s?s.formatDuration(i):i},n.prototype.getChangedValue=function(t){var n,i,e=this.oAi(t),r=t.sheet.getValue(t.row,t.col);if(e)return(r=e.parseDuration(r))?(n=r.value,i=r.unit,"Up"===t.isReservedOnButton?n=Math.floor(n+1):"Down"===t.isReservedOnButton&&(n=Math.max(Math.ceil(n-1),0)),r={value:n,unit:i}):r=s.DurationHelper.default(e.calendarSettings),r=e.parseDuration(r)},n}((r=i("./dist/plugins/gantt/celltypes/numberInput.base.js")).NumberInputCellType),n.TaskDurationCellType=u,e.CellTypes.ti[102]=u},"./dist/plugins/gantt/celltypes/numberInput.base.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l=this&&this.qKr||(d=function(t,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},d(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}d(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),d;function v(t,n,i,e,s){var r,u=t.getCellType(n,i,s);if(u instanceof a){e&&t.Ut.do("setValueForKey",n,i,h,!0,s);try{r=t.getCellRect(n,i,s),t.repaint(r)}finally{e&&t.Ut.do("setValueForKey",n,i,h,void 0,s)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.NumberInputCellType=n.NumberInputCellHitInfo=void 0,e=i("Core"),s=5,r=3,u=5,o=8,h="_leaveCell",a=function(t){function n(n){void 0===n&&(n=!0);var i=t.call(this)||this;return i.showButton=n,i.aAi="None",i.typeName="NumberInput",i}return l(n,t),n.prototype.paint=function(n,i,s,r,u,o,h,a){var c=this.isCurrentCellSelected(a.sheet,a.row,a.col),f=h.hAlign;c&&(h.hAlign=e.HorizontalAlign.left),t.prototype.paint.call(this,n,i,s,r,u,o,h,a),c&&this.showButton&&this.paintButtons(n,s,r,u,o,a),h.hAlign=f},n.prototype.isCurrentCellSelected=function(t,n,i){var e=t.Ut.getValueForKey(n,i,h);return t.getActiveRowIndex()===n&&t.getActiveColumnIndex()===i&&!0!==e},n.prototype.paintButtons=function(t,n,i,e,h,a){this.drawTriangleUp(t,n+e-o-s,i+(h-2*r-u)/2,s,r,a),this.drawTriangleDown(t,n+e-o-s,i+(h-2*r-u)/2+r+u,s,r,a)},n.prototype.drawTriangleUp=function(t,n,i,e,s,r){var u="Up"===this.aAi?"black":"gray";t.beginPath(),t.moveTo(n+e/2,i),t.lineTo(n,i+s),t.lineTo(n+e,i+s),t.lineTo(n+e/2,i),t.closePath(),t.strokeStyle=u,t.stroke(),t.fillStyle=u,t.fill()},n.prototype.drawTriangleDown=function(t,n,i,e,s,r){var u="Down"===this.aAi?"black":"gray";t.beginPath(),t.moveTo(n,i),t.lineTo(n+e/2,i+s),t.lineTo(n+e,i),t.lineTo(n,i),t.closePath(),t.strokeStyle=u,t.stroke(),t.fillStyle=u,t.fill()},n.prototype.getButtonHoveredByHitInfo=function(t){var n=t.cellRect,i=t.x,r=t.y,u=new e.Rect(n.x+n.width-o-s-1,n.y,s+2,n.height/2),h=new e.Rect(n.x+n.width-o-s-1,n.y+n.height/2,s+2,n.height/2);return t.sheet.getActiveRowIndex()===t.row&&t.sheet.getActiveColumnIndex()===t.col&&this.showButton?u.contains(i,r)?"Up":h.contains(i,r)?"Down":"None":"None"},n.prototype.refreshButtonHoverEffect=function(t,n,i){(this.aAi!==n||this.fAi&&this.fAi!==i)&&(this.aAi=n,"None"===this.aAi&&this.fAi?(t.repaint(this.fAi),delete this.fAi):(t.repaint(i),this.fAi=i))},n.prototype.getHitInfo=function(t,n,i,s,r){var u,o;if(r&&(null==(u=r.sheetArea)||3===u))return(o={x:t,y:n,row:r.row,col:r.col,cellRect:s,sheetArea:e.SheetArea.viewport,isReservedLocation:!1,sheet:r.sheet,cellStyle:i,isReservedOnButton:"None"}).isReservedOnButton=this.getButtonHoveredByHitInfo(o),o},n.prototype.processMouseMove=function(n){if(n){var i=n.cellRect;return this.refreshButtonHoverEffect(n.sheet,n.isReservedOnButton,i),t.prototype.processMouseMove.call(this,n)}},n.prototype.getChangedValue=function(t){},n.prototype.processMouseDown=function(n){if(n&&n.row===n.sheet.getActiveRowIndex()&&n.col===n.sheet.getActiveColumnIndex()&&"None"!==n.isReservedOnButton){var i=this.getChangedValue(n);return n.sheet.setValue(n.row,n.col,i),t.prototype.processMouseDown.call(this,n)}},n.prototype.processMouseLeave=function(t){return this.refreshButtonHoverEffect(t.sheet,t.isReservedOnButton,t.cellRect),!1},n.prototype.getAutoFitWidth=function(n,i,e,r,u){var h;return t.prototype.getAutoFitWidth.call(this,n,i,e,r,u)+s+2*o},n.prototype.getAutoFitHeight=function(n,i,e,s,o){var h=t.prototype.getAutoFitHeight.call(this,n,i,e,s,o);return Math.max(h,r+3*u)},n.prototype.toJSON=function(){return{typeName:this.typeName}},n}(e.CellTypes.Text),n.NumberInputCellType=a,c=function(){function t(){this.isReservedOnButton="None"}return t}(),n.NumberInputCellHitInfo=c,f="numberInputCellType",e.Worksheet.ch(f,{setHost:function(){var t=this;t.bind(e.Events.EnterCell+"."+f,(function(n,i){v(t,i.row,i.col,!1,i.sheetArea)})),t.bind(e.Events.LeaveCell+"."+f,(function(n,i){v(t,i.row,i.col,!0,i.sheetArea)})),t.bind(e.Events.TopRowChanged+"."+f,(function(n,i){v(t,i.row,i.col,!0,i.sheetArea)}))},dispose:function(t){var n=this;n.unbind(e.Events.EnterCell+"."+f),n.unbind(e.Events.LeaveCell+"."+f),n.unbind(e.Events.TopRowChanged+"."+f)}})},"./dist/plugins/gantt/celltypes/predecessor.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A=this&&this.qKr||(g=function(t,n){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},g(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}g(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),g;function b(){return{canUndo:!1,execute:function(t,n){var i,r,h,a,c,f=(0,e._f)(t,n.sheetName);return!!(f&&t.jg().name()===n.sheetName&&f.NMi instanceof s.GanttSheet)&&(i=n.row,r=n.col,(u(i)||u(r))&&(n.row=i=f.getActiveRowIndex(),n.col=r=f.getActiveColumnIndex()),h=n.sheetArea,u(h)&&(n.sheetArea=h=3),(a=f.getCellType(i,r,h))instanceof o&&(f.showCell(i,r,e.VerticalPosition.nearest,e.HorizontalPosition.nearest),(c=new v(f.NMi,n)).open(),!0))}}}Object.defineProperty(n,"__esModule",{value:!0}),n.TaskPredecessorCellType=void 0,e=i("Core"),s=i("./dist/plugins/gantt/gantt-sheet.js"),r=i("Common"),u=r.Common.lt.ht,o=function(t){function n(){var n=t.call(this)||this;return n.typeName="103",n}return A(n,t),n.prototype.toJSON=function(){return{typeName:this.typeName}},n}(e.CellTypes.Text),n.TaskPredecessorCellType=o,e.CellTypes.ti[103]=o,h="taskPredecessorCellType",a="data-task-number",c="OpenPredecessor",f="ribbon-dropdowngroup-popup",l="_cellButtonParam",d=window.gcGlobal,v=function(){function t(t,n){var i=this;this.globalMousedownEventHandler=function(t){var n,e;if(i.rf){for(e=n=t.target;e&&e!==i.Wc;)e=e.parentElement;e||(i.close(),t.stopPropagation(),t.preventDefault())}},this.windowResizeEventHandler=function(){i.rf&&i.close()},this.rf=!1,this.lAi=t,this.LEt=n,this.AAi=this.getOriginalValueMap()}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.rf||(d.ef(),this.bindEvent(),this.render(),this.clearPosition(),this.calcPosition(),this.scrollListToCurrentItem(),this.attachExpandButtonClick(),this.rf=!0,this.Wc.tabIndex=-1,this.Wc.style.cssText+="outline:none",this.Wc.focus())},t.prototype.dispose=function(){var t=this;document.removeEventListener("resize",this.windowResizeEventHandler),"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.removeEventListener(n,t.globalMousedownEventHandler,!0)})),this.Ti.parentElement.removeChild(this.Ti),this.Ti=null},t.prototype.close=function(){if(this.rf){this.rf=!1;try{this.setValue()}catch(t){}finally{this.dispose(),this.gAi(),d.cf()}}},t.prototype.gAi=function(){var t,n=this.LEt.row,i=this.LEt.col,e=this.LEt.sheetArea,s=this.sheet.Il(n,i,e).cellButtons;this.sheet&&s&&s.length>0&&(t=this.sheet.Ut.getValueForKey(n,i,l,e))&&t.isMouseDownReservedLocation&&(t.buttonDownIndex=-1,t.isMouseDownReservedLocation=!1,this.sheet.repaint(this.sheet.getCellRect(n,i)))},t.prototype.bindEvent=function(){var t=this;"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.addEventListener(n,t.globalMousedownEventHandler,!0)})),document.addEventListener("resize",this.windowResizeEventHandler)},t.prototype.render=function(){this.Ti=document.createElement("div"),this.Ti.style.cssText="position:absolute; z-index:10000; box-shadow:rgba(0, 0, 0, 0.4) 2px 4px 5px; outline:none",this.Ti.classList.add(f),this.Wc=document.createElement("div"),this.renderList(),this.Ti.appendChild(this.Wc),this.sheet.qc().appendChild(this.Ti)},t.prototype.renderList=function(){var t,n;this.Wc.classList.add("gc-list-control"),this.Wc.style.outline="none",(t=document.createElement("div")).className="gc-list-control-container gc-list-alignment-vertical",t.style.maxHeight="300px",t.style.maxWidth="500px",t.style.overflow="auto",this.Wc.appendChild(t),n=this.project.root,this.renderTaskTree(n,t)},t.prototype.scrollListToCurrentItem=function(){var t,n=this.project.getRowState(this.LEt.row).taskNumber,i=document.querySelector("[".concat(a,'="').concat(n,'"]'));i&&(t=i.parentElement.parentElement.offsetTop,document.querySelector(".gc-list-control-container").scrollTop=t)},t.prototype.attachExpandButtonClick=function(){var t=this;this.Wc.addEventListener("click",(function(n){var i=n.target;i.hasAttribute("data-open")&&(t.setButtonExpandStatus(i,"false"===i.getAttribute("data-open")),n.preventDefault(),n.stopImmediatePropagation())}))},t.prototype.renderTaskTree=function(t,n){var i,e=this,s=this.project.Pki(t),r=document.createElement("div");r.className="gc-list-control-tree",n.appendChild(r),s||this.renderTaskItem(t,!0,r),(i=document.createElement("div")).className="gc-list-control-tree-content gc-list-alignment-vertical",s||(i.style.marginLeft="1.5em"),r.appendChild(i),t.children.forEach((function(t){t.children.length>0?e.renderTaskTree(t,i):e.renderTaskItem(t,!1,i)}))},t.prototype.renderTaskItem=function(t,n,i){var e,s,r,u,o,h=this.project.getRowState(this.LEt.row).task,c=Object.keys(this.AAi).map((function(t){return parseInt(t)})),f=document.createElement("div");f.classList.add("gc-list-control-item"),n&&f.classList.add("gc-list-control-hassubitem"),(e=document.createElement("label")).setAttribute("for","task-".concat(t.taskNumber)),e.className="gc-list-control-tree-text",e.style.display="flex",e.style.alignItems="center",n&&((s=document.createElement("span")).style.display="inline-flex",s.style.transition="0.2s linear",s.style.borderLeft="5px solid transparent",s.style.borderRight="5px solid transparent",s.style.borderTop="6px solid #000",this.setButtonExpandStatus(s,!0),e.appendChild(s)),h&&h.taskNumber===t.taskNumber?((r=document.createElement("span")).id="task-".concat(t.taskNumber),r.style.width="23px",r.style.height="18px",r.style.display="inline-block",r.setAttribute(a,t.taskNumber.toString()),e.appendChild(r),e.style.backgroundColor="#E1E1E1",e.style.cursor="default"):((u=document.createElement("input")).id="task-".concat(t.taskNumber),u.type="checkbox",u.style.marginLeft="5px",u.style.marginRight="5px",u.setAttribute(a,t.taskNumber.toString()),c.indexOf(t.taskNumber)>-1&&(u.checked=!0),e.appendChild(u)),(o=document.createElement("span")).innerText="".concat(t.taskNumber,"  ").concat(t.name?t.name:""),this.setTextSpanEllipsis(o),e.appendChild(o),f.appendChild(e),i.appendChild(f)},t.prototype.setButtonExpandStatus=function(t,n){for(var i=t;i&&!i.classList.contains("gc-list-control-tree");)i=i.parentElement;n?(t.style.removeProperty("transform"),t.setAttribute("data-open","true"),i&&i.classList.remove("hide-children")):(t.style.transform="rotate(-90deg)",t.setAttribute("data-open","false"),i&&i.classList.add("hide-children"))},t.prototype.setTextSpanEllipsis=function(t){t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.whiteSpace="nowrap",t.title=t.innerText},t.prototype.clearPosition=function(){this.Ti.style.top=this.Ti.style.bottom=this.Ti.style.left=this.Ti.style.right=""},t.prototype.getTargetRect=function(){var t=1===this.LEt.sheetArea?-1:void 0,n=2===this.LEt.sheetArea?-1:void 0,i=this.sheet.getCellRect(this.LEt.row,this.LEt.col,t,n);return i.x=this.sheet.uw().left+i.x,i.y=this.sheet.uw().top+i.y,i},t.prototype.calcPosition=function(){var t=this.calculateDropDownLocation(),n=this.Ti.offsetParent,i=n.getBoundingClientRect(),e=n===document.body,s=document.documentElement,r=(window.pageXOffset||s.scrollLeft)-(s.clientLeft||0),u=(window.pageYOffset||s.scrollTop)-(s.clientTop||0);this.Ti.style.left="".concat(t.x-(e?-r:i.left),"px"),this.Ti.style.top="".concat(t.y-(e?-u:i.top),"px")},t.prototype.calculateDropDownLocation=function(){var t,n,i,s=new e.Rect(0,0,window.innerWidth,window.innerHeight),r=this.getTargetRect(),u=r.x+r.width,o=r.y,h=r.y+r.height,a=s.height-h,c=!0,f=this.Wc.offsetHeight,l=this.Wc.offsetWidth;return f>a&&(c=!1),t=u-l,n=0,n=c?h:o-f,(i=new e.Rect(t,n,l,f)).width>s.width?i.x=0:(i.x=Math.max(i.x,0),i.x=Math.min(i.x,s.width-i.width)),i.height>s.height?i.y=0:(i.y=Math.max(i.y,0),i.y=Math.min(i.y,s.height-i.height)),{x:i.x,y:i.y}},t.prototype.getOriginalValueMap=function(){var t=this.sheet.getValue(this.LEt.row,this.LEt.col),n=/^(\d*)[^\d]*$/,i={};return t?(t.split(",").forEach((function(t){if(t.match(n)){var e=t.match(n)[1];i[e]=t.match(n)[0]}})),i):{}},t.prototype.getSelectedValuesInList=function(){var t=this.AAi,n=this.Wc.querySelectorAll(".gc-list-control-item input:checked"),i=[];return n.forEach((function(n){var e=parseInt(n.getAttribute(a));t[e]?i.push(t[e]):i.push(e.toString())})),i.join(",")},t.prototype.setValue=function(){var t,n,i,e,s,r=this.sheet,o=this.getSelectedValuesInList(),h=this.LEt.row,a=this.LEt.col,c=this.LEt.sheetArea;if(r.isEditing()&&r.ci===a&&r.ui===h)t=r.getCellType(h,a),n={sheet:r,row:h,col:a,sheetArea:c},i=r.Il(h,a,c),e=r.getCellRect(h,a),t.updateEditor(r.li,i,e,n),t.setEditorValue(r.li,o,n);else{if(s=r.getValue(h,a),u(s)&&""===o)return;o!==s&&r.setValue(h,a,o)}},t}(),e.Workbook.ch(h,{init:function(){this.commandManager().register(c,b())}})},"./dist/plugins/gantt/celltypes/resources.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A=this&&this.qKr||(g=function(t,n){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},g(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}g(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),g;function b(){return{canUndo:!1,execute:function(t,n){var i,r,h,a,c,f=(0,e._f)(t,n.sheetName);return!!(f&&t.jg().name()===n.sheetName&&f.NMi instanceof s.GanttSheet)&&(i=n.row,r=n.col,(u(i)||u(r))&&(n.row=i=f.getActiveRowIndex(),n.col=r=f.getActiveColumnIndex()),h=n.sheetArea,u(h)&&(n.sheetArea=h=3),(a=f.getCellType(i,r,h))instanceof o&&(f.showCell(i,r,e.VerticalPosition.nearest,e.HorizontalPosition.nearest),(c=new v(f.NMi,n)).open(i),!0))}}}Object.defineProperty(n,"__esModule",{value:!0}),n.TaskResourcesCellType=void 0,e=i("Core"),s=i("./dist/plugins/gantt/gantt-sheet.js"),r=i("Common"),u=r.Common.lt.ht,o=function(t){function n(){var n=t.call(this)||this;return n.typeName="104",n}return A(n,t),n.prototype.toJSON=function(){return{typeName:this.typeName}},n}(e.CellTypes.Text),n.TaskResourcesCellType=o,e.CellTypes.ti[104]=o,h="taskResourcesCellType",a="data-resource-id",c="OpenResources",f="ribbon-dropdowngroup-popup",l="_cellButtonParam",d=window.gcGlobal,v=function(){function t(t,n){var i=this;this.globalMousedownEventHandler=function(t){var n,e;if(i.rf){for(e=n=t.target;e&&e!==i.Wc;)e=e.parentElement;e||(i.close(),t.stopPropagation(),t.preventDefault())}},this.windowResizeEventHandler=function(){i.rf&&i.close()},this.rf=!1,this.lAi=t,this.LEt=n,this.AAi=this.getOriginalValueMap()}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.open=function(t){var n,i,e,s;if(!this.rf){if(n=this.lAi.getTaskByRow(t),e=(i=this.project.host.getDataView()).gLt.primaryKey(),s=n.getDataValue(e),u(s))return!1;d.ef(),this.bindEvent(),this.render(),this.clearPosition(),this.calcPosition(),this.rf=!0,this.Wc.tabIndex=-1,this.Wc.style.cssText+="outline:none",this.Wc.focus()}},t.prototype.dispose=function(){var t=this;document.removeEventListener("resize",this.windowResizeEventHandler),"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.removeEventListener(n,t.globalMousedownEventHandler,!0)})),this.Ti.parentElement.removeChild(this.Ti),this.Ti=null},t.prototype.close=function(){if(this.rf){this.rf=!1;try{this.setValue()}catch(t){}finally{this.dispose(),this.gAi(),d.cf()}}},t.prototype.gAi=function(){var t,n=this.LEt.row,i=this.LEt.col,e=this.LEt.sheetArea,s=this.sheet.Il(n,i,e).cellButtons;this.sheet&&s&&s.length>0&&(t=this.sheet.Ut.getValueForKey(n,i,l,e))&&t.isMouseDownReservedLocation&&(t.buttonDownIndex=-1,t.isMouseDownReservedLocation=!1,this.sheet.repaint(this.sheet.getCellRect(n,i)))},t.prototype.bindEvent=function(){var t=this;"mousedown touchstart MSPointerDown pointerdown".split(" ").forEach((function(n){document.addEventListener(n,t.globalMousedownEventHandler,!0)})),document.addEventListener("resize",this.windowResizeEventHandler)},t.prototype.render=function(){this.Ti=document.createElement("div"),this.Ti.style.cssText="position:absolute; z-index:10000; box-shadow:rgba(0, 0, 0, 0.4) 2px 4px 5px; outline:none",this.Ti.classList.add(f),this.Wc=document.createElement("div"),this.renderList(),this.Ti.appendChild(this.Wc),this.sheet.qc().appendChild(this.Ti)},t.prototype.renderList=function(){var t,n,i;for(this.Wc.classList.add("gc-list-control"),this.Wc.style.outline="none",(t=document.createElement("div")).className="gc-list-control-container gc-list-alignment-vertical",t.style.maxHeight="300px",t.style.maxWidth="500px",t.style.overflow="auto",this.Wc.appendChild(t),n=this.project.resourcesManager.resourcesList,i=0;i<n.length;i++)this.renderResource(n[i],t)},t.prototype.renderResource=function(t,n){var i=document.createElement("div");i.className="gc-list-control-tree",n.appendChild(i),this.renderResourceItem(t,!0,i)},t.prototype.renderResourceItem=function(t,n,i){var e,s,r,u=t.id,o=t.name,h=Object.keys(this.AAi),c=document.createElement("div");c.classList.add("gc-list-control-item"),n&&c.classList.add("gc-list-control-hassubitem"),(e=document.createElement("label")).setAttribute("for","resource-".concat(u)),e.className="gc-list-control-tree-text",e.style.display="flex",e.style.alignItems="center",(s=document.createElement("input")).id="resource-".concat(u),s.type="checkbox",s.style.marginLeft="5px",s.style.marginRight="5px",s.setAttribute(a,u.toString()||""),h.indexOf(u.toString())>-1&&(s.checked=!0),e.appendChild(s),(r=document.createElement("span")).innerText="".concat(o||""),this.setTextSpanEllipsis(r),e.appendChild(r),c.appendChild(e),i.appendChild(c)},t.prototype.setTextSpanEllipsis=function(t){t.style.overflow="hidden",t.style.textOverflow="ellipsis",t.style.whiteSpace="nowrap",t.title=t.innerText},t.prototype.clearPosition=function(){this.Ti.style.top=this.Ti.style.bottom=this.Ti.style.left=this.Ti.style.right=""},t.prototype.getTargetRect=function(){var t=1===this.LEt.sheetArea?-1:void 0,n=2===this.LEt.sheetArea?-1:void 0,i=this.sheet.getCellRect(this.LEt.row,this.LEt.col,t,n);return i.x=this.sheet.uw().left+i.x,i.y=this.sheet.uw().top+i.y,i},t.prototype.calcPosition=function(){var t=this.calculateDropDownLocation(),n=this.Ti.offsetParent,i=n.getBoundingClientRect(),e=n===document.body,s=document.documentElement,r=(window.pageXOffset||s.scrollLeft)-(s.clientLeft||0),u=(window.pageYOffset||s.scrollTop)-(s.clientTop||0);this.Ti.style.left="".concat(t.x-(e?-r:i.left),"px"),this.Ti.style.top="".concat(t.y-(e?-u:i.top),"px")},t.prototype.calculateDropDownLocation=function(){var t,n,i,s=new e.Rect(0,0,window.innerWidth,window.innerHeight),r=this.getTargetRect(),u=r.x+r.width,o=r.y,h=r.y+r.height,a=s.height-h,c=!0,f=this.Wc.offsetHeight,l=this.Wc.offsetWidth;return f>a&&(c=!1),t=u-l,n=0,n=c?h:o-f,(i=new e.Rect(t,n,l,f)).width>s.width?i.x=0:(i.x=Math.max(i.x,0),i.x=Math.min(i.x,s.width-i.width)),i.height>s.height?i.y=0:(i.y=Math.max(i.y,0),i.y=Math.min(i.y,s.height-i.height)),{x:i.x,y:i.y}},t.prototype.getOriginalValueMap=function(){var t=this,n=this.sheet.getValue(this.LEt.row,this.LEt.col),i={};return n?(n.forEach((function(n){var e=t.project.resourcesManager.getResourcesByName(n).id;i[e]=n})),i):{}},t.prototype.getSelectedValuesInList=function(){var t=this,n=this.AAi,i=this.Wc.querySelectorAll(".gc-list-control-item input:checked"),e=[];return i.forEach((function(i){var s,r=parseInt(i.getAttribute(a));n[r]?e.push(n[r]):(s=t.project.resourcesManager.getResourcesById(r),e.push(s.name))})),e},t.prototype.setValue=function(){var t=this.sheet,n=this.getSelectedValuesInList(),i=this.LEt.row,e=this.LEt.col;t.setValue(i,e,n)},t}(),e.Workbook.ch(h,{init:function(){this.commandManager().register(c,b())}})},"./dist/plugins/gantt/celltypes/subject.js":function(t,n,i){var e,s,r=this&&this.qKr||(u=function(t,n){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},u(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}u(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),u;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskSubjectCellType=void 0,s=function(t){function n(){var n=t.call(this)||this;return n.typeName="105",n}return r(n,t),n.prototype.cAi=function(t){return t.row},n.prototype.toJSON=function(){return{typeName:this.typeName}},n}((e=i("Core")).CellTypes.Text),n.TaskSubjectCellType=s,e.CellTypes.ti[105]=s},"./dist/plugins/gantt/celltypes/taskbar.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g=this&&this.qKr||(b=function(t,n){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},b(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}b(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),b;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarCellType=n.TipSettings=void 0,e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/utils/util.js"),u=i("./dist/plugins/gantt/gantt-json.js"),o=i("./dist/plugins/gantt/taskbar/action.js"),h=i("./dist/plugins/gantt/gantt.enum.js"),a=i("./dist/plugins/gantt/gantt.ns.js"),c=new e.Common.ResourceManager(a.SR,"GanttSheet"),f=c.getResource.bind(c),l=s.mt.vi,d=s.CellTypes.Base,v=function(){function t(t){this.className=t}return t.prototype.getContent=function(){return'\n        <div class="'.concat(this.className,'" style="padding:4px;font-size:14px;color:black;max-width:500px">\n            <div style="overflow:hidden;text-overflow:ellipsis;">\n                <div class="gantt-tip-title" style="text-align:center">').concat(r.GanttUtil.encodeHtml(this.title),"</div>\n                ").concat(this.getBodyString(),"\n            </div>\n        </div>")},t.prototype.getBodyString=function(){var t,n="";for(t in this.body)this.body.hasOwnProperty(t)&&(n+='<div>\n                    <span class="gantt-tip-key">'.concat(r.GanttUtil.encodeHtml(this.body[t][0]),'</span>\n                    <span class="gantt-tip-value">').concat(r.GanttUtil.encodeHtml(this.body[t][1]),"</span>\n                </div>"));return n},t.prototype.addTaskTipItems=function(t,n){var i=this;this.body||(this.body=[]),n.forEach((function(n){i.addTaskItemDictionary[n]&&i.addTaskItemDictionary[n](t)}))},Object.defineProperty(t.prototype,"addTaskItemDictionary",{get:function(){var t=this;return{name:function(n){t.addNameItem(n)},start:function(n){t.addStartItem(n)},finish:function(n){t.addFinishItem(n)},duration:function(n){t.addDurationItem(n)},"%complete":function(n){t.addCompleteTextItem(n)},completeThrough:function(n){t.addCompleteThroughItem(n)}}},enumerable:!1,configurable:!0}),t.prototype.addNameItem=function(t){t.name?this.body.push([f().GANTT_ACTION_TASK_COLON,t.name]):this.body.push([f().GANTT_ACTION_TASK_COLON,f().GANTT_TASK_BAR_UNNAMED])},t.prototype.addStartItem=function(t){var n=new e.Formatter.GeneralFormatter(t.project.layout.tipDateFormat);this.body.push([f().GANTT_ACTION_TASK_START,n.format(t.startDisplayed)])},t.prototype.addFinishItem=function(t){var n=new e.Formatter.GeneralFormatter(t.project.layout.tipDateFormat);this.body.push([f().GANTT_ACTION_TASK_FINISH,n.format(t.finishDisplayed)])},t.prototype.addDurationItem=function(t){t.duration&&this.body.push([f().GANTT_ACTION_DURATION,t.project.formatDuration(t.duration)])},t.prototype.addCompleteThroughItem=function(t){var n=new e.Formatter.GeneralFormatter(t.project.layout.tipDateFormat);t.completeThrough&&this.body.push([f().GANTT_TASK_BAR_COMPLETE_THROUGH,n.format(t.completeThrough)])},t.prototype.addCompleteTextItem=function(t){var n=new e.Formatter.GeneralFormatter("0%");this.body.push([f().GANTT_TASK_BAR_COMPLETE,n.format(t.complete)])},t.getDefaultTaskHoverTipItems=function(t){switch(t){case"progress":case"manualProgress":return["name","start","completeThrough","duration","%complete"];case"milestone":case"manualMilestone":case"finishOnlyMilestone":case"durationOnlyMilestone":case"finishOnly":return["name","finish"];case"startOnly":case"startOnlyMilestone":return["name","start"];default:return["name","start","finish","duration"]}},t}(),n.TipSettings=v,A=function(t){function n(n){void 0===n&&(n=0);var i=t.call(this)||this;return i.typeName="106",i.IOProps=["typeName","leftTextStyle","topTextStyle","rightTextStyle","bottomTextStyle","insideTextStyle","showDefaultTips","allowMoveOrResizeTask","allowLinkTask","allowChangeProgress","allowDragNewTask"],i.leftTextStyle={},i.topTextStyle={},i.rightTextStyle={},i.bottomTextStyle={},i.insideTextStyle={},i.showDefaultTips=!0,i.allowMoveOrResizeTask=!0,i.allowLinkTask=!0,i.allowChangeProgress=!0,i.allowDragNewTask=!0,i.dAi=n,i}return g(n,t),n.prototype.oAi=function(t){if(t&&t.sheet&&t.sheet.NMi)return t.sheet.NMi.project},n.prototype.cAi=function(t){return t.row-this.dAi},n.prototype.An=function(t,n,i){return t.clone()},n.prototype.paintValue=function(t,n,i,e,s,r,u,o){var a,c,f,l=o.sheet,d=this.oAi(o);t&&d&&s>0&&r>0&&(t.save(),t.rect(i,e,s,r),t.clip(),a=this.cAi(o),c=d.getTaskByRow(a),f=l.NMi.lki,o.offsetX=0,f.paintTask(t,c,i,e,s,r,u,o,this,this.paintTextCore),f.paintLinkLines(t,d,c,a,i,e,s,r),this.barAction&&this.barAction.actionStatus===h.ActionStatus.InProgress&&f.paintActionPending(t,this.barAction),t.restore())},n.prototype.paintTextCore=function(n,i,e,s,r,u,o,h){t.prototype.paintValue.call(this,n,i,e,s,r,u,o,h)},n.prototype.getHitInfo=function(t,n,i,e,r){var u,o,h,a,c,f;return r&&r.sheetArea===s.SheetArea.viewport&&e?(u=r.sheetArea,o=e.x,h=e.x+e.width,a=e.y,c=e.y+e.height,f={x:t,y:n,row:r.row,col:r.col,cellRect:e,sheetArea:u,sheet:r.sheet,cellStyle:i},o<=t&&t<=h&&a<=n&&n<=c&&(f.isReservedLocation=!0),f):null},n.prototype.processMouseDown=function(t){var n,i,e=t&&t.sheet;if(!e||!t.isReservedLocation)return!1;(n=this.oAi(t))&&((i=o.BarActionBuilder.getBarHitInfo(n,this,t)).task&&(e.clearSelection(),e.setActiveCell(t.row,t.col),e.addSelection(t.row,0,1,e.getColumnCount()-1)),this.barAction=o.BarActionBuilder.getHitAction(n,this,i),this.barAction&&this.barAction.start())},n.prototype.processMouseMove=function(t){var n,i,e,s,r,u,a,c=t&&t.sheet;if(!c||!t.isReservedLocation)return!1;(n=this.oAi(t))&&(this.barAction||(e=void 0,(i=o.BarActionBuilder.getBarHitInfo(n,this,t))&&i.task?(o.BarActionBuilder.updateCursorByBarHitInfo(c.Dg(),n,this,i),e=this.bAi(i.task,i.style),s={task:i.task,partName:i.style.name,tip:e},c.ki(h.GanttSheetEvent.Event_HoverOnBar,s),e=s.tip):(o.BarActionBuilder.updateCursorStyle(c.Dg(),h.CursorStyle.Default),(r=this.mAi(t))&&(s={dependency:r,tip:e=this.pAi(r)},c.ki(h.GanttSheetEvent.Event_HoverOnLink,s),e=s.tip)),e&&this.showDefaultTips&&(u=e.getContent(),(a=c.parent).Tw(u,0,0),a.R3.style.whiteSpace="normal",a.ny(u,t.x-25-a.R3.offsetWidth,t.y-25))))},n.prototype.bAi=function(t,n){var i,e;if(t&&n)return(e=new v((i="gc-gantt-hover-on-")+n.name)).title=n.name,e.addTaskTipItems(t,v.getDefaultTaskHoverTipItems(n.name)),e},n.prototype.pAi=function(t){var n,i;if(t)return(i=new v((n="gc-gantt-hover-on-")+"link")).title="",i.body=[[f().GANTT_TASK_BAR_TASK_LINK,this.getDependencyTypeText(t.type)],[f().GANTT_TASK_BAR_FROM,"(ID ".concat(t.from.taskNumber,") ").concat(t.from.name)],[f().GANTT_TASK_BAR_TO,"(ID ".concat(t.to.taskNumber,") ").concat(t.to.name)]],i},n.prototype.getDependencyTypeText=function(t){switch(t){case"FS":return f().GANTT_TASK_BAR_FS;case"FF":return f().GANTT_TASK_BAR_FF;case"SF":return f().GANTT_TASK_BAR_SF;case"SS":return f().GANTT_TASK_BAR_SS}},n.prototype.mAi=function(t){var n,i,e,s,r=t&&t.sheet,u=r.NMi.lki,o=this.cAi(t),h=u.getLinkLines(o,t.cellRect);for(i=0,e=h;i<e.length;i++)(s=e[i]).contains({x:t.x,y:t.y})&&(n=s.data);return n},n.prototype.isReservedKey=function(t,n){return 32===t.keyCode&&!t.ctrlKey&&!t.shiftKey&&!t.altKey},n.prototype.getAutoFitWidth=function(t,n,i,e,s){var r,u,o,h,a,c,f,l,d,v,A,g,b=s.sheet,m=b.NMi,p=m.gp();if(p)return m.wAi()*e;if(r=b.ot().width,u=0,o=b.OF())for(h=0,a=o;h<a.length;h++)u+=f=(c=a[h]).width;if(l=0,d=b.m9())for(v=m.getGanttColumnIndex(),A=0,g=d;A<g.length;A++)(c=g[A]).col!==v&&(l+=f=c.width);return r-u-l},n.prototype.getAutoFitHeight=function(n,i,e,s,r){var u=r.sheet.NMi.lki;return u?u.getBarStyleRowHeight()*s:t.prototype.getAutoFitHeight.call(this,n,i,e,s,r)},n.prototype.QD=function(t){this.isReservedKey(t)&&l(t)},n.prototype.isImeAware=function(t){return!1},n.prototype.jn=function(t){},n.prototype.Ke=function(){},n.prototype.toJSON=function(){return u.GanttSheetJsonConverter.toJSON(this,this.IOProps)},n.prototype.fromJSON=function(t){u.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},n.prototype.activeOnClick=function(){return!1},n}(d),n.TaskbarCellType=A,s.CellTypes.ti[106]=A},"./dist/plugins/gantt/celltypes/timescales.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p=this&&this.qKr||(y=function(t,n){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},y(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}y(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),y;function w(t,n){return g*t*n+5}Object.defineProperty(n,"__esModule",{value:!0}),n.TimescaleCellType=n.getTimescaleHeight=void 0,e=i("Core"),s=i("./dist/plugins/gantt/gantt-column.js"),r=i("./dist/plugins/gantt/gantt-json.js"),u=i("./dist/plugins/gantt/project/calendar.js"),o=i("./dist/plugins/gantt/gantt.enum.js"),h=i("Common"),a=h.Common.lt.ht,c=e.mt.vi,f=e.CellTypes.Context,l=e.CellTypes.Base,d=e.GC$,v=null,A=void 0,g=18,n.getTimescaleHeight=w,b=function(){function t(t,n){this.lAi=t,this.startX=n,this.yAi=!1}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.jAi=this.project.timescale.currentDateUtc,this.yAi=!1,this.sheet.Dg().style.cursor="grabbing",this.Fg()},t.prototype.Fg=function(){var t=this;d(document).bind("mousemove.ganttSheet.timescale",(function(n){t.pg(n)})).bind("mouseup.ganttSheet.timescale",(function(n){t.bg(n)}))},t.prototype.OAi=function(){d(document).unbind("mousemove.ganttSheet.timescale").unbind("mouseup.ganttSheet.timescale")},t.prototype.pg=function(t){var n,i,e,s,r;this.sheet&&(n=this.sheet.uw(),i=t.pageX-n.left,e=t.pageY-n.top,s=this.sheet.hitTest(i,e),r=this.startX-s.x-this.getScrollDistance(),this.project.timescale.scroll(r))},t.prototype.getScrollDistance=function(){return-this.project.timescale.getOffsetByDateUtc(this.jAi)},t.prototype.bg=function(t){this.OAi(),this.yAi=!0,delete this.jAi},t.prototype.isFinish=function(){return this.yAi},t}(),m=function(t){function n(){var n=t.call(this)||this;return n.typeName="107",n.marginTop=2,n.marginBottom=2,n.backColor="#f0f0f0",n.topTierTextStyle={},n.middleTierTextStyle={},n.bottomTierTextStyle={},n.allowDragScroll=!0,n.IOProps=["typeName","allowDragScroll","topTierTextStyle","middleTierTextStyle","bottomTierTextStyle"],n}return p(n,t),n.prototype.oAi=function(t){if(t&&t.sheet&&t.sheet.NMi)return t.sheet.NMi.project},n.prototype.paintValue=function(t,n,i,s,r,u,o,h){if(t&&r>0&&u>0){t.save(),t.rect(i,s,r,u),t.clip(),t.beginPath();var a=void 0;a=this.backColor,t.fillStyle!==a&&(t.fillStyle=a),e.W.setFillStyle(t,a,i,s,r,u,(function(){t.fillRect(i,s,r,u)})),this.paintTimescales(t,i,s,r,u,h),t.restore()}},n.prototype.paintTimescales=function(t,n,i,r,u,h){var a,c,f,l,d=h.sheet.zoom(),v=g*d+this.marginTop,A=this.oAi(h);if(A)switch(a=A.timescale,c=new e.Style,f=new e.Style,l=new e.Style,this.topTierTextStyle&&(0,s.mergeTextStyle)(this.topTierTextStyle,c),this.middleTierTextStyle&&(0,s.mergeTextStyle)(this.middleTierTextStyle,f),this.bottomTierTextStyle&&(0,s.mergeTextStyle)(this.bottomTierTextStyle,l),h.offsetX=0,a.tierMode){case o.TimescaleTierMode.middle:u-v>=0&&(this.paintSeparatorLine(t,n,i+u-.5,r,a),this.paintTier(t,n,i+u-v,r,v,f,A,a.middleTier,h));break;case o.TimescaleTierMode.middleBottom:u-2*v>=0&&(this.paintSeparatorLine(t,n,i+u-.5,r,a),this.paintTier(t,n,i+u-v,r,v,l,A,a.bottomTier,h),this.paintTier(t,n,i+u-2*v,r,v,f,A,a.middleTier,h));break;case o.TimescaleTierMode.topMiddleBottom:u-3*v>=0&&(this.paintSeparatorLine(t,n,i+u-.5,r,a),this.paintTier(t,n,i+u-v,r,v,l,A,a.bottomTier,h),this.paintTier(t,n,i+u-2*v,r,v,f,A,a.middleTier,h),this.paintSeparatorLine(t,n,i+u-2*v-.5,r,a),this.paintTier(t,n,i+u-3*v,r,v,c,A,a.topTier,h))}},n.prototype.paintTier=function(t,n,i,s,r,o,h,c,f){var d,v,g,b,m,p,y,w,j,T,O,k=this;if(!a(c))for(v=d=h.timescale.currentDateUtc,g=o,b=c.labelAlign||"Left",g.hAlign="Left"===b?e.HorizontalAlign.left:"Center"===b?e.HorizontalAlign.center:e.HorizontalAlign.right;p=(m=h.timescale.getDateUtcRange(v,c.unit,c.count))[0],y=m[1],!((w=n+h.timescale.getOffsetByDateUtc(p))>=n+s);)j=n+h.timescale.getOffsetByDateUtc(y)+.5,j=Math.floor(j)+.5,T=c.formatDate(u.Calendar.utcToLocal(p)),O={},l.prototype.paintText.call(k,t,T,w,i,j-w,r,g,f,T,O,A,A),c.showTickLines&&(t.beginPath(),t.moveTo(j,i),t.lineTo(j,i+r),t.strokeStyle="gray",t.stroke()),v=y},n.prototype.paintSeparatorLine=function(t,n,i,e,s){s.showScaleSeparator&&(t.beginPath(),t.moveTo(n,i),t.lineTo(n+e,i),t.strokeStyle="gray",t.stroke())},n.prototype.getText=function(t,n){return t},n.prototype.getHitInfo=function(t,n,i,e,s){var r,u,o,h,a,c,f=this;return s?(r=s.sheetArea,u=e.x,o=e.x+e.width,h=e.y+f.marginTop,a=e.y+e.height-f.marginBottom,c={x:t,y:n,row:s.row,col:s.col,cellRect:e,sheetArea:r,sheet:s.sheet,cellStyle:i},u<=t&&t<=o&&h<=n&&n<=a&&(c.isReservedLocation=!0),c):v},n.prototype.processMouseDown=function(t){var n,i=this.oAi(t);return!!i&&(!!((n=t&&t.sheet)&&t.isReservedLocation&&this.allowDragScroll)&&(this.TAi=new b(t.sheet.NMi,t.x),this.TAi.start(),!0))},n.prototype.processMouseMove=function(t){this.allowDragScroll&&(this.TAi&&!this.TAi.isFinish()||(t.sheet.Dg().style.cursor="grab"),this.TAi&&!this.TAi.isFinish()&&(t.sheet.Dg().style.cursor="grabbing"))},n.prototype.processKeyDown=function(t,n){return!1},n.prototype.processKeyUp=function(t,n){return!1},n.prototype.isReservedKey=function(t,n){return 32===t.keyCode&&!t.ctrlKey&&!t.shiftKey&&!t.altKey},n.prototype.getAutoFitWidth=function(t,n,i,e,s){return f.Bt(t,n,i,e,s)},n.prototype.getAutoFitHeight=function(t,n,i,e,s){var r=this.oAi(s);return w(r?r.timescale.tierMode:o.TimescaleTierMode.middle,s.sheet.zoom())},n.prototype.QD=function(t){this.isReservedKey(t)&&c(t)},n.prototype.isImeAware=function(t){return!1},n.prototype.jn=function(t){},n.prototype.Ke=function(){},n.prototype.activeOnClick=function(){return!1},n.prototype.toJSON=function(){return r.GanttSheetJsonConverter.toJSON(this,this.IOProps)},n.prototype.fromJSON=function(t){r.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},n}(l),n.TimescaleCellType=m,e.CellTypes.ti[107]=m},"./dist/plugins/gantt/gantt-action.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l=this&&this.iJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,s=n.length,r;e<s;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))};function d(t){return t instanceof r.GanttSheet}function v(t){var n;t.commandManager().addListener("ganttSheetCleanUndo",(function(n){var i=n.command,e=n.vM,s=t.Wp.Nmt;0===e&&s&&s.length>0&&d(t.Ofe(i.sheetName))&&s.pop()}))}function A(t,n){var i,e=new Array(t);for(i=0;i<t;i++)e[i]=n();return e}Object.defineProperty(n,"__esModule",{value:!0}),e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/gantt-sheet.js"),u=i("./dist/plugins/gantt/gantt.enum.js"),o=i("./dist/plugins/gantt/utils/util.js"),h=i("./dist/plugins/gantt/gantt.ns.js"),a=new e.Common.ResourceManager(h.SR,"GanttSheet"),c=a.getResource.bind(a),f=e.Common.lt.ht,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP]={canUndo:!1,execute:function(t,n){var i,e,s,r=o.GanttUtil.getGanttSheet(t);if(r)return(i=r.project)&&(e=i.timescale,s=r.getTaskbarAreaVisibleSize(),e.scroll(-1*s)),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN]={canUndo:!1,execute:function(t,n){var i,e,s,r=o.GanttUtil.getGanttSheet(t);if(r)return(i=r.project)&&(e=i.timescale,s=r.getTaskbarAreaVisibleSize(),e.scroll(s)),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_BEGIN]={canUndo:!1,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return(i=e.project).timescale.scrollTo(i.startDate,.25),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_END]={canUndo:!1,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return(i=e.project).timescale.scrollTo(i.finishDate,.75),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT]={canUndo:!1,execute:function(t,n){var i,e,s=o.GanttUtil.getGanttSheet(t);if(s)return(i=s.project)&&(e=i.timescale).scrollOneTick(!1),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT]={canUndo:!1,execute:function(t,n){var i,e,s=o.GanttUtil.getGanttSheet(t);if(s)return(i=s.project)&&(e=i.timescale).scrollOneTick(!0),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_IN]={canUndo:!1,execute:function(t,n){var i,e,s=o.GanttUtil.getGanttSheet(t);if(s)return e=(i=s.project).timescale,s.uiOptions.allowZoomTimescale&&e.zoomIn(),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_OUT]={canUndo:!1,execute:function(t,n){var i,e,s=o.GanttUtil.getGanttSheet(t);if(s)return e=(i=s.project).timescale,s.uiOptions.allowZoomTimescale&&e.zoomOut(),!1}},s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER]={canUndo:!0,execute:function(t,n){var i,e,s,r=o.GanttUtil.getGanttSheet(t);if(r)return i=r.project,e=n.start,s=n.finish,i.timescale.zoomToRange(e,s),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_COMPLETE]={canUndo:!0,execute:function(t,n){var i,e,s,r,u,h=o.GanttUtil.getGanttSheet(t);if(h){for(i=o.GanttUtil.getSelectedTasks(h),e=n.complete,s=0,r=i;s<r.length;s++)(u=r[s]).complete!==e&&h.project.taskManager.setTaskValue(u,"complete",e);return!0}}},s.Commands[u.GanttCommandNames.GANTTSHEET_INDENT_TASKS]={canUndo:!0,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return i=o.GanttUtil.getSelectedTasks(e),e.project.indentTasks(i.map((function(t){return t.taskNumber}))),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_OUTDENT_TASKS]={canUndo:!0,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return i=o.GanttUtil.getSelectedTasks(e),e.project.outdentTasks(i.map((function(t){return t.taskNumber}))),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_LINK_TASKS]={canUndo:!0,execute:function(t,n){var i,e,s,r,u,h,a,c,f,l,d,v,A=o.GanttUtil.getGanttSheet(t);if(A){for(i=A.project,e=[],s=A.getSelections(),r=-1,u=0;u<s.length;u++){for(h=s[u],-1!==r&&e.push([r,h.row]),a=h.row+1;a<h.row+h.rowCount;a++)e.push([a-1,a]);r=h.row+h.rowCount-1}if(e.length<=0)return!1;for(i.suspendSchedule(),c=0,f=e;c<f.length;c++){d=(l=f[c])[0],v=l[1];try{i.addDependency({fromTaskNumber:d,toTaskNumber:v})}catch(t){}}return i.resumeSchedule(),!0}}},s.Commands[u.GanttCommandNames.GANTTSHEET_UNLINK_TASKS]={canUndo:!0,execute:function(t,n){var i,e,s,r,u,h,a,c,f=o.GanttUtil.getGanttSheet(t);if(f){if(i=o.GanttUtil.getSelectedTaskNumbers(f),e=f.project,s=[],1===i.length)r=e.getTaskByRow(i[0]),s=l(l([],r.predecessorDependencies,!0),r.successorDependencies,!0);else{for(u={},h=0,a=i;h<a.length;h++)c=a[h],u[c]=!0;s=e.dependencies.filter((function(t){return u[t.from.taskNumber]&&u[t.to.taskNumber]}))}return s.length>=1&&e.removeDependency(s),!0}}},s.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_TASK_MODE]={canUndo:!0,execute:function(t,n){var i,e,s,u,h=n.taskMode,a=t.getActiveSheetTab();if(a&&a instanceof r.GanttSheet){for(e=0,s=i=o.GanttUtil.getSelectedTasks(a);e<s.length;e++)(u=s[e]).setValue("mode",h);return!0}}},s.Commands[u.GanttCommandNames.GANTTSHEET_MOVE_TASK]={canUndo:!0,execute:function(t,n){var i,e,s,r,u=o.GanttUtil.getGanttSheet(t);if(u)return i=n.duration,e=n.forward,s=u.project,r=o.GanttUtil.getSelectedTaskNumbers(u),s.suspendSchedule(),r.forEach((function(t){var n,r,u=s.getTask(t),o=e?null!==(n=i.value)&&void 0!==n?n:0:-1*(null!==(r=i.value)&&void 0!==r?r:0);"Week"===i.unit?u.moveInWeeks(o):u.moveInWorkingDays(o)})),s.resumeSchedule(),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_TASK]={canUndo:!0,execute:function(t,n){var i,e,s,r,u=o.GanttUtil.getGanttSheet(t);if(u)return i=u.project,e=u.getSelections().map((function(t){return t.rowCount})).reduce((function(t,n){return t+n})),s=Math.min.apply(Math,l(l([],u.getSelections().map((function(t){return t.row})),!1),[i.count],!1)),r=A(e,(function(){return{name:c().GANTT_NEW_TASK}})),i.insertTasksByRow(s,r),u.setSelection(s,-1,e,-1),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_SUMMARY_TASK]={canUndo:!0,execute:function(t,n){var i,e,s,r,u,h,a=o.GanttUtil.getGanttSheet(t);if(a)return i=a.project,s=(e=a.getSelections()[0]).row,r=a.getTaskNumberByRow(s)||i.count,0===(u=o.GanttUtil.getSelectedRowIndexes(a).map((function(t){return a.getTaskByRow(t)})).filter((function(t){return!!t}))).length?(h=i.insertTasks(r,{name:c().GANTT_NEW_SUMMARY_TASK})[0],i.insertTasks(r+1,{name:c().GANTT_NEW_TASK},h.level+1)):(i.insertTasks(r,{name:c().GANTT_NEW_SUMMARY_TASK},u[0].level),i.sorted?i.indentTasks([u[0].taskNumber]):i.indentTasksByRange(e.row+1,e.rowCount)),a.setSelection(s,-1,1,-1),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_MILESTONE]={canUndo:!0,execute:function(t,n){var i,e,s,r,u=o.GanttUtil.getGanttSheet(t);if(u)return i=u.project,e=u.getSelections().map((function(t){return t.rowCount})).reduce((function(t,n){return t+n})),s=Math.min.apply(Math,l(l([],u.getSelections().map((function(t){return t.row})),!1),[i.count],!1)),r=A(e,(function(){return{name:c().GANTT_NEW_MILESTONE,duration:0}})),i.insertTasksByRow(s,r),u.setSelection(s,-1,e,-1),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_DELETE_TASK]={canUndo:!0,execute:function(t,n){var i,e,s=o.GanttUtil.getGanttSheet(t);if(s)return i=s.project,e=o.GanttUtil.getSelectedTaskNumbers(s),i.removeTasks(e),!0}},s.Commands[u.GanttCommandNames.GANTTSHEET_SCROLL_TO_TASK]={canUndo:!0,execute:function(t,n){var i,e=o.GanttUtil.getGanttSheet(t);if(e)return i=e.getActiveTask(),f(i.start)&&f(i.duration)?e.project.timescale.scrollTo(i.finishDisplayed,.25):e.project.timescale.scrollTo(i.startDisplayed,.25),!0}},s.Commands.kAi=function(t){var n,i=!s.mt.Qf();t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP],33,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN],34,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_BEGIN,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_BEGIN],36,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_END,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_END],35,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT],37,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT],39,!1,!1,!0,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_IN,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_IN],111,i,!1,!1,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_OUT,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_OUT],106,i,!1,!1,!1),t.register(u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER,s.Commands[u.GanttCommandNames.GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER],106,i,!1,!1,!1),t.register(u.GanttCommandNames.GANTTSHEET_CHANGE_COMPLETE,s.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_COMPLETE]),t.register(u.GanttCommandNames.GANTTSHEET_INDENT_TASKS,s.Commands[u.GanttCommandNames.GANTTSHEET_INDENT_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_OUTDENT_TASKS,s.Commands[u.GanttCommandNames.GANTTSHEET_OUTDENT_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_LINK_TASKS,s.Commands[u.GanttCommandNames.GANTTSHEET_LINK_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_UNLINK_TASKS,s.Commands[u.GanttCommandNames.GANTTSHEET_UNLINK_TASKS]),t.register(u.GanttCommandNames.GANTTSHEET_CHANGE_TASK_MODE,s.Commands[u.GanttCommandNames.GANTTSHEET_CHANGE_TASK_MODE]),t.register(u.GanttCommandNames.GANTTSHEET_MOVE_TASK,s.Commands[u.GanttCommandNames.GANTTSHEET_MOVE_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_INSERT_TASK,s.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_INSERT_SUMMARY_TASK,s.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_SUMMARY_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_INSERT_MILESTONE,s.Commands[u.GanttCommandNames.GANTTSHEET_INSERT_MILESTONE]),t.register(u.GanttCommandNames.GANTTSHEET_DELETE_TASK,s.Commands[u.GanttCommandNames.GANTTSHEET_DELETE_TASK]),t.register(u.GanttCommandNames.GANTTSHEET_SCROLL_TO_TASK,s.Commands[u.GanttCommandNames.GANTTSHEET_SCROLL_TO_TASK])},s.Workbook.ch("ganttSheet",{init:function(){var t=this;s.Commands.kAi(t.commandManager()),v(t)}})},"./dist/plugins/gantt/gantt-chart.js":function(t,n,i){var e,s,r,u;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarColumn=void 0,e=i("./dist/plugins/gantt/utils/foundation.js"),s=i("./dist/plugins/gantt/gantt-json.js"),r=i("./dist/plugins/gantt/celltypes/taskbar.js"),u=function(){function t(t){this.propertyChanged=new e.EventList,this.IOProps=["taskbarAllowChangeProgress","taskbarAllowLinkTask","taskbarAllowMoveOrResizeTask","taskbarLeftTextStyle","taskbarRightTextStyle","taskbarTopTextStyle","taskbarBottomTextStyle","taskbarInsideTextStyle","taskbarShowDefaultTips","timescaleAllowDragScroll","timescaleTopTierTextStyle","timescaleMiddleTierTextStyle","timescaleBottomTierTextStyle"],this.YC="*",this._Ai=new r.TaskbarCellType}return Object.defineProperty(t.prototype,"width",{get:function(){return this.YC},set:function(t){this.YC=t,this.propertyChanged.invoke(this,"width")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarLeftTextStyle",{get:function(){return this._Ai.leftTextStyle},set:function(t){this._Ai.leftTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarTopTextStyle",{get:function(){return this._Ai.topTextStyle},set:function(t){this._Ai.topTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarRightTextStyle",{get:function(){return this._Ai.rightTextStyle},set:function(t){this._Ai.rightTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarBottomTextStyle",{get:function(){return this._Ai.bottomTextStyle},set:function(t){this._Ai.bottomTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarInsideTextStyle",{get:function(){return this._Ai.insideTextStyle},set:function(t){this._Ai.insideTextStyle=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarShowDefaultTips",{get:function(){return this._Ai.showDefaultTips},set:function(t){this._Ai.showDefaultTips=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarAllowMoveOrResizeTask",{get:function(){return this._Ai.allowMoveOrResizeTask},set:function(t){this._Ai.allowMoveOrResizeTask=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarAllowLinkTask",{get:function(){return this._Ai.allowLinkTask},set:function(t){this._Ai.allowLinkTask=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskbarAllowChangeProgress",{get:function(){return this._Ai.allowChangeProgress},set:function(t){this._Ai.allowChangeProgress=t,this.propertyChanged.invoke(this,"_taskbarCellType")},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return s.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){s.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.TaskbarColumn=u},"./dist/plugins/gantt/gantt-column.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A;function g(t,n,i){var e,s,u,o,h,a=t.NMi;a instanceof r.GanttSheet&&(e=a.project,u=(s=a.fDi(i.col)).value,(o=s.dataType)&&(h=e.taskManager.getFieldByDataType(o))&&(u=h.name),s&&-1!==["start","finish"].indexOf(u)&&b(t,s,n)),m(t,n,i)}function b(t,n,i){var e,s,r=t.NMi,u=r.project,o=n.value,h=n.dataType;h&&(e=u.taskManager.getFieldByDataType(h))&&(o=e.name),n&&-1!==["start","finish"].indexOf(o)&&(s="start"===n.name?u.calendarSettings.defaultStartTime:u.calendarSettings.defaultFinishTime,i.setHours(s.hour,s.minute,0,0))}function m(t,n,i){var r,u,o,h,a=i.row,c=i.col,f=i.sheetArea,l=(new e.Common.CultureInfo).DateTimeFormat,d=new e.Formatter.GeneralFormatter(l.defaultDatePattern).format(n);t.getParent().commandManager().execute({cmd:"editCell",sheetName:t.name(),row:a,col:c,newValue:d,autoFormat:!0,sheetArea:f,isUndo:!1}),t.isEditing()&&t.ci===c&&t.ui===a&&(r=t.getCellType(a,c),u={sheet:t,row:a,col:c,sheetArea:s.SheetArea.viewport},o=t.Il(a,c,f),h=t.getCellRect(a,c),t.li.Li=n,r.updateEditor(t.li,o,h,u),r.setEditorValue(t.li,d,u))}function p(){var t=new s.Style;return t.cellType=new a.TaskSubjectCellType,t}function y(t,n){void 0===n&&(n=!0);var i=new s.Style;return t&&i.compose(t),i.cellType=new u.TaskDurationCellType(n),i.cellType.showButton=n,i}function w(t){var n=new s.Style;return t&&n.compose(t),n.cellButtons=[{imageType:s.ButtonImageType.dropdown,command:"openList",useButtonStyle:!1,visibility:s.ButtonVisibility.onSelected}],n.dropDowns=[{type:s.DropDownType.list,option:{items:[{text:"Manual",item:"Manual"},{text:"Auto",item:"Auto"}]}}],n}function j(t){var n=new s.Style;return t&&n.compose(t),(A(t)||A(t.formatter))&&(n.formatter="0%"),n.cellType=new l.TaskCompleteCellType,n}function T(t,n){var i,e=new s.Style;return t&&e.compose(t),(A(t)||A(t.formatter))&&(e.formatter=v().DEFAULT_DATE_TIME_FORMAT),e.cellButtons=[{imageType:s.ButtonImageType.dropdown,command:"openDateTimePicker",useButtonStyle:!1,visibility:s.ButtonVisibility.onSelected}],e.dropDowns=[{type:s.DropDownType.dateTimePicker,option:{showTime:!1,startDay:s.CalendarStartDay.sunday},submitCommand:g}],i=new c.TaskDateCellType(n),e.cellType=i,e}function O(t){var n=new s.Style;return t&&n.compose(t),n.cellButtons=[{imageType:s.ButtonImageType.dropdown,command:"OpenPredecessor",useButtonStyle:!1,visibility:s.ButtonVisibility.onSelected}],n.cellType=new o.TaskPredecessorCellType,n}function k(t){var n=new s.Style;return t&&n.compose(t),n.cellButtons=[{imageType:s.ButtonImageType.dropdown,command:"OpenResources",useButtonStyle:!1,visibility:s.ButtonVisibility.onSelected}],n.cellType=new h.TaskResourcesCellType,n}function S(t,n){t&&(t.font&&(n.font=t.font),t.color&&(n.foreColor=t.color),t.textDecoration&&(n.textDecoration=t.textDecoration))}Object.defineProperty(n,"__esModule",{value:!0}),n.mergeTextStyle=n.createStyleForResources=n.createStyleForPredecessors=n.createStyleForDateTime=n.createStyleForComplete=n.createStyleForMode=n.createStyleForDuration=n.createStyleForSubject=void 0,e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/gantt-sheet.js"),u=i("./dist/plugins/gantt/celltypes/duration.js"),o=i("./dist/plugins/gantt/celltypes/predecessor.js"),h=i("./dist/plugins/gantt/celltypes/resources.js"),a=i("./dist/plugins/gantt/celltypes/subject.js"),c=i("./dist/plugins/gantt/celltypes/date.js"),f=i("./dist/plugins/gantt/gantt.ns.js"),l=i("./dist/plugins/gantt/celltypes/complete.js"),d=new e.Common.ResourceManager(f.SR,"GanttSheet"),v=d.getResource.bind(d),A=e.Common.lt.ht,n.createStyleForSubject=p,n.createStyleForDuration=y,n.createStyleForMode=w,n.createStyleForComplete=j,n.createStyleForDateTime=T,n.createStyleForPredecessors=O,n.createStyleForResources=k,n.mergeTextStyle=S},"./dist/plugins/gantt/gantt-contextmenu.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y=this&&this.qKr||(w=function(t,n){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},w(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}w(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),w;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttContextMenu=n.GanttContextMenuView=void 0,e=i("Core"),s=i("ContextMenu"),r=i("./dist/plugins/gantt/gantt-sheet.js"),u=i("./dist/plugins/gantt/celltypes/taskbar.js"),o=i("./dist/plugins/gantt/celltypes/timescales.js"),h=i("./dist/plugins/gantt/taskbar/action.js"),a=i("Common"),c=a.Common.lt.ht,f={Timescale:function(t,n,i,e){return new RegExp("Timescale","i").test(t.workArea)&&i instanceof o.TimescaleCellType},GanttChart:function(t,n,i,e){var s=i instanceof u.TaskbarCellType&&c(h.BarActionBuilder.getBarHitInfo(e.NMi.project,i,n).task);return new RegExp("GanttChart","i").test(t.workArea)&&s},GanttBar:function(t,n,i,e){var s=i instanceof u.TaskbarCellType&&!c(h.BarActionBuilder.getBarHitInfo(e.NMi.project,i,n).task);return new RegExp("GanttBar","i").test(t.workArea)&&s},GanttField:function(t,n,i,s){return new RegExp("GanttField","i").test(t.workArea)&&n.sheetArea===e.SheetArea.viewport&&!(i instanceof u.TaskbarCellType)&&!(i instanceof o.TimescaleCellType)},GanttColHeader:function(t,n,i,s){return new RegExp("GanttColHeader","i").test(t.workArea)&&n.sheetArea===e.SheetArea.colHeader&&!(i instanceof o.TimescaleCellType)},GanttRowHeader:function(t,n,i,s){return new RegExp("GanttRowHeader","i").test(t.workArea)&&n.sheetArea===e.SheetArea.rowHeader}},l="gc.spread.",d="copy",v="cut",A="separator",g="ganttSheetPaste",b=e.GC$,m=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return y(n,t),n.prototype.getCommandOptions=function(t,n,i){if(new RegExp("GanttBar","i").test(t.workArea))return t.commandOptions},n}(s.MenuView),n.GanttContextMenuView=m,p=function(t){function n(){var n,i=t.call(this)||this;return i.menuView=new m,n=[l+d,l+v,l+g],i.menuData.forEach((function(t,i){n.indexOf(t.name)>-1&&(t.workArea+="GanttColHeader",t.workArea+="GanttRowHeader",t.workArea+="GanttField")})),i}return y(n,t),n.prototype.xq=function(n,i,s){var u=(0,e.jf)(s);return u.NMi instanceof r.GanttSheet&&i.worksheetHitInfo?this.xAi(n,i,u):t.prototype.xq.call(this,n,i,s)},n.prototype.xAi=function(t,n,i){var e,s,r=i.getCellType(n.worksheetHitInfo.row,n.worksheetHitInfo.col,n.worksheetHitInfo.hitTestType);return r?(e={x:n.worksheetHitInfo.x,y:n.worksheetHitInfo.y,row:n.worksheetHitInfo.row,col:n.worksheetHitInfo.col,sheet:i,cellRect:n.worksheetHitInfo.cellTypeHitInfo?n.worksheetHitInfo.cellTypeHitInfo.cellRect:void 0,sheetArea:n.worksheetHitInfo.hitTestType},s=[],b.each(t,(function(t,n){for(var o in n.type===A&&s.push(n),f)f[o](n,e,r,i)&&("GanttBar"===o&&r instanceof u.TaskbarCellType&&(n.commandOptions=h.BarActionBuilder.getBarHitInfo(i.NMi.project,r,e).style),s.push(n))})),s):t},n.prototype.kk=function(n,i){var e,s,a=n.getCellType(i.row,i.col,i.hitTestType);if(!(a instanceof o.TimescaleCellType&&n.NMi instanceof r.GanttSheet))return a instanceof u.TaskbarCellType&&n.NMi instanceof r.GanttSheet?(e={x:i.x,y:i.y,row:i.row,col:i.col,sheet:n,cellRect:i.cellTypeHitInfo?i.cellTypeHitInfo.cellRect:void 0,sheetArea:i.hitTestType},void((s=!c(h.BarActionBuilder.getBarHitInfo(n.NMi.project,a,e).task))&&(n.clearSelection(),n.setActiveCell(e.row,e.col),n.addSelection(e.row,0,1,n.getColumnCount()-1)))):void t.prototype.kk.call(this,n,i)},n}(s.ContextMenu),n.GanttContextMenu=p,e.Workbook.ch("ganttcontextmenu",{setHost:function(){var t=this;t.contextMenu&&t.contextMenu instanceof p||(t.contextMenu=new p)}})},"./dist/plugins/gantt/gantt-events.js":function(t,n,i){var e,s,r=this&&this.qKr||(u=function(t,n){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},u(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}u(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),u;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSheetEventHandler=void 0,s=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n}((e=i("Core")).nk),n.GanttSheetEventHandler=s},"./dist/plugins/gantt/gantt-filter.js":function(t,n,i){var e,s,r,u,o=this&&this.qKr||(h=function(t,n){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},h(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}h(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),h;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttFilterDialog=void 0,e=i("Filters"),s=i("./dist/plugins/gantt/gantt-sheet.js"),r=i("./dist/plugins/gantt/celltypes/subject.js"),u=function(t){function n(n,i,e,s){return t.call(this,n,i,e,s)||this}return o(n,t),n.prototype.Ust=function(n,i,e){var u,o,h,a=t.prototype.Ust.call(this,n,i,e);return this.sheet.NMi instanceof s.GanttSheet?(u=this.sheet,o=u.NMi,h=u.JS(this.filterButtonInfo.rowFilter.range),u.getCellType(-1,n)instanceof r.TaskSubjectCellType&&(this.dataSource.forEach((function(t,n){t.level=o.getRowState(h.row+n).level})),a.forEach((function(t,n){t.children[0].level=o.getRowState(h.row+n).level}))),a):a},n}(e.iut),n.GanttFilterDialog=u},"./dist/plugins/gantt/gantt-gridline.js":function(t,n,i){var e,s,r;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttGridlines=void 0,e=i("./dist/plugins/gantt/gantt-json.js"),s=i("./dist/plugins/gantt/gantt.enum.js"),r=function(){function t(t){this.IOProps=["topTierColumn","middleTierColumn","bottomTierColumn","currentDate","ganttRows","projectFinish","projectStart"],this.lAi=t,this.LAi={lineColor:"",lineType:s.GanttGridlineType.empty},this.PAi={lineColor:"#FFFFFF",lineType:s.GanttGridlineType.thin},this.HAi={lineColor:"",lineType:s.GanttGridlineType.empty},this.YAi={lineColor:"transparent",lineType:s.GanttGridlineType.thin},this.QAi={lineColor:"#8BBF8A",lineType:s.GanttGridlineType.thin},this.WAi={lineColor:"#808080",lineType:s.GanttGridlineType.dotted},this.GAi={lineColor:"#808080",lineType:s.GanttGridlineType.dotted}}return Object.defineProperty(t.prototype,"topTierColumn",{get:function(){return this.LAi},set:function(t){this.LAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"middleTierColumn",{get:function(){return this.PAi},set:function(t){this.PAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottomTierColumn",{get:function(){return this.HAi},set:function(t){this.HAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDate",{get:function(){return this.QAi},set:function(t){this.QAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectStart",{get:function(){return this.WAi},set:function(t){this.WAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectFinish",{get:function(){return this.GAi},set:function(t){this.GAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ganttRows",{get:function(){return this.YAi},set:function(t){this.YAi=t,this.onLinesChanged()},enumerable:!1,configurable:!0}),t.prototype.onLinesChanged=function(){this.lAi.project.VAi.invoke()},t.prototype.getLineInfos=function(t){var n=t.lineColor,i=t.lineType,e=t.intervalLineColor,r=t.intervalLineType;return i===s.GanttGridlineType.empty&&(n="transparent",i=s.GanttGridlineType.thin),r===s.GanttGridlineType.empty&&(e="transparent",r=s.GanttGridlineType.thin),{lineColor:n,lineType:i,intervalLineColor:e,intervalLineType:r}},t.prototype.toJSON=function(){return e.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){e.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.GanttGridlines=r},"./dist/plugins/gantt/gantt-json.js":function(t,n,i){var e,s,r,u,o;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSheetJsonConverter=void 0,e=i("Core"),s=i("Common"),r=i("./dist/plugins/gantt/utils/util.js"),u=s.Common.lt.tv,o=function(){function t(){}return t.toJSON=function(t,n){var i,s,r,o={};for(i=0,s=n;i<s.length;i++)t[r=s[i]]instanceof Date?o[r]={oaDate:e.util.Z0(t[r])}:t[r]&&t[r].toJSON&&"function"==typeof t[r].toJSON?o[r]=t[r].toJSON():void 0!==t[r]&&(o[r]=u(t[r]));return o},t.fromJSON=function(t,n,i){var s,o,h;for(s=0,o=i;s<o.length;s++)t[h=o[s]]&&t[h].fromJSON&&"function"==typeof t[h].fromJSON?t[h].fromJSON(n[h]):n[h]&&r.GanttUtil.uki(n[h].oaDate)?t[h]=e.util.V0(n[h].oaDate):void 0!==n[h]&&(t[h]=u(n[h]))},t}(),n.GanttSheetJsonConverter=o},"./dist/plugins/gantt/gantt-options.js":function(t,n,i){var e,s;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttUIOptions=void 0,e=i("./dist/plugins/gantt/gantt-json.js"),s=function(){function t(t){this.zAi=!0,this.KAi=!0,this.XAi=!0,this.allowZoomTimescale=!0,this.IOProps=["allowAddTask","allowRemoveTask","allowReorderTask","allowZoomTimescale"],this.uAi=t}return Object.defineProperty(t.prototype,"allowAddTask",{get:function(){return this.zAi&&this.uAi.canAddTask},set:function(t){this.zAi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowRemoveTask",{get:function(){return this.KAi&&this.uAi.canRemoveTask},set:function(t){this.KAi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowReorderTask",{get:function(){return this.XAi},set:function(t){this.XAi=t},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return e.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){e.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.GanttUIOptions=s},"./dist/plugins/gantt/gantt-outline.js":function(t,n){var i,e;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttOutline=void 0,i=void 0,e=function(){function t(t){this.lAi=t}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.getSheet()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.isRowCollapsed=function(t){return this.sheet.rowOutlines.isCollapsed(t)},t.prototype.initOutlineColumn=function(){var t,n=this.Kki();n>-1&&(t=this.sheet).outlineColumn.options({columnIndex:n,showImage:!0,maxLevel:10})},t.prototype.updateOutlineColumnModel=function(){var t,n,e,s,r,u,o,h=this.Kki();if(-1!==h){for(n=(t=this.lAi).Mf,e=this.project.count,(s=t.options.allowAddNew)&&n.getCell(e,h).textIndent(i),r=0;r<e;r++)o=(u=this.project.getTaskByRow(r))?u.level:i,n.getCell(r,h).textIndent(o);n.outlineColumn.refresh(),n.rowOutlines.A2t=null}},t.prototype.Kki=function(){var t,n,i,e=this.lAi,s=e.getDataView(),r=-1;if(s)for(t=s.getColumnInfos(),n=0;n<t.length;n++)if("TaskSubject"===(i=t[n]).dataType){r=n;break}return r},t.prototype.backupCollapsedState=function(){var t,n,i,e=!1,s=[],r=this.project.count,u=this.sheet;for(t=0;t<r;t++)(n=u.rowOutlines.getCollapsed(t))&&(e||(e=!0),s[i=this.project.getTaskByRow(t).taskNumber]=!0);if(e){for(t=0;t<r;t++)u.rowOutlines.setCollapsed(t,!1);this.tAe=s}},t.prototype.restoreCollapsedState=function(){var t,n,i,e=this.tAe;if(e){for(t=0;t<e.length;t++)e[t]&&(i=(n=this.project.getTask(t)).rowIndex,this.sheet.rowOutlines.setCollapsed(i,!0));this.tAe=null}},t}(),n.GanttOutline=e},"./dist/plugins/gantt/gantt-override.js":function(t,n,i){var e,s,r;function u(t){var n,i,e,s=Object.keys(r);for(n=0,i=s;n<i.length;n++)e=i[n],r[e].call(t)}Object.defineProperty(n,"__esModule",{value:!0}),n.$Ai=void 0,e=i("Common"),s=i("Core"),r={ETi:function(){var t,n,i,r,u,o,h=this,a=this,c=a.Mf;c.NMi=this,c.hP=function(){var t=this.parent;return!t||t.getActiveSheetTab()===a},t=c.columnOutlines.setCollapsed,c.rowOutlines.setCollapsed=function(n,i,e){var s=a.project;s&&!s.keepOutlineStructure&&a.getTaskByRow(n)||t.call(this,n,i,e)},c.TF=function(){return h},n=c.getActualStyle,c.getActualStyle=function(t,i,e,r,u){var o,h,f,l;return void 0===u&&(u={}),o=a.zDi(t),h=n.call(c,t,i,e,r,u),o||(f=void 0===e||e===s.SheetArea.viewport,l=a.getGanttColumnIndex(),e!==s.SheetArea.colHeader&&i!==l||(h.cellPadding=void 0),f&&t>=0&&i>=0&&(i===l?a.mergeGanttTaskbarColumnStyle(t,h):a.margeGanttFieldColumnStyle(t,i,h))),h},i=c.getScrollTooltipContent,c.getScrollTooltipContent=function(t,n){if(n){var s=a.project.timescale.currentDateUtc;return new e.Formatter.GeneralFormatter("yy-mm-dd").format(s)}return i.call(c,t)},r=c.m6,c.m6=function(t,n,i){var e=c.hitTest(n,i);(!e.cellTypeHitInfo||"Up"!==e.cellTypeHitInfo.isReservedOnButton&&"Down"!==e.cellTypeHitInfo.isReservedOnButton)&&r.call(c,t,n,i)},c.sortRange=function(t,n,i,e,s,r,u,o,h){var c,f,l=[],d=[],v=a.getDataView(),A=v.getColumnInfos();for(c=0;c<r.length;c++)A[r[c].index]&&(f=A[r[c].index].name,l.push(f),d.push(r[c].ascending));return a.project.sort(l,d),!1},c.JAi=function(){return!0},c.continuousPaginateLargeColumn=function(){return!0},u=c.getColumnWidth,c.getColumnWidth=function(t,n,i){var e=a.zki,r=a.getGanttColumnIndex();return e&&n===s.SheetArea.viewport&&t===r?a.wAi():u.call(c,t,n,i)},o=c.Sy,c.Sy=function(t){var n;return a.zki?a.Zki():o.call(c,t)}}},n.$Ai=u},"./dist/plugins/gantt/gantt-renderer.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,w,j,T=this&&this.qKr||(O=function(t,n){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},O(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}O(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),O;function k(t){var n,i,e,s,r,u;if(!t||!t.project)return null;for((i=t[n="__celltypeRenderers"])||(i=[],t[n]=i),e=0,s=i;e<s.length;e++)if((r=s[e]).project===t.project)return r;return u=new w(t),i.push(u),u}Object.defineProperty(n,"__esModule",{value:!0}),n.vAi=n.GanttSheetRender=n.GanttCellTypeRenderer=n.GanttRenderer=void 0,e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/gantt-sheet.js"),u=i("./dist/plugins/gantt/gantt-column.js"),o=i("./dist/plugins/gantt/project/calendar.js"),h=i("./dist/plugins/gantt/taskbar/renderer.js"),a=i("./dist/plugins/gantt/gantt.enum.js"),c=s.util.vt,f=e.Common.lt.ht,l=e.Common.ft.YGt,d=s.util.Mt,v=8,A=function(){function t(t,n,i){this.endArrow=void 0,this.points=t,this.color=n,this.data=i}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){this._data=t},enumerable:!1,configurable:!0}),t.prototype.contains=function(t){var n,i,e,s,r,u;if(this.points.length<2)return!1;for(n=0;n<this.points.length-1;n++)if(i=this.points[n].x,e=this.points[n].y,s=this.points[n+1].x,r=this.points[n+1].y,u=3,t.x>Math.min(i,s)-u&&t.x<Math.max(i,s)+u&&t.y>Math.min(e,r)-u&&t.y<Math.max(e,r)+u)return!0;return!1},t.prototype.paint=function(t){var n,i;for(t.beginPath(),t.moveTo(this.points[0].x+.5,this.points[0].y+.5),n=1;n<this.points.length;n++)i=this.points[n],t.lineTo(i.x+.5,i.y+.5);t.strokeStyle=this.color,t.stroke(),this.endArrow&&this.jmi(t,this.endArrow)},t.prototype.jmi=function(t,n){var i,e,s,r;if(this.endArrow){switch(e=(i=this.points[this.points.length-1]).x,s=i.y,t.beginPath(),r=v/2,t.moveTo(e,s),n){case"Left":t.lineTo(e+r,s-r),t.lineTo(e+r,s+r);break;case"Right":t.lineTo(e-r,s-r),t.lineTo(e-r,s+r);break;case"Top":t.lineTo(e-r,s-r),t.lineTo(e+r,s-r);break;case"Bottom":t.lineTo(e-r,s+r),t.lineTo(e+r,s+r)}t.closePath(),t.fillStyle=this.color,t.fill()}},t}(),g=function(){function t(){}return t.prototype.maxDate=function(t,n){return t<n?n:t},t.prototype.minDate=function(t,n){return t<n?t:n},t.prototype.getLinePoints=function(t,n,i,e,s){var r=e.y,u=e.height,o=this.layoutLineX(t,n,i),h=o[0],a=o[1],c=o[2],f=o[3],l=this.layoutLineY(t,n,i),d=l[0],v=l[1],A=l[2],g=this.getArrowDirection(t,n,i);switch(s){case"cross":return[{x:c,y:r},{x:c,y:r+u}];case"start":return[{x:h,y:d},{x:a,y:d},{x:a,y:v},{x:c,y:v},{x:c,y:n.viewIndex<i.viewIndex?r+u:r}];case"end":return"Top"===g?[{x:c,y:n.viewIndex<i.viewIndex?r:r+u},{x:c,y:A}]:[{x:c,y:n.viewIndex<i.viewIndex?r:r+u},{x:c,y:A},{x:f,y:A}]}},t}(),b=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return T(n,t),n.prototype.getArrowDirection=function(t,n,i){switch(t){case"SS":case"FS":return"Right";case"FF":case"SF":return"Left"}},n.prototype.layoutLineX=function(t,n,i){var e,s,r,u,o=n.bounds,h=i.bounds;switch(t){case"SS":e=o.x,s=o.x-v,r=Math.min(s,h.x-v),u=h.x;break;case"SF":e=o.x,s=o.x-v,r=h.x+h.w+v,u=h.x+h.w;break;case"FS":e=o.x+o.w,s=o.x+o.w+v,r=(r=h.x-v)>s?s:r,u=h.x;break;case"FF":e=o.x+o.w,r=s=Math.max(o.x+o.w,h.x+h.w)+v,u=h.x+h.w}return[e,s,r,u]},n.prototype.layoutLineY=function(t,n,i){var e=n.bounds,s=i.bounds,r=e.y+e.h/2,u=n.viewIndex<i.viewIndex?n.cellRect.y+n.cellRect.height-2:n.cellRect.y+1,o=s.y+s.h/2;return[r,u,o]},n}(g),m=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return T(n,t),n.prototype.getArrowDirection=function(t,n,i){var e=n.bounds,s=i.bounds;switch(t){case"FS":return e.x+e.w<=s.x+5?n.viewIndex<i.viewIndex?"Top":"Bottom":"Right";case"SS":return"Right";case"FF":case"SF":return"Left"}},n.prototype.layoutLineX=function(t,n,i){var e,s,r,u,o=n.bounds,h=i.bounds;switch(t){case"SS":e=o.x,r=s=Math.min(o.x-v,h.x-v),u=h.x;break;case"SF":e=o.x,s=o.x-v,r=h.x+h.w+v,u=h.x+h.w;break;case"FS":e=o.x+o.w,o.x+o.w<=h.x+5?u=s=r=Math.max(h.x,o.x+o.w+5):(s=Math.max(o.x+o.w+v,h.x-v),r=(r=h.x-v)>s?s:r,u=h.x);break;case"FF":e=o.x+o.w,r=s=Math.max(o.x+o.w,h.x+h.w)+v,u=h.x+h.w}return[e,s,r,u]},n.prototype.layoutLineY=function(t,n,i){var e=n.bounds,s=i.bounds,r=e.y+e.h/2,u=n.viewIndex<i.viewIndex?n.cellRect.y+n.cellRect.height-2:n.cellRect.y+1,o=s.y+s.h/2;return"FS"===t&&e.x+e.w<=s.x+5&&(o=n.viewIndex<i.viewIndex?s.y:s.y+s.h),[r,u,o]},n}(g),p=function(){function t(t){this.lAi=t,this.Ami=c(this.sheet.getCell(-1,-1).font())}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.getMiddleHeight=function(){var t,n,i,e,s,u,o,h,a=this.project.layout.barHeight;return this.lAi instanceof r.GanttSheet?(this.project.Omi.hasLeftText&&(null===(n=null===(t=this.lAi)||void 0===t?void 0:t.taskbarColumn)||void 0===n?void 0:n.taskbarLeftTextStyle)&&(a=Math.max(this.getTextActualHeight(null===(e=null===(i=this.lAi)||void 0===i?void 0:i.taskbarColumn)||void 0===e?void 0:e.taskbarLeftTextStyle),a)),this.project.Omi.hasRightText&&(null===(u=null===(s=this.lAi)||void 0===s?void 0:s.taskbarColumn)||void 0===u?void 0:u.taskbarRightTextStyle)&&(a=Math.max(this.getTextActualHeight(null===(h=null===(o=this.lAi)||void 0===o?void 0:o.taskbarColumn)||void 0===h?void 0:h.taskbarRightTextStyle),a)),a):a},t.prototype.getTopHeight=function(n){var i,e,s,u,o=Math.max((t.minHeight-n)/2,3);return this.lAi instanceof r.GanttSheet&&this.project.Omi.hasTopText&&(null===(e=null===(i=this.lAi)||void 0===i?void 0:i.taskbarColumn)||void 0===e?void 0:e.taskbarTopTextStyle)?this.getTextActualHeight(null===(u=null===(s=this.lAi)||void 0===s?void 0:s.taskbarColumn)||void 0===u?void 0:u.taskbarTopTextStyle):o},t.prototype.getBottomHeight=function(n){var i,e,s,u,o=Math.max((t.minHeight-n)/2,2);return this.lAi instanceof r.GanttSheet&&this.project.Omi.hasBottomText&&(null===(e=null===(i=this.lAi)||void 0===i?void 0:i.taskbarColumn)||void 0===e?void 0:e.taskbarBottomTextStyle)?this.getTextActualHeight(null===(u=null===(s=this.lAi)||void 0===s?void 0:s.taskbarColumn)||void 0===u?void 0:u.taskbarBottomTextStyle):o},t.prototype.getTextActualHeight=function(t){return t.font?c(t.font):this.Ami},t.prototype.updateHeightWithTaskStyle=function(t,n,i){var e=this;return this.project.tasks.forEach((function(s){var r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,w,j,T,O,k;s.style&&((null===(o=null===(u=null===(r=(k=s.getBarStyleRules()[0]).style)||void 0===r?void 0:r.taskbarStyle)||void 0===u?void 0:u.leftTextStyle)||void 0===o?void 0:o.font)&&(t=Math.max(e.getTextActualHeight(null===(a=null===(h=k.style)||void 0===h?void 0:h.taskbarStyle)||void 0===a?void 0:a.leftTextStyle),t)),(null===(l=null===(f=null===(c=k.style)||void 0===c?void 0:c.taskbarStyle)||void 0===f?void 0:f.rightTextStyle)||void 0===l?void 0:l.font)&&(t=Math.max(e.getTextActualHeight(null===(v=null===(d=k.style)||void 0===d?void 0:d.taskbarStyle)||void 0===v?void 0:v.rightTextStyle),t)),(null===(b=null===(g=null===(A=k.style)||void 0===A?void 0:A.taskbarStyle)||void 0===g?void 0:g.topTextStyle)||void 0===b?void 0:b.font)&&(n=Math.max(e.getTextActualHeight(null===(p=null===(m=k.style)||void 0===m?void 0:m.taskbarStyle)||void 0===p?void 0:p.topTextStyle)+2,n)),(null===(j=null===(w=null===(y=k.style)||void 0===y?void 0:y.taskbarStyle)||void 0===w?void 0:w.bottomTextStyle)||void 0===j?void 0:j.font)&&(i=Math.max(e.getTextActualHeight(null===(O=null===(T=k.style)||void 0===T?void 0:T.taskbarStyle)||void 0===O?void 0:O.bottomTextStyle)+2,i)))})),[t,n,i]},t.prototype.getRowHeight=function(){var t=this.getMiddleHeight(),n=this.getTopHeight(t),i=this.getBottomHeight(t),e=this.updateHeightWithTaskStyle(t,n,i);return t=e[0],{height:(n=e[1])+t+(i=e[2]),topHeight:n,middleHeight:t,bottomHeight:i}},t.prototype.getData=function(){return this.getRowHeight()},t.minHeight=30,t}(),y=function(){function t(t){this.lAi=t,this.ymi=new p(t)}return Object.defineProperty(t.prototype,"sheet",{get:function(){return this.lAi.Mf},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"project",{get:function(){return this.lAi.project},enumerable:!1,configurable:!0}),t.prototype.calcDateWidth=function(t,n){return this.calcDateLocation(0,n)-this.calcDateLocation(0,t)},t.prototype.calcDateLocation=function(t,n){return t+Math.floor(this.project.timescale.getOffsetByDateUtc(n))},t.prototype.getBarStyleRowHeight=function(){return this.ymi.getData().height},t.prototype.getLineTaskbarStyle=function(t){var n;return t.getBarStyleRules()[0]},t.prototype.clipBackgroundRects=function(t,n,i,e,s){for(var r,u,o,h,a,c=this.project.timescale.currentDateUtc;u=(r=this.project.timescale.getDateUtcRange(c))[0],o=r[1],!((h=this.calcDateLocation(n,u))>=n+e);)this.project.timescale.nonWorkingTime.calendar.isNonWorkingArea(u,o)||(a=this.calcDateWidth(u,o),h=Math.floor(h),a=Math.floor(h+a)-h,t.rect(h,i,a,s)),c=o;t.clip()},t.prototype.paintTierColumns=function(t,n,i,e,s){var r={};this.project.timescale.tierMode!==a.TimescaleTierMode.middle&&this.paintTierColumn(t,n,i,e,s,this.lAi.gridlines.bottomTierColumn,this.project.timescale.bottomTier,r),this.paintTierColumn(t,n,i,e,s,this.lAi.gridlines.middleTierColumn,this.project.timescale.middleTier,r),this.project.timescale.tierMode===a.TimescaleTierMode.topMiddleBottom&&this.paintTierColumn(t,n,i,e,s,this.lAi.gridlines.topTierColumn,this.project.timescale.topTier,r)},t.prototype.paintTierColumn=function(t,n,i,e,r,u,o,h){var c,f,l,d,v,A,g,b;if(u&&u.lineType!==a.GanttGridlineType.empty)for(f=c=this.project.timescale.currentDateUtc;d=(l=this.project.timescale.getDateUtcRange(f,o.unit,o.count))[0],v=l[1],!((A=n+this.project.timescale.getOffsetByDateUtc(d))>=n+e);)h[g=n+this.project.timescale.getOffsetByDateUtc(v)]||(g=Math.floor(g)+.5,(b=(0,s.Zx)(g,i,g,i+r,u.lineColor,u.lineType))._e(t),h[g]=!0),f=v},t.prototype.paintSpecialLines=function(t,n,i,e,s){var r=this.lAi.gridlines,u=this.project.layout.roundBarsToWholeDays?this.roundDateUtcWholeDay(this.project.startDateUtc):this.project.startDateUtc,o=this.project.layout.roundBarsToWholeDays?this.roundDateUtcWholeDay(this.project.finishDateUtc):this.project.finishDateUtc,h=this.project.layout.roundBarsToWholeDays?this.roundDateUtcWholeDay(this.project.currentDateUtc):this.project.currentDateUtc;this.paintSingleGridline(r.projectStart,u,t,n,i,e,s),this.paintSingleGridline(r.projectFinish,o,t,n,i,e,s),this.paintSingleGridline(r.currentDate,h,t,n,i,e,s)},t.prototype.paintSingleGridline=function(t,n,i,e,r,u,o){var h,c;if(t&&t.lineType!==a.GanttGridlineType.empty&&n){if((h=e+this.project.timescale.getOffsetByDateUtc(n))>=e+u||h<e)return;h=Math.floor(h)+.5,(c=(0,s.Zx)(h,r+.5,h,r+o+.5,t.lineColor,t.lineType))._e(i)}},t.getTextWidthAndHeight=function(t,n,i){var e=f(n)?0:c(i),s=d(t,i,n)+3;return[s,e]},t.prototype.layoutLinkEndInfo=function(n,i,e){var s,r,u,o,h,a=this.layoutTask(i,e.x,e.y);if(a)return(s=a[0]).styleRule.style.taskbarStyle.middleShape?(r=t.getTaskbarMiddleBounds(s.bounds,s.styleRule.style.taskbarStyle.middleShape),u=s.styleRule.style.taskbarStyle.middleColor):(r=t.getTaskbarMiddleBounds(s.bounds,"rectangleBar"),o=void 0,s.styleRule.style.taskbarStyle.startShape&&!f(s.styleRule.style.taskbarStyle.startShape)&&(o=s.styleRule.style.taskbarStyle.startColor),h=void 0,s.styleRule.style.taskbarStyle.endShape&&!f(s.styleRule.style.taskbarStyle.endShape)&&(h=s.styleRule.style.taskbarStyle.endColor),u=n?o||h:h||o),r?{bounds:r,color:u,viewIndex:i.viewIndex,cellRect:e}:void 0},t.prototype.layoutTask=function(t,n,i){var e=this,s=t.getBarStyleRules();if(!f(s)&&0!==s.length)return s.map((function(s){return e.layoutTaskCore(t,s,n,i)}))},t.prototype.layoutTaskCore=function(t,n,i,e){var s,r=n.getFromDate(t),u=n.getToDate(t),o=n.getScale(t),h=this.OAe(r),a=this.OAe(u),c=this.project.layout.barHeight,f=this.calcDateLocation(i,h),l=Math.max(this.calcDateWidth(h,a)*o,1),d=e;return{styleRule:n,bounds:s={x:f,y:d+=this.ymi.getData().topHeight+(this.ymi.getData().middleHeight-c)/2,w:l,h:c}}},t.prototype.OAe=function(t){t instanceof Date||(t=this.project.getDefaultStartDate());var n=o.Calendar.localToUTC(t);return this.project.layout.roundBarsToWholeDays&&(n=this.roundDateUtcWholeDay(n)),n},t.prototype._Ae=function(t){var n=t.startDisplayed,i=t.finishDisplayed,e=this.OAe(n),s=this.OAe(i);return Math.max(this.calcDateWidth(e,s),1)},t.prototype.getProjectLength=function(t){var n=o.Calendar.localToUTC(t.startDisplayed),i=o.Calendar.localToUTC(t.finishDisplayed);return n=this.roundDateUtcWholeDay(n),i=this.roundDateUtcWholeDay(i),Math.max(this.calcDateWidth(n,i),1)},t.prototype.roundDateUtcWholeDay=function(t){var n,i,e,s,r,u,o,h=864e5,a=t.valueOf(),c=a%h;return c<0&&(c+=h),a<=(e=(n=a-c)+60*(60*(i=this.project.calendarSettings.defaultStartTime).hour+i.minute)*1e3)?(s=this.project.timescale.getDateUtcRange(t),new Date(Math.max(s[0].valueOf(),n))):a>=(u=n+60*(60*(r=this.project.calendarSettings.defaultFinishTime).hour+r.minute)*1e3)?(o=(s=this.project.timescale.getDateUtcRange(t))[0].valueOf()===t.valueOf()?t:s[1],new Date(Math.min(o.valueOf(),n+h))):t},t.getTaskbarMiddleBounds=function(t,n){if(n){var i=t.x,e=t.y,s=t.w,r=t.h;switch(n){case"lineTop":e+=1,r=2;break;case"lineMiddle":e+=r/2-1,r=2;break;case"lineBottom":e+=r-2,r=2;break;case"rectangleTop":r/=2;break;case"rectangleMiddle":e+=r/3,r/=3;break;case"rectangleBottom":e+=r/2,r/=2;break;case"rectangleBar":e+=1,r-=2}return{x:i,y:e,w:s,h:r}}},t.getTaskbarStartBounds=function(t){var n=t.x,i=t.y,e=t.h;return{x:n-(e-=2)/2,y:i+1,w:e,h:e}},t.getTaskbarEndBounds=function(t){var n=t.x,i=t.y,e=t.w,s=t.h;return{x:n+e-(s-=2)/2,y:i+1,w:s,h:s}},t.prototype.getOffsetX=function(t,n){},t.prototype.getOffsetY=function(t,n){},t.prototype.getActionPendingBounds=function(n){var i,e,s,r=n.task,u=n.styleRule;if(r&&u){switch(i=this.layoutTaskCore(r,u,this.getOffsetX(n.rowIndex,n.colIndex),this.getOffsetY(n.rowIndex,n.colIndex)).bounds,e=n.partName){case a.BarPartName.Start:(s=t.getTaskbarStartBounds(i)).x+=n.movedX;break;case a.BarPartName.End:(s=t.getTaskbarEndBounds(i)).x+=n.movedX;break;case a.BarPartName.Middle:s=t.getTaskbarMiddleBounds(i,u.style.taskbarStyle.middleShape),n.stretchX?(s.w+=n.stretchX,s.w<0&&(s.w=Math.abs(s.w),s.x-=s.w)):s.x+=n.movedX;break;case a.BarPartName.Whole:s=i,n.stretchX?(s.w+=n.stretchX,s.w<0&&(s.w=Math.abs(s.w),s.x-=s.w)):s.x+=n.movedX}return s}},t}(),n.GanttRenderer=y,w=function(t){function n(n){return t.call(this,n)||this}return T(n,t),n.prototype.paintTask=function(t,n,i,e,s,r,u,o,h,a){var c,f,l,d=this.getTaskLayoutData(n,i,e,s),v=this.project.timescale.nonWorkingTime.drawMode;switch(v){case"None":case"Behind":this.paintTierColumns(t,i,e,s,r),this.paintTaskbars(t,d)}if(this.paintSpecialLines(t,i,e,s,r),d)for(c=0,f=d;c<f.length;c++)l=f[c],this.paintBarText(t,n,l.styleRule.style.taskbarStyle,l.bounds,u,o,h,a)},n.prototype.getTaskLayoutData=function(t,n,i,e){if(t)return this.layoutTask(t,n,i)},n.prototype.paintTaskbars=function(t,i){var e,s,r;if(i)for(e=0,s=i;e<s.length;e++)r=s[e],n.paintTaskbar(t,r.styleRule.style.taskbarStyle,r.bounds)},n.paintTaskbar=function(t,i,e){n.drawMiddle(t,i,n.getTaskbarMiddleBounds(e,null==i?void 0:i.middleShape)),n.drawStart(t,i,n.getTaskbarStartBounds(e)),n.drawEnd(t,i,n.getTaskbarEndBounds(e))},n.drawMiddle=function(t,n,i){(null==n?void 0:n.middleShape)&&h.BarPainter.draw(t,n.middlePattern||"solidFill",n.middleColor||"#000000",i)},n.drawStart=function(t,n,i){f(null==n?void 0:n.startShape)||f(i)||("triangleLeft"!==n.startShape&&"triangleRight"!==n.startShape||(i.x-=i.w/2),h.BarEndPainter.draw(t,n.startShape,n.startType||"solid",n.startColor||"#000000",i))},n.drawEnd=function(t,n,i){f(null==n?void 0:n.endShape)||f(i)||("triangleLeft"!==n.startShape&&"triangleRight"!==n.startShape||(i.x+=i.w/2),h.BarEndPainter.draw(t,n.endShape,n.endType||"solid",n.endColor||"#000000",i))},n.prototype.paintBarText=function(t,n,i,e,s,r,u,o){var h=6;this.paintBarTextCore(t,u,n,i.leftText,i.leftTextStyle||{},s,e,r,o,(function(t,n,i){return[i.x-t-6,i.y+(i.h-n)/2,t,n]})),this.paintBarTextCore(t,u,n,i.rightText,i.rightTextStyle||{},s,e,r,o,(function(t,n,i){return[i.x+i.w+6,i.y+(i.h-n)/2,t,n]})),this.paintBarTextCore(t,u,n,i.topText,i.topTextStyle||{},s,e,r,o,(function(t,n,i){return[i.x+i.w/2-t/2,i.y-n,t,n]})),this.paintBarTextCore(t,u,n,i.bottomText,i.bottomTextStyle||{},s,e,r,o,(function(t,n,i){return[i.x+i.w/2-t/2,i.y+i.h,t,n]})),this.paintBarTextCore(t,u,n,i.insideText,i.insideTextStyle||{},s,e,r,o,(function(t,n,i){var e,s=t;return t>i.w&&(s=i.w-6),e=Math.min(t,i.h),[i.x+6,i.y+(i.h-e)/2,s,e]}))},n.prototype.paintBarTextCore=function(t,i,r,o,h,a,c,l,d,v){var A,g,b,m,p,y,w,j,T,O,k,S,M;if(!f(o)&&""!==o.trim()){if("="===o[0]?(b=r.rowIndex-1,g=this.lAi.evaluateCalcColumnFormula(b,o)):g=this.project.taskManager.getTaskValue(r,o),g&&this.lAi.Epi(g))A=this.lAi.mapping.formatDuration(g);else if(g instanceof Date)A=new e.Formatter.GeneralFormatter(r.project.layout.barTextDateFormat).format(g);else{if(f(g))return;A="".concat(g)}(m=a.clone()).vAlign=s.VerticalAlign.center,h&&(0,u.mergeTextStyle)(h,m),h.font||(p=this.sheet.currentTheme().bodyFont(),m.font="bold normal 10pt ".concat(p)),O=(T=v(w=(y=n.getTextWidthAndHeight(t,A,m.font))[0],j=y[1],c))[0],k=T[1],S=T[2],M=T[3],d.call(i,t,A,O,k,S,M,m,l)}},n.prototype.paintLinkLines=function(t,n,i,e,r,u,o,h){var a,c,f,l,d;switch(n.layout.linkLineMode){case"toTop":this.lineLayout=new m;break;case"toEnd":this.lineLayout=new b;break;case"noLinks":return}for(a=new s.Rect(r,u,o,h),f=0,l=c=this.getLinkLines(e,a);f<l.length;f++)(d=l[f]).paint(t)},n.prototype.getLinkLines=function(t,n){var i,e,s,r,u,o=this.project.kmi(t);return o?(i=this.getLineData(o.startLines,"start",n),e=this.getLineData(o.crossLines,"cross",n),s=this.getLineData(o.endLines,"end",n),u=function(t,n){return t.data.from.viewIndex-n.data.from.viewIndex},(r=i.concat(e).concat(s)).sort(u),r):[]},n.prototype.getLineData=function(t,n,i){var e,s,r,u,o,h,a,c,f,d,v=this,g=function(t){return!v.project.host||v.project.host.getRowVisible(t.from.viewIndex)&&v.project.host.getRowVisible(t.to.viewIndex)},b=[];for(e=0,s=t;e<s.length;e++)u="SS"===(r=s[e]).type||"SF"===r.type,o="SS"===r.type||"FS"===r.type,h=this.layoutLinkEndInfo(u,r.from,i),a=this.layoutLinkEndInfo(o,r.to,i),g(r)&&h&&a&&this.lineLayout&&(c=this.lineLayout.getLinePoints(r.type,h,a,i,n),f=l(h.color,-.8),d=new A(c,f,r),"end"===n&&(d.endArrow=this.lineLayout.getArrowDirection(r.type,h,a)),b.push(d));return b},n.prototype.paintActionPending=function(t,n){if("Link"===n.command){var i=n;this.paintActionGraph(t,i.getPendingFromTaskInfo()),this.paintActionLink(t,i.getPendingLinkInfo()),i.getPendingToTaskInfo()&&this.paintActionGraph(t,i.getPendingToTaskInfo())}else this.paintActionGraph(t,n.getBarPendingInfo())},n.prototype.paintActionGraph=function(t,n){var i,e=this.getActionPendingBounds(n);e&&(e.x-=1,e.y-=2,e.h+=2,e.w+=2,n.partName!==a.BarPartName.Middle&&n.partName!==a.BarPartName.Whole?(i=n.partName===a.BarPartName.Start?n.styleRule.style.taskbarStyle.startShape:n.styleRule.style.taskbarStyle.endShape,h.BarEndPainter.draw(t,i,"framed","#808080",e)):this.paintActionRect(t,e))},n.prototype.paintActionRect=function(t,n){n&&(t.lineWidth=1,t.strokeStyle="#808080",t.strokeRect(n.x,n.y,n.w,n.h))},n.prototype.paintActionLink=function(t,n){var i={x:n.startX,y:n.startY},e={x:i.x+n.movedX,y:i.y+n.movedY};t.beginPath(),t.lineWidth=1,t.strokeStyle="#808080",t.moveTo(i.x,i.y),t.lineTo(e.x,e.y),t.closePath(),t.stroke()},n.prototype.getTaskRect=function(t,n,i){return this.layoutTaskCore(t,n,i.x,i.y).bounds},n.prototype.getOffsetX=function(t,n){return this.sheet.getCellRect(t,n).x},n.prototype.getOffsetY=function(t,n){return this.sheet.getCellRect(t,n).y},n}(y),n.GanttCellTypeRenderer=w,j=function(t){function n(n){return t.call(this,n)||this}return T(n,t),n.prototype.eO=function(n,i,e,s,r,u,o,h,a){void 0===o&&(o=0),void 0===h&&(h=0),void 0===a&&(a=1),this.Mmi(i,e)&&this.paintNonworkingBackground(n,i[0].x,i[0].y,i[0].width,i[i.length-1].y+i[i.length-1].height-i[0].y),t.prototype.eO.call(this,n,i,e,s,r,u,o,h,a)},n.prototype.Mmi=function(t,n){var i=this.Mf.NMi;return 0!==t.length&&n===s.SheetArea.viewport&&t.filter((function(t){return t.col===i.getGanttColumnIndex()})).length===t.length},n.prototype.paintNonworkingBackground=function(t,n,i,e,s){var r,u,o,a,c,f,l,d,v,A=this.Mf.NMi,g=A.project;if("None"!==g.timescale.nonWorkingTime.drawMode)for(r=g.timescale.currentDateUtc,u=g.timescale.nonWorkingTime.color,o=g.timescale.nonWorkingTime.pattern;c=(a=g.timescale.getDateUtcRange(r))[0],f=a[1],!((l=this.calcDateLocation(n,c))>=n+e);)g.timescale.nonWorkingTime.calendar.isNonWorkingArea(c,f)&&(d=this.calcDateWidth(c,f),v={x:l=Math.floor(l),y:i,w:d=Math.floor(l+d)-l,h:s},h.BarPainter.draw(t,o,u,v,!1)),r=f},n.prototype.calcDateLocation=function(t,n){var i=this.Mf.NMi,e=i.project;return t+Math.floor(e.timescale.getOffsetByDateUtc(n))},n.prototype.calcDateWidth=function(t,n){return this.calcDateLocation(0,n)-this.calcDateLocation(0,t)},n}(s.g7),n.GanttSheetRender=j,n.vAi=k,s.Worksheet.ch("GanttsheetRender",{dispose:function(t){var n=this;!1!==t.clearCache&&n.Dn&&(n.Dn.Mf=null,n.Dn=null)}})},"./dist/plugins/gantt/gantt-sheet.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,w,j,T,O,k,S,M,_,x,D,E,C,F,N,R=this&&this.qKr||(I=function(t,n){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},I(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}I(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),I;function B(t){return"number"==typeof t}function L(t){return"string"==typeof t}function P(t){var n=t.floatingObjects;n&&(t.floatingObjects=n.filter((function(t){return!t.isGanttChart})),0===t.floatingObjects.length&&delete t.floatingObjects)}function U(t){var n,i=t.style;if(i&&i.cellType)switch(n=i.cellType.typeName){case"TaskComplete":i.cellType.typeName="100";break;case"TaskDate":i.cellType.typeName="101";break;case"TaskDuration":i.cellType.typeName="102";break;case"TaskPredecessor":i.cellType.typeName="103";break;case"TaskResources":i.cellType.typeName="104";break;case"TaskSubject":i.cellType.typeName="105";break;case"Taskbar":i.cellType.typeName="106";break;case"Timescale":i.cellType.typeName="107"}}function H(){var t="GanttSheet"+N._ID;return N._ID++,t}function G(t){for(var n=H(),i=0;i<t.length;)t[i].name()!==n?i++:(n=H(),i=0);return n}Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSheet=void 0,e=i("Common"),s=i("Core"),r=i("Filters"),u=i("TableSheet"),o=i("./dist/plugins/gantt/utils/mapping.js"),h=i("./dist/plugins/gantt/gantt-renderer.js"),a=i("./dist/plugins/gantt/gantt-filter.js"),c=i("./dist/plugins/gantt/gantt-outline.js"),f=i("./dist/plugins/gantt/gantt-events.js"),l=i("./dist/plugins/gantt/gantt-options.js"),d=i("./dist/plugins/gantt/gantt-column.js"),v=i("./dist/plugins/gantt/gantt-chart.js"),A=i("./dist/plugins/gantt/gantt-json.js"),g=i("./dist/plugins/gantt/gantt-override.js"),b=i("./dist/plugins/gantt/project/project.js"),m=i("./dist/plugins/gantt/project/calendar.js"),p=i("./dist/plugins/gantt/celltypes/timescales.js"),y=i("./dist/plugins/gantt/celltypes/taskbar.js"),w=i("./dist/plugins/gantt/gantt.enum.js"),j=i("./dist/plugins/gantt/gantt-gridline.js"),T=i("FloatingObject"),O=i("./dist/plugins/gantt/gantt.ns.js"),k=i("./dist/plugins/gantt/gantt-sort.js"),S=i("./dist/plugins/gantt/utils/util.js"),M=new e.Common.ResourceManager(O.SR,"GanttSheet"),_=M.getResource.bind(M),x="start",D=e.Common.lt.ht,E="_ganttColumn",C=e.Common.lt.tv,F=e.Common.ct.W0,N=function(t){function n(n,i,e){var r=t.call(this,n,i,e)||this;return r._gi=s.SheetType.ganttSheet,r.Ake=[],r.IOProps=["project","gridlines"],r.xmi=function(t){return r.Dmi(t)},r}return R(n,t),n.prototype.Hc=function(n,i){this.suspendPaint(),t.prototype.Hc.call(this,n,i),this.Cmi(),this.applyTableTheme(),(0,g.$Ai)(this),n&&(this.Gki=null,this.Emi()),this.resumePaint()},n.prototype.iki=function(){return this.Mf.options},n.prototype.Ob=function(n,i,e){var s,r;"allowAddNew"===n?!0===i&&!1===e?t.prototype.CNi.call(this):!1===i&&!0===e&&t.prototype.rTi.call(this):"enableGanttColumn"===n?(s=this.getDataView())&&(!0===i&&!1===e?this.bindGanttView(s):!1===i&&!0===e&&(this.removeGanttColumn(s),this.bindGanttView(s))):"sheetTabColor"===n&&(r=this.getParent(),D(r.getHost())||r.AC(!1))},Object.defineProperty(n.prototype,"rowStyleSelector",{get:function(){return this.xmi},set:function(t){this.xmi=t,this.project.Rmi.invoke()},enumerable:!1,configurable:!0}),n.prototype.adrs=function(){var t=this.name(),n=this.getParent();n.suspendPaint(),n.removeSheetTab(t),n.setActiveSheetIndex(0),n.resumePaint()},n.prototype.getActiveTask=function(){var t=this.getActiveRowIndex();return this.getTaskByRow(t)},n.prototype.getTaskByRow=function(t){if(-1===t)return null;var n=this.project.getRowState(t);return n?n.task:null},n.prototype.getTaskNumberByRow=function(t){return this.project.getRowState(t).taskNumber},n.prototype.getDefaultOptions=function(){return{enableGanttColumn:!0,allowAddNew:!0,sheetTabColor:void 0}},n.prototype.Tki=function(t){var n=this.project.count+(this.options.allowAddNew?1:0);t?this.Mf.setRowCount(n):this.lNi(n)},n.prototype.resumePaint=function(){this.Mf.resumePaint()},n.prototype.GNi=function(t,n){var i,e,r,u=this.Mf;this.project.clearBackupTasks(),this.project.suspendDirty(),this.suspendPaint(),e=(i=u.getRowCount())-1,r=u.getColumnCount(),u.Ut.clear(0,0,e,r,s.StorageType.data,[]),u.clearPendingChanges({row:0,col:0,rowCount:e,colCount:r,clearType:s.ClearPendingChangeType.dirty|s.ClearPendingChangeType.insert|s.ClearPendingChangeType.delete}),n&&this.EDi(),this.Emi(),this.project.resumeDirty(),this.nAe(),this.resumePaint()},n.prototype.ENi=function(t){var n;t&&t.data&&(this.suspendPaint(),this.dke(t.data),this.resumePaint()),this.Mf.repaint()},n.prototype.dke=function(t){var n,i,e,s,r,u,o,h,a,c,f,l=this.getDataView().gLt.primaryKey();if(l)for(n="parentId",i=0,e=t;i<e.length;i++)if(r=(s=e[i])[l],B(u=s.taskNumber)&&(o=this.project.getTask(u))&&(o.setDataValue(l,r),(h=o.Fpi())&&h.length>0))for(a=0,c=h;a<c.length;a++)(f=c[a]).setDataValue(n,r)},n.prototype.FM=function(){this.Mf.FM()},n.prototype.Fmi=function(){this.Mf.repaint()},n.prototype.L0=function(n,i){t.prototype.L0.call(this,n,i),this.Nmi=null},n.prototype.gp=function(){var t=!1,n=this.Mf;return n&&n.parent&&(t=!!n.parent.Gie),t},n.prototype.fDi=function(t){var n,i,e=this.Mf,s=e.getDataSource();return s?t>=(i=s.getColumnInfos()).length?null:i[t]:(n=this.gp())&&this.Bmi?this.Bmi[t]:null},n.prototype.aAe=function(t,n){var i=this.iAe(t),e=this.getDataView(),s=e.getRowData(i);return s?s[n]:void 0},n.prototype.setSelection=function(t,n,i,e){this.Mf.setSelection(t,n,i,e)},n.prototype.getActiveRowIndex=function(){return this.Mf.getActiveRowIndex()},n.prototype.oAe=function(t){var n=this.options;t.options={enableGanttColumn:n.enableGanttColumn}},n.prototype.hAe=function(t){var n=t.options;D(n.enableGanttColumn)||(this.options.enableGanttColumn=n.enableGanttColumn)},n.prototype.toJSON=function(n){var i,e,s,r,u,o,h,a,c,f,l,d,v,g,b=n&&n.gp,m=n&&n.includeBindingSource,p=this.getGanttColumnIndex(),y=p>-1,w=this.Mf.getColumnWidth(p);if(b&&y&&(i=this.wAi(),this.Mf.setColumnWidth(p,i),this.Mf.frozenTrailingColumnCount(0),n.includeBindingSource=!1),e=t.prototype.toJSON.call(this,n),b&&y&&(this.Mf.setColumnWidth(p,w),this.Mf.frozenTrailingColumnCount(1),n.includeBindingSource=m),s=A.GanttSheetJsonConverter.toJSON(this,this.IOProps),this.oAe(s),e.sheetType=this._gi,e.gantt=s,y&&(r=this.getGanttChartPicture(this.name()),e.floatingObjects||(e.floatingObjects=[]),(u=r.toJSON()).isGanttChart=!0,e.floatingObjects.push(u)),b){for(o=this.getDataView(),h=D(o)?0:o.length(),a=[],c=[],f=D(o)?[]:o.getColumnInfos(),l=0;l<h;l++)a[l]=o.getRowData(l),o.isHierarchy()&&(d=o.getHierarchyNode(l),c.push({id:d.id,parentId:d.parentId,level:d.level}));v=0,a.length>0&&o.isHierarchy()&&(v=(g=o.getHierarchyRootNode()).level),e.gantt.dataViewForPrint={data:a,columns:f,hierarchyNodes:c,rootLevel:v}}return e},n.prototype.fromJSON=function(n,i,e,s,r){var u,o=s&&s.gp;this.suspendEvent(),this.suspendPaint(),this.project.suspendSchedule(),this.hAe(n.gantt),A.GanttSheetJsonConverter.fromJSON(this,n.gantt,this.IOProps),t.prototype.fromJSON.call(this,n,i,e,s,r),o&&(u=n.gantt.dataViewForPrint)&&(this.Emi(u),this.Bmi=u.columns),this.project.resumeSchedule(),this.resumeEvent(),this.resumePaint()},n.prototype.getGanttChartPicture=function(t){var n,i,e,r,u,o,h,a,c,f,l,d,v,A,g,b,m,y,w,j,O,k,S,M,_,x,D,E,C,F;if(this.zki=!0,i=(n=this.Mf).Dn,r=(e=this.project).timescale,u=this.getGanttColumnIndex(),h=(o=n.yw(2)[0]).x,a=n.getColumnCount(),c=this.wAi(),d=(f=(0,p.getTimescaleHeight)(e.timescale.tierMode,n.zoom()))+(l=this.Zki()),v=e.count,A=r.currentDate,g=n.Tb,b=n.ly,n.Tb=0,n.ly=0,r.scrollTo(e.startDate),(m=this.Nmi)||((m=document.createElement("canvas")).style.width=c+"px",m.style.height=d+"px",m.width=c,m.height=d,s.Bf.Wl(m,this.getParent(),n),s.Bf.$l(m,c,d),this.Nmi=m),(y=m.getContext("2d")).fillStyle="white",y.fillRect(0,0,m.width,m.height),y.translate(-h,0),i.Y7(y,2,void 0,void 0),i.W7(y,1,2,void 0,void 0),w=new T.Picture("".concat(t,"_Chart"),m.toDataURL("jpg")),k=j=u,S=O=0,M=0,_=0,x=v+1,D=0,E=a,C=c-n.getColumnWidth(u),F=n.defaults.colWidth,C>=0)for(;;){if(k=E,(C-=F)<0){S=C;break}E++}else k++,S=C;return w.startColumn(j),w.startColumnOffset(O),w.endColumn(k),w.endColumnOffset(S),w.startRow(M),w.startRowOffset(_),w.endRow(x),w.endRowOffset(D),y.translate(h,0),n.Tb=g,n.ly=b,r.scrollTo(A),this.zki=!1,w},n.prototype.Imi=function(t){var n,i,e,r=this.Mf,u=r.getRowHeight(t),o=this.gp();return o&&(i=(n=r.printInfo()).bestFitRows())&&(u=(e=s.mt.e0(t,r,s.SheetArea.viewport,s.AutoFitType.cellWithHeader))<=0?r.defaults.rowHeight:e),u},n.prototype.wAi=function(){var t=this.lki,n=this.project;return t.getProjectLength(n.root)},n.prototype.Zki=function(){var t,n=this.project.count,i=0;for(t=0;t<n;t++)i+=this.Imi(t);return i},n.prototype.wh=function(n,i,e){var s=t.prototype.wh.call(this,n,i,e),r=A.GanttSheetJsonConverter.toJSON(this,this.IOProps);return this.oAe(r),s.lossless.gantt=r,s.lossless.sheetType=this._gi,s},n.prototype.yh=function(n,i,e,s){var r,u;this.suspendPaint(),this.suspendEvent(),this.project.suspendSchedule(),(r=n.lossless)&&(u=r.gantt,this.hAe(u),A.GanttSheetJsonConverter.fromJSON(this,u,this.IOProps)),t.prototype.yh.call(this,n,i,e,s),this.project.resumeSchedule(),this.resumeEvent(),this.resumePaint()},n.prototype.restoreView=function(n,i){t.prototype.restoreView.call(this,n,i),i&&this.bindGanttView(n)},n.prototype.Cmi=function(){var t=this.iki();this.project=new b.Project(this.name()),this.lki=new h.GanttCellTypeRenderer(this),this.project.host=this,this.taskbarColumn=new v.TaskbarColumn(this.project),this.outline=new c.GanttOutline(this),this.gridlines=new j.GanttGridlines(this),this.uiOptions=new l.GanttUIOptions(this.project),this.mapping=new o.GanttMapping(this.project),t.allowCellOverflow=!1,t.reversalTrailingResizeOrder=!0,t.clipBoardOptions=1,this.Mf.showRowOutline(!1),this.Umi(),this.V5t(),this.setDefaultRowHeight(this.lki.getBarStyleRowHeight()),this.project.Lmi.attach(this.Pmi,this),this.project.Hmi.attach(this.Ymi,this),this.project.VAi.attach(this.Fmi,this),this.project.Rmi.attach(this.Qmi,this),this.project.Wmi.attach(this.Gmi,this),this.project.Vmi.attach(this.Umi,this),this.taskbarColumn.propertyChanged.attach(this.jki,this)},n.prototype.Emi=function(t){var n,i,e,s,r,u,o,h,a,c,f;if(t)n=t.columns,i=t.data.length,e=t,this.yki(n);else{if(!(s=this.getDataView()))return;i=s.length(),n=s.getColumnInfos(),e=s}for(r=[],u=0;u<i;u++)o=void 0,o=t?e.data[u]:e.getRowData(u),this.Gki||(this.Gki=o),h=this.Kmi(o,n),a=void 0,e.isHierarchy&&e.isHierarchy()?a=e.getHierarchyNode(u):e.hierarchyNodes&&(a=e.hierarchyNodes[u]),a&&(h.id=a.id,h.parentId=a.parentId,h.level=a.level),r.push(h);c=0,r.length>0&&(e.isHierarchy&&e.isHierarchy()?c=(f=e.getHierarchyRootNode()).level:B(e.rootLevel)&&(c=e.rootLevel)),this.project.loadTasksInternal(r,c),this.Qki()},n.prototype.Qki=function(){this.project.taskView.Wki&&(this.project.taskView.Yki(),delete this.project.taskView.Wki)},n.prototype.yki=function(t){var n,i,e,s,r,u,o,h,a,c,f,l,d,v;for(n=t||(i=this.getDataView())&&i.getColumnInfos(),e=this.project.taskManager,s=0;s<n.length;s++)(r=n[s]).ganttChart||(u=r.value,(o=r.dataType)&&(u=(h=this.project.taskManager.getFieldByDataType(o))?h.name:u),a=r.isPrimaryKey,c=this.mapping.getDefaultMapping(u),f=null,l=null,"function"==typeof r.convert?f=r.convert:c&&(f=c[2]),"function"==typeof r.convertBack?l=r.convertBack:c&&(l=c[3]),v={name:u,convert:f,convertBack:l,isPrimaryKey:a,enabled:!0,readonly:d=r.readonly},e.addField(v))},n.prototype.iAe=function(t){return t.taskNumber-1},n.prototype.eAe=function(t,n){var i,e=t.fields,s=t.ascendingStates,r=[],u=function(t){var n=e[t],i=s[t],u=function(t,i,e){"duration"===n.name?((L(t)||B(t))&&(t=m.DurationHelper.parse(t)),(L(i)||B(i))&&(i=m.DurationHelper.parse(i))):"start"!==n.name&&"finish"!==n.name||(L(t)&&(t=S.ValueHelper.parseDate(t)),L(i)&&(i=S.ValueHelper.parseDate(i)));var s=k.GanttSortService.compareValueWithField(t,i,n);if(0!==s)return e?s:-s};r.push({field:n.name,ascending:i,compare:u})};for(i=0;i<e.length;i++)u(i);r.length>0&&n.sort(r)},n.prototype.Mki=function(t,n,i){var e=this;t&&t.length>0?n.removeItems(t,(function(t){var n,s,r,u,o=t.removedItems;if(o&&o.length>0)for(n=0;n<o.length;n++)r=(s=o[n]).index,u=s.count,e.ZNi(r,u);i(!0)})):i(!0)},n.prototype._ki=function(t,n,i){var e,s=this;t&&t.length>0?((e=0===n.length())&&!this.Gki&&(this.Gki=t[0].data),n.insertItems(t,(function(t){var n=t.row,e=t.addedCount;s.mNi(n,e),i(!0)}),(function(){return i(!1)}))):i(!0)},n.prototype.xki=function(t,n){var i,e,s,r;if(t&&t.length>0)for(i=0;i<t.length;i++)s=(e=t[i]).row,(r=e.level)>0?n.demoteHierarchyLevel(s):r<0&&n.promoteHierarchyLevel(s)},n.prototype.Dki=function(t,n,i,e){var s,r,u,o,h,a,c,f;if(e&&e.length>0&&(r=i.Vp,e.length===r.length&&(t=this.aki(e,r))),t&&t.length>0)for(u=0;u<t.length;u++)if(o=t[u])for(a=0,c=h=Object.keys(o);a<c.length;a++)(f=c[a])!==this.fAe||D(o[f])?n.updateItem(u,((s={})[f]=o[f],s)):this.project.resourcesManager.resourcesAssignment.updateTaskAssignment(u,o[f],this.fAe)},n.prototype.Xmi=function(t,n,i){var e,s,r,u,o=this,h=this.project,a=this.getDataView();return n.action===w.TasksChangeAction.Renumber&&this.eAe(n.sortInfos,a),e=t.updated,s=t.inserted,r=t.deleted,u=t.levels,new Promise((function(t){o.Mki(r,a,t)})).then((function(){return new Promise((function(t){o._ki(s,a,t)}))})).then((function(){return o.xki(u,a),o.Dki(e,a,h,i),Promise.resolve()}))},n.prototype.Kmi=function(t,n){var i,e,s,r,u,o,h,a,c={};for(i=0;i<n.length;i++)e=n[i].value,s=n[i].dataType,r=this.project.taskManager.getField(e),s&&(r=(u=this.project.taskManager.getFieldByDataType(s))||r),r&&(o=r.convert,h=t[e],o&&(h=o(h)),a=e,e!==r.name&&(a=r.name),c[a]=h);return c},n.prototype.getRowState=function(t){return this.project.getRowState(t)},n.prototype.evaluateCalcColumnFormula=function(t,n){var i=this.getDataView(),e=i.gLt.POt,s=e.getCalcService(),r=s.parse(e,n,0,0);return e.pe(t),s.evaluateExpression(e,r,{row:t,col:0})},n.prototype.Qmi=function(){var t,n,i;for(this.suspendPaint(),t=this.getRowCount(),n=this.lki.getBarStyleRowHeight(),i=0;i<t;i++)Math.abs(this.Mf._o(i)-this.Mf.defaults.rowHeight)<.1&&this.$mi(i,n);this.Mf.defaults.rowHeight=n,this.resumePaint()},n.prototype.$mi=function(t,n,i){var e=this.lki.getBarStyleRowHeight();i===s.SheetArea.viewport&&n<e*this.zoom()&&(n=e*this.zoom()),this.Mf.setRowHeight(t,n,i)},n.prototype.getRowVisible=function(t){return this.Mf.getRowVisible(t)},n.prototype.Dmi=function(t){var n=this.currentTheme().bodyFont(),i=new s.Style;return t&&0===t.taskNumber?(i.font="bold normal 12pt ".concat(n),i):t&&t.isSummary?(i.font="bold normal 11pt ".concat(n),i):i},n.prototype.Gmi=function(){var t,n,i,e,r,u;this.suspendPaint(),(t=this.getGanttColumnIndex())>-1&&(i=(n=this.project.timescale).getDateUtcRange(n.minDateUtc)[0],e=n.getDateUtcRange(n.maxDateUtc)[1],r=m.Calendar.diffDaysUtc(i,e)*n.pixelPerDay+this.getTaskbarAreaVisibleSize(),u=m.Calendar.diffDaysUtc(i,n.currentDateUtc)*n.pixelPerDay,this.Mf.setColumnScrollWidth(t,r),this.Mf.setColumnScrollOffsetX(t,-u),this.Mf.setCellType(0,t,n.MAi,s.SheetArea.colHeader)),this.resumePaint()},n.prototype.getGanttColumnIndex=function(){var t,n,i,e,s=-1,r=this.gp();if(r){if(t=this.Bmi)for(n=t.length-1;n>=0;n--)if((i=t[n]).ganttChart){s=n;break}}else if(e=this.getDataView())for(t=e.getColumnInfos(),n=0;n<t.length;n++)if((i=t[n]).ganttChart){s=n;break}return s},n.prototype.getTaskbarAreaVisibleSize=function(){return this.Mf.Do(this.getGanttColumnIndex())},n.prototype.Umi=function(){this.$mi(0,(0,p.getTimescaleHeight)(this.project.timescale.tierMode,this.zoom()),s.SheetArea.colHeader)},n.prototype.Tts=function(){return(0,p.getTimescaleHeight)(this.project.timescale.tierMode,this.zoom())},n.prototype.onBarColumnScroll=function(t){var n=this.Mf,i=this.project.timescale,e=t.newValue,r=t.oldValue,u=t.scrollEventType,o=i.getDateUtcRange(i.minDateUtc)[0];switch(u){case s.Zi.smallDecrement:n.Qy().execute({cmd:w.GanttCommandNames.GANTTSHEET_TIMESCALE_LEFT,sheetName:this.name()});break;case s.Zi.smallIncrement:n.Qy().execute({cmd:w.GanttCommandNames.GANTTSHEET_TIMESCALE_RIGHT,sheetName:this.name()});break;case s.Zi.largeDecrement:n.Qy().execute({cmd:w.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_UP,sheetName:this.name()});break;case s.Zi.largeIncrement:n.Qy().execute({cmd:w.GanttCommandNames.GANTTSHEET_TIMESCALE_PAGE_DOWN,sheetName:this.name()});break;case s.Zi.thumbTrack:0===e?i.scroll(-1-r):i.scroll(e-r)}t.newValue=m.Calendar.diffDaysUtc(o,i.currentDateUtc)*i.pixelPerDay},n.prototype.mergeGanttTaskbarColumnStyle=function(t,n){var i,e,r,u,o,h,a,c;this.gridlines.ganttRows&&(i=this.gridlines.ganttRows,r=(e=this.gridlines.getLineInfos(i)).lineColor,u=e.lineType,o=e.intervalLineColor,h=e.intervalLineType,a=new s.LineBorder(r,u),n.borderTop=n.borderBottom=a,!D(i.intervalLineType)&&t>0&&i.interval&&(c=this.Mf.eP().visibleIndex[t],a=new s.LineBorder(o,h),(c+1)%i.interval===0?n.borderBottom=a:c%i.interval===0&&(n.borderTop=a)))},n.prototype.margeGanttFieldColumnStyle=function(t,n,i){var e,s,r,u,o;if(this.rowStyleSelector){if(!(e=this.project.getTaskByRow(t)))return;(s=this.rowStyleSelector(e))&&(i.h5(s),s.font&&(i.font=s.font),(r=e.getBarStyleRules()).length>0&&(u=r[0].style)&&u.gridStyle&&((o=u.gridStyle).font&&(i.font=o.font),o.color&&(i.foreColor=o.color),o.backColor&&(i.backColor=o.backColor),o.textDecoration&&(i.textDecoration=o.textDecoration)))}},n.prototype.V5t=function(){var t,n=this,i=this.Mf,e=new r.HideRowFilter(new s.Range(-1,-1,-1,-1));i.rowFilter(e),e.filterDialogVisibleInfo({sortByValue:!0,sortByColor:!1,filterByColor:!1,filterByValue:!0,listFilterArea:!0}),e.filterButtonVisible(!0),e.openFilterDialog=function(t){var n=new a.GanttFilterDialog(i.parent.j2(),i,t,e.filterDialogVisibleInfo());i.Cut=n,n.rQ()},t=e.Act,e.Act=function(s,r,u){var o,h=i.loading,a=n.getDataView();return h&&a&&delete i.loading,o=t.call(e,s,r,u),h&&(i.loading=!0),o}},n.prototype.suspendAll=function(){var t=this.getParent();t&&t.suspendPaint&&t.resumePaint?t.suspendPaint():this.suspendPaint(),this.Mf.suspendCalcService(!1),this.suspendEvent()},n.prototype.resumeAll=function(){this.Mf.IB.isFiltered()&&this.Mf.IB.reFilter(),this.resumeEvent(),this.Mf.resumeCalcService(!0);var t=this.getParent();t&&t.suspendPaint&&t.resumePaint?t.resumePaint():this.resumePaint()},n.prototype.sAe=function(t){t.rAe=!0,t.autoSort=!1},n.prototype.lAe=function(t){var n,i=this.project.resourcesManager,e=this.dAe(t);e&&(n=this.AAe(e),i.vAe(e),i.gAe(n),n&&i.bAe(),i.mAe())},n.prototype.dAe=function(t){var n,i,e,s,r=t.gLt.ltt();for(i=0,e=r;i<e.length;i++)if("taskId"===(s=e[i]).targetField){n=s.targetTable;break}return n},n.prototype.AAe=function(t){return t.tBt("resourceId")},n.prototype.beforeSetDataView=function(t){if(t){this.sAe(t),this.lAe(t),this.setCellTypeToColumn(t);var n=this.getGanttColumnIndex();this.options.enableGanttColumn&&-1===n&&this.addGanttColumn(t)}},n.prototype.beforeSubmitChanges=function(){var t=this.project.resourcesManager.resourcesAssignment.assignmentTable;t&&t.submitChanges()},n.prototype.beforeCancelChanges=function(){var t=this.project.resourcesManager.resourcesAssignment.assignmentTable;t&&t.cancelChanges()},n.prototype.afterSetDataView=function(){this.outline.initOutlineColumn(),this.ski(),this._pi(),this.Gmi(),this.Emi()},n.prototype.Ski=function(t){var n=this.Mf;t&&(n.setColumnCount(t.getColumnInfos().length),this.Tki(!0))},n.prototype.bindGanttView=function(n,i){var e,s,r,u;if(i)for(e=0,s=Object.keys(this.options);e<s.length;e++)void 0!==(u=i[r=s[e]])&&(this.options[r]=i[r]);t.prototype.setDataView.call(this,n)},n.prototype.ski=function(){var t=this.getGanttColumnIndex();t>-1?(this.Mf.frozenTrailingColumnCount(1),this.Mf.setColumnWidth(t,this.taskbarColumn.width?this.taskbarColumn.width:"*")):this.Mf.frozenTrailingColumnCount(0)},n.prototype.Epi=function(t){return t.hasOwnProperty("value")&&t.hasOwnProperty("unit")&&t.hasOwnProperty("time")},n.prototype.getFilterButtonVisibleFromColumnInfo=function(t,n,i){var e,s=n[t],r=!1!==s.allowSort||!1!==s.allowFilterByValue||!1!==s.allowFilterByList;return D(s.allowSort)&&D(s.allowFilterByValue)&&D(s.allowFilterByList)&&(!(e=i.getValue(0,t))||"object"!=typeof e||F(e)||this.Epi(e)||(r=!1)),t===this.getGanttColumnIndex()&&(r=!1),r},n.prototype.setCellTypeToColumn=function(t){var n=this,i=t.getColumnInfos();i&&i.forEach((function(t){switch(U(t),t.dataType){case"TaskStartDate":t.style=(0,d.createStyleForDateTime)(t.style,!0);break;case"TaskFinishDate":t.style=(0,d.createStyleForDateTime)(t.style,!1);break;case"TaskDuration":t.style=(0,d.createStyleForDuration)(t.style);break;case"TaskMode":t.style=(0,d.createStyleForMode)(t.style);break;case"TaskComplete":t.style=(0,d.createStyleForComplete)(t.style);break;case"TaskPredecessor":t.style=(0,d.createStyleForPredecessors)(t.style);break;case"TaskResources":n.fAe=t.value,t.style=(0,d.createStyleForResources)(t.style)}switch(t.value){case"start":case"finish":t.style=(0,d.createStyleForDateTime)(t.style,t.value===x);break;case"duration":t.style=(0,d.createStyleForDuration)(t.style);break;case"name":t.dataType="TaskSubject";break;case"mode":t.style=(0,d.createStyleForMode)(t.style);break;case"complete":t.style=(0,d.createStyleForComplete)(t.style);break;case"predecessors":case"successors":t.style=(0,d.createStyleForPredecessors)(t.style);break;case"workTime":t.style=(0,d.createStyleForDuration)(t.style,!1)}}))},n.prototype.addGanttColumn=function(t){if(t.getColumn(t.getColumn().length-1).value!==E){var n={value:E,width:"*",ganttChart:!0,style:this.addTaskbarCellType(),headerStyle:this.addTimescaleCellType()};t.addColumn(n)}},n.prototype.removeGanttColumn=function(t){t.removeColumn(E)},n.prototype.addTaskbarCellType=function(){var t=new s.Style;return t.cellType=new y.TaskbarCellType,t},n.prototype.addTimescaleCellType=function(){var t=new s.Style;return t.cellType=new p.TimescaleCellType,t},n.prototype.onHorizontalDockScroll=function(t,n){var i;this.getGanttColumnIndex()===this.Mf.getDockScrollbarAttachedIndex()?this.onBarColumnScroll(n):this.Mf.onHorizontalDockScroll(t,n)},n.prototype.pM=function(t){this.Mf.pM(t),this._pi()},n.prototype._pi=function(){var t=this.getGanttColumnIndex();t>-1?this.Mf.setDockScrollbarAttachedIndex(t):this.Mf.setDockScrollbarAttachedIndex(null)},n.prototype.tts=function(t){var n,i;return-1===t?t:(n=this.getTaskByRow(t))?(i=this.project.Pki(n))?-1:this.iAe(n):-1},n.prototype.jDi=function(n){var i=this.tts(n);return-1!==i&&t.prototype.jDi.call(this,i)},n.prototype.vDi=function(n){var i=this.tts(n);return-1!==i&&t.prototype.vDi.call(this,i)},n.prototype.CDi=function(n,i){var e=this.tts(n);if(-1!==e)return t.prototype.CDi.call(this,e,i)},n.prototype.ODi=function(n){var i=this.tts(n);if(-1!==i)return t.prototype.ODi.call(this,i)},n.prototype._Ni=function(t,n){if(this.qNi(n)){var i=this.getRowState(t);if(!D(i))return i.level}return 0},n.prototype.qNi=function(t){var n,i=this,e=i.getDataView();return!D(e)&&((n=e.getColumn(t))&&"TaskSubject"===n.dataType)},n.prototype.ZNi=function(t,n){var i=this;i.suspendPaint(),i.KDi(t,n),i.nAe(),i.resumePaint()},n.prototype.mNi=function(t,n){var i=this;D(n)||(i.suspendPaint(),i.Mf.addRows(t,n),i.refreshStyleRuleCache(),i.nAe(),i.resumePaint())},n.prototype.togglePinnedRows=function(i){return this instanceof n?-1:t.prototype.togglePinnedRows.call(this,i)},n.prototype.isAlternatingRowStyleColumn=function(t){return t!==this.getGanttColumnIndex()},n.prototype.leV=function(){if(this instanceof n){var t=this.Mf;t.rt=new f.GanttSheetEventHandler(t),t.Dn=new h.GanttSheetRender(t),this.applyTableTheme(),this.project&&this.Umi()}},n.prototype.Rpi=function(t,n){var i,e,s,r,u,o,h=this.getRowState(t).task,a=this.fDi(n);return a&&(e=a.value,s=a.dataType,r=this.project.taskManager.getField(e),s&&(r=(u=this.project.taskManager.getFieldByDataType(s))||r),r&&(i=this.project.taskManager.getTaskValue(h,r.name),o=r.convertBack,"duration"===r.name&&(i=this.project.formatDuration(i)),"function"==typeof o?i=o(i):"duration"===r.name?i=this.Uki(i,!0):"start"!==r.name&&"finish"!==r.name||(i=this.Hki(i)))),i},n.prototype.nAe=function(){var t=this.outline;t&&(t.updateOutlineColumnModel(),t.restoreCollapsedState())},n.prototype.vke=function(){return this.Ake.length>0},n.prototype.gke=function(t,n,i){this.Ake.push({recordsChanges:t,change:n,backupTasks:i})},n.prototype.bke=function(){var t=this.Ake[0],n=t.recordsChanges,i=t.change,e=t.backupTasks;this.mke(n,i,e)},n.prototype.pke=function(){return this.Ake.shift()},n.prototype.Pmi=function(t){var n=t.needReschedule,i=this.project.isSuspendDirty();n&&!i&&this.project.backupTasksForSchedule(t.action),t.action===w.TasksChangeAction.Sort&&this.outline.backupCollapsedState(),this.suspendAll()},n.prototype.Ymi=function(t){var n,i,e;t.action===w.TasksChangeAction.Reset&&this.Tki(!0),n=this.getDataView(),!t.noChange&&n?(i=this.hki(t),e=this.project.getBackupTasks(),this.vke()?this.gke(i,t,e):(this.gke(i,t,e),this.bke())):this.resumeAll()},n.prototype.mke=function(t,n,i){var e=this;this.Xmi(t,n,i).finally((function(){e.nAe(),e.resumeAll(),e.pke(),e.vke()&&e.bke()}))},n.prototype.jki=function(t,n){var i=this.getGanttColumnIndex();-1!==i&&("width"===n?this.Mf.setColumnWidth(i,this.taskbarColumn.width):"_taskbarCellType"===n&&(this.Mf.setCellType(-1,i,t._Ai,s.SheetArea.viewport),this.Qmi()))},n.prototype.hki=function(t){var n,i,e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,j,T,O,k,S,M,_,x=this.project,E=t.action,N=t.changedItems,R=t.needReschedule,I={updated:[],inserted:[],deleted:[],levels:[]};if(E===w.TasksChangeAction.Update)n=void 0,i=void 0,R||(i=(n=N).map((function(t){var n=t.taskNumber;return x.getTask(n)}))),e=this.aki(n,i),I.updated=e;else if(E===w.TasksChangeAction.Insert)for(r=(s=this.getDataView()).getColumnInfos(),u=0,o=N;u<o.length;u++){for(h=o[u],a=C(h.getData()),c=0,f=r;c<f.length;c++)d=(l=f[c]).value,(v=l.dataType)&&(A=x.taskManager.getFieldByDataType(v))&&(a[d]=a[A.name]);g=this.Gki,b=this.lke("duration","TaskDuration"),m=this.lke("start","TaskStartDate"),p=this.lke("finish","TaskFinishDate"),y=a.duration&&g&&(L(g)||B(b))||D(g),j=F(a.start)&&"Manual"===h.mode&&(g&&L(m)||D(g)),T=F(a.finish)&&"Manual"===h.mode&&(g&&L(p)||D(g)),y&&(a.duration=this.Uki(a.duration)),j&&(a.start=this.Hki(a.start)),T&&(a.finish=this.Hki(a.finish)),O=this.uAe(h,a),I.inserted.push(O)}else if(E===w.TasksChangeAction.Remove)for(k=N.length;k>=0;k--)(h=N[k])&&(S=this.iAe(h),I.deleted.push(S));else if(E===w.TasksChangeAction.Level)for(k=0;k<N.length;k++)(M=N[k])&&(h=M.task,_=M.delta,I.levels.push({row:this.iAe(h),level:_}));return I},n.prototype.uAe=function(t,n){var i,e,s,r=this.project,u=r.taskView,o=this.outline,h=t.taskNumber,a=u.findPreviousTask(h),c=u.findNextTask(h,!0),f={row:this.iAe(t),isAfter:!1,data:n};if(!a)return f;if(!c){for(i=a,e=void 0;o.isRowCollapsed(u.tokens[i.taskNumber].viewIndex);){if(r.Pki(i.parent)){e=i;break}i=i.parent}return f.row=e?this.iAe(e):this.iAe(i),f.isAfter=!0,f}return(s=!o.isRowCollapsed(u.tokens[a.taskNumber].viewIndex))&&!a.isSummary&&(f.row=this.iAe(a),f.isAfter=!0),f},n.prototype.aki=function(t,n){var i,e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,w,j,T,O,S=this.project,M=this.getDataView(),_=[];if(!M)return _;if(t)for(i=t.length,e=M.getColumnInfos(),s=this.project.taskManager,r=0;r<i;r++)if(u=t[r],(o=n[r])!==S.root&&(i!==S.count||0!==r)){if(h=void 0,u&&o)for(a=0,c=e;a<c.length;a++)(f=c[a]).ganttChart||(l=f.value,d=f.dataType,M.FPt(l)&&"TaskResources"!==d||(v=s.getField(l),d&&(v=(A=S.taskManager.getFieldByDataType(d))||v),"level"!==v.name&&"parentId"!==v.name&&"id"!==v.name&&"children"!==v.name&&"workTime"!==v.name&&("Auto"!==o.mode||"start"!==v.name&&"finish"!==v.name)&&(g=void 0,m=0,m=typeof(g="predecessors"===v.name||"successors"===v.name?u.getDataValue(v.name):s.getTaskValue(u,v))!=typeof(b=s.getTaskValue(o,v))?1:k.GanttSortService.compareValueWithField(g,b,v),(p=("start"===v.name||"finish"===v.name)&&"Auto"===u.mode&&"Manual"===o.mode)&&(m=1),0!==m&&(h||(h={}),(y=this.Gki)&&(w=this.lke("duration","TaskDuration"),j=this.lke("start","TaskStartDate"),T=this.lke("finish","TaskFinishDate"),"duration"===v.name&&(L(w)||B(w))?b=this.Uki(b):("start"===v.name&&(L(j)||D(j))&&F(b)||"finish"===v.name&&(L(T)||D(T))&&F(b))&&(b=this.Hki(b))),h[l]=b))));h&&(_[O=this.iAe(o)]=h)}return _},n.prototype.Uki=function(t,n){var i,e,s,r,u,o;return D(t)?null:(i=this.Gki,e=t,s=!1,n||(r=m.DurationHelper.default(),u=this.lke("duration","TaskDuration"),i&&!D(u)&&(L(o=u)?r=m.DurationHelper.parseText(u):B(o)&&(s=!0),r.unit&&(e=m.DurationHelper.normalize({time:t.time,unit:r.unit})))),e=s?e.value:m.DurationHelper.format(e))},n.prototype.lke=function(t,n){var i,e,s,r=this.Gki,u=this.getDataView(),o=u.getColumnInfos();for(i=0,e=o;i<e.length;i++)if((s=e[i]).value===t||s.dataType===n)return r[s.value];return null},n.prototype.Hki=function(t){return S.ValueHelper.formatDate(t)},n.prototype.paintTaskbar=function(t,n,i){h.GanttCellTypeRenderer.paintTaskbar(t,n,i)},n.prototype.getTextWidthAndHeight=function(t,n,i){return h.GanttCellTypeRenderer.getTextWidthAndHeight(t,n,i)},n.prototype.refreshBindColumns=function(){t.prototype.refreshBindColumns.call(this),this.yki()},n}(u.TableSheet),n.GanttSheet=N,s.Workbook.ch("ganttSheet",{adlc:function(t){var n,i=t.flg,e=t.checkRs,s=t.m,r=t.d,u=t.nl,o=t.fn,h="G",a=["eet","anttSh"],c=this.gtwm||this.parent&&this.parent.gtwm;i&&-1===i.indexOf(h.toUpperCase()+a[1]+a[0])?(e.wm=e.wm||[],(n=c&&c(s,r,!0))&&e.wm.push(n),e.nwm=!0,e.state||(e.state=[]),e.state.push([h.toLocaleLowerCase()+"te",0]),e.dis||(e.dis=[]),e.dis.push("67616e74745368656574"),this.parent&&o&&o(this,e.dis,"ad")):-1===s&&(e.wm=e.wm||[],(n=c&&c(s,r,!1))&&e.wm.push(n),e.nwm=!0)},preFromJson:function(t,n,i){var e,r,u,o,h,a;if(N._ID=1,!(e=i&&i.cb===s.OpenSaveFileType.excel)&&(r=t.sheetTabs))for(u=0,o=Object.keys(r);u<o.length;u++)(a=r[h=o[u]]).sheetType===s.SheetType.ganttSheet&&P(a)},createSheetTab:function(t){var n=this.ls;(!n||0!==n.gte||!n.hl&&n.b)&&t.type===s.SheetType.ganttSheet&&(t.name||(t.name=G(this.mp)),t.sheetTab=new N(t.name))},preFromSJSFormat:function(t,n,i){N._ID=1}}),s.Y8.ch("ganttSheet",{priority:7001,isValid:function(){return this.Mf.NMi&&this.Mf.NMi instanceof N},getValue:function(t){var n,i,e,r,u,o,h,a,c,f,l,d=t.sheetArea,v=t.row,A=t.col,g=t.valueType,b=this.Mf,m=b.NMi;if(m&&m instanceof N)return(n=m.gp())&&d===s.SheetArea.colHeader&&1===b.getRowCount(s.SheetArea.colHeader)&&(i=m.Bmi)&&i[A]?(e=i[A].caption||i[A].value,t.value=e,void(t.isValueGet=!0)):d===s.SheetArea.rowHeader&&0===A?(t.value=m.getRowState(v).taskNumber,void(t.isValueGet=!0)):void(void 0!==d&&d!==s.SheetArea.viewport||(r=m.getRowState(v).task,(u=m.fDi(A))?(o=u.value,h=u.dataType,"taskNumber"===o?t.value=m.getRowState(v).taskNumber:"="===o[0]?t.value=r?m.aAe(r,o):void 0:r&&(c=(a=m.project).taskManager.getField(o),h&&(c=(f=a.taskManager.getFieldByDataType(h))||c),c&&(e=a.taskManager.getTaskValue(r,c.name),l=c.convertBack,g===s.ValueType.richText&&"duration"===c.name&&(e=a.formatDuration(e)),"function"==typeof l&&(e=l(e)),t.value=e))):A===m.getGanttColumnIndex()&&(t.value=r),t.isValueGet=!0))},setValue:function(t){var n,i,e,r,u,o,h,a,c,f=t.sheetArea,l=t.row,d=t.col,v=t.value,A=this.Mf,g=A.NMi;if(g&&g instanceof N&&(void 0===f||f===s.SheetArea.viewport)){if(n=g.project,t.isValueSet=!0,i=g.getRowState(l).task,n.Pki(i))return;if(e=g.fDi(d)){if(e.readonly)return;return r=e.value,u=e.dataType,o=n.taskManager.getField(r),u&&(o=(h=n.taskManager.getFieldByDataType(u))||o),S.GanttUtil.uki(v)&&(v=s.util.V0(v)),void(i?n.taskManager.setTaskValue(i,o,v,!0):!i&&l>=n.count&&(a=n.addTasks()).length>0&&(c=a[0],n.taskManager.setTaskValue(c,o,v,!0)))}}}}),s.GC$.extend(s.Workbook.prototype,{gtwm:function(t,n,i){return i?[_().wmk1,0]:-1===t?i?[_().wmk1,0]:[_().wmk2,1]:void 0}}),s.GC$.extend(s.Worksheet.prototype,{gtwm:function(t,n,i){return i?[_().wmk1,0]:-1===t?i?[_().wmk1,0]:[_().wmk2,1]:void 0}})},"./dist/plugins/gantt/gantt-sort.js":function(t,n,i){var e,s,r,u,o,h=this&&this.iJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,s=n.length,r;e<s;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.GanttSortService=void 0,e=i("./dist/plugins/gantt/project/tasks.js"),s=i("Common"),r=s.Common.lt.ht,u=Array.isArray,o=function(){function t(){}return t.sort=function(t,n,i,e,s){return s?this.treeSort(t,n,i,e):this.flatSort(t,n,i,e)},t.flatSort=function(t,n,i,e){var s=this;return h([],t,!0).sort((function(t,r){return s.sortCompare(t,r,n,i,e)}))},t.treeSort=function(t,n,i,e){var s=n[0],r=[];return this.subTreeSort(r,n,s,i,e),this.mergeBlankRows(t,n,r)},t.subTreeSort=function(t,n,i,e,s){var r,u,o,a,c,f=this;if(t.push(i.kU),(r=i.Fpi())&&r.length)for(o=0,a=u=h([],r,!0).sort((function(t,i){return f.sortCompare(t,i,n,e,s)}));o<a.length;o++)c=a[o],this.subTreeSort(t,n,c,e,s)},t.mergeBlankRows=function(t,n,i){var e=this.buildBlankRowMap(t,n),s=[];return i.forEach((function(t){var n=e[t.taskNumber];n&&(s=s.concat(n)),s.push(t)})),e[-1]&&(s=s.concat(e[-1])),s},t.buildBlankRowMap=function(t,n){var i,e,s,r={};for(e=0;e<n.length;e++)(s=n[e])?i&&(r[e]=i,i=null):(i=i||[]).push(t[e]);return i&&(r[-1]=i),r},t.sortCompare=function(t,n,i,s,u){var o,h,a,c,f,l=function(t){return t instanceof e.Task?[t,t.kU]:[i[t.taskNumber],t]},d=l(t),v=d[0],A=d[1],g=l(n),b=g[0],m=g[1];if(s.length>0&&"taskNumber"===s[0].name)return u[0]?A.taskNumber-m.taskNumber:m.taskNumber-A.taskNumber;for(o=0;o<s.length;o++){if(r(v)&&r(b))return A.taskNumber-m.taskNumber;if(r(v))return 1;if(r(b))return-1;if(h=s[o],a=v?v.project.taskManager.getTaskValue(v,h):void 0,c=b?b.project.taskManager.getTaskValue(b,h):void 0,0!==(f=this.compareValueWithField(a,c,h)))return u[o]?f:-f}return 0},t.compareValueWithField=function(n,i,e){var s=0;return s=r(n)||r(i)?this.compareWithEmpty(n,i):e.comparer?e.comparer(n,i):t.builtinCompareFunction(n,i,e)},t.builtinCompareFunction=function(t,n,i){var e,s,o=0;return t instanceof Date&&n instanceof Date?o=this.dateCompareFunction(t,n):"number"==typeof t&&"number"==typeof n?o=this.numberCompareFunction(t,n):"boolean"==typeof t&&"boolean"==typeof n?o=this.booleanCompareFunction(t,n):"string"==typeof t&&"string"==typeof n?o=this.stringCompareFunction(t,n):u(t)&&u(n)?o=this.compareArray(t,n):"duration"===i.name&&"object"==typeof t&&"object"==typeof n&&(e=r(t)?-1:t.time,s=r(n)?-1:n.time,o=this.numberCompareFunction(e,s)),o},t.compareArray=function(t,n){var i,e,s;if(t.length!==n.length)return 1;for(i=h([],t,!0).sort(),e=h([],n,!0).sort(),s=0;s<t.length;s++)if(i[s]!==e[s])return 1;return 0},t.compareWithEmpty=function(t,n){return r(t)&&r(n)?0:r(t)&&!r(n)?1:!r(t)&&r(n)?-1:void 0},t.numberCompareFunction=function(t,n){return t-n},t.booleanCompareFunction=function(t,n){return!0===t&&!1===n?1:!1===t&&!0===n?-1:0},t.stringCompareFunction=function(t,n){return t.toLowerCase().localeCompare(n.toLowerCase())},t.dateCompareFunction=function(t,n){var i=t?t.valueOf():0,e=n?n.valueOf():0;return this.numberCompareFunction(i,e)},t}(),n.GanttSortService=o},"./dist/plugins/gantt/gantt.entry.js":function(t,n,i){var e=this&&this.JKr||(Object.create?function(t,n,i,e){void 0===e&&(e=i);var s=Object.getOwnPropertyDescriptor(n,i);s&&!("get"in s?!n.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,e,s)}:function(t,n,i,e){void 0===e&&(e=i),t[e]=n[i]}),s=this&&this.XKr||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||e(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/gantt/gantt.typedef.js"),s(i("./dist/plugins/gantt/utils/mapping.js"),n),s(i("./dist/plugins/gantt/project/calendar.js"),n),s(i("./dist/plugins/gantt/project/tasks.js"),n),s(i("./dist/plugins/gantt/project/project.js"),n),s(i("./dist/plugins/gantt/project/dependency.js"),n),s(i("./dist/plugins/gantt/project/timescales.js"),n),s(i("./dist/plugins/gantt/taskbar/layout.js"),n),s(i("./dist/plugins/gantt/taskbar/style.js"),n),s(i("./dist/plugins/gantt/celltypes/timescales.js"),n),s(i("./dist/plugins/gantt/celltypes/taskbar.js"),n),s(i("./dist/plugins/gantt/gantt-action.js"),n),s(i("./dist/plugins/gantt/gantt-options.js"),n),s(i("./dist/plugins/gantt/gantt-gridline.js"),n),s(i("./dist/plugins/gantt/gantt-outline.js"),n),s(i("./dist/plugins/gantt/gantt-sheet.js"),n),s(i("./dist/plugins/gantt/gantt-chart.js"),n),s(i("./dist/plugins/gantt/gantt-contextmenu.js"),n),s(i("./dist/plugins/gantt/gantt.ns.js"),n),s(i("./dist/plugins/gantt/gantt.enum.js"),n)},"./dist/plugins/gantt/gantt.enum.js":function(t,n){var i,e,s,r,u,o,h,a,c,f;Object.defineProperty(n,"__esModule",{value:!0}),n.TimescaleUnit=n.TimescaleTierMode=n.DayOfWeek=n.GanttGridlineType=n.GanttSheetEvent=n.TasksChangeAction=n.ActionStatus=n.ScrollDirection=n.CursorStyle=n.BarPartName=n.GanttCommandNames=void 0,n.GanttCommandNames={GANTTSHEET_INSERT_TASK:"ganttSheetInsertTask",GANTTSHEET_INSERT_SUMMARY_TASK:"ganttSheetInsertSummaryTask",GANTTSHEET_INSERT_MILESTONE:"ganttSheetInsertMilestone",GANTTSHEET_DELETE_TASK:"ganttSheetDeleteTask",GANTTSHEET_TIMESCALE_PAGE_UP:"ganttSheetTimescalePageUp",GANTTSHEET_TIMESCALE_PAGE_DOWN:"ganttSheetTimescalePageDown",GANTTSHEET_TIMESCALE_BEGIN:"ganttSheetTimescaleBegin",GANTTSHEET_TIMESCALE_END:"ganttSheetTimescaleEnd",GANTTSHEET_TIMESCALE_LEFT:"ganttSheetTimescaleLeft",GANTTSHEET_TIMESCALE_RIGHT:"ganttSheetTimescaleRight",GANTTSHEET_TIMESCALE_ZOOM_IN:"ganttSheetTimescaleZoomIn",GANTTSHEET_TIMESCALE_ZOOM_OUT:"ganttSheetTimescaleZoomOut",GANTTSHEET_TIMESCALE_ZOOM_CUSTOMER:"ganttSheetTimescaleZoomCustomer",GANTTSHEET_CHANGE_COMPLETE:"ganttSheetChangeComplete",GANTTSHEET_INDENT_TASKS:"ganttSheetIndentTasks",GANTTSHEET_OUTDENT_TASKS:"ganttSheetOutdentTasks",GANTTSHEET_LINK_TASKS:"ganttSheetLinkTasks",GANTTSHEET_UNLINK_TASKS:"ganttSheetUnLinkTasks",GANTTSHEET_CHANGE_TASK_MODE:"ganttSheetChangeTaskMode",GANTTSHEET_MOVE_TASK:"ganttSheetMoveTask",GANTTSHEET_SCROLL_TO_TASK:"ganttSheetScrollToTask"},function(t){t[t.Start=0]="Start",t[t.Middle=1]="Middle",t[t.End=2]="End",t[t.Whole=3]="Whole"}(i=n.BarPartName||(n.BarPartName={})),function(t){t[t.TaskDrag=0]="TaskDrag",t[t.LinkLine=1]="LinkLine",t[t.ProcessDrag=2]="ProcessDrag",t[t.LeftStretch=3]="LeftStretch",t[t.RightStretch=4]="RightStretch",t[t.Move=5]="Move",t[t.Default=6]="Default",t[t.Crosshair=7]="Crosshair"}(e=n.CursorStyle||(n.CursorStyle={})),function(t){t[t.Positive=1]="Positive",t[t.Negative=-1]="Negative"}(s=n.ScrollDirection||(n.ScrollDirection={})),function(t){t[t.NotStart=0]="NotStart",t[t.InProgress=1]="InProgress",t[t.Finish=2]="Finish"}(r=n.ActionStatus||(n.ActionStatus={})),function(t){t[t.Reset=0]="Reset",t[t.Insert=1]="Insert",t[t.Remove=2]="Remove",t[t.Move=3]="Move",t[t.Replace=4]="Replace",t[t.Level=5]="Level",t[t.Sort=6]="Sort",t[t.Update=7]="Update",t[t.Renumber=8]="Renumber"}(u=n.TasksChangeAction||(n.TasksChangeAction={})),function(t){t.Event_BarAction_Pending="Event_BarAction_Pending",t.Event_BarAction_End="Event_BarAction_End",t.Event_HoverOnBar="Event_HoverOnBar",t.Event_HoverOnLink="Event_HoverOnLink",t.Event_DataBindingError="Event_DataBindingError"}(o=n.GanttSheetEvent||(n.GanttSheetEvent={})),function(t){t[t.empty=0]="empty",t[t.thin=1]="thin",t[t.dashed=3]="dashed",t[t.dotted=4]="dotted",t[t.dashDot=9]="dashDot"}(h=n.GanttGridlineType||(n.GanttGridlineType={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(a=n.DayOfWeek||(n.DayOfWeek={})),function(t){t[t.middle=1]="middle",t[t.middleBottom=2]="middleBottom",t[t.topMiddleBottom=3]="topMiddleBottom"}(c=n.TimescaleTierMode||(n.TimescaleTierMode={})),function(t){t[t.years=1]="years",t[t.halfYears=2]="halfYears",t[t.quarters=3]="quarters",t[t.months=4]="months",t[t.thirdsOfMonth=5]="thirdsOfMonth",t[t.weeks=6]="weeks",t[t.days=7]="days",t[t.hours=8]="hours",t[t.minutes=9]="minutes"}(f=n.TimescaleUnit||(n.TimescaleUnit={}))},"./dist/plugins/gantt/gantt.ns.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SR=void 0;var e=i("./dist/plugins/gantt/gantt.res.en.js");n.SR={en:e}},"./dist/plugins/gantt/gantt.res.en.js":function(t,n,i){var e,s;for(s in Object.defineProperty(n,"__esModule",{value:!0}),n.GANTT_ACTION_FROM_OF=n.GANTT_ACTION_FINISH_LINK=n.GANTT_ACTION_START_LINK=n.GANTT_ACTION_TASK_FINISH=n.GANTT_ACTION_TASK_START=n.GANTT_ACTION_FINISH=n.GANTT_ACTION_START=n.GANTT_ACTION_TASK_COLON=n.GANTT_ACTION_TASK=n.DEFAULT_DATE_TIME_FORMAT=n.GANTT_VALUE_READONLY=n.GANTT_VALUE_INVALID=n.GANTT_INVALID_ASCENDING_STATES=n.GANTT_INVALID_FIELD=n.GANTT_INVALID_TASK_LEVEL=n.GANTT_INVALID_TASK_PARENT_ID=n.GANTT_INVALID_TASK_ID=n.GANTT_INVALID_WORK_DAYS=n.GANTT_INVALID_UNIT=n.GANTT_INVALID_DEPENDENCY=n.GANTT_INVALID_TASK=n.GANTT_INVALID_COUNT=n.GANTT_INVALID_INDEX=n.GANTT_INVALID_ROW_INDEX=n.GANTT_INVALID_ID=n.GANTT_INVALID_LEVEL=n.GANTT_INVALID_OPERATION=n.GANTT_TASK_SCHEDULE_MODE_AUTO=n.GANTT_TASK_SCHEDULE_MODE_MANUALLY=n.GANTT_COMPLETE_CHANGE=n.GANTT_COMPLETE=n.GANTT_SUCCESSORS=n.GANTT_PREDECESSORS=n.GANTT_FINISH_DISPLAYED=n.GANTT_START_DISPLAYED=n.GANTT_FINISH=n.GANTT_START=n.GANTT_DURATION=n.GANTT_MODE=n.GANTT_MILESTONE=n.GANTT_TASK_NAME=n.GANTT_TASK_NUMBER=n.GANTT_NEW_MILESTONE=n.GANTT_NEW_SUMMARY_TASK=n.GANTT_NEW_TASK=n.GANTT_MINUTE=n.GANTT_HOUR=n.GANTT_DAY=n.GANTT_WEEK=n.GANTT_MONTH=void 0,n.GANTT_CALENDAR_UNIT_LABELS_PLURALS=n.GANTT_CALENDAR_UNIT_LABELS=n.GANTT_CALENDAR_MONTH_NAMES=n.GANTT_CALENDAR_MONTH=n.GANTT_CALENDAR_WEEK_NAMES=n.GANTT_CALENDAR_WEEK=n.GANTT_CALENDAR_DAY_NAMES=n.GANTT_CALENDAR_DAY=n.GANTT_CALENDAR_HOUR_NAMES=n.GANTT_CALENDAR_HOUR=n.GANTT_CALENDAR_MINUTE_NAMES=n.GANTT_CALENDAR_MINUTE=n.GANTT_CALENDAR_24HOURS=n.GANTT_CALENDAR_NIGHT_SHIFT=n.GANTT_CALENDAR_STANDARD=n.GANTT_TASK_BAR_COMPLETE=n.GANTT_TASK_BAR_COMPLETE_THROUGH=n.GANTT_TASK_BAR_UNNAMED=n.GANTT_TASK_BAR_SS=n.GANTT_TASK_BAR_SF=n.GANTT_TASK_BAR_FF=n.GANTT_TASK_BAR_FS=n.GANTT_TASK_BAR_TO=n.GANTT_TASK_BAR_FROM=n.GANTT_TASK_BAR_TASK_LINK=n.GANTT_ACTION_LINE_TIP_TITLE=n.GANTT_ACTION_COMPLETE_THROUGH=n.GANTT_ACTION_DURATION=n.GANTT_ACTION_FINISH_ONLY=n.GANTT_ACTION_START_ONLY=n.GANTT_ACTION_TO_OF=void 0,n.GANTT_MONTH="Month",n.GANTT_WEEK="Week",n.GANTT_DAY="Day",n.GANTT_HOUR="Hour",n.GANTT_MINUTE="Minute",n.GANTT_NEW_TASK="<New Task>",n.GANTT_NEW_SUMMARY_TASK="<New Summary Task>",n.GANTT_NEW_MILESTONE="<New Milestone>",n.GANTT_TASK_NUMBER="Task Number",n.GANTT_TASK_NAME="Task Name",n.GANTT_MILESTONE="Milestone",n.GANTT_MODE="Mode",n.GANTT_DURATION="Duration",n.GANTT_START="Start",n.GANTT_FINISH="Finish",n.GANTT_START_DISPLAYED="StartDisplayed",n.GANTT_FINISH_DISPLAYED="FinishDisplayed",n.GANTT_PREDECESSORS="Predecessors",n.GANTT_SUCCESSORS="Successors",n.GANTT_COMPLETE="% Complete",n.GANTT_COMPLETE_CHANGE="Complete Through",n.GANTT_TASK_SCHEDULE_MODE_MANUALLY="Manual",n.GANTT_TASK_SCHEDULE_MODE_AUTO="Auto",n.GANTT_INVALID_OPERATION="invalidOperation",n.GANTT_INVALID_LEVEL="invalidLevel",n.GANTT_INVALID_ID="invalidId",n.GANTT_INVALID_ROW_INDEX="invalidRowIndex",n.GANTT_INVALID_INDEX="invalidIndex",n.GANTT_INVALID_COUNT="invalidCount",n.GANTT_INVALID_TASK="invalidTask",n.GANTT_INVALID_DEPENDENCY="invalidDependency",n.GANTT_INVALID_UNIT="invalidUnit",n.GANTT_INVALID_WORK_DAYS="invalidWorkDays",n.GANTT_INVALID_TASK_ID="invalidTaskId",n.GANTT_INVALID_TASK_PARENT_ID="invalidTaskParentId",n.GANTT_INVALID_TASK_LEVEL="invalidTaskLevel",n.GANTT_INVALID_FIELD="invalidField",n.GANTT_INVALID_ASCENDING_STATES="invalidAscendingStates",n.GANTT_VALUE_INVALID="valueInvalid",n.GANTT_VALUE_READONLY="valueReadonly",n.DEFAULT_DATE_TIME_FORMAT="yy-mm-dd h:mm",n.GANTT_ACTION_TASK="Task",n.GANTT_ACTION_TASK_COLON="Task:",n.GANTT_ACTION_START="Start:",n.GANTT_ACTION_FINISH="Finish:",n.GANTT_ACTION_TASK_START="Task Start:",n.GANTT_ACTION_TASK_FINISH="Task Finish:",n.GANTT_ACTION_START_LINK="Start",n.GANTT_ACTION_FINISH_LINK="Finish",n.GANTT_ACTION_FROM_OF="From {0} Of:",n.GANTT_ACTION_TO_OF="To {0} Of:",n.GANTT_ACTION_START_ONLY="StartOnly",n.GANTT_ACTION_FINISH_ONLY="FinishOnly",n.GANTT_ACTION_DURATION="Duration:",n.GANTT_ACTION_COMPLETE_THROUGH="CompleteThrough:",n.GANTT_ACTION_LINE_TIP_TITLE="{0} to {1} Link",n.GANTT_TASK_BAR_TASK_LINK="Task Link:",n.GANTT_TASK_BAR_FROM="From:",n.GANTT_TASK_BAR_TO="To:",n.GANTT_TASK_BAR_FS="Finish-to-Start (FS)",n.GANTT_TASK_BAR_FF="Finish-to-Finish (FF)",n.GANTT_TASK_BAR_SF="Start-to-Finish (SF)",n.GANTT_TASK_BAR_SS="Start-to-Start (SS)",n.GANTT_TASK_BAR_UNNAMED="Unnamed",n.GANTT_TASK_BAR_COMPLETE_THROUGH="Complete Through:",n.GANTT_TASK_BAR_COMPLETE="% Complete:",n.GANTT_CALENDAR_STANDARD="Standard",n.GANTT_CALENDAR_NIGHT_SHIFT="Night Shift",n.GANTT_CALENDAR_24HOURS="24 Hours",n.GANTT_CALENDAR_MINUTE="Minute",n.GANTT_CALENDAR_MINUTE_NAMES=["m","min","minute"],n.GANTT_CALENDAR_HOUR="Hour",n.GANTT_CALENDAR_HOUR_NAMES=["h","hr","hour"],n.GANTT_CALENDAR_DAY="Day",n.GANTT_CALENDAR_DAY_NAMES=["d","dy","day"],n.GANTT_CALENDAR_WEEK="Week",n.GANTT_CALENDAR_WEEK_NAMES=["w","wk","week"],n.GANTT_CALENDAR_MONTH="Month",n.GANTT_CALENDAR_MONTH_NAMES=["mo","mon","month"],n.GANTT_CALENDAR_UNIT_LABELS=["min","hr","day","wk","mon","yr"],n.GANTT_CALENDAR_UNIT_LABELS_PLURALS=["mins","hrs","days","wks","mons","yrs"],e=i("./dist/plugins/gantt/lr.gcn.js"))e.hasOwnProperty(s)&&(n[s]=e[s])},"./dist/plugins/gantt/gantt.typedef.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0})},"./dist/plugins/gantt/lr.gcn.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.wmk2=n.wmk1=void 0,n.wmk1=["757256","1879fe"],n.wmk2=["757256","1879fe"]},"./dist/plugins/gantt/project/calendar.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g=this&&this.qKr||(b=function(t,n){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},b(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}b(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),b;function m(t,n){return{hour:t,minute:n}}function p(t,n,i,e){return{start:{hour:t,minute:n},end:{hour:i,minute:e}}}function y(){return[]}function w(){return[p(8,0,12,0),p(13,0,17,0)]}Object.defineProperty(n,"__esModule",{value:!0}),n.Calendar=n.CustomWorkWeek=n.WorkWeek=n.DurationHelper=n.CalendarSettings=void 0,e=i("./dist/plugins/gantt/utils/foundation.js"),s=i("./dist/plugins/gantt/gantt-json.js"),r=i("./dist/plugins/gantt/gantt.enum.js"),u=i("Common"),o=i("./dist/plugins/gantt/gantt.ns.js"),h=new u.Common.ResourceManager(o.SR,"GanttSheet"),a=h.getResource.bind(h),c=u.Common.lt.ht,f=function(){function t(){this.Upi=m(8,0),this.Bpi=r.DayOfWeek.Sunday,this.Lpi=m(17,0),this.Hpi=8,this.Ypi=40,this.Qpi=20,this.Wpi="Day",this.Gpi=3,this.Vpi=a().GANTT_CALENDAR_UNIT_LABELS,this.zpi=a().GANTT_CALENDAR_UNIT_LABELS_PLURALS,this.propertyChanged=new e.EventList,this.IOProps=["defaultDurationDecimalDigits","defaultDurationUnit","defaultFinishTime","defaultStartTime","daysPerMonth","hoursPerDay","hoursPerWeek","unitLabels","unitLabelsPlurals","weekStartOn"]}return Object.defineProperty(t.prototype,"weekStartOn",{get:function(){return this.Bpi},set:function(t){this.Bpi=t,this.onPropertyChanged("weekStartOn")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultStartTime",{get:function(){return this.Upi},set:function(t){this.Upi=t,this.onPropertyChanged("defaultStartTime")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultFinishTime",{get:function(){return this.Lpi},set:function(t){this.Lpi=t,this.onPropertyChanged("defaultFinishTime")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoursPerDay",{get:function(){return this.Hpi},set:function(t){this.Hpi=t,this.onPropertyChanged("hoursPerDay")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hoursPerWeek",{get:function(){return this.Ypi},set:function(t){this.Ypi=t,this.onPropertyChanged("hoursPerWeek")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"daysPerMonth",{get:function(){return this.Qpi},set:function(t){this.Qpi=t,this.onPropertyChanged("daysPerMonth")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultDurationUnit",{get:function(){return this.Wpi},set:function(t){this.Wpi=t,this.onPropertyChanged("defaultDurationUnit")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultDurationDecimalDigits",{get:function(){return this.Gpi},set:function(t){this.Gpi=t,this.onPropertyChanged("defaultDurationDecimalDigits")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unitLabels",{get:function(){return this.Vpi},set:function(t){this.Vpi=t,this.onPropertyChanged("unitLabels")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unitLabelsPlurals",{get:function(){return this.zpi},set:function(t){this.zpi=t,this.onPropertyChanged("unitLabelsPlurals")},enumerable:!1,configurable:!0}),t.prototype.onPropertyChanged=function(t){this.propertyChanged.invoke(t)},t.prototype.toJSON=function(){return s.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){s.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t.default=new t,t}(),n.CalendarSettings=f,l=function(){function t(){}return t.empty=function(t){var n=0;return this.fromTime(0,t.defaultDurationUnit,t)},t.default=function(t){t=t||f.default;var n=this.getTime(1,"Day",t);return this.fromTime(n,t.defaultDurationUnit,t)},t.parse=function(t,n,i){if(null==t||""===t)return null;var e=null;if("object"==typeof t)e=t;else if("number"==typeof t)e={value:t};else{if("string"!=typeof t)return null;if(e=this.parseText(t,n),c(e))return null}return c(e.unit)&&(e.unit=i||n.defaultDurationUnit),this.normalize(e,n)},t.normalize=function(t,n){var i=t.value,e=t.unit,s=t.time;return e=(e=e?this.parseUnit(e,n):null)||n.defaultDurationUnit,c(s)?c(i)?s=i=0:(i=this.normalizeNumber(i),(s=this.getTime(i,e,n))>this.MaxTime&&(s=this.MaxTime,i=this.getValue(s,e,n))):((s=this.normalizeNumber(s))>this.MaxTime&&(s=this.MaxTime),i=this.getValue(s,e,n)),{value:i,unit:e,time:s}},t.normalizeNumber=function(t){return"number"!=typeof t||isNaN(t)||t<0?0:t},t.parseText=function(t,n){var i,e,s,r,u;return t?((s=(t=t.trim()).search(/[^\d\.\s]/))>=0?(i=t.substr(0,s).trim(),e=t.substr(s)):(i=t,e=null),r=e?this.parseUnit(e,n):null,u=parseFloat(i),isNaN(u)?null:{value:u,unit:r}):null},t.getUnitTextMap=function(){var t,n=this;return this.qpi||(this.qpi={},(t=function(t,i){i.forEach((function(i){n.qpi[i]=t,n.qpi[i+"s"]=t}))})("Minute",a().GANTT_CALENDAR_MINUTE_NAMES),t("Hour",a().GANTT_CALENDAR_HOUR_NAMES),t("Day",a().GANTT_CALENDAR_DAY_NAMES),t("Week",a().GANTT_CALENDAR_WEEK_NAMES),t("Month",a().GANTT_CALENDAR_MONTH_NAMES)),this.qpi},t.parseUnit=function(t,n){var i,e=this.getUnitTextMap()[t.toLowerCase()];if(this.$pi.indexOf(e)>=0)return e;if(n=n||f.default,c(e))for(i=0;i<this.$pi.length;i++)if(t===n.unitLabels[i]||t===n.unitLabelsPlurals[i])return this.$pi[i];return n.defaultDurationUnit},t.format=function(t,n){var i,e,s,r,u,o;if("string"==typeof t)return t;if("object"!=typeof t||null===t)return"";switch(n=n||f.default,i=Math.max(0,Math.min(10,n.defaultDurationDecimalDigits)),e=t.value,s=t.unit,r=Math.pow(10,i),u=(Math.round(e*r)/r).toString(),o=1===e?n.unitLabels:n.unitLabelsPlurals,s){case"Minute":return"".concat(u," ").concat(o[0]);case"Hour":return"".concat(u," ").concat(o[1]);case"Day":return"".concat(u," ").concat(o[2]);case"Week":return"".concat(u," ").concat(o[3]);case"Month":return"".concat(u," ").concat(o[4])}},t.getTime=function(t,n,i){switch(i=i||f.default,n){case"Month":return t*i.daysPerMonth*i.hoursPerDay*this.hourTime;case"Week":return t*i.hoursPerWeek*this.hourTime;case"Day":return t*i.hoursPerDay*this.hourTime;case"Hour":return t*this.hourTime;case"Minute":return t*this.minuteTime;default:return 0}},t.getValue=function(t,n,i){switch(i=i||f.default,n){case"Month":return t/this.hourTime/i.hoursPerDay/i.daysPerMonth;case"Week":return t/this.hourTime/i.hoursPerWeek;case"Day":return t/this.hourTime/i.hoursPerDay;case"Hour":return t/this.hourTime;case"Minute":return t/this.minuteTime;default:return 0}},t.fromValue=function(t,n,i){var e;return{value:t,unit:n,time:this.getTime(t,n,i)}},t.fromTime=function(t,n,i){var e;return{value:this.getValue(t,n,i),unit:n,time:t}},t.minuteTime=6e4,t.hourTime=36e5,t.MaxTime=864e9,t.$pi=["Minute","Hour","Day","Week","Month"],t}(),n.DurationHelper=l,d=function(){function t(t){if(!t||7!==t.length)throw new Error(a().GANTT_INVALID_WORK_DAYS);this.workDays=t}return t.prototype.getWorkDay=function(t){return this.workDays[t]},t}(),n.WorkWeek=d,v=function(t){function n(n,i,e){var s=t.call(this,n)||this;return s.start=i,s.finish=e,s}return g(n,t),Object.defineProperty(n.prototype,"start",{get:function(){return this.ak},set:function(t){this.ak=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"finish",{get:function(){return this.oz},set:function(t){this.oz=t},enumerable:!1,configurable:!0}),n}(d),n.CustomWorkWeek=v,A=function(){function t(n,i,e){this.Kpi=[],this.Xpi=[],this.name=n,this.Zpi=i||new d(t.defaultWorkDays()),this.Kpi=e||[]}return Object.defineProperty(t,"standard",{get:function(){return new t(a().GANTT_CALENDAR_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"nightShift",{get:function(){return new t(a().GANTT_CALENDAR_NIGHT_SHIFT,new d([[],[p(23,0,24,0)],[p(0,0,3,0),p(4,0,8,0),p(23,0,24,0)],[p(0,0,3,0),p(4,0,8,0),p(23,0,24,0)],[p(0,0,3,0),p(4,0,8,0),p(23,0,24,0)],[p(0,0,3,0),p(4,0,8,0),p(23,0,24,0)],[p(0,0,3,0),p(4,0,8,0)]]))},enumerable:!1,configurable:!0}),Object.defineProperty(t,"hours24",{get:function(){return new t(a().GANTT_CALENDAR_24HOURS,new d([0,1,2,3,4,5,6].map((function(){return[p(0,0,24,0)]}))))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.Zc},set:function(t){this.Zc=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultWorkWeek",{get:function(){return this.Zpi},set:function(t){this.Zpi=t,this.invalidDateWorkCache()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"customWorkWeeks",{get:function(){return this.Kpi},set:function(t){this.Kpi=t,this.invalidDateWorkCache()},enumerable:!1,configurable:!0}),t.defaultWorkDays=function(){return[[],w(),w(),w(),w(),w(),[]]},t.copyWorkDays=function(t){var n,i,e=[];for(n=0;n<7;n++)i=t.getWorkDay(n),e[n]=i.map((function(t){return p(t.start.hour,t.start.minute,t.end.hour,t.end.minute)}));return e},t.prototype.copyTo=function(n){return new t(n,new d(t.copyWorkDays(this.defaultWorkWeek)),this.customWorkWeeks.map((function(n){return new v(t.copyWorkDays(n),new Date(n.start.valueOf()),new Date(n.finish.valueOf()))})))},t.utcToLocal=function(t){return t?new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()):null},t.localToUTC=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())):null},t.diffDaysUtc=function(t,n){var i;return(n.valueOf()-t.valueOf())/this.millisecondsPerDay},t.prototype.invalidDateWorkCache=function(){this.Xpi=[]},t.prototype.getDateIndex=function(n){return Math.floor(n/t.millisecondsPerDay)},t.prototype.getTimeInDay=function(n){if("number"==typeof n){var i=n%t.millisecondsPerDay;return i<0&&(i=t.millisecondsPerDay+i),i}return 60*(60*n.hour+n.minute)*1e3},t.prototype.getDateValue=function(n){return n*t.millisecondsPerDay},t.prototype.getDateWork=function(t){var n,i,e=this.Xpi[t];return e||(n=this.getDateWorkCore(t),e={total:i=this.getWorkDayTotal(n),work:n},this.Xpi[t]=e),e},t.prototype.getDateWorkFallback=function(){var t,n;for(t=2;t<9;t++)if(n=this.defaultWorkWeek.getWorkDay(t%7),this.getWorkDayTotal(n)>0)return n;return w()},t.prototype.getDateWorkCore=function(t){var n,i,e,s,r=this.getDateValue(t);for(i=this.customWorkWeeks.length-1;i>=0;i--)if((e=this.customWorkWeeks[i]).start.valueOf()<=r&&e.finish.valueOf()>=r){n=e;break}return(s=(t+4)%7)<0&&(s+=7),(n=n||this.defaultWorkWeek).getWorkDay(s)},t.prototype.getWorkDayTotal=function(t){var n=0;return t.forEach((function(t){var i=t.start,e=t.end;n+=60*(60*e.hour+e.minute-60*i.hour-i.minute)*1e3})),n},t.prototype.calcDurationUtc=function(t,n,i,e,s){var r,u,o,h,a,c,f,d;if(s=s||e.defaultDurationUnit,r=t.valueOf(),(u=n.valueOf())<=r)return l.fromTime(0,s,e);if(o=this.getDateIndex(r),h=this.getDateIndex(u),a=this.getTimeInDay(r),c=this.getTimeInDay(u),f=0,o===h)f+=this.calcDurationInDate(o,a,c,i);else if(o<h){for(f+=this.calcDurationInDate(o,a,null,i),d=o+1;d<h;d++)f+=this.getDateWork(d).total;f+=this.calcDurationInDate(h,null,c,i)}return l.fromTime(f,s,e)},t.prototype.calcDurationInDate=function(n,i,e,s){var r,u,o,h,a,f,l,d,v,A;if(null!==i&&null!==e&&i>=e)return 0;if(u=(r=this.getDateWork(n)).work,0===r.total){if(!s)return 0;u=this.getDateWorkFallback()}for(c(i)&&(i=e<(o=this.getTimeInDay(u[0].start))?0:o),c(e)&&(e=i>(h=this.getTimeInDay(u[u.length-1].end))?t.millisecondsPerDay:h),a=0,f=!0,l=0;l<u.length;l++)if(d=u[l],!(i>(v=this.getTimeInDay(d.end)))){if(i<(A=this.getTimeInDay(d.start))){if(e<A)return s&&(a+=e-i),a;f&&s&&(a+=A-i),i=A}if(e<=v)return a+=e-Math.max(i,A);a+=v-Math.max(i,A),i=v,f=!1}return s&&(a+=e-i),a},t.prototype.addDuration=function(n,i,e,s,r){var u=t.localToUTC(n);return t.utcToLocal(this.addDurationUtc(u,i,e,s,r))},t.prototype.addDurationUtc=function(t,n,i,e,s){var r,u,o,h;if(r=(n=l.parse(n,s||f.default)).time,u=this.getDateIndex(t.valueOf()),o=this.getTimeInDay(t.valueOf()),i)for(;;){if("number"!=typeof(h=this.addDurationUtcForwardInDay(u,o,r,e)))return h;o=null,r=h,u++}else for(;;){if("number"!=typeof(h=this.addDurationUtcBackwardInDay(u,o,r,e)))return h;o=null,r=h,u--}},t.prototype.addDurationUtcForwardInDay=function(n,i,e,s){var r,u,o,h,a,f,l=this.getDateWork(n),d=l.work;if(c(i)){if(e>l.total)return e-l.total;if(e===l.total)return s?0:this.createDate(n,this.getTimeInDay(d[d.length-1].end));i=this.getTimeInDay(d[0].start)}else if(0===l.total){if(s)return 0;d=this.getDateWorkFallback()}if(!s&&i>(r=this.getTimeInDay(d[d.length-1].end)))return i+e<=(r=t.millisecondsPerDay)?this.createDate(n,i+e):e-=r-i;for(u=!!s,o=0;o<d.length;o++)if(h=d[o],!(i>(a=this.getTimeInDay(h.end)))){if(i<(f=this.getTimeInDay(h.start))){if(!u){if(i+e<=f)return this.createDate(n,i+e);e-=f-i}i=f}if(s?i+e<a:i+e<=a)return this.createDate(n,i+e);e-=a-i,i=a,u=!0}return e},t.prototype.addDurationUtcBackwardInDay=function(t,n,i,e){var s,r,u,o,h,a,f=this.getDateWork(t),l=f.work;if(c(n)){if(i>f.total)return i-f.total;if(i===f.total)return e?this.createDate(t,this.getTimeInDay(l[0].start)):0;n=this.getTimeInDay(l[l.length-1].end)}else if(0===f.total){if(!e)return 0;l=this.getDateWorkFallback()}if(e&&n<(s=this.getTimeInDay(l[0].start)))return n-i>=(s=0)?this.createDate(t,n-i):i-=n-s;for(r=!e,u=l.length-1;u>=0;u--)if(o=l[u],!(n<(h=this.getTimeInDay(o.start)))){if(n>(a=this.getTimeInDay(o.end))){if(!r){if(n-i>=a)return this.createDate(t,n-i);i-=n-a}n=a}if(e?n-i>=h:n-i>h)return this.createDate(t,n-i);i-=n-h,n=h,r=!0}return i},t.prototype.createDate=function(n,i){return new Date(n*t.millisecondsPerDay+i)},t.prototype.isNonWorkingArea=function(t,n){var i;return 0===this.calcDurationUtc(t,n,!1,f.default).time},t.prototype.isWorkingDay=function(t){var n=this.getDateIndex(t.valueOf()),i=this.getDateWork(n);return i.total>0},t.millisecondsPerDay=864e5,t}(),n.Calendar=A},"./dist/plugins/gantt/project/dependency.js":function(t,n,i){var e,s,r,u,o,h,a,c=this&&this.iJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,s=n.length,r;e<s;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.TaskDependencyMap=n.TaskDependency=void 0,e=i("Common"),s=i("./dist/plugins/gantt/gantt.ns.js"),r=new e.Common.ResourceManager(s.SR,"GanttSheet"),u=r.getResource.bind(r),o=e.Common.lt.ht,h=function(){function t(t,n,i){void 0===i&&(i="FS"),this.xT=!1,this.m1n=t,this._to=n,this._type=i}return Object.defineProperty(t.prototype,"from",{get:function(){return this.m1n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"to",{get:function(){return this._to},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),t.parsePredecessors=function(t,n){return t&&n?this.parseText(n,t,!0):null},t.parseSuccessors=function(t,n){return t&&n?this.parseText(n,t,!1):null},t.parseText=function(t,n,i){var e,s=this,r=+t;return isNaN(r)?(e=t.split(",")).map((function(t){var e,r,o;if(e=+(t=t.trim()),!isNaN(e))return s.createParseResult(e,n,i);if(!(r=t.match(s.DEPENDENCY_REGEX)))throw new Error(u().GANTT_INVALID_DEPENDENCY);return e=+r[1],o=r[2]?r[2].toUpperCase():"FS",s.createParseResult(e,n,i,o)})):[this.createParseResult(r,n,i)]},t.createParseResult=function(n,i,e,s){if(void 0===s&&(s="FS"),!i)return{taskNumber:n,type:s};var r=i.project.getTask(n);if(!r)throw new Error(u().GANTT_INVALID_DEPENDENCY);return e?new t(r,i,s):new t(i,r,s)},t.formatPredecessors=function(t){return t.map((function(t){return t.getText(t.from)})).join(",")},t.formatSuccessors=function(t){return t.map((function(t){return t.getText(t.to)})).join(",")},t.prototype.getText=function(t){var n=t.taskNumber,i=this.type;return"FS"!==i?"".concat(n).concat(i):"".concat(n)},t.DEPENDENCY_REGEX=/^([1-9][0-9]*)(FF|FS|SF|SS)?([+-].*)?$/i,t}(),n.TaskDependency=h,a=function(){function t(t){this.project=t,this.dependencies=[]}return t.prototype.rebuild=function(){this.dependencies=[];try{var t=this.buildDependencies(this.project.Vp);this.validate(t)&&(this.dependencies=t)}catch(t){this.dependencies=[]}this.dependencies.forEach((function(t){t.from.tyi().push(t),t.to.nyi().push(t)}))},t.prototype.buildDependencies=function(t){var n=[];return t.forEach((function(t){var i,e;t&&((i=t._data.predecessors)&&n.push.apply(n,h.parsePredecessors(t,i)),(e=t._data.successors)&&n.push.apply(n,h.parseSuccessors(t,e)))})),n},t.prototype.add=function(t){var n;if(!o(t)&&0!==t.length){if(!1===this.validateChanges(t))throw new Error(u().GANTT_INVALID_DEPENDENCY);t.forEach((function(t){t.from.tyi().push(t),t.to.nyi().push(t)})),(n=this.dependencies).push.apply(n,t),this.invalidateLines()}},t.prototype.validateChanges=function(t,n){var i,e,s,r,u,o,h,a,f;for(i=0,e=t;i<e.length;i++)if(s=e[i],!1===this.validateMembership(s))return!1;if(r=c([],this.dependencies,!0),n&&n.length>0){for(u=0,o=n;u<o.length;u++)(h=o[u]).iyi=!0;for(r=r.filter((function(t){return!t})),a=0,f=n;a<f.length;a++)delete(h=f[a]).iyi}return this.validateCircle(c(c([],r,!0),t,!0))},t.prototype.validate=function(t){var n,i,e;for(n=0,i=t;n<i.length;n++)if(e=i[n],!1===this.validateMembership(e))return!1;return!1!==this.validateCircle(t)},t.prototype.validateMembership=function(t){var n,i,e=t.from,s=t.to;if(s.isSummary&&("SF"===t.type||"FF"===t.type))return!1;for(n=e.level>s.level?e:s,i=e.level>s.level?s:e;n.level>i.level;)n=n.parent;return n!==i},t.prototype.validateCircle=function(t){var n=this.buildDependencyMap(t);return!(!n||!1===this.validateCircleCore(n))},t.prototype.validateCircleCore=function(t){var n,i=[],e=[],s=this.project.count<<1,r=[];for(n=0;n<s;n++)if(!i[n])for(r.push([n,-1]);r.length;)if(!1===this.dfs(t,i,e,r))return!1;return!0},t.prototype.buildDependencyMap=function(t){var n,i,e,s=this.initDependencyMap();for(n=0,i=t;n<i.length;n++)if(e=i[n],!1===this.buildDependencyMapLine(s,e.from,e.to))return null;return s},t.prototype.initDependencyMap=function(){var t,n,i,e,s,r,u,h,a=[];for(t=0;t<this.project.count;t++)if(n=this.project.getTask(t),!o(n)){for(s=[e=(i=n.taskNumber<<1)+1],a[i]=s,r=0,u=n.Fpi();r<u.length;r++)h=u[r],s.push(h.taskNumber<<1);0!==t&&(a[e]=[1+(n.parent.taskNumber<<1)])}return a},t.prototype.buildDependencyMapLine=function(t,n,i){var e=1+(n.taskNumber<<1),s=i.taskNumber<<1,r=t[e];if(r){if(r.indexOf(s)>=0)return!1}else r=[],t[e]=r;return r.push(s),!0},t.prototype.dfs=function(t,n,i,e){var s,r=e[e.length-1],u=r[0],o=r[1];if(-1===o){if(n[u])return!i[u]&&(e.pop(),!0);n[u]=!0,i[u]=!0}return o++,(s=t[u])&&o<s.length?(e[e.length-1][1]=o,e.push([s[o],-1]),!0):(i[u]=!1,e.pop(),!0)},t.prototype.remove=function(t){var n=this;t.forEach((function(t){n.disposeDependency(t)})),this.dependencies=this.dependencies.filter((function(t){return!t.xT})),this.invalidateLines()},t.prototype.onTasksRemoved=function(){var t=this;this.dependencies.forEach((function(n){(n.from.xT||n.to.xT)&&t.disposeDependency(n)})),this.dependencies=this.dependencies.filter((function(t){return!t.xT}))},t.prototype.onTasksMembershipChanged=function(){var t=this;this.dependencies.forEach((function(n){t.validateMembership(n)||t.disposeDependency(n)})),this.dependencies=this.dependencies.filter((function(t){return!t.xT}))},t.prototype.disposeDependency=function(t){t.xT=!0,this.removeArrayItem(t.from.tyi(),t),this.removeArrayItem(t.to.nyi(),t)},t.prototype.removeArrayItem=function(t,n){for(var i=0;i<t.length;i++)if(t[i]===n){t.splice(i,1);break}},t.prototype.getLinkLineInRow=function(t){return this.lineMap||this.rebuildLines(),this.getRowData(t)},t.prototype.invalidateLines=function(){this.lineMap=null},t.prototype.rebuildLines=function(){var t=this;this.lineMap=[],this.project.eyi().forEach((function(n){var i,e,s=n.from.viewIndex,r=n.to.viewIndex;for(i=Math.min(s,r);i<=Math.max(s,r);i++)e=t.getRowData(i,!0),i===s?e.startLines.push(n):i===r?e.endLines.push(n):e.crossLines.push(n)}))},t.prototype.getRowData=function(t,n){void 0===n&&(n=!1);var i=this.lineMap[t];return!i&&n&&(i={startLines:[],endLines:[],crossLines:[]},this.lineMap[t]=i),i},t}(),n.TaskDependencyMap=a},"./dist/plugins/gantt/project/gantt-assignment.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ResourcesAssignment=void 0;var i=function(){function t(t){this.uAi=t,this.assignments=[],this.taskAssignments={}}return t.prototype.vAe=function(t){this.assignmentTable=t},t.prototype.pAe=function(){this.assignments=[]},t.prototype.yAe=function(){this.taskAssignments={}},t.prototype.mAe=function(){var t=this,n=this.assignmentTable.VRt();this.pAe(),this.yAe(),n.forEach((function(n){t.assignments.push(n);var i=t.taskAssignments[n.taskId];i?i.push(n.resourceId):t.taskAssignments[n.taskId]=[n.resourceId]}))},t.prototype.wAe=function(t){var n=this.uAi.host.getDataView(),i=n.gLt.primaryKey();return t.getDataValue(i)},t.prototype.updateTaskAssignment=function(t,n,i){var e=this,s=this.uAi.host,r=s.getDataView(),u=this.uAi.getTaskByRow(t+1),o=this.wAe(u),h=[],a=r.gLt;a.yRt(t,1,(function(){var t,r,u,c,f,l,d,v;for(s.suspendPaint(),t=e.assignmentTable,r=0;r<e.assignments.length;r++)(u=e.assignments[r]).taskId===o&&(e.assignments.splice(r,1),r--);for(c=0,f=n;c<f.length;c++)l=f[c],d=e.uAi.getResourcesByName(l),v={taskId:o,resourceId:d.id},h.push(d.id),t.insertItem(t.length(),v),e.assignments.push(v);e.taskAssignments[o]=h,a.rRt(i),s.resumePaint()}))},t.prototype.getResourcesCountByTaskNumber=function(t){var n,i,e=this.uAi.getTask(t);return e?(i=this.wAe(e),(null===(n=this.taskAssignments[i])||void 0===n?void 0:n.length)||0):0},t}();n.ResourcesAssignment=i},"./dist/plugins/gantt/project/gantt-resources.js":function(t,n,i){var e,s,r;Object.defineProperty(n,"__esModule",{value:!0}),n.ResourcesManager=n.Resources=void 0,e=i("./dist/plugins/gantt/project/gantt-assignment.js"),s=function(){function t(t,n){this.name=t,this._data=n}return Object.defineProperty(t.prototype,"id",{get:function(){return this._data.id},enumerable:!1,configurable:!0}),t}(),n.Resources=s,r=function(){function t(t){this.uAi=t,this.resourcesAssignment=new e.ResourcesAssignment(this.uAi)}return t.prototype.vAe=function(t){this.resourcesAssignment.vAe(t)},t.prototype.gAe=function(t){this.resourcesTable=t},t.prototype.getResourcesByTaskId=function(t){var n;return null!==(n=this.resourcesAssignment.taskAssignments[t])&&void 0!==n?n:[]},t.prototype.getResourcesById=function(t){for(var n=0;n<this.resourcesList.length;n++)if(this.resourcesList[n].id===t)return this.resourcesList[n];return null},t.prototype.getResourcesByName=function(t){for(var n=0;n<this.resourcesList.length;n++)if(this.resourcesList[n].name===t)return this.resourcesList[n];return null},t.prototype.mAe=function(){this.resourcesAssignment.mAe()},t.prototype.bAe=function(){var t=this,n=this.resourcesTable.VRt();this.jAe(),n.forEach((function(n){var i=new s(n.name,n);t.resourcesList.push(i)}))},t.prototype.jAe=function(){this.resourcesList=[]},t.prototype.TAe=function(){var t=this;this.resourcesTable.fetch().then((function(){t.bAe()}))},t}(),n.ResourcesManager=r},"./dist/plugins/gantt/project/project.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,w,j,T=this&&this.iJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,s=n.length,r;e<s;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.Project=void 0,e=i("./dist/plugins/gantt/utils/foundation.js"),s=i("./dist/plugins/gantt/utils/util.js"),r=i("./dist/plugins/gantt/project/dependency.js"),u=i("./dist/plugins/gantt/project/timescales.js"),o=i("./dist/plugins/gantt/project/calendar.js"),h=i("./dist/plugins/gantt/project/schedule.js"),a=i("./dist/plugins/gantt/project/tasks.js"),c=i("./dist/plugins/gantt/taskbar/layout.js"),f=i("./dist/plugins/gantt/taskbar/style.js"),l=i("./dist/plugins/gantt/gantt.enum.js"),d=i("./dist/plugins/gantt/gantt-json.js"),v=i("Common"),A=i("./dist/plugins/gantt/gantt.ns.js"),g=i("./dist/plugins/gantt/project/gantt-resources.js"),b=i("./dist/plugins/gantt/gantt-sort.js"),m=new v.Common.ResourceManager(A.SR,"GanttSheet"),p=m.getResource.bind(m),y=v.Common.lt.ht,w=v.Common.lt.tv,j=function(){function t(t){var n,i,s=this;this.cki=[],this.Kj=0,this.Lmi=new e.EventList,this.Hmi=new e.EventList,this.VAi=new e.EventList,this.Rmi=new e.EventList,this.Wmi=new e.EventList,this.Vmi=new e.EventList,this.IOProps=["calendarSettings","timescale","layout","defaultMode","taskStyleRules","startDate","currentDate","taskView"],this.Zc=t,this.taskManager=new a.TaskManager(this),this.resourcesManager=new g.ResourcesManager(this),this.syi=o.Calendar.standard,this.ryi=new o.CalendarSettings,this.ryi.propertyChanged.attach((function(){s.uyi.reSchedule()}),this),this.hyi=new u.Timescale(this),this.GY=new c.TaskbarLayout(this),this.taskView=new a.TaskCollectionView(this),this.taskView.onTasksChanging=this.onTasksChanging.bind(this),this.taskView.onTasksChanged=this.onTasksChanged.bind(this),this.oyi=new r.TaskDependencyMap(this),this.Omi=new f.TaskbarStyleManager(this),this.uyi=new h.ScheduleManager(this),n=new Date,i=this.calendarSettings.defaultStartTime,n.setHours(i.hour,i.minute,0,0),this.startDate=n,this.loadTasksInternal([],0)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.Zc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startDateUtc",{get:function(){return this.jAi},set:function(t){this.jAi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startDate",{get:function(){return o.Calendar.utcToLocal(this.jAi)},set:function(t){this.jAi=o.Calendar.localToUTC(t),this.hyi.update(t),this.uyi.reSchedule()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finishDateUtc",{get:function(){return this.ayi||this.jAi},set:function(t){this.ayi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finishDate",{get:function(){return o.Calendar.utcToLocal(this.finishDateUtc)},set:function(t){throw new Error(p().GANTT_INVALID_OPERATION)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDateUtc",{get:function(){if(!this.cyi){var t=new Date;t.setHours(this.calendarSettings.defaultStartTime.hour,this.calendarSettings.defaultStartTime.minute,0,0),this.cyi=o.Calendar.localToUTC(t)}return this.cyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDate",{get:function(){return o.Calendar.utcToLocal(this.currentDateUtc)},set:function(t){this.cyi=o.Calendar.localToUTC(t),this.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calendar",{get:function(){return this.syi},set:function(t){this.syi=t,this.uyi.reSchedule()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calendarSettings",{get:function(){return this.ryi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescale",{get:function(){return this.hyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskStyleRules",{get:function(){return this.Omi.rules},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){return this.GY},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canAddTask",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRemoveTask",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tasks",{get:function(){return T([],this.taskView.tasks,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Vp",{get:function(){return this.taskView.tasks},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tasksSorted",{get:function(){return this.taskView.getTasksInView()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this.Vp[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.Vp.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sorted",{get:function(){return this.taskView.sorted},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keepOutlineStructure",{get:function(){return!this.taskView.fyi||this.taskView.fyi.keepStructure},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sortState",{get:function(){return this.taskView.fyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultMode",{get:function(){return this.uyi.defaultMode},set:function(t){this.uyi.defaultMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dependencies",{get:function(){return T([],this.oyi.dependencies,!0)},enumerable:!1,configurable:!0}),t.prototype.Pki=function(t){return this.root===t},t.prototype.getTask=function(t){return this.taskView.getTask(t)},t.prototype.getTaskByRow=function(t){var n=this.getRowState(t);return n?n.task:null},t.prototype.getResources=function(t){return this.resourcesManager.getResourcesById(t)},t.prototype.getResourcesByName=function(t){return this.resourcesManager.getResourcesByName(t)},t.prototype.getResourcesByTaskNumber=function(t){return this.resourcesManager.getResourcesByTaskId(t)},t.prototype.getRowState=function(t){return this.taskView.getRowState(t)},t.prototype.cloneTask=function(t){var n=w(t.getData()),i=this.createTask(n),e=t.kU;return i.kU.taskNumber=e.taskNumber,i.kU.viewIndex=e.viewIndex,t.predecessors&&(i._data.predecessors=t.predecessors),t.successors&&(i._data.successors=t.successors),i},t.prototype.getBackupTasks=function(){return this.cki},t.prototype.clearBackupTasks=function(){this.cki=[]},t.prototype.backupTasksForSchedule=function(t){var n,i,e=[],s=this.count,r=t===l.TasksChangeAction.Renumber;for(n=0;n<s;n++)i=r?this.getTaskByRow(n):this.getTask(n),e.push(this.cloneTask(i));return this.cki=e,e},t.prototype.addField=function(t){this.taskManager.addField(t)},t.prototype.getField=function(t){return this.taskManager.getField(t)},t.prototype.suspendDirty=function(){this.Kj++},t.prototype.resumeDirty=function(){this.Kj--,this.Kj>0&&this.Kj--},t.prototype.isSuspendDirty=function(){return this.Kj>0},t.prototype.createChange=function(t,n,i,e){return{action:t,changedItems:n,needReschedule:!!i,sortInfos:e}},t.prototype.Eki=function(t,n){var i,e=t.start,s=0!==b.GanttSortService.dateCompareFunction(e,n);s&&(i=this.createChange(l.TasksChangeAction.Update,[],!0),this.Lmi.invoke(i),this.uyi.Eki(t,n),this.Hmi.invoke(i))},t.prototype.Fki=function(t,n){var i,e=t.finish,s=0!==b.GanttSortService.dateCompareFunction(e,n);s&&(i=this.createChange(l.TasksChangeAction.Update,[],!0),this.Lmi.invoke(i),this.uyi.Fki(t,n),this.Hmi.invoke(i))},t.prototype.sort=function(t,n,i,e){var s,r,u,o,h,a;if(void 0===i&&(i=!0),void 0===e&&(e=!1),e&&!i)throw new Error(p().GANTT_INVALID_OPERATION);if(n&&n.length!==t.length)throw new Error(p().GANTT_INVALID_OPERATION);for(s=[],r=0,u=t;r<u.length;r++){if(o=u[r],!(h=this.getField(o)))throw new Error(p().GANTT_INVALID_FIELD);s.push(h)}if((n=n||s.map((function(){return!0}))).length!==s.length)throw new Error(p().GANTT_INVALID_ASCENDING_STATES);this.taskView.sort(s,n,i),e&&(a={fields:s,ascendingStates:n},this.taskView.renumberTaskNumbers(a))},t.prototype.resort=function(){if(this.taskView.sorted){var t=this.taskView.fyi,n=t.fields,i=t.ascendingStates,e=t.keepStructure;this.taskView.sort(n,i,e)}},t.prototype.createTask=function(t){return this.taskManager.createTask(t)},t.prototype.createRoot=function(){var t=this.createTask({name:this.name});return t.kU.taskNumber=0,t.kU.viewIndex=0,t.q2t(0),t},t.prototype.loadTasksInternal=function(t,n){var i=this.createTasks(t,n);this.taskView.reset(i)},t.prototype.createTasks=function(t,n){var i,e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m=[];for(m[0]=this.createRoot(),i={},e=this.taskManager.getPrimaryKeyField(),s=this.taskView.Wki,r=0,u=t;r<u.length;r++)"number"==typeof(h=(o=u[r]).taskNumber)&&(a=o.id,f=i[c=o.parentId],l=this.createTask(o),e&&s&&(v=s[d=this.taskManager.getTaskValue(l,e.name)])&&(v.task=l),m[h]=l,l.kU.taskNumber=h,f?(m[A=f.taskNumber]||(m[A]=f),this.setParent(f,l)):this.setParent(m[0],l),"number"!=typeof(g=o.level)&&(g=1),b=g-n,l.q2t(b),i[a]=l);return m.filter((function(t){return!!t}))},t.prototype.setParent=function(t,n){n.lyi(t),t.Fpi().push(n)},t.prototype.addTasks=function(t,n){if(void 0===t&&(t=1),!this.canAddTask)throw new Error(p().GANTT_INVALID_OPERATION);var i=this.insertTasks(this.count,t,n);return this.resort(),i},t.prototype.insertTasks=function(t,n,i){if(void 0===n&&(n=1),!this.canAddTask)throw new Error(p().GANTT_INVALID_OPERATION);return this.validateInsertIndex(t,!0),this.insertTasksCore(t,n,i)},t.prototype.insertTasksByRow=function(t,n,i){if(!this.canAddTask)throw new Error(p().GANTT_INVALID_OPERATION);var e=this.validateInsertIndex(t,!1);return this.insertTasksCore(e,n,i)},t.prototype.insertTasksCore=function(t,n,i){if(void 0===i)i=this.taskView.calcRowLevel(t);else if(!1===this.taskView.validateLevel(t,i))throw new Error(p().GANTT_INVALID_LEVEL);var e=this.createTasksForInsert(n);return e.forEach((function(t){t.q2t(i)})),this.taskView.insert(t,e),this.resort(),e},t.prototype.createTasksForInsert=function(t){var n,i=[];if("number"==typeof t)for(n=0;n<t;n++)i.push(this.createTask());else if(Array.isArray(t))for(n=0;n<t.length;n++)i.push(this.createTask(t[n]));else i.push(this.createTask(t));return i},t.prototype.addRecurringTask=function(t,n){if(!this.canAddTask)throw new Error(p().GANTT_INVALID_OPERATION)},t.prototype.insertRecurringTask=function(t,n,i){if(!this.canAddTask)throw new Error(p().GANTT_INVALID_OPERATION)},t.prototype.validateInsertIndex=function(t,n){if(isNaN(t)||t<=0||t>this.count)throw new Error(n?p().GANTT_INVALID_ID:p().GANTT_INVALID_ROW_INDEX);return n||t===this.count?t:this.getRowState(t).taskNumber},t.prototype.removeTasks=function(t){if(!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.taskView.remove(t)},t.prototype.removeTasksByRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!0,n);this.taskView.remove(i)},t.prototype.removeTasksByRowRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!1,n);this.taskView.remove(i)},t.prototype.clearTasks=function(t){if(!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.taskView.clear(t)},t.prototype.clearTasksByRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!0,n);this.taskView.clear(i)},t.prototype.clearTasksByRowRange=function(t,n){if(void 0===n&&(n=1),!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);var i=this.validateOperationIndexAndCount(t,!1,n);this.taskView.clear(i)},t.prototype.renewTasks=function(t,n){if(!this.canAddTask||!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);if("number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)){var i=void 0;if((i=y(n)?this.createTasksForInsert(t.length):this.createTasksForInsert(n)).length!==t.length)throw new Error(p().GANTT_INVALID_COUNT);return this.taskView.renew(t,i),i}},t.prototype.renewTasksByRange=function(t,n){var i,e;if(void 0===n&&(n=1),!this.canAddTask||!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);return i=this.createTasksForInsert(n),e=this.validateOperationIndexAndCount(t,!0,i.length),this.taskView.renew(e,i),i},t.prototype.renewTasksByRowRange=function(t,n){var i,e;if(void 0===n&&(n=1),!this.canAddTask||!this.canRemoveTask)throw new Error(p().GANTT_INVALID_OPERATION);return i=this.createTasksForInsert(n),e=this.validateOperationIndexAndCount(t,!1,i.length),this.taskView.renew(e,i),i},t.prototype.indentTasks=function(t){"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.indentOutdentCore(t,1)},t.prototype.indentTasksByRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!0,n);this.indentOutdentCore(i,1)},t.prototype.indentTasksByRowRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!1,n);this.indentOutdentCore(i,1)},t.prototype.outdentTasks=function(t){"number"==typeof t&&(t=[t]),this.validateOperationIndexes(t)&&this.indentOutdentCore(t,-1)},t.prototype.outdentTasksByRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!0,n);this.indentOutdentCore(i,-1)},t.prototype.outdentTasksByRowRange=function(t,n){void 0===n&&(n=1);var i=this.validateOperationIndexAndCount(t,!1,n);this.indentOutdentCore(i,-1)},t.prototype.indentOutdentCore=function(t,n){this.keepOutlineStructure&&(this.taskView.changeTasksLevel(t,n),this.resort())},t.prototype.validateOperationIndexAndCount=function(t,n,i){var e,r=this;if(isNaN(t)||t<=0||t>=this.count)throw new Error(n?p().GANTT_INVALID_ID:p().GANTT_INVALID_ROW_INDEX);if(!y(i)&&(isNaN(i)||i<=0||t+i-1>=this.count))throw new Error(p().GANTT_INVALID_COUNT);return e=s.GanttUtil.range(t,i),n?e:e.map((function(t){return r.getRowState(t).taskNumber}))},t.prototype.validateOperationIndexes=function(t){var n=this;return!!(t&&t.length>0)&&(t.forEach((function(t){if(isNaN(t)||t<=0||t>=n.count)throw new Error(p().GANTT_INVALID_ID)})),!0)},t.prototype.eyi=function(){return this.oyi.dependencies},t.prototype.addDependency=function(t){var n,i=this;if(t&&0!==t.length){if(Array.isArray(t)||(t=[t]),n=t.map((function(t){var n,e;if(t instanceof r.TaskDependency){if(t.from.project!==i||t.to.project!==i)throw new Error(p().GANTT_INVALID_DEPENDENCY);return t}if(n=i.getTask(t.fromTaskNumber),e=i.getTask(t.toTaskNumber),y(n)||y(e))throw new Error(p().GANTT_INVALID_DEPENDENCY);return new r.TaskDependency(n,e,t.type)})),!this.Ayi(n))throw new Error(p().GANTT_INVALID_DEPENDENCY);this.gyi(null,n)}},t.prototype.removeDependency=function(t){var n,i,e;if(t&&0!==t.length){for(Array.isArray(t)||(t=[t]),n=0,i=t;n<i.length;n++)if(!(e=i[n])||e.from.project!==this||e.to.project!==this)throw new Error(p().GANTT_INVALID_DEPENDENCY);this.gyi(t,null)}},t.prototype.gyi=function(t,n,i){var e=this.createChange(l.TasksChangeAction.Update,this.Vp,!0);i||this.Lmi.invoke(e),t&&t.length&&(this.uyi.invalidTasks(t.map((function(t){return t.to}))),this.oyi.remove(t)),n&&n.length&&(t&&t.length&&!1===this.oyi.validateChanges(n)?(this.uyi.validTasks(t.map((function(t){return t.to}))),this.oyi.add(t)):(this.oyi.add(n),this.uyi.invalidTasks(n.map((function(t){return t.to}))))),i||this.Hmi.invoke(e)},t.prototype.Ayi=function(t,n){return!(!y(t)&&0!==t.length)||this.oyi.validateChanges(t,n)},t.prototype.kmi=function(t){return this.oyi.getLinkLineInRow(t)},t.prototype.getDefaultStartDate=function(){var t=this.calendarSettings.defaultStartTime,n=new Date;return n.setHours(t.hour,t.minute,0,0),n},t.prototype.getDefaultFinishDate=function(){var t=this.calendarSettings.defaultFinishTime,n=new Date;return n.setHours(t.hour,t.minute,0,0),n},t.prototype.suspendSchedule=function(){this.uyi.suspend()},t.prototype.resumeSchedule=function(){this.uyi.resume()},t.prototype.parseDuration=function(t){return o.DurationHelper.parse(t,this.calendarSettings)},t.prototype.formatDuration=function(t){return o.DurationHelper.format(t,this.calendarSettings)},t.prototype.onTasksChanging=function(t){this.Lmi.invoke(t)},t.prototype.onTasksChanged=function(t){t.action===l.TasksChangeAction.Reset?this.oyi.rebuild():t.action===l.TasksChangeAction.Remove||t.action===l.TasksChangeAction.Replace?this.oyi.onTasksRemoved():t.action===l.TasksChangeAction.Move&&this.oyi.onTasksMembershipChanged(),this.oyi.invalidateLines(),this.Hmi.invoke(t)},t.prototype.toJSON=function(){return d.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){d.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.Project=j},"./dist/plugins/gantt/project/schedule.js":function(t,n,i){var e,s,r,u;Object.defineProperty(n,"__esModule",{value:!0}),n.ScheduleManager=void 0,e=i("./dist/plugins/gantt/project/calendar.js"),s=i("Common"),r=s.Common.lt.ht,u=function(){function t(t){this.vyi="Auto",this.byi=0,this.uAi=t,this.uAi.Hmi.attach(this.onTasksChanged,this)}return Object.defineProperty(t.prototype,"defaultMode",{get:function(){return this.vyi},set:function(t){this.vyi=t,this.reSchedule()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSuspended",{get:function(){return this.byi>0},enumerable:!1,configurable:!0}),t.prototype.suspend=function(){this.byi++},t.prototype.resume=function(){this.byi>0&&this.byi--,0===this.byi&&this.reSchedule()},t.prototype.validTasks=function(t){var n,i,e;for(n=0,i=t;n<i.length;n++)(e=i[n]).myi=!1,e.pyi=!1},t.prototype.invalidTasks=function(t){var n,i,e;for(n=0,i=t;n<i.length;n++)(e=i[n]).myi=!0,e.pyi=!0},t.prototype.invalidAllTasks=function(){this.invalidTasks(this.uAi.Vp)},t.prototype.Eki=function(t,n){var i=this.prepareSetTaskStartFinishDuration(t);i&&(i=this.setTaskStartCore(i,n,t.mode),this.applyScheduleData(t,i))},t.prototype.setTaskStartCore=function(n,i,e){var s=t.getScheduleDataType(n);return i?n="All"===s?this.buildScheduleData(i,null,n.duration,e,!1):this.buildScheduleData(i,n.finish,n.duration,e,!1):(n.start=null,"All"===s&&(n.duration=null)),n},t.prototype.Fki=function(t,n){var i=this.prepareSetTaskStartFinishDuration(t);i&&(i=this.setTaskFinishCore(i,n,t.mode),this.applyScheduleData(t,i))},t.prototype.setTaskFinishCore=function(n,i,e){var s,r=t.getScheduleDataType(n);return i?"All"===r?(s=n.duration.unit,n=this.buildScheduleData(n.start,i,null,e,!1,s)):n=this.buildScheduleData(n.start,i,n.duration,e,!1):(n.finish=null,"All"===r&&(n.duration=null)),n},t.prototype.setTaskDuration=function(t,n){var i=this.prepareSetTaskStartFinishDuration(t);i&&(i=this.setTaskDurationCore(i,n,t.mode),this.applyScheduleData(t,i),this.onTaskChanged(t))},t.prototype.setTaskDurationCore=function(n,i,s){var r,u,o,h=t.getScheduleDataType(n);return i?"All"===h?"Manual"===s&&i.time<=n.duration.time?(r=e.Calendar.localToUTC(n.finish),u=this.uAi.calendar.addDurationUtc(e.Calendar.localToUTC(n.start),i,!0,!1,this.uAi.calendarSettings),o=n.duration.time-i.time,r.valueOf()-o<u.valueOf()&&(u=new Date(r.valueOf()-o)),n=this.buildScheduleData(n.start,e.Calendar.utcToLocal(u),null,s,!1,i.unit)):n=this.buildScheduleData(n.start,null,i,s,!1):n=this.buildScheduleData(n.start,n.finish,i,s,!1):(n.duration=null,"All"===h&&(n.finish=null)),n},t.prototype.prepareSetTaskStartFinishDuration=function(t){if(t&&0!==t.taskNumber)return"Auto"===t.mode&&t.isSummary&&(t._data.mode="Manual"),this.buildScheduleData(t._data.start,t._data.finish,t._data.duration,t.mode,!1)},t.prototype.buildScheduleData=function(n,i,e,s,r,u){var o={start:n,finish:i,duration:e},h=t.getScheduleDataType(o);return"Partly"===h&&(n&&e?this.updateScheduleDataFinish(o,n,e,r):i&&e?this.updateScheduleDataStart(o,i,e,r):n&&i&&this.updateScheduleDataDuration(o,n,i,u,s,r)),o},t.prototype.updateScheduleDataStart=function(t,n,i,e){0===i.time?t.start=new Date(n.getTime()):t.start=e?this.uAi.calendar.addDurationUtc(n,i,!1,!0,this.uAi.calendarSettings):this.uAi.calendar.addDuration(n,i,!1,!0,this.uAi.calendarSettings)},t.prototype.updateScheduleDataFinish=function(t,n,i,e){0===i.time?t.finish=new Date(n.getTime()):t.finish=e?this.uAi.calendar.addDurationUtc(n,i,!0,!1,this.uAi.calendarSettings):this.uAi.calendar.addDuration(n,i,!0,!1,this.uAi.calendarSettings)},t.prototype.updateScheduleDataDuration=function(t,n,i,s,r,u){s=s||this.uAi.calendarSettings.defaultDurationUnit;var o="Manual"===r;t.duration=u?this.uAi.calendar.calcDurationUtc(n,i,o,this.uAi.calendarSettings,s):this.uAi.calendar.calcDurationUtc(e.Calendar.localToUTC(n),e.Calendar.localToUTC(i),o,this.uAi.calendarSettings,s)},t.prototype.applyScheduleData=function(t,n){t._data.start=n.start,t._data.finish=n.finish,t._data.duration=n.duration},t.prototype.onTaskChanged=function(t){this.invalidTasks([t]),this.reSchedule()},t.prototype.onTasksChanged=function(t){t.noChange||(this.invalidAllTasks(),this.reSchedule())},t.prototype.reSchedule=function(){var t,n;this.isSuspended||0!==(t=this.uAi.Vp).length&&(this.beforeSchedule(t),n=this.buildIncomingDegreeList(t),this.scheduleTasks([this.uAi.root],n),this.afterSchedule(t),this.uAi.VAi.invoke())},t.prototype.beforeSchedule=function(t){var n,i,s,r,u,o,h;for(n=0,i=t;n<i.length;n++)r=(s=i[n])._data.start?e.Calendar.localToUTC(s._data.start):null,u=s._data.finish?e.Calendar.localToUTC(s._data.finish):null,(h=!((o=s._data.duration)||r&&u&&"Manual"===s.mode))&&(o=r||u||"Auto"===s.mode?e.DurationHelper.default(this.uAi.calendarSettings):e.DurationHelper.empty(this.uAi.calendarSettings)),s.wyi=this.buildScheduleData(r,u,o,s.mode,!0),s.yyi={},s.myi=!0,s.pyi=!0;t[0].wyi=this.buildScheduleData(this.uAi.startDateUtc,this.uAi.startDateUtc,null,"Auto",!0)},t.prototype.buildIncomingDegreeList=function(t){var n,i,e,s,u=[];for(n=0,i=t;n<i.length;n++)u[2*(s=(e=i[n]).taskNumber)]=(r(e.parent)?0:1)+e.nyi().length,u[2*s+1]=e.Fpi().length;return u},t.prototype.scheduleTasks=function(t,n){var i=[];for(i.push.apply(i,t);i.length;)this.scheduleTask(i.shift(),i,n)},t.prototype.scheduleTask=function(t,n,i){var e,s,r,u,o,h,a;if(t.myi){if(this.scheduleTaskInitially(t),t.myi)return;if(t.isSummary)for(e=0,s=t.Fpi();e<s.length;e++)r=s[e],this.determineFollowing(r,n,i,!0)}if(t.pyi){if(this.scheduleTaskFinally(t),t.pyi)return;if((u=t.tyi())&&u.length>0)for(o=0,h=u;o<h.length;o++)a=h[o],this.determineFollowing(a.to,n,i,!0);t.parent&&this.determineFollowing(t.parent,n,i,!1)}},t.prototype.determineFollowing=function(t,n,i,e){var s=2*t.taskNumber+(e?0:1),r=i[s];r--,i[s]=r,0===r&&n.push(t)},t.prototype.scheduleTaskInitially=function(t){var n,i,e,s,r,u=this;if(0===t.taskNumber||"Manual"===t.mode&&t.wyi.start)return t.yyi.start=t.wyi.start,void(t.myi=!1);if(n=t.parent.yyi.start,"Manual"===t.mode&&t.parent.jyi&&(n=t.parent.jyi),n){if((s=t.nyi())&&s.length){if(!(r=this.getPredecessorsDates(s)))return;i=r[0],e=r[1]}t.yyi.start=this.getMaxDate(n,i),t.isSummary?t.jyi=t.Fpi().reduce((function(t,n){return"Manual"===n.mode?u.getMinDate(n.wyi.start,t):t}),t.yyi.start):t.yyi.finish=e,t.myi=!1}},t.prototype.scheduleTaskFinally=function(t){var n,i,s,r,u,o,h,a,c,f,l;if(!t.myi&&(i=(n=this.getChildrenScheduleResult(t))[0],s=n[1],r=n[2],i)){if("Manual"===t.mode&&t.wyi.finish)return o=(u=t.wyi).start,h=u.finish,a=u.duration,(c=this.uAi.calendar.calcDurationUtc(o,h,!0,this.uAi.calendarSettings)).time!==a.time&&(h=this.uAi.calendar.addDurationUtc(o,a,!0,!1,this.uAi.calendarSettings)),t.yyi.duration=this.fixDuration(a),t.yyi.finish=h,void(t.pyi=!1);if("Auto"===t.mode&&t.isSummary)return s&&r&&(t.yyi.start=s,t.yyi.finish=r,t.yyi.duration=this.uAi.calendar.calcDurationUtc(s,r,!1,this.uAi.calendarSettings,t.wyi.duration.unit)),void(t.pyi=!1);t.yyi.duration=this.fixDuration(t.wyi.duration),f=t.yyi.start,l=t.yyi.finish,0===t.yyi.duration.time&&"Auto"===t.mode?(f=this.getMaxDate(f,l),t.yyi.start=f,t.yyi.finish=f):(l&&(f=this.getMaxDate(f,this.uAi.calendar.addDurationUtc(l,t.yyi.duration,!1,!0,this.uAi.calendarSettings))),"Auto"===t.mode?t.yyi.start=this.uAi.calendar.addDurationUtc(f,e.DurationHelper.empty(this.uAi.calendarSettings),!0,!0,this.uAi.calendarSettings):t.yyi.start=f,t.yyi.finish=this.getMaxDate(l,this.uAi.calendar.addDurationUtc(t.yyi.start,t.yyi.duration,!0,!1,this.uAi.calendarSettings))),t.pyi=!1}},t.prototype.getPredecessorsDates=function(t){var n,i,e,s,r=null,u=null;for(n=0,i=t;n<i.length;n++){if((s=(e=i[n]).from).pyi)return;"FS"===e.type?r=this.getMaxDate(r,s.yyi.finish):"SS"===e.type?r=this.getMaxDate(r,s.yyi.start):"FF"===e.type?u=this.getMaxDate(u,s.yyi.finish):"SF"===e.type&&(u=this.getMaxDate(u,s.yyi.start))}return[r,u]},t.prototype.getMaxDate=function(t,n){return r(t)?n:r(n)?t:t.valueOf()<n.valueOf()?n:t},t.prototype.getMinDate=function(t,n){return r(t)?n:r(n)||t.valueOf()<n.valueOf()?t:n},t.prototype.getChildrenScheduleResult=function(t){var n,i,e,s,r,u=!0,o=t.Fpi();if(o||o.length)for(e=0,s=o;e<s.length;e++){if((r=s[e]).myi||r.pyi){u=!1;break}n=this.getMinDate(n,r.yyi.start),i=this.getMaxDate(i,r.yyi.finish)}return[u,n,i]},t.prototype.afterSchedule=function(n){var i,s,r,u,o,h,a,c,f,l,d;for(n=n.slice(1),i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,r=0,u=n;r<u.length;r++)o=u[r],i=Math.min(i,o.yyi.start.valueOf()),s=Math.max(s,o.yyi.finish.valueOf()),"Auto"===o.mode?(o._data.start=e.Calendar.utcToLocal(o.yyi.start),o._data.finish=e.Calendar.utcToLocal(o.yyi.finish),o._data.duration=o.yyi.duration):(h={start:o.start,finish:o.finish,duration:o.duration},"All"!==(a=t.getScheduleDataType(h))&&"Partly"!==a&&"StartOnly"!==a||(o._data.start=e.Calendar.utcToLocal(o.yyi.start)),"All"!==a&&"Partly"!==a&&"FinishOnly"!==a||(o._data.finish=e.Calendar.utcToLocal(o.yyi.finish)),"All"!==a&&"Partly"!==a&&"DurationOnly"!==a||(o._data.duration=o.yyi.duration)),o.wyi=null;c=null,f=null,l=null,i!==Number.POSITIVE_INFINITY&&(c=new Date(i)),s!==Number.NEGATIVE_INFINITY&&(f=new Date(s)),0===n.length?(c=this.uAi.startDateUtc,f=this.uAi.startDateUtc,l=e.DurationHelper.empty(this.uAi.calendarSettings)):(d=this.uAi.calendarSettings.defaultDurationUnit,l=this.uAi.calendar.calcDurationUtc(c,f,!1,this.uAi.calendarSettings,d)),this.uAi.root._data.start=e.Calendar.utcToLocal(c),this.uAi.root._data.finish=e.Calendar.utcToLocal(f),this.uAi.root._data.duration=l,this.uAi.finishDateUtc=f},t.prototype.fixDuration=function(t){return t?e.DurationHelper.fromTime(t.time,t.unit,this.uAi.calendarSettings):null},t.getScheduleDataType=function(t){return t.start||t.finish||t.duration?t.start&&t.finish&&t.duration?"All":!t.start||t.finish||t.duration?!t.finish||t.start||t.duration?!t.duration||t.start||t.finish?"Partly":"DurationOnly":"FinishOnly":"StartOnly":"None"},t}(),n.ScheduleManager=u},"./dist/plugins/gantt/project/tasks.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b=this&&this.nJr||function(){return b=Object.assign||function(t){var n,i,e,s;for(i=1,e=arguments.length;i<e;i++)for(s in n=arguments[i])Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s]);return t},b.apply(this,arguments)},m=this&&this.iJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,s=n.length,r;e<s;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.TaskCollectionView=n.TaskManager=n.Task=void 0,e=i("./dist/plugins/gantt/utils/util.js"),s=i("./dist/plugins/gantt/gantt-sort.js"),r=i("./dist/plugins/gantt/project/dependency.js"),u=i("./dist/plugins/gantt/project/calendar.js"),o=i("./dist/plugins/gantt/project/schedule.js"),h=i("./dist/plugins/gantt/gantt.enum.js"),a=i("Common"),c=i("./dist/plugins/gantt/gantt.ns.js"),f=new a.Common.ResourceManager(c.SR,"GanttSheet"),l=f.getResource.bind(f),d=a.Common.lt.ht,v=function(){function t(t){this.xT=!1,this.k1=!1,this.myi=!1,this.pyi=!1,this.hke=!1,this.ayt=t}return t.ZX=function(n){return new t(n)},Object.defineProperty(t.prototype,"project",{get:function(){return this.ayt.project},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"taskNumber",{get:function(){return this.kU.taskNumber},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewIndex",{get:function(){return this.kU.viewIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.viewIndex},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this.sft},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"level",{get:function(){return this.YAt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return m([],this.R1t,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"predecessors",{get:function(){return this.Tyi.length?r.TaskDependency.formatPredecessors(this.Tyi):""},set:function(t){var n=r.TaskDependency.parsePredecessors(this,t);if(!this.project.Ayi(n,this.predecessorDependencies))throw new Error(l().GANTT_INVALID_DEPENDENCY);this.project.gyi(this.predecessorDependencies,n,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"predecessorDependencies",{get:function(){return m([],this.Tyi,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"successors",{get:function(){return this.kyi.length?r.TaskDependency.formatSuccessors(this.kyi):""},set:function(t){var n=r.TaskDependency.parseSuccessors(this,t);if(!this.project.Ayi(n,this.successorDependencies))throw new Error(l().GANTT_INVALID_DEPENDENCY);this.project.gyi(this.successorDependencies,n,!0),this._data.successors=r.TaskDependency.formatSuccessors(this.kyi)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"successorDependencies",{get:function(){return m([],this.kyi,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"start",{get:function(){return this._data.start},set:function(t){this.project.Eki(this,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startDisplayed",{get:function(){return this.yyi&&this.yyi.start?u.Calendar.utcToLocal(this.yyi.start):this._data.start||this.project.startDate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finish",{get:function(){return this._data.finish},set:function(t){this.project.Fki(this,t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finishDisplayed",{get:function(){return this.yyi&&this.yyi.finish?u.Calendar.utcToLocal(this.yyi.finish):this._data.finish||this.project.startDate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){if(this.isSummary){var t=this._data.duration;return t&&this.project.parseDuration({time:t.time})}return this._data.duration},set:function(t){var n=this.project.parseDuration(t);this.project.uyi.setTaskDuration(this,n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"workTime",{get:function(){var t,n,i,e,s,r=this.project.parseDuration(this._data.duration),o=this.project.resourcesManager.resourcesAssignment.getResourcesCountByTaskNumber(this.taskNumber),h=0;if(0!==o&&(h=r.time*o),this.isSummary)for(i=0,e=this.children;i<e.length;i++)h+=null!==(n=null===(t=(s=e[i]).workTime)||void 0===t?void 0:t.time)&&void 0!==n?n:0;return u.DurationHelper.normalize({time:h,unit:"Hour"})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return 0===this.taskNumber?"Auto":this._data.mode||this.project.uyi.defaultMode},set:function(t){if(0===this.taskNumber)throw new Error(l().GANTT_INVALID_OPERATION);this._data.mode=t,this.project.uyi.onTaskChanged(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.getDataValue("name")},set:function(t){this.setDataValue("name",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"complete",{get:function(){var t=0;return t=this.isSummary?this.cAe():this.getDataValue("complete")||0},set:function(t){this.isSummary||t>=0&&this.setDataValue("complete",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completeThrough",{get:function(){var t,n,i,e,s;return 0===this.complete?this.startDisplayed:(t=u.Calendar.localToUTC(this.startDisplayed),n=u.Calendar.localToUTC(this.finishDisplayed),i=this.project.calendar.calcDurationUtc(t,n,!0,this.project.calendarSettings),e=this.project.parseDuration({time:i.time*this.complete}),s=this.project.calendar.addDurationUtc(t,e,!0,!1,this.project.calendarSettings),u.Calendar.utcToLocal(s))},set:function(t){var n=u.Calendar.localToUTC(this.startDisplayed),i=u.Calendar.localToUTC(this.finishDisplayed),e=u.Calendar.localToUTC(t),s=this.project.calendar.calcDurationUtc(n,e,!0,this.project.calendarSettings),r=this.project.calendar.calcDurationUtc(n,i,!0,this.project.calendarSettings),o=0===r.time?1:s.time/r.time;o<0&&(o=0),this.complete!==o&&this.ayt.setTaskValue(this,"complete",o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.getDataValue("styles")},set:function(t){var n;this.ayt.getPrimaryKeyField()&&(this.project.Omi.invalidateTextStates(),this.setDataValue("styles",t,!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMilestone",{get:function(){var t,n=this.getDataValue("isMilestone");return d(n)&&(n=(t=this.duration)&&0===t.time),n},set:function(t){this.setDataValue("isMilestone",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSummary",{get:function(){return this.R1t&&this.R1t.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNormal",{get:function(){return!this.isMilestone&&!this.isSummary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isManuallyScheduled",{get:function(){return"Manual"===this.mode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return this.k1},enumerable:!1,configurable:!0}),t.prototype.initialize=function(t){this.kU={taskNumber:-1,viewIndex:-1},this.R1t=[],this.Tyi=[],this.kyi=[],this._data=t},t.prototype.getData=function(t){void 0===t&&(t=!1);var n=this._data;return n.taskNumber=this.taskNumber,n.level=this.level,n.predecessors=this.predecessors,n.successors=this.successors,n.complete=this.complete,t&&(n.children=this.Fpi().map((function(t){return t.getData(!0)}))),n},t.prototype.lyi=function(t){this.sft=t},t.prototype.q2t=function(t){this.YAt=t},t.prototype.Fpi=function(){return this.R1t},t.prototype.nyi=function(){return this.Tyi},t.prototype.tyi=function(){return this.kyi},t.prototype.L0=function(){this.xT=!0},t.prototype.cAe=function(){var t=0,n=0;return e.GanttUtil.traverseChildren(this,(function(i){i.isNormal&&(i.duration?(t+=i.duration.time*i.complete,n+=i.duration.time):(t+=0,n+=0))})),0===n?0:t/n},t.prototype.moveInWorkingDays=function(t){var n,i,e;if("Auto"!==this.mode)switch(n=o.ScheduleManager.getScheduleDataType({start:this.start,finish:this.finish,duration:this.duration})){case"All":case"Partly":case"StartOnly":case"DurationOnly":i=u.Calendar.localToUTC(this.startDisplayed),this.isInWorkingTime(i)?(i=this.moveByDays(i,t,!0),i=this.moveToNextWorkingTime(i)):i=this.moveByDays(i,t,!1),this.start=u.Calendar.utcToLocal(i);break;case"FinishOnly":e=u.Calendar.localToUTC(this.finish),e=this.moveByDays(e,t,!0),e=this.moveToNextWorkingTime(e),this.finish=u.Calendar.utcToLocal(e)}},t.prototype.moveInWeeks=function(t){var n,i,e;if("Auto"!==this.mode)switch(n=o.ScheduleManager.getScheduleDataType({start:this.start,finish:this.finish,duration:this.duration})){case"All":case"Partly":case"StartOnly":case"DurationOnly":i=u.Calendar.localToUTC(this.startDisplayed),this.isInWorkingTime(i)?(i=this.moveByWeeks(i,t,!0),i=this.moveToNextWorkingTime(i)):i=this.moveByWeeks(i,t,!1),this.start=u.Calendar.utcToLocal(i);break;case"FinishOnly":e=u.Calendar.localToUTC(this.finish),e=this.moveByWeeks(e,t,!0),e=this.moveToNextWorkingTime(e),this.finish=u.Calendar.utcToLocal(e)}},t.prototype.isInWorkingTime=function(t){var n=new Date(t.valueOf()+1);return this.project.calendar.calcDurationUtc(t,n,!1,this.project.calendarSettings).time>0},t.prototype.moveByDays=function(t,n,i){if(0===n)return t;var e=new Date(t.valueOf());if(i){for(;n>0;)e.setUTCDate(e.getUTCDate()+1),this.project.calendar.isWorkingDay(e)&&n--;for(;n<0;)e.setUTCDate(e.getUTCDate()-1),this.project.calendar.isWorkingDay(e)&&n++}else e.setUTCDate(e.getUTCDate()+n);return e},t.prototype.moveByWeeks=function(t,n,i){if(0===n)return t;var e=new Date(t.valueOf());if(e.setUTCDate(e.getUTCDate()+7*n),i){if(n>0)for(;!this.project.calendar.isWorkingDay(e);)e.setUTCDate(e.getUTCDate()+1);if(n<0)for(;!this.project.calendar.isWorkingDay(e);)e.setUTCDate(e.getUTCDate()-1)}return e},t.prototype.moveToNextWorkingTime=function(t){return this.project.calendar.addDurationUtc(t,{time:0},!0,!0,this.project.calendarSettings)},t.prototype.getValue=function(t){return this.ayt.getTaskValue(this,t)},t.prototype.setValue=function(t,n){return this.ayt.setTaskValue(this,t,n)},t.prototype.getDataValue=function(t){return this._data[t]},t.prototype.setDataValue=function(t,n,i){void 0===i&&(i=!1);var e=this._data[t];e!==n&&(this._data[t]=n,this.wmi(),this.ayt.notifyTaskValueChanged(this,t,e,n,i))},t.prototype.wmi=function(){this.k1=!0},t.prototype.pOt=function(){this.k1=!1},t.prototype.getBarStyleRules=function(){return this.project.Omi.getBarStyleRuleForTask(this)},t}(),n.Task=v,A=function(){function t(n){var i,e,s;for(this.fields={},this.uAi=n,this.Oyi=v.ZX(this),i=0,e=t.defaultFields;i<e.length;i++)s=e[i],this.fields[s.name]=b({},s)}return Object.defineProperty(t.prototype,"project",{get:function(){return this.uAi},enumerable:!1,configurable:!0}),t.prototype.resetTaskPrototype=function(){this.Oyi=v.ZX(this)},t.prototype.createTask=function(t){var n=Object.create(this.Oyi);return null!==(t=t||{}).duration&&void 0!==t.duration&&(t.duration=this.project.parseDuration(t.duration)),t.mode||(t.mode=this.project.defaultMode),n.initialize(t),n},t.prototype.addField=function(n){var i=this.fields[n.name];i?t.mergeField(i,n):this.fields[n.name]=n,Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(this.Oyi),n.name)||Object.defineProperty(this.Oyi,n.name,{configurable:!0,enumerable:!0,get:function(){return this.getDataValue(n.name)},set:function(t){this.setDataValue(n.name,t)}})},t.prototype.getField=function(t){return this.fields[t]},t.prototype.getFieldByDataType=function(t){var n,i,e,s=Object.values(this.fields);for(n=0,i=s;n<i.length;n++)if((e=i[n]).dataType===t)return e;return null},t.prototype.getPrimaryKeyField=function(){var t,n,i;if(this.Vki)return this.Vki;for(n in this.fields)(i=this.fields[n])&&i.isPrimaryKey&&(t=i);return this.Vki=t,t},t.prototype.isFieldEnabled=function(t){var n=this.getField(t),i=void 0===n.enabled||n.enabled,e=void 0!==n.readonly&&n.readonly;return i&&!e},t.prototype.getTaskValue=function(t,n){if(t&&("string"==typeof n&&(n=this.getField(n)),n))return n.getter?n.getter(t):v.prototype.hasOwnProperty(n.name)?t[n.name]:t.getDataValue(n.name)},t.prototype.setTaskValue=function(t,n,i,e){var r,u,o,a,c,f,l;if(t&&("string"==typeof n&&(n=this.getField(n)),n&&!n.readonly&&n.enabled&&(n.fixValue&&(i=n.fixValue(i,t)),u=this.project.taskManager.getTaskValue(t,n),0!==(o=s.GanttSortService.compareValueWithField(u,i,n))))){c=[],(a=n.fki)||(f=this.project.cloneTask(t),c.push(f)),l=this.project.createChange(h.TasksChangeAction.Update,c,a);try{if(this.project.Lmi.invoke(l),n.setter)n.setter(t,i);else if(v.prototype.hasOwnProperty(n.name)&&Object.getOwnPropertyDescriptor(v.prototype,n.name).set)if(e)try{t[n.name]=i}catch(t){l.noChange=!0}else t[n.name]=i;else t.setDataValue(n.name,i);this.project.Hmi.invoke(l)}catch(t){throw null===(r=this.project.host)||void 0===r||r.resumeAll(),t}}},t.prototype.notifyTaskValueChanged=function(t,n,i,e,s){void 0===s&&(s=!1),s?this.project.Rmi.invoke():this.project.VAi.invoke()},t.mergeField=function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},t.defaultFields=[{name:"taskNumber",text:l().GANTT_TASK_NUMBER,readonly:!0},{name:"name",text:l().GANTT_TASK_NAME,dataType:"TaskSubject",fixValue:function(t){return e.ValueHelper.parseString(t)}},{name:"isMilestone",text:l().GANTT_MILESTONE,fixValue:function(t){return e.ValueHelper.parseBoolean(t,!0)},enabled:!0},{name:"mode",text:l().GANTT_MODE,dataType:"TaskMode",fixValue:function(t){var n=e.ValueHelper.parseStringEnumValues(t,["Auto","Manual"]);return d(n)?"Auto":n},enabled:!1,fki:!0},{name:"duration",text:l().GANTT_DURATION,dataType:"TaskDuration",fixValue:function(t,n){var i=n.duration;return u.DurationHelper.parse(t,n.project.calendarSettings,i?i.unit:void 0)},fki:!0},{name:"start",text:l().GANTT_START,dataType:"TaskStartDate",fixValue:function(t){return e.ValueHelper.parseDate(t)},fki:!0},{name:"finish",text:l().GANTT_FINISH,dataType:"TaskFinishDate",fixValue:function(t){return e.ValueHelper.parseDate(t)},fki:!0},{name:"startDisplayed",text:l().GANTT_START_DISPLAYED,readonly:!0},{name:"finishDisplayed",text:l().GANTT_FINISH_DISPLAYED,readonly:!0},{name:"predecessors",text:l().GANTT_PREDECESSORS,dataType:"TaskPredecessor",fixValue:function(t){return e.ValueHelper.parseString(t)},comparer:function(t,n){return e.ValueHelper.compareTaskDependency(t,n)},enabled:!1,fki:!0},{name:"successors",text:l().GANTT_SUCCESSORS,dataType:"TaskPredecessor",fixValue:function(t){return e.ValueHelper.parseString(t)},comparer:function(t,n){return e.ValueHelper.compareTaskDependency(t,n)},enabled:!1,fki:!0},{name:"complete",text:l().GANTT_COMPLETE,dataType:"TaskComplete",fixValue:function(t,n){return n.isSummary&&(t=n.complete),e.ValueHelper.parseNumber(t,!1)},enabled:!1},{name:"completeText",text:l().GANTT_COMPLETE,getter:function(t){return"".concat((100*t.complete).toFixed(),"%")},readonly:!0},{name:"completeThrough",text:l().GANTT_COMPLETE_CHANGE,fixValue:function(t){return e.ValueHelper.parseDate(t)}}],t}(),n.TaskManager=A,g=function(){function t(t){this.tasks=[],this.tokens=[],this.project=t}return t.prototype.getTask=function(t){return this.tasks[t]},t.prototype.getRowState=function(t){var n,i,e;return t>=this.tasks.length||d(t)?{taskNumber:void 0,level:void 0,task:void 0}:(n=this.viewTokens?this.viewTokens[t].taskNumber:t,i=this.tasks[n],{taskNumber:n,level:e=this.getLevel(n),task:i})},t.prototype.getTasksInView=function(){var t=this;return this.viewTokens?this.viewTokens.map((function(n){return t.tasks[n.taskNumber]})):m([],this.tasks,!0)},t.prototype.generateTokens=function(t){return t.map((function(t){return t?t.kU:{taskNumber:-1,viewIndex:-1}}))},t.prototype.reset=function(t){var n=this.project.createChange(h.TasksChangeAction.Reset,t,!0);this.onTasksChanging(n),this.tasks=t,this.tokens=this.generateTokens(t),delete this.viewTokens,this.fixTokens(),this.onTasksChanged(n)},t.prototype.insert=function(t,n){var i,e,s,r,u,o,a,c=t;this.tokens[t]&&(c=this.tokens[t].viewIndex),(i=this.tasks).splice.apply(i,m([t,0],n,!1)),u=this.generateTokens(n),(e=this.tokens).splice.apply(e,m([t,0],u,!1)),this.viewTokens&&(s=this.viewTokens).splice.apply(s,m([c,0],u,!1)),o=this.project.createChange(h.TasksChangeAction.Insert,n,!0);try{this.onTasksChanging(o),this.fixTokens(),(a=this.findParentTask(t))&&this.fixTaskMembership(a),this.onTasksChanged(o)}catch(t){throw null===(r=this.project.host)||void 0===r||r.resumeAll(),t}},t.prototype.remove=function(t){var n,i,e,s,r,u,o,a,c,f,l,d=this,v=this.tasks.length;if(t=t.filter((function(t){return t>0&&t<v})).sort((function(t,n){return t-n})),!(t.length<=0)){for(i={},e=(n=this.calculateSubTreeRanges(t)).length-1;e>=0;e--)s=n[e],(r=this.tasks[s[0]])&&(i[r.parent.taskNumber]=r.parent);for(u=[],e=n.length-1;e>=0;e--)s=n[e],(o=this.tasks.splice(s[0],s[1]-s[0]+1)).forEach((function(t){t&&(d.kki(t,u)||(u[t.taskNumber]=t),t.L0())})),(a=this.tokens.splice(s[0],s[1]-s[0]+1)).forEach((function(t){t.viewIndex=-1}));for(f in this.viewTokens&&(this.viewTokens=this.viewTokens.filter((function(t){return-1!==t.viewIndex}))),c=this.project.createChange(h.TasksChangeAction.Remove,u,!0),this.onTasksChanging(c),this.fixTokens(),i)Object.prototype.hasOwnProperty.call(i,f)&&(l=i[f],this.fixTaskMembership(l));this.onTasksChanged(c)}},t.prototype.clear=function(t){var n,i,e,s,r,u,o,a,c,f=this,l=this.calculateSubTreeRanges(t),d={};for(n=l.length-1;n>=0;n--)i=l[n],(e=this.tasks[i[0]])&&(d[e.parent.taskNumber]=e.parent);for(s=[],n=l.length-1;n>=0;n--)for(r=(i=l[n])[0];r<=i[1];r++)s.push(r);for(a in u=[],s.forEach((function(t){var n,i=f.tasks[t];i&&(u.push(f.project.cloneTask(i)),f.tasks[t]=null,i.L0(),n={taskNumber:i.taskNumber,viewIndex:i.viewIndex},f.tokens[t]=n,f.viewTokens&&(f.viewTokens[i.viewIndex]=n))})),o=this.project.createChange(h.TasksChangeAction.Replace,u,!0),this.onTasksChanging(o),d)Object.prototype.hasOwnProperty.call(d,a)&&(c=d[a],this.fixTaskMembership(c));this.onTasksChanged(o)},t.prototype.renew=function(t,n){var i,e,s,r,u,o,a,c,f,l,d,v={},A=[];for(i=0;i<t.length;i++)e=t[i],s=n[i],r=this.tasks[e],A.push(this.project.cloneTask(r)),u=this.getLevel(e),s.q2t(u),this.tasks[e]=s,r&&r.L0(),o=this.tokens[e],(a=s.kU).taskNumber=o.taskNumber,a.viewIndex=o.viewIndex,this.tokens[e]=a,this.viewTokens&&(this.viewTokens[a.viewIndex]=a),(c=this.findParentTask(e))&&(v[c.taskNumber]=c);for(l in f=this.project.createChange(h.TasksChangeAction.Replace,A,!0),this.onTasksChanging(f),v)Object.prototype.hasOwnProperty.call(v,l)&&(d=v[l],this.fixTaskMembership(d));this.onTasksChanged(f)},t.prototype.validateLevel=function(t,n){var i=this.findPreviousTask(t),e=i?i.level:0;return!(n<=0||n>e+1)},t.prototype.getLevel=function(t){var n=this.tasks[t];return n?n.level:this.calcRowLevel(t)},t.prototype.kki=function(t,n){var i,e=t.parent;if(e&&0!==(i=e.taskNumber))return n[i]?n[i]:this.kki(e,n)},t.prototype.calcRowLevel=function(t){var n,i=this.findPreviousTask(t),e=this.findNextTask(t);if(!i)return 1;if(n=this.project.host,!e){for(;n&&n.outline.isRowCollapsed(this.tokens[i.taskNumber].viewIndex);)i=i.parent;return Math.max(i.level,1)}return i.isSummary?i.level+1:n&&n.outline.isRowCollapsed(this.tokens[i.taskNumber].viewIndex)?e.level:i.level},t.prototype.findPreviousTask=function(t){var n,i;for(n=t-1;n>0;n--)if(i=this.tasks[n],!d(i))return i;return null},t.prototype.findNextTask=function(t,n){var i,e,s=n?t+1:t;for(i=s;i<this.tasks.length;i++)if(e=this.tasks[i],!d(e))return e;return null},t.prototype.findParentTask=function(t){var n,i,e,s=this.tasks[t];if(!s)return null;for(n=s.level,i=t-1;i>=0;i--)if(e=this.tasks[i],!d(e)&&e.level<n)return e;return null},t.prototype.changeTasksLevel=function(t,n){var i,e,s,r,u,o,a,c,f,l,d,A,g,b,m,p=this,y=this.tasks.length;if(t=t.filter((function(t){return t>0&&t<y&&p.tasks[t]instanceof v})).sort((function(t,n){return t-n})),0!==t.length){for(s={},r=[],u=(e=this.calculateSubTreeRanges(t)).length-1;u>=0;u--)if(a=(o=e[u])[0],(c=this.tasks[a])&&!1!==this.validateLevel(a,c.level+n))for(s[c.parent.taskNumber]=c.parent,f=o[0];f<=o[1];f++)r.push(f);r.forEach((function(t){var i=p.tasks[t];i&&i.q2t(i.level+n)})),l=e.map((function(t){return{task:p.getTask(t[0]),delta:n}})),d=this.project.createChange(h.TasksChangeAction.Level,l,!0);try{for(this.onTasksChanging(d),u=e.length-1;u>=0;u--)o=e[u],(A=this.tasks[o[0]])&&(s[(g=this.findParentTask(o[0])).taskNumber]=g,n<0&&(s[o[0]]=A));for(b in s)Object.prototype.hasOwnProperty.call(s,b)&&(m=s[b],this.fixTaskMembership(m));this.project.suspendSchedule(),this.project.oyi.onTasksMembershipChanged(),this.adjustManuallyParentMode(s),this.project.resumeSchedule(),this.onTasksChanged(d)}catch(t){throw null===(i=this.project.host)||void 0===i||i.resumeAll(),t}}},t.prototype.adjustManuallyParentMode=function(t){var n,i,e,s,r,u,o,h,a=this.getManuallyParentForAdjust(t);if(!(a.length<=0))for(n=0,i=a;n<i.length;n++)s=(e=i[n])[0],r=e[1],u=e[2],"Auto"===r?s.mode="Auto":"Manual"===r&&("DurationOnly"===u?s.start=this.getChildrenDate(s,!0):"StartOnly"===u?(o=this.getChildrenDate(s,!1))>s.start&&(s.finish=o):"FinishOnly"===u&&(h=this.getChildrenDate(s,!0))<s.finish&&(s.start=h))},t.prototype.getChildrenDate=function(t,n){var i,e,s,r,u=null;for(i=0,e=t.Fpi();i<e.length;i++)s=e[i],r=n?s.startDisplayed:s.finishDisplayed,u=d(u)?r.valueOf():n?Math.min(u,r.valueOf()):Math.max(u,r.valueOf());return d(u)?null:new Date(u)},t.prototype.getManuallyParentForAdjust=function(t){var n,i,e,s=[];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&"Manual"===(i=t[n]).mode&&i.Fpi().length&&("None"===(e=o.ScheduleManager.getScheduleDataType({start:i.start,finish:i.finish,duration:i.duration}))?s.push([i,"Auto",null]):"DurationOnly"!==e&&"StartOnly"!==e&&"FinishOnly"!==e||s.push([i,"Manual",e]));return s},t.prototype.calculateSubTreeRanges=function(t){var n,i,e,s=this,r=t.map((function(t){return s.getSubTreeRange(t)})),u=[];for(r.length>0&&u.push(r[0]),n=1;n<r.length;n++)i=r[n],e=u[u.length-1],i[0]<=e[1]||u.push(i);return u},t.prototype.getSubTreeRange=function(t){var n,i,e,s,r=this.tasks[t];if(d(r))return[t,t];for(n=r.level,i=t,e=t+1;e<this.tasks.length;e++)if(s=this.tasks[e]){if(!(s.level>n))break;i=e}return[t,i]},t.prototype.fixTaskMembership=function(t){var n,i,e=t.Fpi();for(e.length=0,n=t.taskNumber+1;n<this.tasks.length;n++)if(i=this.tasks[n],!d(i)){if(i.level<=t.level)break;i.level===t.level+1&&(e.push(i),i.lyi(t))}},t.prototype.fixTokens=function(){this.tokens&&this.tokens.forEach((function(t,n){return t.taskNumber=n})),this.viewTokens?this.viewTokens.forEach((function(t,n){return t.viewIndex=n})):this.tokens.forEach((function(t,n){return t.viewIndex=n}))},Object.defineProperty(t.prototype,"sorted",{get:function(){return!d(this.viewTokens)},enumerable:!1,configurable:!0}),t.prototype.sort=function(t,n,i){var e,r=this.project.createChange(h.TasksChangeAction.Sort,[],!1);this.onTasksChanging(r),d(t)?(this.viewTokens=null,this.fyi=null):(e=s.GanttSortService.sort(this.tokens,this.tasks,t,n,i),this.viewTokens=e,this.fyi={fields:t,ascendingStates:n,keepStructure:i}),this.fixTokens(),this.onTasksChanged(r)},t.prototype.renumberTaskNumbers=function(t){var n,i=this;this.viewTokens&&(n=this.project.createChange(h.TasksChangeAction.Renumber,this.tasks,!0,t),this.onTasksChanging(n),this.tasks=this.viewTokens.map((function(t){return i.tasks[t.taskNumber]})),this.tokens=m([],this.viewTokens,!0),this.viewTokens=null,this.fixTokens(),this.tasks.forEach((function(t){var n=t?t.Fpi():null;n&&n.sort((function(t,n){return t.taskNumber-n.taskNumber}))})),this.fyi=null,this.onTasksChanged(n))},t.prototype.toJSON=function(){var t,n,i,e,s,r={},u=this.project.taskManager.getPrimaryKeyField();if(u)for(t=0,n=this.tasks;t<n.length;t++)i=n[t],e=this.project.taskManager.getTaskValue(i,u.name),(s=i.style)&&(r[e]={style:s});return r},t.prototype.fromJSON=function(t){t&&(this.Wki=t)},t.prototype.Yki=function(){var t,n,i,e,s=this.Wki;for(t in s)(n=s[t])&&(i=n.task,e=n.style,i&&e&&(i.style=e))},t}(),n.TaskCollectionView=g},"./dist/plugins/gantt/project/timescales.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p;Object.defineProperty(n,"__esModule",{value:!0}),n.Timescale=n.NonWorkingTimeStyle=n.TimescaleTier=void 0,e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/gantt-json.js"),u=i("./dist/plugins/gantt/project/calendar.js"),o=i("./dist/plugins/gantt/celltypes/timescales.js"),h=i("./dist/plugins/gantt/gantt.enum.js"),a=i("./dist/plugins/gantt/gantt.ns.js"),c=new e.Common.ResourceManager(a.SR,"GanttSheet"),f=c.getResource.bind(c),l=e.Common.lt.ht,d=s.q.Wt,v=32,A=[{pixel:1/32,units:[h.TimescaleUnit.years,h.TimescaleUnit.years,h.TimescaleUnit.years],counts:[50,20,5],formats:["yyyy","yyyy","yyyy"]},{pixel:1/8,units:[h.TimescaleUnit.years,h.TimescaleUnit.years,h.TimescaleUnit.halfYears],counts:[10,1,1],formats:["yyyy","yyyy",'"H"{!HALF_YEAR}']},{pixel:.5,units:[h.TimescaleUnit.years,h.TimescaleUnit.years,h.TimescaleUnit.quarters],counts:[5,1,1],formats:["yyyy","yyyy",'"Q"{!QUARTER}']},{pixel:1,units:[h.TimescaleUnit.years,h.TimescaleUnit.halfYears,h.TimescaleUnit.months],counts:[1,1,1],formats:["yyyy",'yyyy, "Half" {!HALF_YEAR}',"mmmmm"]},{pixel:2,units:[h.TimescaleUnit.years,h.TimescaleUnit.quarters,h.TimescaleUnit.months],counts:[1,1,1],formats:["yyyy",'yyyy "Qtr" {!QUARTER}',"mmm"]},{pixel:4,units:[h.TimescaleUnit.years,h.TimescaleUnit.months,h.TimescaleUnit.weeks],counts:[1,1,1],formats:["yyyy","'yy mmm","d"]},{pixel:8,units:[h.TimescaleUnit.quarters,h.TimescaleUnit.months,h.TimescaleUnit.days],counts:[1,1,5],formats:['yyyy "Qtr" {!QUARTER}',"yyyy mmmm","d"]},{pixel:16,units:[h.TimescaleUnit.quarters,h.TimescaleUnit.months,h.TimescaleUnit.days],counts:[1,1,2],formats:['yyyy "Qtr" {!QUARTER}',"yyyy mmmm","d"]},{pixel:32,units:[h.TimescaleUnit.months,h.TimescaleUnit.weeks,h.TimescaleUnit.days],counts:[1,1,1],formats:["yyyy mmmm","'yy mmm d",'{!DAY_OF_WEEK("S","M","T","W","T","F","S")}']},{pixel:128,units:[h.TimescaleUnit.weeks,h.TimescaleUnit.days,h.TimescaleUnit.hours],counts:[1,1,6],formats:["yyyy mmmm d","ddd mmm d","h"]},{pixel:256,units:[h.TimescaleUnit.weeks,h.TimescaleUnit.days,h.TimescaleUnit.hours],counts:[1,1,2],formats:["yyyy mmmm d","ddd mmm d","h"]},{pixel:512,units:[h.TimescaleUnit.weeks,h.TimescaleUnit.days,h.TimescaleUnit.hours],counts:[1,1,1],formats:["yyyy mmmm d","ddd mmm d","h"]},{pixel:4096,units:[h.TimescaleUnit.days,h.TimescaleUnit.hours,h.TimescaleUnit.minutes],counts:[1,1,15],formats:["ddd mmm d","ddd mmm d, h","{!MINUTE}"]}],g=function(){function t(){}return t.buildFormatter=function(t){var n=this;return t?function(i,s){for(var r,o,h,a,c=t;r=c.match(n.searchExpReg);)o=r[0],h=r[1],a=r[2],c=c.replace(o,n.getReplaceValue(h,a,u.Calendar.localToUTC(i),s));return new e.Formatter.GeneralFormatter(c).format(i)}:function(){return""}},t.getDefaultFormatter=function(t){var n,i=this.defaultFormatter[t];return l(i)&&(n=this.defaultFormatterText[t]||"",i=this.buildFormatter(n),this.defaultFormatter[t]=i),i},t.getReplaceValue=function(t,n,i,e){return this.keywordFunctionMap[t]?this.keywordFunctionMap[t](i,e,n):t},t.calcDiff_year=function(t,n){var i=n.getUTCFullYear()-t.getUTCFullYear();return this.fixDiffCount(i)},t.calcDiff_half_year=function(t,n){var i=2*n.getUTCFullYear()+(n.getUTCMonth()<6?0:1)-(2*t.getUTCFullYear()+(t.getUTCMonth()<6?0:1));return this.fixDiffCount(i)},t.calcDiff_quarter=function(t,n){var i=4*n.getUTCFullYear()+Math.floor(n.getUTCMonth()/3)-(4*t.getUTCFullYear()+Math.floor(t.getUTCMonth()/3));return this.fixDiffCount(i)},t.calcDiff_month=function(t,n){var i=12*n.getUTCFullYear()+n.getUTCMonth()-(12*t.getUTCFullYear()+t.getUTCMonth());return this.fixDiffCount(i)},t.calcDiff_week=function(t,n,i){var e,s,r=t.getUTCDay()-i.calendarSettings.weekStartOn;return r<0&&(r+=7),e=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)),s=Math.floor(u.Calendar.diffDaysUtc(e,n)/7),this.fixDiffCount(s)},t.calcDiff_day=function(t,n){var i=864e5,e=Math.floor(t.valueOf()/i),s=Math.floor(n.valueOf()/i),r=s-e;return this.fixDiffCount(r)},t.calcDiff_hour=function(t,n){var i=36e5,e=Math.floor(t.valueOf()/i),s=Math.floor(n.valueOf()/i),r=s-e;return this.fixDiffCount(r)},t.calcDiff_minute=function(t,n){var i=6e4,e=Math.floor(t.valueOf()/i),s=Math.floor(n.valueOf()/i),r=s-e;return this.fixDiffCount(r)},t.fixDiffCount=function(t){return t>=0&&(t+=1),'"'.concat(t.toFixed(),'"')},t.calcIndex_half_year=function(t,n){var i=t.getUTCMonth()<6?0:1;return this.getParams(n,["1","2"])[i]},t.calcIndex_quarter=function(t,n){var i=Math.floor(t.getUTCMonth()/3);return this.getParams(n,["1","2","3","4"])[i]},t.calcIndex_thirds_of_month=function(t,n){var i=Math.floor((t.getUTCDate()-1)/10);return this.getParams(n,["B","M","E"])[i]},t.calcIndex_week_of_year=function(t,n){var i,e=n.calendarSettings.weekStartOn,s=new Date(Date.UTC(t.getUTCFullYear(),0,1)),r=e-s.getUTCDay();return r<0&&(r+=7),r<4?s.setUTCDate(s.getUTCDate()+r):s.setUTCDate(s.getUTCDate()+r-7),i=u.Calendar.diffDaysUtc(s,t),'"'.concat(Math.floor(i/7)+1,'"')},t.calcIndex_day_of_week=function(t,n){var i=t.getUTCDay();return this.getParams(n,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[i]},t.calcIndex_day_of_year=function(t){var n=new Date(Date.UTC(t.getUTCFullYear(),0,1)),i=Math.floor(u.Calendar.diffDaysUtc(n,t))+1;return'"'.concat(i,'"')},t.calcIndex_minute=function(t){return'"'.concat(t.getUTCMinutes(),'"')},t.getParams=function(t,n){var i,e=n.length;return t&&(i=t.slice(1,t.length-1).split(",")).length>=e?i.slice(0,e):n},t.defaultFormatterText=["","yyyy",'"Half" {!HALF_YEAR}','"Qtr" {!QUARTER}',"mmm",'{!THIRDS_OF_MONTH("B","M","E")}',"m/d","ddd","h","{!MINUTE}"],t.defaultFormatter=[],t.searchExpReg=new RegExp("{!([^}\\(]*)(\\([^\\)]*\\))?}"),t.keywordFunctionMap={YEAR_FROM_START:function(n,i,e){return t.calcDiff_year(i.startDateUtc,n)},YEAR_FROM_END:function(n,i,e){return t.calcDiff_year(n,i.finishDateUtc)},HALF_YEAR:function(n,i,e){return t.calcIndex_half_year(n,e)},HALF_YEAR_FROM_START:function(n,i,e){return t.calcDiff_half_year(i.startDateUtc,n)},HALF_YEAR_FROM_END:function(n,i,e){return t.calcDiff_half_year(n,i.finishDateUtc)},QUARTER:function(n,i,e){return t.calcIndex_quarter(n,e)},QUARTER_FROM_START:function(n,i,e){return t.calcDiff_quarter(i.startDateUtc,n)},QUARTER_FROM_END:function(n,i,e){return t.calcDiff_quarter(n,i.finishDateUtc)},MONTH_FROM_START:function(n,i,e){return t.calcDiff_month(i.startDateUtc,n)},MONTH_FROM_END:function(n,i,e){return t.calcDiff_month(n,i.finishDateUtc)},THIRDS_OF_MONTH:function(n,i,e){return t.calcIndex_thirds_of_month(n,e)},WEEK_OF_YEAR:function(n,i,e){return t.calcIndex_week_of_year(n,i)},DAY_OF_WEEK:function(n,i,e){return t.calcIndex_day_of_week(n,e)},WEEK_FROM_START:function(n,i,e){return t.calcDiff_week(i.startDateUtc,n,i)},WEEK_FROM_END:function(n,i,e){return t.calcDiff_week(n,i.finishDateUtc,i)},DAY_OF_YEAR:function(n,i,e){return t.calcIndex_day_of_year(n)},DAY_FROM_START:function(n,i,e){return t.calcDiff_day(i.startDateUtc,n)},DAY_FROM_END:function(n,i,e){return t.calcDiff_day(n,i.finishDateUtc)},HOUR_FROM_START:function(n,i,e){return t.calcDiff_hour(i.startDateUtc,n)},HOUR_FROM_END:function(n,i,e){return t.calcDiff_hour(n,i.finishDateUtc)},MINUTE:function(n,i,e){return t.calcIndex_minute(n)},MINUTE_FROM_START:function(n,i,e){return t.calcDiff_minute(i.startDateUtc,n)},MINUTE_FROM_END:function(n,i,e){return t.calcDiff_minute(n,i.finishDateUtc)}},t}(),b=function(){function t(t){this.DU=1,this.Myi="Left",this.xyi=!0,this.IOProps=["count","formatter","unit","labelAlign","showTickLines","formatter"],this.sft=t}return Object.defineProperty(t.prototype,"unit",{get:function(){return this.l6n},set:function(t){this.l6n=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.DU},set:function(t){var n=Number(t);n>0&&n%1==0&&(this.DU=n),this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelAlign",{get:function(){return this.Myi},set:function(t){this.Myi=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showTickLines",{get:function(){return this.xyi},set:function(t){this.xyi=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"formatter",{get:function(){return this.bbt},set:function(t){this.Hyi="string"==typeof t?g.buildFormatter(t):t,this.bbt=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realFormatter",{get:function(){return l(this.Hyi)?g.getDefaultFormatter(this.l6n):this.Hyi},enumerable:!1,configurable:!0}),t.prototype.formatDate=function(t){var n=this.realFormatter;return"function"==typeof n?n(t,this.sft.project):""},t.prototype.toJSON=function(){return r.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){r.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.TimescaleTier=b,m=function(){function t(t){this.Syi="Behind",this._x="#F7F7F7",this.Ox="solidFill",this.IOProps=["color","drawMode","pattern"],this.project=t}return Object.defineProperty(t.prototype,"drawMode",{get:function(){return this.Syi},set:function(t){this.Syi=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._x},set:function(t){this._x=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pattern",{get:function(){return this.Ox},set:function(t){this.Ox=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"calendar",{get:function(){return this.syi||this.project.calendar},set:function(t){this.syi=t,this.project.VAi.invoke()},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return r.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){r.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.NonWorkingTimeStyle=m,p=function(){function t(t){this.iq=!1,this.Dyi=!1,this.Cyi=h.TimescaleTierMode.middleBottom,this.Eyi=!0,this.Ryi=new Date(Date.UTC(2020,0,1,0,0,0)),this.Fyi=new Date(Date.UTC(2030,0,1,0,0,0)),this.Nyi=v,this.IOProps=["topTier","middleTier","bottomTier","nonWorkingTime","tierMode","maxDate","minDate","pixelPerDay"],this.project=t,this.Byi=new b(this),this.Byi.unit=h.TimescaleUnit.days,this.Byi.labelAlign="Center",this.Iyi=new b(this),this.Iyi.unit=h.TimescaleUnit.weeks,this.Uyi=new b(this),this.Uyi.unit=h.TimescaleUnit.years,this.Lyi=new m(this.project);var n=new Date;n.setHours(0,0,0,0),this.cyi=u.Calendar.localToUTC(n),this.zoomAuto(),this.iq=!0,this.MAi=new o.TimescaleCellType}return Object.defineProperty(t,"initialDate",{get:function(){return u.Calendar.utcToLocal(this.Yyi)},set:function(t){this.Yyi=u.Calendar.localToUTC(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"initialDateUtc",{get:function(){return this.Yyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDateUtc",{get:function(){return this.Ryi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minDate",{get:function(){return this.Ryi},set:function(t){this.Ryi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDateUtc",{get:function(){return this.Fyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDate",{get:function(){return this.Fyi},set:function(t){this.Fyi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDate",{get:function(){return u.Calendar.utcToLocal(this.cyi)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentDateUtc",{get:function(){return this.cyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tierMode",{get:function(){return this.Cyi},set:function(t){this.Cyi=t,this.project.Vmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showScaleSeparator",{get:function(){return this.Eyi},set:function(t){this.Eyi=t,this.project.Wmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topTier",{get:function(){return this.Uyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"middleTier",{get:function(){return this.Iyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottomTier",{get:function(){return this.Byi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nonWorkingTime",{get:function(){return this.Lyi},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pixelPerDay",{get:function(){return this.Nyi},set:function(t){this.Nyi=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomFactor",{get:function(){return this.pixelPerDay/v},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleTopTierTextStyle",{get:function(){return this.MAi.topTierTextStyle},set:function(t){this.MAi.topTierTextStyle=t,this.project.Wmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleMiddleTierTextStyle",{get:function(){return this.MAi.middleTierTextStyle},set:function(t){this.MAi.middleTierTextStyle=t,this.project.Wmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleBottomTierTextStyle",{get:function(){return this.MAi.bottomTierTextStyle},set:function(t){this.MAi.bottomTierTextStyle=t,this.project.Wmi.invoke()},enumerable:!1,configurable:!0}),t.prototype.update=function(t,n){var i,e;if(!l(t)){if(isNaN(t.valueOf()))throw new Error(f().GANTT_INVALID_OPERATION);i=this.getDateUtcRange(this.minDateUtc),e=this.getDateUtcRange(this.maxDateUtc),t<i[1]?this.cyi=i[0]:t>e[1]?this.cyi=e[1]:this.cyi=t}l(n)||(n=Math.min(n,65536),n=Math.max(n,1/32),this.Nyi=n),this.project.Wmi.invoke()},t.prototype.scroll=function(t){var n,i;0!==t&&(n=this.getDateUtcRange(this.getDateUtcByOffset(t)),(i=t<0?n[1]:n[0]).valueOf()!==this.currentDateUtc.valueOf()&&this.update(i))},t.prototype.scrollOneTick=function(t){var n=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier;this.scrollBy(t?n.count:-n.count,n.unit)},t.prototype.scrollBy=function(n,i){var e;e=n>0?this.getDateUtcRange(this.currentDateUtc,i,n)[1]:this.getDateUtcRange(new Date(this.currentDateUtc.valueOf()-t.millisecondsPerMinute),i,-n)[0],this.update(e)},t.prototype.scrollTo=function(n,i){var e,s,r;void 0===i&&(i=0),n&&(e=this.project.host?this.project.host.getTaskbarAreaVisibleSize():500,s=u.Calendar.localToUTC(n).valueOf()-e/this.pixelPerDay*t.millisecondsPerDay*i,r=this.getDateUtcRange(new Date(s))[0],this.update(r))},t.prototype.getDateUtcByOffset=function(t,n){var i,e,s;return i=n=n||this.currentDateUtc,0!==t&&(e=t/this.pixelPerDay,s=Math.ceil(24*e*60*60*1e3),i=new Date(n.valueOf()+s)),i},t.prototype.getOffsetByDateUtc=function(t){return u.Calendar.diffDaysUtc(this.currentDateUtc,t)*this.pixelPerDay},t.prototype.zoomTo=function(t,n){var i,e;void 0===n&&(n=!0),isNaN(t)||t<=0||(i=t*v,e=null,n&&(this.adjustTierUnit(i),e=this.getDateUtcRange(this.currentDateUtc)[0]),this.update(e,i))},t.prototype.log2=function(t){return Math.log(t)/Math.log(2)},t.prototype.getCurrentZoomLevel=function(){var t=this.log2(this.pixelPerDay),n=this.log2(v);return t=t>n?Math.floor(t):Math.ceil(t)},t.prototype.zoomIn=function(t){var n,i;void 0===t&&(t=!0),n=Math.pow(2,this.getCurrentZoomLevel()+1),i=null,t&&(this.adjustTierUnit(n),i=this.getDateUtcRange(this.currentDateUtc)[0]),this.update(i,n)},t.prototype.zoomOut=function(t){var n,i;void 0===t&&(t=!0),n=Math.pow(2,this.getCurrentZoomLevel()-1),i=null,t&&(this.adjustTierUnit(n),i=this.getDateUtcRange(this.currentDateUtc)[0]),this.update(i,n)},t.prototype.zoomToRange=function(n,i,e){var s,r,o,h,a,c,f,l,d,v;void 0===e&&(e=!0),n.valueOf()!==i.valueOf()?(s=this.project.host?this.project.host.getTaskbarAreaVisibleSize():500,r=u.Calendar.localToUTC(n),o=u.Calendar.localToUTC(i),h=u.Calendar.diffDaysUtc(r,o),a=Math.ceil(s/h),e&&this.adjustTierUnit(a),c=this.getDateUtcRange(r)[0],f=this.getDateUtcRange(o)[1],l=s/u.Calendar.diffDaysUtc(c,f)*.9,d=r.valueOf()-s/a*t.millisecondsPerDay*.05,v=this.getDateUtcRange(new Date(d))[0],this.update(v,l)):this.scrollTo(n,.1)},t.prototype.adjustTierUnit=function(t){var n,i,e,s,r,u;try{for(this.Dyi=!0,s=0,r=0;r<A.length&&!(A[r].pixel>t);r++)s=r;(u=A[s])&&(n=u.units,this.topTier.unit=n[0],this.middleTier.unit=n[1],this.bottomTier.unit=n[2],i=u.counts,this.topTier.count=i[0],this.middleTier.count=i[1],this.bottomTier.count=i[2],e=u.formats,this.topTier.formatter=e[0],this.middleTier.formatter=e[1],this.bottomTier.formatter=e[2])}finally{this.Dyi=!1}},t.prototype.zoomAuto=function(){var t,n,i=this.getSuitablePixelPerDayForTier(this.bottomTier),e=this.getSuitablePixelPerDayForTier(this.middleTier),s=this.getSuitablePixelPerDayForTier(this.topTier);switch(this.tierMode){case h.TimescaleTierMode.middle:t=e;break;case h.TimescaleTierMode.middleBottom:t=Math.max(e,i);break;case h.TimescaleTierMode.topMiddleBottom:t=Math.max(i,e,s)}l(t)||(n=this.getDateUtcRange(this.currentDateUtc)[0],this.update(n,t))},t.prototype.getSuitablePixelPerDayForTier=function(t){var n,i=new Date(2020,8,30,11,11,59,59),e=t.formatDate(i),s=d(e,"16px Calibri");return(s=1.5*s+3)/((n=this.convertUnitToDay(t.unit))*t.count)},t.prototype.convertUnitToDay=function(n){return t.TimescaleUnitValueMap[n]},t.prototype.dateUtcToUnitValue=function(n,i){var e,s;switch(i){case h.TimescaleUnit.years:return n.getUTCFullYear();case h.TimescaleUnit.halfYears:return 2*n.getUTCFullYear()+(n.getUTCMonth()>=6?1:0);case h.TimescaleUnit.quarters:return 4*n.getUTCFullYear()+Math.floor(n.getUTCMonth()/3);case h.TimescaleUnit.months:return 12*n.getUTCFullYear()+n.getUTCMonth();case h.TimescaleUnit.thirdsOfMonth:return s=(e=n.getUTCDate())>20?2:e>10?1:0,36*n.getUTCFullYear()+3*n.getUTCMonth()+s;case h.TimescaleUnit.weeks:return Math.floor((Math.floor(n.valueOf()/t.millisecondsPerDay)+4-this.project.calendarSettings.weekStartOn)/7);case h.TimescaleUnit.days:return Math.floor(n.valueOf()/t.millisecondsPerDay);case h.TimescaleUnit.hours:return Math.floor(n.valueOf()/t.millisecondsPerHour);case h.TimescaleUnit.minutes:return Math.floor(n.valueOf()/t.millisecondsPerMinute)}},t.prototype.unitValueToDateUtc=function(n,i){switch(i){case h.TimescaleUnit.years:return new Date(Date.UTC(n,0,1));case h.TimescaleUnit.halfYears:return new Date(Date.UTC(Math.floor(n/2),n%2*6,1));case h.TimescaleUnit.quarters:return new Date(Date.UTC(Math.floor(n/4),n%4*3,1));case h.TimescaleUnit.months:return new Date(Date.UTC(Math.floor(n/12),n%12,1));case h.TimescaleUnit.thirdsOfMonth:return new Date(Date.UTC(Math.floor(n/36),Math.floor(n%36/3),n%3*10+1));case h.TimescaleUnit.weeks:return new Date((7*n-4+this.project.calendarSettings.weekStartOn)*t.millisecondsPerDay);case h.TimescaleUnit.days:return new Date(n*t.millisecondsPerDay);case h.TimescaleUnit.hours:return new Date(n*t.millisecondsPerHour);case h.TimescaleUnit.minutes:return new Date(n*t.millisecondsPerMinute)}},t.prototype.getDateUtcRange=function(n,i,e){var s,r,u;return l(i)&&l(e)&&(i=(s=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier).unit,e=s.count),r=this.dateUtcToUnitValue(n,i),1===e?[this.unitValueToDateUtc(r,i),this.unitValueToDateUtc(r+1,i)]:(u=this.dateUtcToUnitValue(t.initialDateUtc,i),this.unitValueToDateUtc(u,i)<t.initialDateUtc&&u++,r=Math.floor((r-u)/e)*e+u,[this.unitValueToDateUtc(r,i),this.unitValueToDateUtc(r+e,i)])},t.prototype.Pyi=function(){this.iq&&!this.Dyi&&this.zoomAuto()},t.prototype.toJSON=function(){return r.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){this.iq=!1,r.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps),t.currentDate&&(this.cyi=u.Calendar.localToUTC(new Date(t.currentDate))),this.iq=!0},t.Yyi=u.Calendar.localToUTC(new Date(1984,1,1)),t.TimescaleUnitValueMap=[NaN,365,182,90,28,8,7,1,1/24,1/1440],t.millisecondsPerMinute=6e4,t.millisecondsPerHour=36e5,t.millisecondsPerDay=864e5,t}(),n.Timescale=p},"./dist/plugins/gantt/taskbar/action.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,w,j,T,O,k,S,M,_,x,D=this&&this.qKr||(E=function(t,n){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},E(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}E(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),E;function C(t){return["task","manualTask","durationOnly"].indexOf(t.name)>-1}function F(t){return"startOnly"===t.name}function N(t){return"finishOnly"===t.name}function R(t){return["milestone","manualMilestone","startOnlyMilestone","finishOnlyMilestone","durationOnlyMilestone"].indexOf(t.name)>-1}function I(t){return"progress"===t.name||"manualProgress"===t.name}Object.defineProperty(n,"__esModule",{value:!0}),n.ActionPendingInfo=n.BarActionBuilder=n.BarNewAction=n.BarLinkAction=n.ProgressStretchAction=n.BarStretchAction=n.BarMoveAction=n.BarAction=void 0,e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/gantt-sheet.js"),u=i("./dist/plugins/gantt/gantt-renderer.js"),o=i("./dist/plugins/gantt/project/calendar.js"),h=i("./dist/plugins/gantt/project/tasks.js"),a=i("./dist/plugins/gantt/project/dependency.js"),c=i("./dist/plugins/gantt/project/schedule.js"),f=i("./dist/plugins/gantt/celltypes/taskbar.js"),l=i("./dist/plugins/gantt/gantt.enum.js"),d=i("./dist/plugins/gantt/gantt.ns.js"),v=e.Common.lt.ht,A=new e.Common.ResourceManager(d.SR,"GanttSheet"),g=A.getResource.bind(A),b=e.Common.zf,m=s.GC$,p=function(){function t(){this.scrollingDistanceCache=0,this.scrollInterval=100,this.Qyi=!0}return t.prototype.start=function(t){var n=this;this.direction=t,this.Qyi=!1,this.timer=window.setInterval((function(){n.scrolling()}),this.scrollInterval)},t.prototype.scrolling=function(){},t.prototype.stop=function(){this.timer&&(window.clearInterval(this.timer),delete this.timer),this.Qyi=!0},t.prototype.isStopped=function(){return this.Qyi},t.prototype.getScrollDistance=function(){return this.scrollingDistanceCache},t}(),y=function(t){function n(n){var i=t.call(this)||this;return i.hyi=n,i}return D(n,t),n.prototype.scrolling=function(){var t,n=this.hyi.currentDateUtc;this.hyi.scrollOneTick(this.direction===l.ScrollDirection.Positive),t=-this.hyi.getOffsetByDateUtc(n),this.scrollingDistanceCache+=t,this.onTimescaleScroll&&this.onTimescaleScroll()},n}(p),w=function(t){function n(n){var i=t.call(this)||this;return i.Wyi=10,i.Mf=n,i.Mf.parent.options.scrollByPixel=!0,i.Mf.parent.options.scrollPixel=i.Wyi,i}return D(n,t),n.prototype.scrolling=function(){var t=this.Wyi*this.direction,n=this.Mf.ly,i=this.Mf.getViewportTopRow(1);this.Mf.scroll(t,0),n===this.Mf.ly&&i===this.Mf.getViewportTopRow(1)||(this.scrollingDistanceCache+=t,this.onSheetVerticalScroll&&this.onSheetVerticalScroll())},n}(p),j=function(){function t(t,n,i,e){this.tipHeight=65,this.tipWidth=160,this.actionStatus=l.ActionStatus.NotStart,this.startInfo=i,this.cursorStyle=e,this.sheet=i.hitInfo.sheet,this.project=t,this.cellType=n,this.minMoveX=i.hitInfo.cellRect.x-i.hitInfo.x,this.maxMoveX=i.hitInfo.cellRect.x+i.hitInfo.cellRect.width-i.hitInfo.x,this.project&&(this.timescaleScrollTimer=new y(this.project.timescale))}return t.prototype.doMouseMove=function(t){this.pending(this.getHitInfoByMouseEvent(t));var n=this.getMovingRepaintRect();this.sheet.repaint(n),_.updateCursorStyle(this.sheet.Dg(),this.cursorStyle),this.tipSettings=this.getTipDefaultSettings(),this.triggerEvent(),this.showTips()},t.prototype.doMouseUp=function(t){this.process(this.getHitInfoByMouseEvent(t)),this.unhandleDocumentMouseMove(),this.sheet.repaint(),this.triggerEvent(),this.dispose(),this.actionStatus=l.ActionStatus.NotStart,_.updateCursorStyle(this.sheet.Dg(),l.CursorStyle.Default)},t.prototype.getHitInfoByMouseEvent=function(t){var n=this.sheet.uw(),i=t.pageX-n.left,e=t.pageY-n.top,s=this.sheet.hitTest(i,e),r={x:s.x,y:s.y,row:s.row,col:s.col,sheet:this.sheet,cellRect:s.cellTypeHitInfo?s.cellTypeHitInfo.cellRect:void 0,sheetArea:s.cellTypeHitInfo?s.cellTypeHitInfo.sheetArea:void 0};return r},t.prototype.handleDocumentMouseMove=function(){var t=this;m(document).bind("mousemove.ganttSheet.baraction",(function(n){t.doMouseMove(n)})).bind("mouseup.ganttSheet.baraction",(function(n){t.doMouseUp(n)}))},t.prototype.unhandleDocumentMouseMove=function(){m(document).unbind("mousemove.ganttSheet.baraction").unbind("mouseup.ganttSheet.baraction")},t.prototype.getMovedX=function(t){if(!this.currentInfo||!this.startInfo)return 0;var n=Math.max(this.minMoveX,this.currentInfo.hitInfo.x-this.startInfo.hitInfo.x);return n=Math.min(this.maxMoveX,n),this.timescaleScrollTimer&&!t&&(n+=this.timescaleScrollTimer.getScrollDistance()),n},t.prototype.getMovedY=function(){return this.currentInfo&&this.startInfo?this.currentInfo.hitInfo.y-this.startInfo.hitInfo.y:0},t.prototype.checkScrolling=function(){var t,n=this;this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x<=0&&(t=l.ScrollDirection.Negative),this.currentInfo.hitInfo.x-(this.startInfo.hitInfo.cellRect.x+this.startInfo.hitInfo.cellRect.width)>=0&&(t=l.ScrollDirection.Positive),void 0!==t?this.timescaleScrollTimer&&this.timescaleScrollTimer.isStopped()&&(this.timescaleScrollTimer.start(t),this.timescaleScrollTimer.onTimescaleScroll=function(){n.triggerEvent(),n.showTips()}):this.timescaleScrollTimer&&this.timescaleScrollTimer.stop()},t.prototype.showTips=function(){var t,n;this.tipSettings&&((t=this.startInfo.hitInfo.cellStyle?this.startInfo.hitInfo.cellStyle.cellType:null)instanceof f.TaskbarCellType&&!t.showDefaultTips||((n=this.sheet.parent).R3||(this.sheet.parent.Tw(this.tipSettings.getContent(),0,0),n.R3.style.whiteSpace="normal",n.R3.style.zIndex="1000",this.tipPosition=this.calcTipPosition()),this.tipPosition&&this.sheet.parent.ny(this.tipSettings.getContent(),this.tipPosition.x,this.tipPosition.y)))},t.prototype.hideTips=function(){var t=this.startInfo.hitInfo.cellStyle?this.startInfo.hitInfo.cellStyle.cellType:null;t instanceof f.TaskbarCellType&&!t.showDefaultTips||(this.sheet.parent.iy(),delete this.tipPosition,delete this.tipSettings)},t.prototype.calcTipPosition=function(){if(this.startInfo.barBounds&&this.sheet.parent.R3)return{x:this.startInfo.hitInfo.x-this.tipWidth/2-2,y:this.startInfo.barBounds.y-this.tipHeight-10}},t.prototype.start=function(){this.handleDocumentMouseMove(),_.updateCursorStyle(this.sheet.Dg(),this.cursorStyle)},t.prototype.pending=function(n){this.currentInfo=_.getBarHitInfo(this.project,this.cellType,n),this.checkScrolling(),(Math.abs(this.getMovedX())>t.actionStartOffset||Math.abs(this.getMovedY())>t.actionStartOffset)&&(this.actionStatus=l.ActionStatus.InProgress)},t.prototype.process=function(t){this.currentInfo=_.getBarHitInfo(this.project,this.cellType,t),this.actionStatus===l.ActionStatus.InProgress&&(this.actionStatus=l.ActionStatus.Finish)},t.prototype.triggerEvent=function(){if(this.actionStatus===l.ActionStatus.Finish)this.sheet.ki(l.GanttSheetEvent.Event_BarAction_End,this.getTriggerData());else if(this.actionStatus===l.ActionStatus.InProgress){var t=this.getTriggerData();t.tip=this.tipSettings,this.sheet.ki(l.GanttSheetEvent.Event_BarAction_Pending,t)}},t.prototype.dispose=function(){this.timescaleScrollTimer&&this.timescaleScrollTimer.stop(),this.hideTips();var t=this.sheet.getCellType(this.startInfo.hitInfo.row,this.startInfo.hitInfo.col);t.barAction===this&&(t.barAction=void 0)},t.prototype.getBarPendingInfo=function(){return{partName:l.BarPartName.Middle,styleRule:this.startInfo.style,task:this.startInfo.task,name:this.command+"_P",movedX:this.getMovedX(),movedY:this.getMovedY(),colIndex:this.startInfo.hitInfo.col,rowIndex:this.startInfo.hitInfo.row}},t.prototype.getTipDefaultSettings=function(){return null},t.prototype.getTriggerData=function(){return{command:this.command}},t.prototype.getMovingRepaintRect=function(){return this.sheet.getCellRect(this.startInfo.hitInfo.row,this.startInfo.hitInfo.col)},t.prototype.getDateChangeUnit=function(t){var n,i;if(void 0===t&&(t=!1),i=(n=this.project.timescale).tierMode===l.TimescaleTierMode.middle?n.middleTier:n.bottomTier,!t)return i.unit;switch(i.unit){case l.TimescaleUnit.minutes:return l.TimescaleUnit.minutes;case l.TimescaleUnit.hours:case l.TimescaleUnit.days:case l.TimescaleUnit.weeks:case l.TimescaleUnit.thirdsOfMonth:case l.TimescaleUnit.months:case l.TimescaleUnit.quarters:case l.TimescaleUnit.halfYears:case l.TimescaleUnit.years:return 1===i.count?i.unit+1:i.unit}},t.actionStartOffset=4,t}(),n.BarAction=j,T=function(t){function n(n,i,e){var s=t.call(this,n,i,e,l.CursorStyle.Move)||this;return s.tipHeight=65,s.tipWidth=200,s.command="Move",s.Gyi=i,s}return D(n,t),n.prototype.pending=function(n){if(t.prototype.pending.call(this,n),this.isTryToLink(n)){this.unhandleDocumentMouseMove();var i=_.getActionInstance("Link",this.project,this.Gyi,this.startInfo);i&&(this.Gyi.barAction=i,i.start())}else this.actionStatus===l.ActionStatus.InProgress&&(this.cursorStyle=l.CursorStyle.TaskDrag)},n.prototype.process=function(n){var i,e,s,r;t.prototype.process.call(this,n),this.actionStatus===l.ActionStatus.Finish&&(i=this.startInfo.task,"FinishOnly"===(e=c.ScheduleManager.getScheduleDataType({start:i.start,finish:i.finish,duration:i.duration}))?(s=this.getTargetDate(this.getBarEndPosition()),i.finishDisplayed.valueOf()!==s.valueOf()&&(i.finish=s)):(r=this.getTargetDate(this.getBarStartPosition()),i.startDisplayed.valueOf()!==r.valueOf()&&(i.start=r)))},n.prototype.getTipDefaultSettings=function(){var t,n,i,s,r=this.startInfo.style.name,u=new e.Formatter.GeneralFormatter(this.project.layout.tipDateFormat),o=this.startInfo.task,h=new f.TipSettings("gc-gantt-bar-action-"+this.command);return h.title=r||"",h.body=[],"StartOnly"===(t=c.ScheduleManager.getScheduleDataType({start:o.start,finish:o.finish,duration:o.duration}))?(n=this.getTargetDate(this.getBarStartPosition()),h.body.push([g().GANTT_ACTION_TASK_START,"".concat(u.format(n))])):"FinishOnly"===t||o.isMilestone?(i=this.getTargetDate(this.getBarEndPosition()),h.body.push([g().GANTT_ACTION_TASK_FINISH,"".concat(u.format(i))])):(n=this.getTargetDate(this.getBarStartPosition()),h.body.push([g().GANTT_ACTION_TASK_START,"".concat(u.format(n))]),(s=o.duration)&&(i=this.project.calendar.addDuration(n,s,!0,!1,this.project.calendarSettings),h.body.push([g().GANTT_ACTION_TASK_FINISH,"".concat(u.format(i))]))),2===h.body.length?this.tipHeight=65:this.tipHeight=45,h},n.prototype.getBarStartPosition=function(){return this.startInfo.barBounds.x-this.startInfo.hitInfo.cellRect.x},n.prototype.getBarEndPosition=function(){return this.startInfo.barBounds.x+this.startInfo.barBounds.w-this.startInfo.hitInfo.cellRect.x},n.prototype.getTriggerData=function(){var t=this.startInfo.task;return{command:this.command,targetTask:t,start:this.getTargetDate(this.getBarStartPosition()),finish:this.getTargetDate(this.getBarEndPosition())}},n.prototype.isTryToLink=function(t){return!(!this.timescaleScrollTimer.isStopped()||0!==this.timescaleScrollTimer.getScrollDistance())&&(void 0!==t.row&&t.row!==this.startInfo.hitInfo.row||this.actionStatus===l.ActionStatus.NotStart&&Math.abs(this.getMovedX())<=j.actionStartOffset&&Math.abs(this.getMovedY())>j.actionStartOffset)},n.prototype.getTargetDate=function(t){var n,i,e,s,r,u=this.startInfo.task;if(u)return n=u.project.timescale,i=this.getMovedX(!0),e=this.getDateChangeUnit(),s=n.getDateUtcRange(n.getDateUtcByOffset(i+t,n.currentDateUtc),e,1)[0],e<=l.TimescaleUnit.days&&(r=this.project.calendarSettings,s.setUTCHours(r.defaultStartTime.hour,r.defaultStartTime.minute,0,0)),o.Calendar.utcToLocal(s)},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);return n.styleRule.style.taskbarStyle.middleShape?n.partName=l.BarPartName.Middle:n.styleRule.style.taskbarStyle.startShape?n.partName=l.BarPartName.Start:n.styleRule.style.taskbarStyle.endShape&&(n.partName=l.BarPartName.End),n},n}(j),n.BarMoveAction=T,O=function(t){function n(n,i,e){var s=t.call(this,n,i,e,l.CursorStyle.RightStretch)||this;return s.command="Stretch",s}return D(n,t),n.prototype.process=function(n){var i,e;t.prototype.process.call(this,n),this.actionStatus===l.ActionStatus.Finish&&(i=this.startInfo.task,(e=this.getStretchToDate())<i.start?i.finish=i.start=e:i.finish=e)},n.prototype.getStretchToDate=function(){var t=this.startInfo.task,n=this.getMovedX(!0),i=t.project.timescale,e=this.startInfo.barBounds.x+this.startInfo.barBounds.w-this.startInfo.hitInfo.cellRect.x,s=i.getDateUtcRange(i.getDateUtcByOffset(n+e,i.currentDateUtc),this.getDateChangeUnit(!0),1)[0];return o.Calendar.utcToLocal(s)},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);return n.styleRule.style.taskbarStyle.endShape?n.partName=l.BarPartName.End:n.styleRule.style.taskbarStyle.middleShape?(n.partName=l.BarPartName.Middle,n.movedX=0,n.stretchX=this.getMovedX()):n.styleRule.style.taskbarStyle.startShape&&(n.partName=l.BarPartName.Start),n},n.prototype.getTipDefaultSettings=function(){var t=this.startInfo.style.name,n=this.getStretchToDate(),i=new e.Formatter.GeneralFormatter(this.project.layout.tipDateFormat),s=this.startInfo.task.duration,r="Manual"===this.startInfo.task.mode,u=this.project.calendar.calcDurationUtc(o.Calendar.localToUTC(this.startInfo.task.startDisplayed),o.Calendar.localToUTC(n),r,this.project.calendarSettings,s?s.unit:null),h=new f.TipSettings("gc-gantt-bar-action-"+this.command);return h.title="".concat(t),h.body=[[g().GANTT_ACTION_FINISH,"".concat(i.format(n))],[g().GANTT_ACTION_DURATION,"".concat(this.project.formatDuration(u))]],h},n.prototype.getTriggerData=function(){return{command:this.command,targetTask:this.startInfo.task,finish:this.getStretchToDate()}},n}(j),n.BarStretchAction=O,k=function(t){function n(n,i,e){var s=t.call(this,n,i,e,l.CursorStyle.ProcessDrag)||this;return s.tipWidth=210,s.tipHeight=50,s.command="ProgressStretch",s}return D(n,t),n.prototype.process=function(n){var i,e;t.prototype.process.call(this,n),i=this.startInfo.task,v(i.start)&&(i.start=i.startDisplayed),e=this.DAe(),this.project.taskManager.setTaskValue(i,"complete",e,!0)},n.prototype.getCompleteThroughDate=function(){var t=this.startInfo.task,n=t.project.timescale,i=n.getDateUtcRange(n.getDateUtcByOffset(this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x,n.currentDateUtc),this.getDateChangeUnit(!0),1)[0],e=o.Calendar.utcToLocal(i);return e.valueOf()>t.finishDisplayed.valueOf()?e=t.finishDisplayed:e.valueOf()<t.startDisplayed.valueOf()&&(e=t.startDisplayed),e},n.prototype.DAe=function(){var t=this.sheet.NMi.lki,n=this.getBarPendingInfo().stretchX,i=this.startInfo.task,e=i.complete,s=t._Ae(i),r=s*e,u=Math.round((r+n)/s*100)/100;return u<0&&(u=0),u},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);if(I(n.styleRule)){if(n.styleRule.style.taskbarStyle.endShape)return n.partName=l.BarPartName.End,n;n.movedX=0,n.stretchX=this.getMovedX()}else{if(n.styleRule.style.taskbarStyle.startShape)return n.partName=l.BarPartName.Start,n;n.movedX=0,n.stretchX=this.getMovedX()-this.startInfo.barBounds.w}return n},n.prototype.getTipDefaultSettings=function(){var t=this.startInfo.style.name,n=this.DAe(),i=new f.TipSettings("gc-gantt-bar-action-"+this.command);return i.title="".concat(t),i.body=[[g().GANTT_TASK_BAR_COMPLETE,"".concat(Math.round(100*n),"%")]],i},n.prototype.getTriggerData=function(){return{command:this.command,targetTask:this.startInfo.task,completeThroughDate:this.getCompleteThroughDate()}},n}(j),n.ProgressStretchAction=k,S=function(t){function n(n,i,e){var s=t.call(this,n,i,e,l.CursorStyle.LinkLine)||this;return s.command="Link",s.ck=new w(s.sheet),s.init(),s}return D(n,t),n.prototype.init=function(){var t,n=this.startInfo.hitInfo.sheet,i=n.NMi;i instanceof r.GanttSheet&&i.project===this.project&&(t=this.sheet.getRangeRect(1,2,{row:-1,col:this.startInfo.hitInfo.col,rowCount:-1,colCount:1}),this.Vyi=new s.Rect(t.x,t.y,t.width,t.height)),this.zyi=this.startInfo.hitInfo.cellRect},n.prototype.checkScrolling=function(){var t,n,i=this;this.Vyi&&(this.currentInfo.hitInfo.y<=this.Vyi.y?t=l.ScrollDirection.Negative:this.currentInfo.hitInfo.y>=this.Vyi.y+this.Vyi.height&&(t=l.ScrollDirection.Positive),void 0!==t?this.ck.isStopped()&&(this.ck.start(t),this.ck.onSheetVerticalScroll=function(){i.sheet.repaint(i.sheet.j1(new s.Range(-1,i.startInfo.hitInfo.col,-1,1)))}):this.ck.stop()),this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x<=0&&(n=l.ScrollDirection.Negative),this.currentInfo.hitInfo.x-(this.startInfo.hitInfo.cellRect.x+this.startInfo.hitInfo.cellRect.width)>=0&&(n=l.ScrollDirection.Positive),void 0!==n?this.ck.isStopped()&&this.timescaleScrollTimer.isStopped()&&this.timescaleScrollTimer.start(n):this.timescaleScrollTimer.stop()},n.prototype.process=function(n){var i,e,s;t.prototype.process.call(this,n),i=this.startInfo.task,e=this.currentInfo.task,i&&e&&i.taskNumber!==e.taskNumber&&(s=new a.TaskDependency(i,e),this.project.Ayi([s])&&this.project.addDependency(s))},n.prototype.getMovingRepaintRect=function(){return this.sheet.j1(new s.Range(-1,this.startInfo.hitInfo.col,-1,1))},n.prototype.dispose=function(){t.prototype.dispose.call(this),this.ck.stop()},n.prototype.calcTipPosition=function(){if(this.sheet.parent.R3)return this.Vyi?{x:this.Vyi.x-this.tipWidth-6,y:this.zyi.y-this.tipHeight-10}:{x:this.zyi.x-this.tipWidth-6,y:this.zyi.y-this.tipHeight-10}},n.prototype.getPendingLinkInfo=function(){var t=this.startInfo.hitInfo.x-this.timescaleScrollTimer.getScrollDistance(),n=this.startInfo.hitInfo.y-this.ck.getScrollDistance();return this.Vyi?(t=Math.min(this.Vyi.x+this.Vyi.width,Math.max(t,this.Vyi.x)),n=Math.min(this.Vyi.y+this.Vyi.height,Math.max(n,this.Vyi.y))):(t=Math.min(document.body.clientWidth,Math.max(t,0)),n=Math.min(document.body.clientHeight,Math.max(n,0))),{name:this.command+"_L",movedX:this.currentInfo.hitInfo.x-t,movedY:this.currentInfo.hitInfo.y-n,startX:t,startY:n,task:this.startInfo.task,colIndex:this.startInfo.hitInfo.col,rowIndex:this.startInfo.hitInfo.row}},n.prototype.getPendingFromTaskInfo=function(){var t,n=this.startInfo.style;return n&&(n.style.taskbarStyle.middleShape?t=l.BarPartName.Middle:n.style.taskbarStyle.startShape?t=l.BarPartName.Start:n.style.taskbarStyle.endShape&&(t=l.BarPartName.End)),{partName:t,styleRule:this.startInfo.style,task:this.startInfo.task,name:this.command+"_S",movedX:0,movedY:0,colIndex:this.startInfo.hitInfo.col,rowIndex:this.startInfo.hitInfo.row}},n.prototype.getPendingToTaskInfo=function(){var t,n=this.currentInfo.style;return n&&(n.style.taskbarStyle.middleShape?t=l.BarPartName.Middle:n.style.taskbarStyle.startShape?t=l.BarPartName.Start:n.style.taskbarStyle.endShape&&(t=l.BarPartName.End)),{partName:t,styleRule:this.currentInfo.style,task:this.currentInfo.task,name:this.command+"_E",movedX:0,movedY:0,colIndex:this.currentInfo.hitInfo.col,rowIndex:this.currentInfo.hitInfo.row}},n.prototype.getTipDefaultSettings=function(){var t="FS",n="S"===t[0]?g().GANTT_ACTION_START_LINK:g().GANTT_ACTION_FINISH_LINK,i="S"===t[1]?g().GANTT_ACTION_START_LINK:g().GANTT_ACTION_FINISH_LINK,e=new f.TipSettings("gc-gantt-bar-action-"+this.command);return e.title=b.I5(g().GANTT_ACTION_LINE_TIP_TITLE,[n,i]),e.body=[[b.I5(g().GANTT_ACTION_FROM_OF,[n]),g().GANTT_ACTION_TASK+" "+this.startInfo.task.taskNumber],[b.I5(g().GANTT_ACTION_TO_OF,[i]),"".concat(this.currentInfo.task?g().GANTT_ACTION_TASK+" "+this.currentInfo.task.taskNumber:"")]],e},n.prototype.getTriggerData=function(){return{command:this.command,fromTask:this.startInfo.task,toTask:this.currentInfo.task}},n}(j),n.BarLinkAction=S,M=function(t){function n(n,i,e){var s=t.call(this,n,i,e,l.CursorStyle.Default)||this;return s.tipHeight=85,s.command="New",s}return D(n,t),n.prototype.pending=function(n){var i,e,s;t.prototype.pending.call(this,n),this.actionStatus===l.ActionStatus.InProgress&&!this.Kyi&&this.project&&(i=this.project.timescale,this.timescaleScrollTimer=new y(i),s=e=o.Calendar.utcToLocal(i.getDateUtcByOffset(this.startInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x)),this.Kyi=this.createNewTask(e,s,this.startInfo.hitInfo.row),this.cursorStyle=l.CursorStyle.Crosshair)},n.prototype.createNewTask=function(t,n,i){var e=h.Task.ZX(null);return Object.defineProperty(e,"viewIndex",{get:function(){return i}}),Object.defineProperty(e,"start",{get:function(){return t}}),Object.defineProperty(e,"startDisplayed",{get:function(){return t}}),Object.defineProperty(e,"finish",{get:function(){return n}}),Object.defineProperty(e,"finishDisplayed",{get:function(){return n}}),e},n.prototype.calcTipPosition=function(){var t,n;if(this.Kyi&&this.sheet.parent.R3)return n=(t=this.sheet.NMi.lki).getTaskRect(this.Kyi,this.project.Omi.rules.getRule("task"),this.startInfo.hitInfo.cellRect),{x:this.startInfo.hitInfo.x-this.tipWidth/2-2,y:n.y-this.tipHeight-10}},n.prototype.process=function(n){var i,e,s;t.prototype.process.call(this,n),this.Kyi&&(i=this.getNewTaskBuildInfo(),e=this.project,(s=this.cellType.cAi(this.startInfo.hitInfo))>=e.count&&e.addTasks({name:g().GANTT_NEW_TASK,start:i.start,finish:i.finish,duration:i.duration}))},n.prototype.getNewTaskBuildInfo=function(){var t,n,i,e,s,r=this.project.timescale,u=this.Kyi.startDisplayed,h=o.Calendar.utcToLocal(r.getDateUtcByOffset(this.currentInfo.hitInfo.x-this.startInfo.hitInfo.cellRect.x)),a={};return h<u?(a.start=h,a.finish=u):h>u?(a.start=u,a.finish=h):a.finish=a.start=u,t=this.getDateChangeUnit(),n=r.getDateUtcRange(o.Calendar.localToUTC(a.start),t,1)[0],i=r.getDateUtcRange(o.Calendar.localToUTC(a.finish),t,1)[1],t<=l.TimescaleUnit.days&&(e=this.project.calendarSettings,n.setUTCHours(e.defaultStartTime.hour,e.defaultStartTime.minute,0,0),i.setUTCDate(i.getUTCDate()-1),i.setUTCHours(e.defaultFinishTime.hour,e.defaultFinishTime.minute,0,0)),s="Manual"===this.project.defaultMode,a.start=o.Calendar.utcToLocal(n),a.finish=o.Calendar.utcToLocal(i),a.duration=this.project.calendar.calcDurationUtc(n,i,s,this.project.calendarSettings),a},n.prototype.getBarPendingInfo=function(){var n=t.prototype.getBarPendingInfo.call(this);return this.Kyi&&(n.task=this.Kyi,n.styleRule=this.project.Omi.rules.getRule("task"),n.movedX=0,n.stretchX=this.getMovedX()),n},n.prototype.getTipDefaultSettings=function(){var t,n,i;if(this.Kyi)return t=new e.Formatter.GeneralFormatter(this.project.layout.tipDateFormat),n=this.getNewTaskBuildInfo(),(i=new f.TipSettings("gc-gantt-bar-action-"+this.command)).title="Create Task",i.body=[[g().GANTT_ACTION_START,"".concat(t.format(n.start))],[g().GANTT_ACTION_FINISH,"".concat(t.format(n.finish))],[g().GANTT_ACTION_DURATION,"".concat(this.project.formatDuration(n.duration))]],i},n.prototype.getTriggerData=function(){var t=this.getNewTaskBuildInfo(),n=t.start,i=t.finish,e=t.duration;return{command:this.command,start:n,finish:i,duration:e}},n}(j),n.BarNewAction=M,_=function(){function t(){}return t.getBarHitInfo=function(t,n,i){var e,s,r,o,a,c,f,l,d,v,A,g={hitInfo:i,area:"outOfBar"},b=i&&i.sheet,m=n.cAi(i),p=t.getTaskByRow(m);if(!(i&&p&&p instanceof h.Task&&i.cellRect))return g;if(!(e=p.getBarStyleRules()))return g;for(s=e.length-1;s>=0;s--)if(r=e[s],o=this.getTaskbarBounds(t,p,r,i.cellRect,b),a=u.GanttRenderer.getTaskbarStartBounds(o),c=u.GanttRenderer.getTaskbarEndBounds(o),f=o.x,l=o.y,d=o.w,v=o.h,f=a.x,d=c.x+c.w-a.x,this.isHitInBounds(i,{x:f,y:l,w:d,h:v}))return g.task=p,g.style=r,g.barBounds=o,A=o.w>=2*a.w?a.w/4:a.w/2,a.w-=A,c.x+=A,c.w-=A,this.isHitInBounds(i,a)?g.area="aroundLeft":this.isHitInBounds(i,c)?g.area="aroundRight":g.area="insideBar",g;return g},t.isHitInBounds=function(t,n){return!!(n&&t.x>=n.x&&t.x<n.x+n.w&&t.y>=n.y&&t.y<n.y+n.h)},t.getHitAction=function(n,i,e){var s,r,u,o=e.hitInfo,h=i.cAi(o);if(!n.getTaskByRow(h))return this.getActionInstance("New",n,i,e);if((s=e.task)&&0!==s.taskNumber){if(r="Manual"===s.mode,u=e.style,r&&(R(u)||F(u)||N(u)))return this.getActionInstance("Move",n,i,e);if("aroundLeft"===e.area)return I(u)?this.getActionInstance("ProgressStretch",n,i,e):C(u)?(s.hke=!0,e=t.getBarHitInfo(n,i,o),s.hke=!1,this.getActionInstance("ProgressStretch",n,i,e)):void 0;if("aroundRight"===e.area){if(I(u))return this.getActionInstance("ProgressStretch",n,i,e);if(C(u))return this.getActionInstance("Stretch",n,i,e)}return"insideBar"===e.area?r?this.getActionInstance("Move",n,i,e):this.getActionInstance("Link",n,i,e):void 0}},t.getActionInstance=function(t,n,i,e){var s,r,u=e.hitInfo.sheet,o=u.NMi;switch(t){case"Move":i&&i.allowMoveOrResizeTask&&(s=new T(n,i,e));break;case"Stretch":i&&i.allowMoveOrResizeTask&&(s=new O(n,i,e));break;case"Link":i&&i.allowLinkTask&&(r=n.taskManager.isFieldEnabled("predecessors"))&&(s=new S(n,i,e));break;case"New":if(i&&i.allowDragNewTask){if(o.uiOptions&&!1===o.uiOptions.allowAddTask)return;s=new M(n,i,e)}break;case"ProgressStretch":i&&i.allowChangeProgress&&(r=n.taskManager.isFieldEnabled("complete"))&&(s=new k(n,i,e));break;default:return}return s},t.getTaskbarBounds=function(t,n,i,e,s){var r;if(!v(i))return s.NMi.lki.getTaskRect(n,i,e)},t.updateCursorByBarHitInfo=function(t,n,i,e){var s=this.getHitAction(n,i,e);s?this.updateCursorStyle(t,s.cursorStyle):this.updateCursorStyle(t,null)},t.updateCursorStyle=function(t,n){switch(n){case l.CursorStyle.TaskDrag:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////////////////////////////////7//f/84Bz/+O/cf/Dv3D/gD8Af8O/cP/jv3H/84Bz//v/9///////////////////////////////////////////////////////////8=) 15 15,auto");case l.CursorStyle.ProcessDrag:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////////////////////////////x///77t///e7P//7ux///ccP//7/D///fx//478//93ff//d7///3ff//+P7/////////////////////////////////////////////////8=) 15 15,auto");case l.CursorStyle.Move:return void(t.style.cursor="move");case l.CursorStyle.LeftStretch:return void(t.style.cursor="w-resize");case l.CursorStyle.RightStretch:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////n////5v///+Z////mP///4B///+Af///mP///5n///+b////n///////////////////////////////////////////////////////8=) 15 15,auto");case l.CursorStyle.LinkLine:return void(t.style.cursor="url(data:image/ico;base64,AAACAAEAICAAABAACQAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAgAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPx+AAGAAwABX/UAAYADAAD8fgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////////////////////////////////////////////////////////////////////8Dgf/+AQD//AAAf/wAAH/8AAB//gEA//8Dgf////////////////////////////////////////////////////////////////8=) 15 15,auto");case l.CursorStyle.Crosshair:return void(t.style.cursor="crosshair");default:return void(t.style.cursor="default")}},t}(),n.BarActionBuilder=_,x=function(){function t(){}return t}(),n.ActionPendingInfo=x},"./dist/plugins/gantt/taskbar/layout.js":function(t,n,i){var e,s,r;Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarLayout=void 0,e=i("./dist/plugins/gantt/gantt-json.js"),s=i("./dist/plugins/gantt/utils/util.js"),r=function(){function t(t){this.Xyi="toTop",this.Zyi=12,this.qyi=s.DefaultDateFormatter,this.$yi=s.DefaultDateFormatter,this.Jyi=!0,this.IOProps=["barHeight","barTextDateFormat","linkLineMode","roundBarsToWholeDays","tipDateFormat"],this.uAi=t}return Object.defineProperty(t.prototype,"linkLineMode",{get:function(){return this.Xyi},set:function(t){this.Xyi=t,this.uAi.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"barHeight",{get:function(){return this.Zyi},set:function(t){this.Zyi=t,this.uAi.Rmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"barTextDateFormat",{get:function(){return this.qyi},set:function(t){this.qyi=t,this.uAi.Rmi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tipDateFormat",{get:function(){return this.$yi},set:function(t){this.$yi=t,this.uAi.VAi.invoke()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"roundBarsToWholeDays",{get:function(){return this.Jyi},set:function(t){this.Jyi=t,this.uAi.VAi.invoke()},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return e.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){e.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.TaskbarLayout=r},"./dist/plugins/gantt/taskbar/renderer.js":function(t,n,i){var e,s,r,u,o,h;Object.defineProperty(n,"__esModule",{value:!0}),n.BarPainter=n.BarEndPainter=void 0,e=i("Common"),s=i("Core"),r=i("./dist/plugins/gantt/utils/util.js"),u=e.Common.lt.ht,o=function(){function t(){}return t.draw=function(t,n,i,e,s){if(!u(n)){var o=s.x,h=s.y,a=s.w,c=s.h;switch(s=r.GanttUtil.fixPixelAlignment(o,h,a,c),n){case"houseUp":this.drawHouseUp(t,s,i,e);break;case"houseDown":this.drawHouseDown(t,s,i,e);break;case"diamond":this.drawDiamond(t,s,i,e);break;case"circleDiamond":this.drawCircleDiamond(t,s,i,e);break;case"triangleUp":this.drawTriangleUp(t,s,i,e);break;case"triangleDown":this.drawTriangleDown(t,s,i,e);break;case"triangleLeft":this.drawTriangleLeft(t,s,i,e);break;case"triangleRight":this.drawTriangleRight(t,s,i,e);break;case"circleTriangleUp":this.drawCircleTriangleUp(t,s,i,e);break;case"circleTriangleDown":this.drawCircleTriangleDown(t,s,i,e);break;case"arrowUp":this.drawArrowUp(t,s,i,e);break;case"arrowDown":this.drawArrowDown(t,s,i,e);break;case"circleArrowUp":this.drawCircleArrowUp(t,s,i,e);break;case"circleArrowDown":this.drawCircleArrowDown(t,s,i,e);break;case"caretDownTop":this.drawCaretDownTop(t,s,i,e);break;case"caretUpBottom":this.drawCaretUpBottom(t,s,i,e);break;case"lineShape":this.drawLine(t,s,i,e);break;case"square":this.drawSquare(t,s,i,e);break;case"circle":this.drawCircle(t,s,i,e);break;case"star":this.drawStar(t,s,i,e);break;case"leftBracket":this.drawLeftBracket(t,s,i,e);break;case"rightBracket":this.drawRightBracket(t,s,i,e);break;case"leftFade":this.drawLeftFade(t,s,i,e);break;case"rightFade":this.drawRightFade(t,s,i,e)}}},t.paintWithStyle=function(t,n,i){switch(n){case"solid":t.strokeStyle=i,t.stroke(),t.fillStyle=i,t.fill();break;case"framed":t.strokeStyle=i,t.stroke();break;case"dashed":t.setLineDash([4,2]),t.strokeStyle=i,t.stroke(),t.setLineDash([])}},t.drawLine=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2-1,r),t.lineTo(s+u/2+2,r),t.lineTo(s+u/2+2,r+o),t.lineTo(s+u/2-1,r+o),t.lineTo(s+u/2-1,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawDiamond=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2,r),t.lineTo(s+u,r+o/2),t.lineTo(s+u/2,r+o),t.lineTo(s,r+o/2),t.closePath(),this.paintWithStyle(t,i,e)},t.drawHouseUp=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2,r),t.lineTo(s,r+o/2),t.lineTo(s,r+o),t.lineTo(s+u,r+o),t.lineTo(s+u,r+o/2),t.lineTo(s+u/2,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawHouseDown=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s,r),t.lineTo(s,r+o/2),t.lineTo(s+u/2,r+o),t.lineTo(s+u,r+o/2),t.lineTo(s+u,r),t.lineTo(s,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawWhiteFillCircle=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.arc(s+u/2,r+o/2,o/2,0,2*Math.PI),t.closePath(),"dashed"===e&&t.setLineDash([2,2]),t.strokeStyle=i,t.stroke(),t.fillStyle="white",t.fill(),t.setLineDash([])},t.drawCircleDiamond=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.lineTo(s+u/2,r+o/4),t.lineTo(s+u/4,r+o/2),t.lineTo(s+u/2,r+3*o/4),t.lineTo(s+3*u/4,r+o/2),t.lineTo(s+u/2,r+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleUp=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2,r),t.lineTo(s,r+o),t.lineTo(s+u,r+o),t.lineTo(s+u/2,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleDown=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s,r),t.lineTo(s+u/2,r+o),t.lineTo(s+u,r),t.lineTo(s,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleLeft=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s,r+o/2),t.lineTo(s+u,r+o),t.lineTo(s+u,r),t.lineTo(s,r+o/2),t.closePath(),this.paintWithStyle(t,i,e)},t.drawTriangleRight=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s,r),t.lineTo(s,r+o),t.lineTo(s+u,r+o/2),t.lineTo(s,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircleTriangleUp=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2,r+o/4),t.lineTo(s+u/4,r+3*o/4),t.lineTo(s+3*u/4,r+3*o/4),t.lineTo(s+u/2,r+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircleTriangleDown=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/4,r+o/4),t.lineTo(s+u/2,r+3*o/4),t.lineTo(s+3*u/4,r+o/4),t.lineTo(s+u/4,r+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawArrowUp=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2,r),t.lineTo(s,r+o/2),t.lineTo(s+u/4,r+o/2),t.lineTo(s+u/4,r+o),t.lineTo(s+3*u/4,r+o),t.lineTo(s+3*u/4,r+o/2),t.lineTo(s+u,r+o/2),t.lineTo(s+u/2,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawArrowDown=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/4,r),t.lineTo(s+u/4,r+o/2),t.lineTo(s,r+o/2),t.lineTo(s+u/2,r+o),t.lineTo(s+u,r+o/2),t.lineTo(s+3*u/4,r+o/2),t.lineTo(s+3*u/4,r),t.lineTo(s+u/4,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircleArrowUp=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var s=n.x,r=n.y,u=n.w,o=n.h;this.drawArrowUp(t,{x:s+1,y:r+1,w:u-2,h:o-2},i,e)},t.drawCircleArrowDown=function(t,n,i,e){this.drawWhiteFillCircle(t,n,e,i);var s=n.x,r=n.y,u=n.w,o=n.h;this.drawArrowDown(t,{x:s+1,y:r+1,w:u-2,h:o-2},i,e)},t.drawCaretDownTop=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s,r+3*o/4),t.lineTo(s,r+o),t.lineTo(s+u,r+o),t.lineTo(s+u,r+3*o/4),t.lineTo(s+u/2,r+o/2),t.lineTo(s,r+3*o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCaretUpBottom=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s,r),t.lineTo(s,r+o/4),t.lineTo(s+u/2,r+o/2),t.lineTo(s+u,r+o/4),t.lineTo(s+u,r),t.lineTo(s,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawSquare=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/4,r+o/4),t.lineTo(s+u/4,r+3*o/4),t.lineTo(s+3*u/4,r+3*o/4),t.lineTo(s+3*u/4,r+o/4),t.lineTo(s+u/4,r+o/4),t.closePath(),this.paintWithStyle(t,i,e)},t.drawCircle=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.arc(s+u/2,r+o/2,o/2,0,2*Math.PI),t.closePath(),this.paintWithStyle(t,i,e)},t.drawStar=function(t,n,i,e){var s=n.x,r=n.y,u=n.h,o=u/4;t.beginPath(),t.moveTo(s+2*o,r),t.lineTo(s+5*o/2,r+3*o/2),t.lineTo(s+4*o,r+3*o/2),t.lineTo(s+14*o/5,r+12*o/5),t.lineTo(s+10*o/3,r+4*o),t.lineTo(s+2*o,r+3*o),t.lineTo(s+2*o/3,r+4*o),t.lineTo(s+6*o/5,r+12*o/5),t.lineTo(s,r+3*o/2),t.lineTo(s+3*o/2,r+3*o/2),t.lineTo(s+2*o,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawLeftBracket=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2,r),t.lineTo(s+u,r),t.lineTo(s+u,r+o/8),t.lineTo(s+5*u/8,r+o/8),t.lineTo(s+5*u/8,r+7*o/8),t.lineTo(s+u,r+7*o/8),t.lineTo(s+u,r+o),t.lineTo(s+u/2,r+o),t.lineTo(s+u/2,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawRightBracket=function(t,n,i,e){var s=n.x,r=n.y,u=n.w,o=n.h;t.beginPath(),t.moveTo(s+u/2,r),t.lineTo(s,r),t.lineTo(s,r+o/8),t.lineTo(s+3*u/8,r+o/8),t.lineTo(s+3*u/8,r+7*o/8),t.lineTo(s,r+7*o/8),t.lineTo(s,r+o),t.lineTo(s+u/2,r+o),t.lineTo(s+u/2,r),t.closePath(),this.paintWithStyle(t,i,e)},t.drawLeftFade=function(t,n,i,e){var s,r=n.x,u=n.y,o=n.w,h=n.h;r-=1,u-=1,o+=2,h+=2,t.lineWidth=h,(s=t.createLinearGradient(r+o/2,u,r+o,u)).addColorStop(0,e),s.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=s,t.fillRect(r+o/2,u,o/2,h),t.lineWidth=1,t.beginPath()},t.drawRightFade=function(t,n,i,e){var s,r=n.x,u=n.y,o=n.w,h=n.h;r-=1,u-=1,o+=2,h+=2,t.lineWidth=h,(s=t.createLinearGradient(r,u,r+o/2,u)).addColorStop(0,"rgba(255,255,255,0)"),s.addColorStop(1,e),t.fillStyle=s,t.fillRect(r,u,o/2,h),t.lineWidth=1},t}(),n.BarEndPainter=o,h=function(){function t(){}return t.draw=function(n,i,e,u,o){var h,a,c,f,l,d,v,A,g;if(void 0===o&&(o=!0),u){if(2===u.h)return n.beginPath(),n.fillStyle=e,n.fillRect(u.x,u.y,u.w,u.h),void n.closePath();h=u.x,a=u.y,c=u.w,f=u.h,s.W.setFillStyle(n,t.getBackColor(e,i),h,a,c,f,t.getFillFunction(n,h,a,c,f,i)),o&&(d=(l=r.GanttUtil.fixPixelAlignment(u.x,u.y,u.w,u.h)).x,v=l.y,A=l.w,g=l.h,t.DrawBorder(n,e,{x:d,y:v,w:A,h:g},"dashedBorder"!==i))}},t.getBackColor=function(t,n){var i={type:s.PatternType.solid,patternColor:t,backgroundColor:"white"};switch(n){case"hollow":i.patternColor="white";break;case"solidFill":case"dashedBorder":break;case"lightFill":i.type=s.PatternType.lightGray;break;case"mediumFill":i.type=s.PatternType.mediumGray;break;case"darkFill":i.type=s.PatternType.darkGray;break;case"diagonalRight":i.type=s.PatternType.lightDown;break;case"diagonalLeft":i.type=s.PatternType.lightUp;break;case"diagonalCross":i.type=s.PatternType.lightTrellis;break;case"lineVertical":i.type=s.PatternType.lightVertical;break;case"lineHorizontal":i.type=s.PatternType.lightHorizontal;break;case"lineCross":i.type=s.PatternType.lightGrid}return i.type===s.PatternType.solid?i.patternColor:i},t.getFillFunction=function(n,i,e,r,u,o){var h=new s.Rect(i,e,r,u),a=function(){n.fillRect(i,e,r,u)};if(!t.paintPatternResetOrigin)return a;switch(o){case"hollow":case"solidFill":break;case"mediumFill":case"diagonalCross":case"lineVertical":case"lineHorizontal":case"lineCross":case"dashedBorder":a=function(){t.FillPattern(n,0,0,h)};break;case"lightFill":case"darkFill":a=function(){t.FillPattern(n,1,0,h)};break;case"diagonalRight":case"diagonalLeft":a=function(){t.FillPattern(n,2,0,h)}}return a},t.FillPattern=function(t,n,i,e){t.save(),t.translate(e.x-n,e.y-i),t.fillRect(n,i,e.width,e.height),t.restore()},t.DrawBorder=function(t,n,i,e){var s=i.x,r=i.y,u=i.w,o=i.h;e||t.setLineDash([2,2]),t.strokeStyle=n,t.strokeRect(s,r,u,o),t.setLineDash([])},t.paintPatternResetOrigin=!0,t}(),n.BarPainter=h},"./dist/plugins/gantt/taskbar/style.js":function(t,n,i){var e,s,r,u,o,h,a,c,f,l,d,v,A,g,b,m,p,y,w,j,T=this&&this.qKr||(O=function(t,n){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},O(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}O(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),O;function k(t){return t.start&&t.finish&&!!t.duration}function S(t){return!t.start&&!t.finish&&!!t.duration}function M(t){return t.start&&!t.finish&&!t.duration}function _(t){return!t.start&&t.finish&&!t.duration}function x(t){return t.startDisplayed.valueOf()!==t.finishDisplayed.valueOf()}Object.defineProperty(n,"__esModule",{value:!0}),n.TaskbarStyleManager=n.TaskbarStyleRule=void 0,e=i("./dist/plugins/gantt/utils/foundation.js"),s=i("Common"),r=s.Common.lt.ht,u=function(){function t(t){this.tji=new e.EventList,this.Zc=t}return Object.defineProperty(t.prototype,"name",{get:function(){return this.Zc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.RN},set:function(t){this.RN=t,this.tji.invoke()},enumerable:!1,configurable:!0}),t.prototype.match=function(t){return!1},t.prototype.getFromDate=function(t){return t.startDisplayed},t.prototype.getToDate=function(t){return t.finishDisplayed},t.prototype.getScale=function(t){return 1},t.prototype.toJSON=function(){return{name:this.name,style:this.style}},t.prototype.fromJSON=function(t){this.style=t.style},t}(),n.TaskbarStyleRule=u,o=function(t){function n(){var n=t.call(this,"task")||this;return n.style={taskbarStyle:{middlePattern:"solidFill",middleShape:"rectangleBar",middleColor:"#8abbed"}},n}return T(n,t),n.prototype.match=function(t){return t.isNormal&&!t.isManuallyScheduled&&x(t)},n}(u),h=function(t){function n(){var n=t.call(this,"milestone")||this;return n.style={taskbarStyle:{startColor:"#636363",startShape:"diamond",startType:"solid",rightText:"finish"}},n}return T(n,t),n.prototype.match=function(t){return t.isMilestone&&!t.isManuallyScheduled},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),a=function(t){function n(){var n=t.call(this,"summary")||this;return n.style={taskbarStyle:{startColor:"#545454",startShape:"lineShape",startType:"solid",middleColor:"#545454",middlePattern:"solidFill",middleShape:"lineTop",endShape:"lineShape",endType:"solid",endColor:"#545454"}},n}return T(n,t),n.prototype.match=function(t){return t.isSummary&&t.taskNumber>0&&!t.isManuallyScheduled&&x(t)},n}(u),c=function(t){function n(){var n=t.call(this,"progress")||this;return n.style={taskbarStyle:{middleColor:"#3B87D4",middleShape:"rectangleMiddle",middlePattern:"solidFill"}},n}return T(n,t),n.prototype.match=function(t){return t.isNormal&&!t.isManuallyScheduled&&t.complete>0||t.hke},n.prototype.getScale=function(t){return t.complete},n}(u),f=function(t){function n(){var n=t.call(this,"projectSummary")||this;return n.style={taskbarStyle:{startColor:"#B6B6B6",startShape:"lineShape",startType:"solid",middleColor:"#B6B6B6",middlePattern:"solidFill",middleShape:"lineTop",endShape:"lineShape",endType:"solid",endColor:"#B6B6B6"}},n}return T(n,t),n.prototype.match=function(t){return 0===t.taskNumber&&x(t)},n}(u),l=function(t){function n(){var n=t.call(this,"manualTask")||this;return n.style={taskbarStyle:{startColor:"#2BA3AD",startShape:"lineShape",startType:"solid",middleColor:"#74CCD4",middlePattern:"solidFill",middleShape:"rectangleBar",endShape:"lineShape",endType:"solid",endColor:"#2BA3AD"}},n}return T(n,t),n.prototype.match=function(t){return t.isNormal&&t.isManuallyScheduled&&k(t)&&x(t)},n}(u),d=function(t){function n(){var n=t.call(this,"manualSummary")||this;return n.style={taskbarStyle:{startColor:"#545454",startShape:"lineShape",startType:"solid",middleColor:"#545454",middlePattern:"solidFill",middleShape:"lineTop",endShape:"lineShape",endType:"solid",endColor:"#545454"}},n}return T(n,t),n.prototype.match=function(t){return t.isSummary&&t.taskNumber>0&&t.isManuallyScheduled&&k(t)&&x(t)},n}(u),v=function(t){function n(){var n=t.call(this,"manualProgress")||this;return n.style={taskbarStyle:{middleColor:"#2BA3AD",middleShape:"rectangleMiddle",middlePattern:"solidFill"}},n}return T(n,t),n.prototype.match=function(t){return t.isNormal&&t.isManuallyScheduled&&t.complete>0},n.prototype.getToDate=function(t){return t.completeThrough},n}(u),A=function(t){function n(){var n=t.call(this,"manualMilestone")||this;return n.style={taskbarStyle:{startColor:"#2BA3AD",startShape:"diamond",startType:"solid",rightText:"finish"}},n}return T(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&k(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),g=function(t){function n(){var n=t.call(this,"durationOnly")||this;return n.style={taskbarStyle:{startColor:"#FFFFFF",startShape:"leftFade",startType:"solid",middleColor:"#74CCD4",middlePattern:"solidFill",middleShape:"rectangleBar",endShape:"rightFade",endType:"solid",endColor:"#FFFFFF"}},n}return T(n,t),n.prototype.match=function(t){return!t.isMilestone&&t.isManuallyScheduled&&S(t)&&x(t)},n}(u),b=function(t){function n(){var n=t.call(this,"startOnly")||this;return n.style={taskbarStyle:{startColor:"#2BA3AD",startShape:"leftBracket",startType:"solid"}},n}return T(n,t),n.prototype.match=function(t){return!t.isMilestone&&t.isManuallyScheduled&&M(t)},n.prototype.getToDate=function(t){return t.startDisplayed},n}(u),m=function(t){function n(){var n=t.call(this,"finishOnly")||this;return n.style={taskbarStyle:{endShape:"rightBracket",endType:"solid",endColor:"#2BA3AD"}},n}return T(n,t),n.prototype.match=function(t){return!t.isMilestone&&t.isManuallyScheduled&&_(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),p=function(t){function n(){var n=t.call(this,"durationOnlyMilestone")||this;return n.style={taskbarStyle:{startColor:"#CED9E8",startShape:"diamond",startType:"solid",rightText:"finishDisplayed"}},n}return T(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&S(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),y=function(t){function n(){var n=t.call(this,"startOnlyMilestone")||this;return n.style={taskbarStyle:{startColor:"#CED9E8",startShape:"diamond",startType:"solid",rightText:"start"}},n}return T(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&M(t)},n.prototype.getToDate=function(t){return t.startDisplayed},n}(u),w=function(t){function n(){var n=t.call(this,"finishOnlyMilestone")||this;return n.style={taskbarStyle:{startColor:"#CED9E8",startShape:"diamond",startType:"solid",rightText:"finish"}},n}return T(n,t),n.prototype.match=function(t){return t.isMilestone&&t.isManuallyScheduled&&_(t)},n.prototype.getFromDate=function(t){return t.finishDisplayed},n}(u),j=function(){function t(t){this.uAi=t,this.uAi.Lmi.attach(this.invalidateTextStates,this),this.qK=new e.Collection([new o,new h,new a,new f,new l,new A,new g,new d,new b,new m,new p,new y,new w,new c,new v]),this.qK.nji.attach(this.onRulesChanged,this)}return Object.defineProperty(t.prototype,"rules",{get:function(){return this.qK},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTopText",{get:function(){return this.getTextStates().hasTopText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasLeftText",{get:function(){return this.getTextStates().hasLeftText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasBottomText",{get:function(){return this.getTextStates().hasBottomText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasRightText",{get:function(){return this.getTextStates().hasRightText},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasInsideText",{get:function(){return this.getTextStates().hasInsideText},enumerable:!1,configurable:!0}),t.prototype.getBarStyleRuleForTask=function(t){var n=this,i=this.getMatchedRulesForTask(t);return i.map((function(i){var e=i.name,s=i.match,r=i.getFromDate,u=i.getToDate,o=i.getScale,h=t.style?t.style[i.name]:null,a=n.mergeStyle(h,i.style);return{name:e,match:s,getFromDate:r,getToDate:u,getScale:o,style:a}}))},t.prototype.mergeStyle=function(t,n){return{taskbarStyle:this.mergeCustomToRuleStyle(null==t?void 0:t.taskbarStyle,null==n?void 0:n.taskbarStyle),gridStyle:this.mergeCustomToRuleStyle(null==t?void 0:t.gridStyle,null==n?void 0:n.gridStyle)}},t.prototype.mergeCustomToRuleStyle=function(t,n){var i,e=Object.assign({},t||{},n||{});if(!r(t))for(i in t)r(t[i])||(e[i]=t[i]);return e},t.prototype.getMatchedRulesForTask=function(t){return this.rules.all().filter((function(n){return n.match(t)}))},t.prototype.onRulesChanged=function(){this.eji=null,this.uAi.Rmi.invoke()},t.prototype.invalidateTextStates=function(){this.eji=null},t.prototype.getTextStates=function(){if(r(this.eji)){var t=this.getAllStyles();this.eji={hasTopText:t.some((function(t){var n;return!!(null===(n=null==t?void 0:t.taskbarStyle)||void 0===n?void 0:n.topText)})),hasBottomText:t.some((function(t){var n;return!!(null===(n=null==t?void 0:t.taskbarStyle)||void 0===n?void 0:n.bottomText)})),hasRightText:t.some((function(t){var n;return!!(null===(n=null==t?void 0:t.taskbarStyle)||void 0===n?void 0:n.rightText)})),hasLeftText:t.some((function(t){var n;return!!(null===(n=null==t?void 0:t.taskbarStyle)||void 0===n?void 0:n.leftText)})),hasInsideText:t.some((function(t){var n;return!!(null===(n=null==t?void 0:t.taskbarStyle)||void 0===n?void 0:n.insideText)}))}}return this.eji},t.prototype.getAllStyles=function(){var t=[];return this.uAi.Vp.forEach((function(n){var i,e=n.getBarStyleRules()[0];e&&(i=e.style)&&t.push(i)})),(t=t.concat(this.rules.all().map((function(t){return t.style})))).filter((function(t){return!!t}))},t}(),n.TaskbarStyleManager=j},"./dist/plugins/gantt/utils/foundation.js":function(t,n,i){var e,s,r,u;Object.defineProperty(n,"__esModule",{value:!0}),n.Collection=n.EventList=void 0,e=i("Common"),s=e.Common.lt.ht,r=function(){function t(){var t=this;this.invoke=function(){var n=arguments;s(t.sji)||t.sji.forEach((function(t){return t.handler.apply(t.target,n)}))},this.invokeSome=function(){var n=arguments;return!s(t.sji)&&t.sji.some((function(t){return t.handler.apply(t.target,n)}))}}return t.prototype.attach=function(t,n){this.sji=this.sji||[],this.sji.push({handler:t,target:n})},t.prototype.detach=function(t){if(this.sji){var n=this.sji.map((function(t){return t.handler})).indexOf(t);n>=0&&this.sji.splice(n,1)}},t}(),n.EventList=r,u=function(){function t(t){this.nji=new r,this.inner=t||[]}return t.prototype.add=function(t){this.dki(this.inner.length,t)},t.prototype.insert=function(t,n){this.dki(t,n)},t.prototype.remove=function(t){var n=this.getIndexByItem(t);this.gki(n)},t.prototype.removeAt=function(t){this.gki(t)},t.prototype.getItemAt=function(t){return this.inner[t]},t.prototype.getRule=function(t){var n,i,e;for(n=0,i=this.inner;n<i.length;n++)if((e=i[n]).name&&e.name===t)return e;return null},t.prototype.setItemAt=function(t,n){this.bki(t,n)},t.prototype.clear=function(){this.vki()},Object.defineProperty(t.prototype,"length",{get:function(){return this.inner.length},enumerable:!1,configurable:!0}),t.prototype.getIndexByItem=function(t){return this.inner.indexOf(t)},t.prototype.all=function(){return this.inner},t.prototype.dki=function(t,n){this.inner.splice(t,0,n),this.Aki()},t.prototype.gki=function(t){this.inner.splice(t,1),this.Aki()},t.prototype.vki=function(){this.inner=[],this.Aki()},t.prototype.bki=function(t,n){this.inner[t]=n,this.Aki()},t.prototype.Aki=function(){this.nji.invoke()},t.prototype.toJSON=function(){var t,n,i,e=[];for(t=0,n=this.inner;t<n.length;t++)i=n[t],e.push(i.toJSON());return e},t.prototype.fromJSON=function(t){var n,i,e,s;for(n=0,i=t;n<i.length;n++)(e=i[n]).name&&this.getRule(e.name)&&(s=this.getRule(e.name)).fromJSON&&"function"==typeof s.fromJSON&&s.fromJSON(e)},t}(),n.Collection=u},"./dist/plugins/gantt/utils/mapping.js":function(t,n,i){var e,s;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttMapping=void 0,e=i("./dist/plugins/gantt/utils/util.js"),s=function(){function t(t){this.project=t}return t.prototype.getDefaultMapping=function(t,n){var i=this,e=n?n.dateFormat:null;return"taskNumber"===t||"level"===t?[t,null,function(t){return i.parseInt(t)},null]:"name"===t||"predecessors"===t||"successors"===t?[t,null,null,null]:"start"===t||"finish"===t?[t,null,function(t){return i.parseDate(t,e)},null]:"duration"===t?["duration",null,function(t){return i.parseDuration(t)},null]:"mode"===t?[t,null,function(t){return i.parseMode(t)},null]:"isMilestone"===t?["isMilestone",null,function(t){return i.parseBoolean(t)},null]:"complete"===t?["complete",null,function(t){return i.parseFloat(t)},null]:void 0},t.prototype.parseFloat=function(t){return e.ValueHelper.parseNumber(t,!1)},t.prototype.parseInt=function(t){return e.ValueHelper.parseNumber(t,!0)},t.prototype.formatInt=function(t){return e.ValueHelper.formatNumber(t)},t.prototype.parseDate=function(t,n,i){return e.ValueHelper.parseDate(t,n,i)},t.prototype.formatDate=function(t,n,i){return e.ValueHelper.formatDate(t,n,i)},t.prototype.parseDuration=function(t){return this.project.parseDuration(t)},t.prototype.formatDuration=function(t){return this.project.formatDuration(t)},t.prototype.parseBoolean=function(t){return e.ValueHelper.parseBoolean(t,!0)},t.prototype.formatBoolean=function(t){return e.ValueHelper.formatBoolean(t)},t.prototype.parseMode=function(t){return e.ValueHelper.parseStringEnumValues(t,["Auto","Manual"])},t.prototype.formatMode=function(t){return e.ValueHelper.parseStringEnumValues(t,["Auto","Manual"])},t}(),n.GanttMapping=s},"./dist/plugins/gantt/utils/util.js":function(t,n,i){var e,s,r,u,o,h,a,c=this&&this.iJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,s=n.length,r;e<s;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.ValueHelper=n.GanttUtil=n.DefaultDateFormatter=void 0,e=i("Common"),s=i("./dist/plugins/gantt/project/dependency.js"),r=i("./dist/plugins/gantt/gantt-sheet.js"),u=e.Common.lt.ht,o=function(t){return isNaN(t.valueOf())},n.DefaultDateFormatter="yyyy/mm/dd hh:mm",h=function(){function t(){}return t.range=function(t,n){var i,e=new Array(n);for(i=0;i<n;i++)e[i]=t+i;return e},t.repeat=function(t,n){var i,e=new Array(n);for(i=0;i<n;i++)e[i]=t;return e},t.convertIndexToRange=function(t){var n,i,e,s,r,u=c([],t,!0);for(u.sort((function(t,n){return t-n})),n=[],i=null,e=0,s=u;e<s.length;e++)r=s[e],i&&r===i[0]+i[1]?i[1]++:(i=[r,1],n.push(i));return n},t.encodeHtml=function(t){if(!t)return"";var n=document.createElement("div");return n.innerText=t,n.innerHTML},t.fixPixelAlignment=function(t,n,i,e){return t%1==0&&(t+=.5),n%1==0&&(n+=.5),i%1!=0&&(i=Math.floor(i)),e%1!=0&&(e=Math.floor(e)),{x:t,y:n,w:i,h:e}},t.getSelectedTasks=function(t){var n,i,e,s,r=[],u=t.getSelections();for(n=0;n<u.length;n++)for(e=(i=u[n]).row;e<i.row+i.rowCount;e++)(s=t.getTaskByRow(e))&&r.push(s);return r},t.getSelectedTaskNumbers=function(t){var n,i,e,s,r=[],u=t.getSelections();for(n=0;n<u.length;n++)for(e=(i=u[n]).row;e<i.row+i.rowCount;e++)(s=t.getTaskByRow(e))&&r.push(s.taskNumber);return r},t.getSelectedRowIndexes=function(t){var n,i,e,s=[],r=t.getSelections();for(n=0;n<r.length;n++)for(e=(i=r[n]).row;e<i.row+i.rowCount;e++)s.push(e);return s},t.getGanttSheet=function(t){var n=t.getActiveSheetTab();if(n&&n instanceof r.GanttSheet)return n},t.uki=function(t){return/^\/OADate\(\d+(\.\d+)?\)\//.test(t)},t.traverseChildren=function(t,n){var i,e,s,r=t.children;if(r&&r.length>0)for(i=0,e=r;i<e.length;i++)s=e[i],n&&(n(s),this.traverseChildren(s,n))},t}(),n.GanttUtil=h,a=function(){function t(){}return t.parseBoolean=function(t,n){return"boolean"==typeof t?t:("string"==typeof t&&(t=this.parseStringEnumValues(t,["true","false"],[!0,!1])),n&&null==t?t:!!t)},t.formatBoolean=function(t){return t?"true":"false"},t.parseNumber=function(t,n){var i=NaN;if("string"==typeof t?i=n?parseInt(t,10):parseFloat(t):"number"==typeof t&&(i=t),!isNaN(i))return i},t.formatNumber=function(t){if("number"==typeof t){if(isNaN(t))return;return t.toString()}},t.parseDate=function(t,i,s){var r,u=null;if(t instanceof Date&&(u=t),"string"==typeof t&&(i||(i=n.DefaultDateFormatter),u=(r=new e.Formatter.GeneralFormatter(i,s)).parse(t)),u&&u instanceof Date&&!o(u))return u},t.formatDate=function(t,i,s){return!t||isNaN(t.valueOf())?null:(i||(i=n.DefaultDateFormatter),new e.Formatter.GeneralFormatter(i,s).format(t));var r},t.parseString=function(t){return"string"==typeof t?t:u(t)?"":"function"==typeof t.toString?t.toString():void 0},t.parseStringEnumValues=function(t,n,i){var e,s=this.parseString(t);if(!u(s))for(e=0;e<n.length;e++)if(s.toLowerCase()===n[e].toLowerCase())return(i||n)[e]},t.compareString=function(t,n,i){var e,s;return void 0===i&&(i=!0),e=this.parseString(t),s=this.parseString(n),i?e.toLowerCase()===s.toLowerCase():e===s},t.compareTaskDependency=function(t,n){var i,e,r,o,h,a,c,f,l,d,v,A="string"==typeof t?t:null,g="string"==typeof n?n:null,b=u(A)||0===A.length,m=u(g)||0===g.length;if(b)return m?0:-1;if(m)return 1;for(i=s.TaskDependency.parseText(A),e=s.TaskDependency.parseText(g),r=0;r<Math.max(i.length,e.length);r++){if(u(i[r]))return-1;if(u(e[r]))return 1;if(h=(o=i[r]).taskNumber,a=o.type,f=(c=e[r]).taskNumber,l=c.type,h!==f)return h-f;if((d="FS"===a?"":a)!==(v="FS"===l?"":l))return d<v?-1:1}return 0},t}(),n.ValueHelper=a},Common:function(n){n.exports=t.Spread},ContextMenu:function(n){n.exports=t.Spread.Sheets.ContextMenu},Core:function(n){n.exports=t.Spread.Sheets},Filters:function(n){n.exports=t.Spread.Sheets.Filter},FloatingObject:function(n){n.exports=t.Spread.Sheets.FloatingObjects},TableSheet:function(n){n.exports=t.Spread.Sheets.TableSheet}},e={};function s(t){var n,r=e[t];return void 0!==r?r.exports:(n=e[t]={exports:{}},i[t].call(n.exports,n,n.exports,s),n.exports)}n=s("./dist/plugins/gantt/gantt.entry.js"),(((t=void 0===t?{}:t).Spread=t.Spread||{}).Sheets=t.Spread.Sheets||{}).GanttSheet=n}(),t.Spread.Common.CultureManager.reloadResources&&t.Spread.Common.CultureManager.reloadResources("GanttSheet")}));