UNPKG

@mescius/spread-sheets-ganttsheet

Version:

SpreadJS GanttSheet Plugin

12 lines 317 kB
/*! * * SpreadJS Library 19.1.0 * * Copyright(c) MESCIUS inc. All rights reserved. * * Licensed under the SpreadJS Commercial License. * us.sales@mescius.com * https://developer.mescius.com/spreadjs * */ !function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("@mescius/spread-sheets")):"function"==typeof define&&define.amd?define(["@mescius/spread-sheets"],t):"object"==typeof exports?exports.Spread=t(require("@mescius/spread-sheets")):t(GC)}((function(t){!function(){"use strict";var n,i={179:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d=this&&this.vJr||(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(){return{canUndo:!1,execute:function(t,n){var i,s,h,a,c,f=(0,e._f)(t,n.sheetName);return!!(f&&t.jg().name()===n.sheetName&&f.NMi instanceof r.GanttSheet)&&(i=n.row,s=n.col,(u(i)||u(s))&&(n.row=i=f.getActiveRowIndex(),n.col=s=f.getActiveColumnIndex()),h=n.sheetArea,u(h)&&(n.sheetArea=h=3),(a=f.$go(i,s,h))instanceof o&&(f.showCell(i,s,e.VerticalPosition.nearest,e.HorizontalPosition.nearest),(c=new A(f.NMi,n)).open(i),!0))}}}Object.defineProperty(n,"__esModule",{value:!0}),n.TaskResourcesCellType=void 0,e=i(1376),r=i(5392),s=i(7234),u=s.Common.lt.ht,o=function(t){function n(){var n=t.call(this)||this;return n.typeName="104",n}return d(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",v=window.gcGlobal,A=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,r;if(!this.rf){if(n=this.lAi.getTaskByRow(t),e=(i=this.project.host.getDataView()).gLt.primaryKey(),r=n.getDataValue(e),u(r))return!1;v.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(),v.cf()}}},t.prototype.gAi=function(){var t,n=this.LEt.row,i=this.LEt.col,e=this.LEt.sheetArea,r=this.sheet.Il(n,i,e).cellButtons;this.sheet&&r&&r.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,r,s,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",(r=document.createElement("input")).id="resource-".concat(u),r.type="checkbox",r.style.marginLeft="5px",r.style.marginRight="5px",r.setAttribute(a,u.toString()||""),h.indexOf(u.toString())>-1&&(r.checked=!0),e.appendChild(r),(s=document.createElement("span")).innerText="".concat(o||""),this.setTextSpanEllipsis(s),e.appendChild(s),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,r=document.documentElement,s=(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0),u=(window.pageYOffset||r.scrollTop)-(r.clientTop||0);this.Ti.style.left="".concat(t.x-(e?-s:i.left),"px"),this.Ti.style.top="".concat(t.y-(e?-u:i.top),"px")},t.prototype.calculateDropDownLocation=function(){var t,n,i,r=new e.Rect(0,0,window.innerWidth,window.innerHeight),s=this.getTargetRect(),u=s.x+s.width,o=s.y,h=s.y+s.height,a=r.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>r.width?i.x=0:(i.x=Math.max(i.x,0),i.x=Math.min(i.x,r.width-i.width)),i.height>r.height?i.y=0:(i.y=Math.max(i.y,0),i.y=Math.min(i.y,r.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 r,s=parseInt(i.getAttribute(a));n[s]?e.push(n[s]):(r=t.project.resourcesManager.getResourcesById(s),e.push(r.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,m())}})},237:function(t,n,i){var e,r,s,u,o,h,a,c=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.TaskDependencyMap=n.TaskDependency=void 0,e=i(7234),r=i(8869),s=new e.Common.ResourceManager(r.SR,"GanttSheet"),u=s.getResource.bind(s),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,r=this,s=+t;return isNaN(s)?(e=t.split(",")).map((function(t){var e,s,o;if(e=+(t=t.trim()),!isNaN(e))return r.createParseResult(e,n,i);if(!(s=t.match(r.DEPENDENCY_REGEX)))throw new Error(u().GANTT_INVALID_DEPENDENCY);return e=+s[1],o=s[2]?s[2].toUpperCase():"FS",r.createParseResult(e,n,i,o)})):[this.createParseResult(s,n,i)]},t.createParseResult=function(n,i,e,r){if(void 0===r&&(r="FS"),!i)return{taskNumber:n,type:r};var s=i.project.getTask(n);if(!s)throw new Error(u().GANTT_INVALID_DEPENDENCY);return e?new t(s,i,r):new t(i,s,r)},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,r,s,u,o,h,a,f;for(i=0,e=t;i<e.length;i++)if(r=e[i],!1===this.validateMembership(r))return!1;if(s=c([],this.dependencies,!0),n&&n.length>0){for(u=0,o=n;u<o.length;u++)(h=o[u]).iyi=!0;for(s=s.filter((function(t){return!t})),a=0,f=n;a<f.length;a++)delete(h=f[a]).iyi}return this.validateCircle(c(c([],s,!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,r=t.to;if(r.isSummary&&("SF"===t.type||"FF"===t.type))return!1;for(n=e.level>r.level?e:r,i=e.level>r.level?r: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=[],r=this.project.count<<1,s=[];for(n=0;n<r;n++)if(!i[n])for(s.push([n,-1]);s.length;)if(!1===this.dfs(t,i,e,s))return!1;return!0},t.prototype.buildDependencyMap=function(t){var n,i,e,r=this.initDependencyMap();for(n=0,i=t;n<i.length;n++)if(e=i[n],!1===this.buildDependencyMapLine(r,e.from,e.to))return null;return r},t.prototype.initDependencyMap=function(){var t,n,i,e,r,s,u,h,a=[];for(t=0;t<this.project.count;t++)if(n=this.project.getTask(t),!o(n)){for(r=[e=(i=n.taskNumber<<1)+1],a[i]=r,s=0,u=n.Fpi();s<u.length;s++)h=u[s],r.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),r=i.taskNumber<<1,s=t[e];if(s){if(s.indexOf(r)>=0)return!1}else s=[],t[e]=s;return s.push(r),!0},t.prototype.dfs=function(t,n,i,e){var r,s=e[e.length-1],u=s[0],o=s[1];if(-1===o){if(n[u])return!i[u]&&(e.pop(),!0);n[u]=!0,i[u]=!0}return o++,(r=t[u])&&o<r.length?(e[e.length-1][1]=o,e.push([r[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,r=n.from.viewIndex,s=n.to.viewIndex;for(i=Math.min(r,s);i<=Math.max(r,s);i++)e=t.getRowData(i,!0),i===r?e.startLines.push(n):i===s?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},649:function(t,n,i){var e,r;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttUIOptions=void 0,e=i(2749),r=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=r},670:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y;Object.defineProperty(n,"__esModule",{value:!0}),n.Timescale=n.NonWorkingTimeStyle=n.TimescaleTier=void 0,e=i(7234),r=i(1376),s=i(2749),u=i(7350),o=i(3018),h=i(4627),a=i(8869),c=i(1220),f=new e.Common.ResourceManager(a.SR,"GanttSheet"),l=f.getResource.bind(f),v=e.Common.lt.ht,A=r.q.Wt,d=32,b=[{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}"]}],m=function(){function t(){}return t.buildFormatter=function(t){var n=this;return t?function(i,r){for(var s,o,h,a,c=t;s=c.match(n.searchExpReg);)o=s[0],h=s[1],a=s[2],c=c.replace(o,n.getReplaceValue(h,a,u.Calendar.localToUTC(i),r));return new e.Formatter.GeneralFormatter(c).format(i)}:function(){return""}},t.getDefaultFormatter=function(t){var n,i=this.defaultFormatter[t];return v(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,r,s=t.getUTCDay()-i.calendarSettings.weekStartOn;return s<0&&(s+=7),e=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-s)),r=Math.floor(u.Calendar.diffDaysUtc(e,n)/7),this.fixDiffCount(r)},t.calcDiff_day=function(t,n){var i=864e5,e=Math.floor(t.valueOf()/i),r=Math.floor(n.valueOf()/i),s=r-e;return this.fixDiffCount(s)},t.calcDiff_hour=function(t,n){var i=36e5,e=Math.floor(t.valueOf()/i),r=Math.floor(n.valueOf()/i),s=r-e;return this.fixDiffCount(s)},t.calcDiff_minute=function(t,n){var i=6e4,e=Math.floor(t.valueOf()/i),r=Math.floor(n.valueOf()/i),s=r-e;return this.fixDiffCount(s)},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,r=new Date(Date.UTC(t.getUTCFullYear(),0,1)),s=e-r.getUTCDay();return s<0&&(s+=7),s<4?r.setUTCDate(r.getUTCDate()+s):r.setUTCDate(r.getUTCDate()+s-7),i=u.Calendar.diffDaysUtc(r,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}(),g=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?m.buildFormatter(t):t,this.bbt=t,this.sft.Pyi()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realFormatter",{get:function(){return v(this.Hyi)?m.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 s.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){s.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.TimescaleTier=g,w=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 s.GanttSheetJsonConverter.toJSON(this,this.IOProps)},t.prototype.fromJSON=function(t){s.GanttSheetJsonConverter.fromJSON(this,t,this.IOProps)},t}(),n.NonWorkingTimeStyle=w,y=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=d,this.IOProps=["topTier","middleTier","bottomTier","nonWorkingTime","tierMode","maxDate","minDate","pixelPerDay","autoFitMode","margin"],this.project=t,this.Byi=new g(this),this.Byi.unit=h.TimescaleUnit.days,this.Byi.labelAlign="Center",this.Iyi=new g(this),this.Iyi.unit=h.TimescaleUnit.weeks,this.Uyi=new g(this),this.Uyi.unit=h.TimescaleUnit.years,this.Lyi=new w(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 t.prototype.sns=function(){this.project.Wmi.invoke()},t.prototype.ins=function(){var t,n;this.sns(),null===(n=null===(t=this.project.host)||void 0===t?void 0:t.uns)||void 0===n||n.call(t)},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 u.Calendar.utcToLocal(this.Ryi)},set:function(t){var n,i=u.Calendar.localToUTC(t);(null===(n=this.Ryi)||void 0===n?void 0:n.valueOf())!==(null==i?void 0:i.valueOf())&&(this.Ryi=i,this.ins())},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 u.Calendar.utcToLocal(this.Fyi)},set:function(t){var n,i=u.Calendar.localToUTC(t);(null===(n=this.Fyi)||void 0===n?void 0:n.valueOf())!==(null==i?void 0:i.valueOf())&&(this.Fyi=i,this.ins())},enumerable:!1,configurable:!0}),t.prototype.ons=function(){var n=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier;return(0,c.getScrollbarRangeUtc)({minDateUtc:this.minDateUtc,maxDateUtc:this.maxDateUtc,margin:this.margin,autoFitMode:this.autoFitMode,pixelPerDay:this.Nyi,visibleSize:this.project.host?this.project.host.getTaskbarAreaVisibleSize():0,tierUnit:n.unit,tierCount:n.count,getDateUtcRange:this.getDateUtcRange.bind(this),dateUtcToUnitValue:this.dateUtcToUnitValue.bind(this),unitValueToDateUtc:this.unitValueToDateUtc.bind(this),millisecondsPerDay:t.millisecondsPerDay})},t.prototype.hns=function(t){var n=this.ons(),i=n.startDateUtc,e=n.maxCurrentDateUtc;return t<i?i:t>e?e:t},t.prototype.clampCurrentDateToRange=function(){if(!this.cyi)return!1;var t=this.hns(this.cyi);return t.valueOf()!==this.cyi.valueOf()&&(this.cyi=t,!0)},Object.defineProperty(t.prototype,"autoFitMode",{get:function(){var t;return null!==(t=this.zts)&&void 0!==t?t:"none"},set:function(t){if(this.zts="none"===t?void 0:t,"project"===t){var n=this.project.root;n&&n.start&&n.finish&&(this.Ryi=u.Calendar.localToUTC(n.start),this.Fyi=u.Calendar.localToUTC(n.finish))}this.ins()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){var t;return null!==(t=this._margin)&&void 0!==t?t:0},set:function(t){(isNaN(t)||t<0)&&(t=0),this._margin=0===t?void 0:t,this.ins()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollableMinDateUtc",{get:function(){var t,n,i=this.margin;return i<=0?this.minDateUtc:(t=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier,n=this.dateUtcToUnitValue(this.minDateUtc,t.unit),this.unitValueToDateUtc(n-i*t.count,t.unit))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollableMaxDateUtc",{get:function(){var n,i,e,r,s,u,o=this.maxDateUtc,a=this.margin;return a>0&&(n=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier,i=this.dateUtcToUnitValue(o,n.unit),o=this.unitValueToDateUtc(i+a*n.count,n.unit)),e=this.getDateUtcRange(o)[1],"none"!==this.autoFitMode&&(s=(r=this.project.host?this.project.host.getTaskbarAreaVisibleSize():0)/this.Nyi,(e=new Date(e.valueOf()-s*t.millisecondsPerDay))<(u=this.getDateUtcRange(this.scrollableMinDateUtc)[0])&&(e=u)),e},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.sns()},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/d},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleTopTierTextStyle",{get:function(){return this.MAi.topTierTextStyle},set:function(t){this.MAi.topTierTextStyle=t,this.sns()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleMiddleTierTextStyle",{get:function(){return this.MAi.middleTierTextStyle},set:function(t){this.MAi.middleTierTextStyle=t,this.sns()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timescaleBottomTierTextStyle",{get:function(){return this.MAi.bottomTierTextStyle},set:function(t){this.MAi.bottomTierTextStyle=t,this.sns()},enumerable:!1,configurable:!0}),t.prototype.update=function(t,n){if(!v(t)){if(isNaN(t.valueOf()))throw new Error(l().GANTT_INVALID_OPERATION);this.cyi=this.hns(t)}v(n)||(n=Math.min(n,65536),n=Math.max(n,1/32),this.Nyi=n),v(n)?this.sns():this.ins()},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,r,s;void 0===i&&(i=0),n&&(e=this.project.host?this.project.host.getTaskbarAreaVisibleSize():500,r=u.Calendar.localToUTC(n).valueOf()-e/this.pixelPerDay*t.millisecondsPerDay*i,s=this.getDateUtcRange(new Date(r))[0],this.update(s))},t.prototype.getDateUtcByOffset=function(t,n){var i,e,r;return i=n=n||this.currentDateUtc,0!==t&&(e=t/this.pixelPerDay,r=Math.ceil(24*e*60*60*1e3),i=new Date(n.valueOf()+r)),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*d,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(d);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 r,s,o,h,a,c,f,l,v,A;void 0===e&&(e=!0),n.valueOf()!==i.valueOf()?(r=this.project.host?this.project.host.getTaskbarAreaVisibleSize():500,s=u.Calendar.localToUTC(n),o=u.Calendar.localToUTC(i),h=u.Calendar.diffDaysUtc(s,o),a=Math.ceil(r/h),e&&this.adjustTierUnit(a),c=this.getDateUtcRange(s)[0],f=this.getDateUtcRange(o)[1],l=r/u.Calendar.diffDaysUtc(c,f)*.9,v=s.valueOf()-r/a*t.millisecondsPerDay*.05,A=this.getDateUtcRange(new Date(v))[0],this.update(A,l)):this.scrollTo(n,.1)},t.prototype.adjustTierUnit=function(t){var n,i,e,r,s,u;try{for(this.Dyi=!0,r=0,s=0;s<b.length&&!(b[s].pixel>t);s++)r=s;(u=b[r])&&(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),r=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,r)}v(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),r=A(e,"16px Calibri");return(r=1.5*r+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,r;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 r=(e=n.getUTCDate())>20?2:e>10?1:0,36*n.getUTCFullYear()+3*n.getUTCMonth()+r;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 r,s,u;return v(i)&&v(e)&&(i=(r=this.tierMode===h.TimescaleTierMode.middle?this.middleTier:this.bottomTier).unit,e=r.count),s=this.dateUtcToUnitValue(n,i),1===e?[this.unitValueToDateUtc(s,i),this.unitValueToDateUtc(s+1,i)]:(u=this.dateUtcToUnitValue(t.initialDateUtc,i),this.unitValueToDateUtc(u,i)<t.initialDateUtc&&u++,s=Math.floor((s-u)/e)*e+u,[this.unitValueToDateUtc(s,i),this.unitValueToDateUtc(s+e,i)])},t.prototype.Pyi=function(){this.iq&&!this.Dyi&&this.zoomAuto()},t.prototype.toJSON=function(){var t=s.GanttSheetJsonConverter.toJSON(this,this.IOProps);return"none"===t.autoFitMode&&delete t.autoFitMode,0===t.margin&&delete t.margin,t},t.prototype.fromJSON=function(t){this.iq=!1,s.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=y},1114:function(t,n,i){var e,r,s=this&&this.vJr||(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,r=function(t){function n(){var n=t.call(this)||this;return n.typeName="105",n}return s(n,t),n.prototype.cAi=function(t){return t.row},n.prototype.toJSON=function(){return{typeName:this.typeName}},n}((e=i(1376)).CellTypes.Text),n.TaskSubjectCellType=r,e.CellTypes.ti[105]=r},1220:function(t,n){function i(t){var n,i,e=t.minDateUtc,r=t.maxDateUtc,s=t.margin,u=t.tierUnit,o=t.tierCount,h=t.getDateUtcRange,a=t.dateUtcToUnitValue,c=t.unitValueToDateUtc,f=h(e)[0],l=h(r)[1];return s>0&&(n=a(f,u),i=a(l,u),f=c(n-s*o,u),l=c(i+s*o,u)),{startDateUtc:f,endDateUtc:l}}function e(t){var n,e=t.autoFitMode,r=t.visibleSize,s=t.pixelPerDay,u=t.millisecondsPerDay,o=i(t),h=o.startDateUtc,a=o.endDateUtc,c=a;return"none"!==e&&(n=r/s,(c=new Date(a.valueOf()-n*u))<h&&(c=h)),{startDateUtc:h,maxCurrentDateUtc:c}}Object.defineProperty(n,"__esModule",{value:!0}),n.getScrollbarRangeUtc=n.getScrollbarContentRangeUtc=void 0,n.getScrollbarContentRangeUtc=i,n.getScrollbarRangeUtc=e},1264:function(t,n,i){var e,r;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttMapping=void 0,e=i(4448),r=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=r},1376:function(n){n.exports=t.Spread.Sheets},1805:function(t,n,i){var e,r,s;Object.defineProperty(n,"__esModule",{value:!0}),n.GanttGridlines=void 0,e=i(2749),r=i(4627),s=function(){function t(t){this.IOProps=["topTierColumn","middleTierColumn","bottomTierColumn","currentDate","ganttRows","projectFinish","projectStart"],this.lAi=t,this.LAi={lineColor:"",lineType:r.GanttGridlineType.empty},this.PAi={lineColor:"#FFFFFF",lineType:r.GanttGridlineType.thin},this.HAi={lineColor:"",lineType:r.GanttGridlineType.empty},this.YAi={lineColor:"transparent",lineType:r.GanttGridlineType.thin},this.QAi={lineColor:"#8BBF8A",lineType:r.GanttGridlineType.thin},this.WAi={lineColor:"#808080",lineType:r.GanttGridlineType.dotted},this.GAi={lineColor:"#808080",lineType:r.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,s=t.intervalLineType;return i===r.GanttGridlineType.empty&&(n="transparent",i=r.GanttGridlineType.thin),s===r.GanttGridlineType.empty&&(e="transparent",s=r.GanttGridlineType.thin),{lineColor:n,lineType:i,intervalLineColor:e,intervalLineType:s}},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=s},2187:function(t,n,i){var e,r,s,u,o,h,a,c,f,l,v,A,d,b,m,g,w,y,p,T,O,S=this&&this.mJr||function(){return S=Object.assign||function(t){var n,i,e,r;for(i=1,e=arguments.length;i<e;i++)for(r in n=arguments[i])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},S.apply(this,arguments)},k=this&&this.yJr||function(t,n,i){if(i||2===arguments.length)for(var e=0,r=n.length,s;e<r;e++)!s&&e in n||(s||(s=Array.prototype.slice.call(n,0,e)),s[e]=n[e]);return t.concat(s||Array.prototype.slice.call(n))};Object.defineProperty(n,"__esModule",{value:!0}),n.Project=void 0,e=i(5909),r=i(4448),s=i(237),u=i(670),o=i(7350),h=i(6985),a=i(6324),c=i(8943),f=i(7632),l=i(4627),v=i(2749),A=i(7234),d=i(8869),b=i(4924),m=i(3099),g=new A.Common.ResourceManager(d.SR,"GanttSheet"),w=g.getResource.bind(g),y=A.Common.lt.ht,p=A.Common.lt.tv,T="currentSortState",O=function(){function t(t){var n,i,r=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 b.ResourcesManager(this),this.syi=o.Calendar.standard,this.ryi=new o.CalendarSettings,this.ryi.propertyChanged.attach((function(){r.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 s.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(w().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 k([],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 k([],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=p(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=[],r=this.count,s=t===l.TasksChangeAction.Renumber;for(n=0;n<r;n++)i=s?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,r=0!=