@dlhsoft/ganttcharthyperlibrary
Version:
Gantt Chart library for JavaScript and TypeScript with Angular, React, and Vue extensions
97 lines • 86.8 kB
JavaScript
var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.PertChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.20.21",copyright:"Copyright \u00a9 2012-2025 DlhSoft",title:"Project Data PERT Chart HTML Controls",description:"Project Data PERT Chart related HTML client components"});
DlhSoft.buildReleaseDate=function(m,I,L){m=new Date(m,I-1,L);return m>DlhSoft.buildReleaseDate?m:DlhSoft.buildReleaseDate}(2025,6,28);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{");
void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var m=_0x5c25[1],I=_0x5c25[2],L=[],R=[],$=_0x5c25[3],S=function(H,z){if(typeof H!==I||typeof z!==I)return!1;if(z==$)return!0;var M=z[_0x5c25[11]](_0x5c25[10]);if(0<=M){var E=z[_0x5c25[12]](0,M),u,B=E[_0x5c25[11]](_0x5c25[10]);if(0<=B)try{u=new Date(parseInt(E[_0x5c25[12]](B+1)))}catch(y){}typeof u===m&&(u=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>u)return!1;E=E+_0x5c25[10]+H;for(i=u=0;i<E[_0x5c25[5]];i++)B=E[_0x5c25[14]](i),u=(u<<5)-
u+B,u&=u;0>u&&(u=Math[_0x5c25[15]](2,32)-u);E=u.toString(16)[_0x5c25[16]]();M=z[_0x5c25[12]](M+1);if(E==M)return!0}return!1},aa=function(H,z,I,E,u){var B=_0x5c25[17],y=_0x5c25[18],J=typeof ComponentSource===m||!ComponentSource?y+_0x5c25[19]+E+_0x5c25[20]+u:_0x5c25[21],L=E+_0x5c25[22]+u+_0x5c25[23],A=_0x5c25[24],F=_0x5c25[25],C=_0x5c25[26];setTimeout(function(){var m=H[_0x5c25[27]],u=m[_0x5c25[29]](_0x5c25[28]);u[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var y=m[_0x5c25[29]](_0x5c25[28]);y[_0x5c25[32]](_0x5c25[30],
_0x5c25[33]);var w=m[_0x5c25[29]](_0x5c25[28]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);y[_0x5c25[35]](w);w[_0x5c25[35]](m[_0x5c25[36]](B));y[_0x5c25[35]](m[_0x5c25[36]](A+_0x5c25[10]));w=m[_0x5c25[29]](_0x5c25[28]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);w[_0x5c25[35]](m[_0x5c25[36]](z));y[_0x5c25[35]](w);y[_0x5c25[35]](m[_0x5c25[36]](F+_0x5c25[10]));w=m[_0x5c25[29]](_0x5c25[28]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);w[_0x5c25[35]](m[_0x5c25[36]](L));y[_0x5c25[35]](w);y[_0x5c25[35]](m[_0x5c25[36]](C+
_0x5c25[10]));w=m[_0x5c25[29]](_0x5c25[28]);w[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var D=m[_0x5c25[29]](_0x5c25[39]);D[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);D[_0x5c25[32]](_0x5c25[41],J);D[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);D[_0x5c25[35]](m[_0x5c25[36]](_0x5c25[44]));w[_0x5c25[35]](D);D=m[_0x5c25[29]](_0x5c25[39]);D[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);D[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);D[_0x5c25[35]](m[_0x5c25[36]](_0x5c25[47]));D[_0x5c25[50]](_0x5c25[48],function(){H[_0x5c25[49]](u);R[_0x5c25[7]](I)},
!1);w[_0x5c25[35]](D);y[_0x5c25[35]](w);u[_0x5c25[35]](y);H[_0x5c25[35]](u)},0);setTimeout(function(){alert(B+_0x5c25[51]+A+_0x5c25[52]+z+_0x5c25[51]+F+_0x5c25[53]+L+_0x5c25[51]+C+_0x5c25[4])},600000)};return{setLicense:function(m,z){L[_0x5c25[7]]({type:m,content:z})},validate:function(H,z,M,E,u,B,y){for(var z=z+_0x5c25[4]+M,J=0;J<R[_0x5c25[5]];J++)if(R[J]==z)return;a:if(typeof B!==I&&typeof y!==m&&(y[_0x5c25[6]]!==m&&(B=y[_0x5c25[6]]),typeof y===I&&(B=y)),typeof B!==I)for(y=0;y<L[_0x5c25[5]];y++)if(J=
L[y],J[_0x5c25[8]]==z&&typeof J[_0x5c25[9]]===I){B=J[_0x5c25[9]];break a}S(z,B)?H[_0x5c25[6]]=B:aa(H,M,z,E,u)}}}());void 0==DlhSoft.Controls&&(DlhSoft.Controls={});void 0==DlhSoft.Controls.Pert&&(DlhSoft.Controls.Pert={});
void 0==DlhSoft.Controls.Pert.PertChartView&&(DlhSoft.Controls.Pert.PertChartView=function(){var m=function(b,g,d,a,j){b.internalEventListeners&&b.internalEventListeners.push({object:g,event:d,handler:a,useCapture:j});return a},I=function(b,g,d,a){var j=["DlhSoft.Controls.Pert","PertChartView","DlhSoft.ProjectData.PertChart.HTML.Controls","5","validate","Licensing"];DlhSoft[j[5]][j[4]](b,j[0],j[1],j[2],j[3],a,d);b.isInitializing=true;if(typeof b.initializedItems!=="undefined"){b.initializedItems.forEach(function(a){a.chartItemArea&&
a.chartItemArea.parentNode&&a.chartItemArea.parentNode.removeChild(a.chartItemArea);delete a.pertChartView;delete a.chartItem;delete a.chartItemArea});typeof b.draggableItems!=="undefined"&&delete b.draggableItems}b.initializedItems=g.slice();b.internalEventListeners&&b.internalEventListeners.forEach(function(a){a.object.removeEventListener(a.event,a.handler,a.useCapture)});b.internalEventListeners=[];if(typeof b.items!=="undefined")for(a=0;a<b.items.length;a++)delete b.items[a].successors;typeof d!==
"object"&&(d={});S(g,d);$(d,g,b);U(b,g,d);aa(g);var c=E(b,g,d),e=b.ownerDocument,a=e.createElement("div");a.setAttribute("style","font-family: "+(d.classic?"Arial":"system-ui, Arial")+"; font-size: "+(d.classic?"small":"12px")+"; overflow: auto");j=e.createElement("div");typeof d.containerClass!=="undefined"?j.setAttribute("class",d.containerClass):j.setAttribute("class","dlh-pertchartview-container");typeof d.containerStyle!=="undefined"&&j.setAttribute("style",d.containerStyle);a.appendChild(j);
var f=e.createElement("div");f.setAttribute("style","border: solid 1px "+d.border+"; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; overflow: hidden");j.appendChild(f);j=e.createElement("div");j.setAttribute("style","overflow: auto");f.appendChild(j);var h=e.createElement("div");h.setAttribute("style","overflow: "+(typeof d.isExport==="undefined"||!d.isExport?"auto":"hidden")+
"; height: "+c);j.appendChild(h);var f=y(g,d),t=J(g,d),l=e.createElement("div");l.setAttribute("style","float: left; overflow: hidden; width: "+f+"px; height: "+t+"px");h.appendChild(l);c=e.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("style","width: "+f+"px; height: "+t+"px");f=d.styleDefinitionTemplate();c.appendChild(f);c.chartAreaDefinitions=f;f=function(){setTimeout(function(){try{var a=l.chartArea,c=a.chartAreaDefinitions;a.removeChild(c);a.childNodes.length>0?a.insertBefore(c,
a.childNodes[0]):a.appendChild(c)}catch(j){}},0)};c.addEventListener("mousedown",m(b,c,"mousedown",f,true),true);e.addEventListener("mouseup",m(b,e,"mouseup",f,true),true);l.appendChild(c);l.chartArea=c;var k;setTimeout(function(){k=b.clientHeight},0);typeof b.heightUpdateTimer!=="undefined"&&clearInterval(b.heightUpdateTimer);b.heightUpdateTimer=setInterval(function(){try{if(!(b.clientHeight<=0)){var a=b.clientHeight;if(a!=k){var c=E(b,g,d);h.style.height=c;k=a}}}catch(j){try{clearInterval(b.heightUpdateTimer)}catch(e){}}},
100);var n=function(a,c,j,f){var b;if(d.mouseHandler||d.mouseMoveHandler&&f=="mousemove"||d.mouseDownHandler&&f=="mousedown"||d.clickHandler&&f=="click"||d.doubleClickHandler&&f=="dblclick"){var h=a.which;!h&&a.button&&(a.button&1?h=1:a.button&4?h=2:a.button&2&&(h=3));b=j.getBoundingClientRect();var l=e.body,t=e.documentElement,j=b.left+(window.pageXOffset||t.scrollLeft||l.scrollLeft)-(t.clientLeft||l.clientLeft||0);b=Math.round(b.top+(window.pageYOffset||t.scrollTop||l.scrollTop)-(t.clientTop||l.clientTop||
0));j=Math.round(j);j=a.pageX-j;b=a.pageY-b;for(l=0;l<g.length;l++){var t=g[l],k=A(t,d),n=F(t,d);if(j>=k&&j<k+d.itemWidth&&b>=n&&b<n+d.itemHeight){d.mouseHandler&&d.mouseHandler(f,t,h,c,a);d.mouseMoveHandler&&f=="mousemove"&&d.mouseMoveHandler(t);d.mouseDownHandler&&f=="mousedown"&&d.mouseDownHandler(t,h);d.itemClickHandler&&f=="click"&&d.itemClickHandler(t);d.itemDoubleClickHandler&&f=="dblclick"&&d.itemDoubleClickHandler(t)}}}};l.addEventListener("mousemove",m(b,l,"mousemove",function(a){n(a,0,
l,"mousemove")}));l.addEventListener("mousedown",m(b,l,"mousedown",function(a){n(a,1,l,"mousedown")}));l.addEventListener("click",m(b,l,"click",function(a){n(a,1,l,"click")}));l.addEventListener("dblclick",m(b,l,"dblclick",function(a){n(a,2,l,"dblclick")}));l.addEventListener("click",m(b,l,"click",function(a){a.srcElement&&a.srcElement.nodeName!="rect"&&a.stopPropagation()},true),true);l.addEventListener("touchmove",m(b,l,"touchmove",function(a){b.draggingItem&&a.preventDefault()},true),true);l.container=
h;b.chartContainer=j;b.chartContent=l;b.chartContentContainer=h;h.isInitializing=true;ia(b,a);V(l,c,g,d);h.isInitializing=false;b.isInitializing=false;b.isInitialized=true;return b},L=function(b){I(b,b.items,b.settings,b.license)},R=function(b){if(typeof b.timeSpanFormatter==="undefined")b.timeSpanFormatter=B;if(typeof b.itemPropertyChangeHandler==="undefined")b.itemPropertyChangeHandler=function(){};if(typeof b.target==="undefined")b.target="Standard";if(typeof b.theme==="undefined")b.theme="Modern"},
$=function(b,g,d){R(b);if(typeof b.border==="undefined")switch(b.theme){default:b.border="#e0e0e0";break;case "ModernBordered":case "Aero":b.border="#9a9a9a"}if(typeof b.canUserRearrangeItems==="undefined")b.canUserRearrangeItems=true;if(typeof b.snapRearrangedItemsToGuidelines==="undefined")b.snapRearrangedItemsToGuidelines=true;if(typeof b.itemWidth==="undefined")b.itemWidth=40;if(typeof b.itemHeight==="undefined")b.itemHeight=40;if(typeof b.aspectRatio==="undefined")b.aspectRatio=1;if(typeof b.shapeWidth===
"undefined")b.shapeWidth=32;if(typeof b.shapeHeight==="undefined")b.shapeHeight=32;if(typeof b.styleDefinitionTemplate==="undefined")b.styleDefinitionTemplate=W(d,b);if(typeof b.dependencyTextBlockWidth==="undefined")b.dependencyTextBlockWidth=120;if(typeof b.shapeStyle==="undefined"&&b.shapeClass==null)b.shapeStyle="fill: White; stroke: #606060; stroke-width: 0.75px";if(typeof b.temporaryThumbStyle==="undefined"&&b.temporaryThumbClass==null)b.temporaryThumbStyle="fill: none; stroke: #0000ff; stroke-width: 0.65px; stroke-dasharray: 2, 2; ";
if(typeof b.dependencyLineStyle==="undefined"&&b.dependencyLineClass==null)b.dependencyLineStyle="stroke: "+(b.classic?"#8080FF":"#3b87d9")+"; stroke-width: 0.65px; fill: none; marker-end: url(#PertArrowMarker)";if(typeof b.virtualEffortDependencyLineStyle==="undefined"&&b.virtualEffortDependencyLineClass==null)b.virtualEffortDependencyLineStyle="stroke: "+(b.classic?"#8080FF":"#3b87d9")+"; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#PertArrowMarker)";if(typeof b.dependencyLineZoneStyle===
"undefined"&&b.dependencyLineZoneClass==null)b.dependencyLineZoneStyle="stroke: White; stroke-opacity: 0; stroke-width: 4px; fill: none";if(typeof b.taskEventTemplate==="undefined")b.taskEventTemplate=ba();if(typeof b.dependencyTextStyle==="undefined")b.dependencyTextStyle="color: #606060; text-anchor: middle";if(typeof b.chartMargin==="undefined")b.chartMargin=16;if(typeof b.isTaskEventToolTipVisible==="undefined")switch(b.target){default:b.isTaskEventToolTipVisible=true;break;case "Phone":b.isTaskEventToolTipVisible=
false}if(typeof b.itemTemplate==="undefined")b.itemTemplate=X(b);if(typeof b.dependencyLineTemplate==="undefined")b.dependencyLineTemplate=ja();if(typeof b.isDependencyToolTipVisible==="undefined")b.isDependencyToolTipVisible=b.isTaskEventToolTipVisible;if(typeof b.predecessorItemTemplate==="undefined")b.predecessorItemTemplate=ca(b);if(typeof b.useInlineToolTips==="undefined")b.useInlineToolTips=true;if(typeof b.useInlineToolTipsForDependencies==="undefined")b.useInlineToolTipsForDependencies=true},
S=function(b){for(var g=0;g<b.length;g++){var d=b[g];if(typeof d==="string"){d={content:d};b[g]=d}if(typeof d.predecessors!=="undefined"){if(typeof d.predecessors==="string")d.predecessors=d.predecessors.split(",");for(var a=0;a<d.predecessors.length;a++){var j=d.predecessors[a];if(typeof j==="string"){j={item:j};d.predecessors[a]=j}if(typeof j.item==="string"){var c=parseInt(j.item)-1;j.item=c>=0&&c<b.length?b[c]:null}if(typeof j.effort==="string")j.effort=parseFloat(j.effort)}}if(typeof d.displayedRowIndex!==
"undefined")d.actualRowIndex=d.displayedRowIndex;if(typeof d.displayedColumnIndex!=="undefined")d.actualColumnIndex=d.displayedColumnIndex;if(typeof d.actualRowIndex==="undefined")d.actualRowIndex=0;if(typeof d.actualColumnIndex==="undefined")d.actualColumnIndex=0}},aa=function(b){b.positionedItems=[];b.maxRowIndex=null;for(var g=0;g<b.length;g++){var d=b[g],a=b;if(typeof d.displayedRowIndex==="undefined"){var j;if(typeof d.predecessors!=="undefined"){j=a.positionedItems;for(var c=[],e=d.predecessors,
f=0;f<j.length;f++)for(var h=j[f],t=0;t<e.length;t++)if(e[t].item==h){c.push(h);break}j=c}else j=null;if(j!=null){c=j;e=[];for(f=0;f<c.length;f++){h=c[f].actualRowIndex;e.indexOf(h)<0&&e.push(h)}c=e}else c=null;c=c!=null&&c.length>0?P(c):a.maxRowIndex!=null?a.maxRowIndex+1:0;e=e=void 0;if(typeof d.displayedColumnIndex==="undefined"){e=H(a.positionedItems,c);e=e.length>0?P(e)+1:0;f=j!=null?H(j,c):null;if(f!=null&&f.length>0){h=null;for(t=0;t<f.length;t++)if(h==null||f[t]<h)h=f[t];f=h+1}else f=null;
if(f!=null&&f!=e){c++;j=j!=null?z(j):null;e=j!=null&&j.length>0?P(j)+1:0}for(d.actualColumnIndex=e;M(a.positionedItems,c,e);)c++}else for(;;c++){e=H(a.positionedItems,c);e=e.length>0?P(e)+1:0;if(e<=d.actualColumnIndex)break}d.actualRowIndex=c}else if(typeof d.displayedColumnIndex==="undefined"){j=z(a.positionedItems);d.actualColumnIndex=j.length>0?P(j)+1:0}a.positionedItems.push(d);if(a.maxRowIndex==null||d.actualRowIndex>a.maxRowIndex)a.maxRowIndex=d.actualRowIndex}},H=function(b,g){for(var d=[],
a=0;a<b.length;a++){var j=b[a];if(j.actualRowIndex==g){j=j.actualColumnIndex;d.indexOf(j)<0&&d.push(j)}}return d},z=function(b){for(var g=[],d=0;d<b.length;d++){var a=b[d].actualColumnIndex;g.indexOf(a)<0&&g.push(a)}return g},M=function(b,g,d){for(var a=0;a<b.length;a++){var j=b[a];if(j.actualRowIndex==g&&j.actualColumnIndex==d)return true}return false},E=function(b,g,d){var a;if(b.isContentHeightInitialized&&b.isContentHeightAuto)a=g.length>0?"auto":d.itemHeight+"px";else{var j=b.clientHeight-2;
j<0&&(j=0);a=j+"px";if(j<d.itemHeight){if(!b.isContentHeightInitialized)b.isContentHeightAuto=true;a=g.length>0?"auto":d.itemHeight+"px"}b.isContentHeightInitialized=true}return a},u=function(b,g){var d=b.createElement("span");d.innerHTML=g;return d},B=function(b){return Math.ceil(b/3600000*10000/100)/100+"h"},y=function(b,g){for(var d=0,a=0;a<b.length;a++)d=Math.max(d,b[a].actualColumnIndex);return g.itemWidth+d*(g.itemWidth+g.dependencyTextBlockWidth)+g.chartMargin*2},J=function(b,g){for(var d=
0,a=0;a<b.length;a++)d=Math.max(d,b[a].actualRowIndex);return g.itemHeight+d*(g.itemHeight+g.dependencyTextBlockWidth/g.aspectRatio)+g.chartMargin*2},V=function(b,g,d,a){for(b=0;b<d.length;b++){var j=d[b],c=A(j,a),e=F(j,a);g.appendChild(K(j,c,e,a))}},A=function(b,g){if(typeof b.displayedColumnIndex!=="undefined")b.actualColumnIndex=b.displayedColumnIndex;return Math.max(0,g.chartMargin+b.actualColumnIndex*(g.itemWidth+g.dependencyTextBlockWidth))},F=function(b,g){if(typeof b.displayedRowIndex!=="undefined")b.actualRowIndex=
b.displayedRowIndex;return Math.max(0,g.chartMargin+b.actualRowIndex*(g.itemHeight+g.dependencyTextBlockWidth/g.aspectRatio))},C=function(b){for(var g=[],d,a,j=0;j<b.length;j++){var c=b[j];if(typeof c.predecessors!=="undefined"&&c.predecessors.length>0)for(var e=0;e<c.predecessors.length;e++){var f=c.predecessors[e].item;if(typeof f!=="undefined"){d=true;for(a=0;a<g;a++)if(f==g[a]){d=false;break}if(d){O(f.chartItem,f,f.pertChartView.settings);d=A(f,f.pertChartView.settings);a=F(f,f.pertChartView.settings);
f.chartItem.setAttribute("transform","translate("+d+", "+a+")");g.push(f)}}}if(typeof c.predecessors!=="undefined"&&c.predecessors.length>0){d=true;for(a=0;a<g;a++)if(typeof c!=="undefined"&&c==g[a]){d=false;break}if(d){O(c.chartItem,c,c.pertChartView.settings);d=A(c,c.pertChartView.settings);a=F(c,c.pertChartView.settings);c.chartItem.setAttribute("transform","translate("+d+", "+a+")");g.push(c)}}}},K=function(b,g,d,a){var j=b.pertChartView.ownerDocument.createElementNS("http://www.w3.org/2000/svg",
"g");b.chartItem=j;j.setAttribute("style","-ms-touch-action: pinch-zoom; touch-action: pinch-zoom");j.setAttribute("transform","translate("+g+", "+d+")");O(j,b,a);return j},O=function(b,g,d){for(var a=b.childNodes.length;a-- >0;)b.removeChild(b.childNodes[a]);if(typeof g.isShapeVisible==="undefined"||g.isShapeVisible){a=d.taskEventTemplate;if(typeof g.taskEventTemplate!=="undefined")a=g.taskEventTemplate;a=a(g);b.appendChild(a);if(typeof d.internalExtraTaskTemplate!=="undefined"){var j=d.internalExtraTaskTemplate(g);
j!=null&&b.appendChild(j)}if(typeof d.extraTaskEventTemplate!=="undefined"){j=d.extraTaskEventTemplate(g);j!=null&&b.appendChild(j)}if(d.isTaskEventToolTipVisible&&!d.useInlineToolTips){j=d.itemTemplate;if(typeof g.template!=="undefined")j=g.template;a.appendChild(j(g))}if(typeof g.predecessors!=="undefined")for(a=0;a<g.predecessors.length;a++){j=g.predecessors[a];if(!((typeof g.pertChartView==="undefined"||g.pertChartView.items.indexOf(j.item))<0)){var c=d.dependencyLineTemplate(g,j);c.predecessorIndex=
a;(function(a){c.addEventListener("click",m(g.pertChartView,c,"click",function(c){d.dependencyLineClickHandler&&d.dependencyLineClickHandler(a,g,c)}));c.addEventListener("dblclick",m(g.pertChartView,c,"dblclick",function(c){d.dependencyLineDoubleClickHandler&&d.dependencyLineDoubleClickHandler(a,g,c)}))})(j);b.appendChild(c);if(d.isDependencyToolTipVisible&&(!d.useInlineToolTips||!d.useInlineToolTipsForDependencies)){var e=d.predecessorItemTemplate;if(typeof j.template!=="undefined")e=j.template;
c.appendChild(e(g,j))}}}}},T=function(b){if(typeof b.isWaitingToRefreshChartItem==="undefined"){b.isWaitingToRefreshChartItem=true;setTimeout(function(){O(b.chartItem,b,b.pertChartView.settings);var g=A(b,b.pertChartView.settings),d=F(b,b.pertChartView.settings);b.chartItem.setAttribute("transform","translate("+g+", "+d+")");delete b.isWaitingToRefreshChartItem},0)}},w=function(b){T(b)},D=function(b){if(typeof b.isWaitingToRefreshPredecessorItems==="undefined"){b.isWaitingToRefreshPredecessorItems=
true;setTimeout(function(){C(b.pertChartView.items,b);delete b.isWaitingToRefreshPredecessorItems},0)}},da=function(b){if(typeof b.isWaitingToRefreshChartItem!=="undefined"||typeof b.isWaitingToRefreshPredecessorItems!=="undefined"){typeof b.isWaitingToRefreshChartItem==="undefined"&&T(b);typeof b.isWaitingToRefreshPredecessorItems==="undefined"&&D(b)}else{b.isWaitingToRefreshChartItem=true;b.isWaitingToRefreshPredecessorItems=true;setTimeout(function(){O(b.chartItem,b,b.pertChartView.settings);var g=
A(b,b.pertChartView.settings),d=F(b,b.pertChartView.settings);b.chartItem.setAttribute("transform","translate("+g+", "+d+")");C(b.pertChartView.items,b);delete b.isWaitingToRefreshChartItem;delete b.isWaitingToRefreshPredecessorItems},0)}},W=function(b,g){return function(){var d=b.ownerDocument,a=d.createElementNS("http://www.w3.org/2000/svg","defs"),j=d.createElementNS("http://www.w3.org/2000/svg","marker");j.setAttribute("id","PertArrowMarker");j.setAttribute("viewBox","0 0 10 10");j.setAttribute("refX",
"0");j.setAttribute("refY","5");j.setAttribute("markerUnits","strokeWidth");j.setAttribute("markerWidth","5");j.setAttribute("markerHeight","4");j.setAttribute("orient","auto");d=d.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("d","M 0 0 L 10 5 L 0 10 z");d.setAttribute("fill",g.arrowFill?g.arrowFill:g.theme=="Aero"?"Blue":"#8080ff");j.appendChild(d);a.appendChild(j);return a}},X=function(){return function(b){var g=b.pertChartView.ownerDocument,d=g.createElementNS("http://www.w3.org/2000/svg",
"title");d.appendChild(u(g,typeof b.content!=="undefined"?b.content:""));return d}},ka=function(b){var g=b.pertChartView.ownerDocument;if(typeof b.chartItemArea==="undefined")b.chartItemArea=g.createElementNS("http://www.w3.org/2000/svg","g");for(g=b.chartItemArea.childNodes.length;g-- >0;)b.chartItemArea.removeChild(b.chartItemArea.childNodes[g]);return b.chartItemArea},ba=function(b,g,d){return function(a){var j=typeof g!=="undefined"?g:a.pertChartView,c=typeof d!=="undefined"?d:j.settings,e=typeof b!==
"undefined"?b:j.items,f=j.ownerDocument,h=ka(a),t=(c.itemWidth-c.shapeWidth)/2,l=t+c.shapeWidth,k=(c.itemHeight-c.shapeHeight)/2,n=k+c.shapeHeight,s=c.shapeHeight,p,r=f.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("x",t);r.setAttribute("y",k);r.setAttribute("width",Math.max(0,l-t-1));r.setAttribute("height",Math.max(0,n-k-1));r.setAttribute("rx",c.shapeWidth/10);r.setAttribute("ry",c.shapeHeight/10);p=c.shapeClass;if(typeof a.shapeClass!=="undefined")p=a.shapeClass;if(typeof p!==
"undefined")r.setAttribute("class",p);else{r.setAttribute("class","dlh-pertchartview-bar");p=c.shapeStyle;if(typeof a.shapeStyle!=="undefined")p=a.shapeStyle;typeof p!=="undefined"&&r.setAttribute("style",p)}h.appendChild(r);h.addEventListener("mouseover",m(j,h,"mouseover",function(){var e=DlhSoft.Controls.ToolTip.get(r);e||(e=DlhSoft.Controls.ToolTip.initialize(void 0,r,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+
c.border+"; background-color: White; color: Black; font-family: "+(c.classic?"Arial":"system-ui, Arial")+"; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));e.setContent(c.itemTemplate(a).innerHTML.replaceAll("\n","<br/>"));e.show();j.toolTip=e}));h.addEventListener("mouseout",m(j,h,"mouseout",function(){var a=j.toolTip;a.disable();a.hide()}));p=f.createElementNS("http://www.w3.org/2000/svg",
"text");p.setAttribute("x",(t+l)/2);p.setAttribute("y",n-s*1.5/8-6);p.setAttribute("style","font-weight: bold; text-anchor: middle");s=a.displayedText;typeof s==="undefined"&&(s="");p.appendChild(f.createTextNode(s));h.appendChild(p);if(c.canUserRearrangeItems){f=f.createElementNS("http://www.w3.org/2000/svg","rect");f.setAttribute("x",t);f.setAttribute("y",k);f.setAttribute("width",Math.max(0,l-t-1));f.setAttribute("height",Math.max(0,n-k-1));f.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");
h.appendChild(f);la(f,a,e,A(a,c),F(a,c),j,c)}return h}},ja=function(b,g){return function(d,a){var j=d.pertChartView,c=typeof g!=="undefined"?g:j.settings,e=typeof b!=="undefined"?b:j.items,f=j.ownerDocument,h=f.createElementNS("http://www.w3.org/2000/svg","g"),t={x:void 0,y:void 0},e=ma(d,a,e,c,t),l=f.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",e);typeof c.dependencyLineZoneClass!=="undefined"?l.setAttribute("class",c.dependencyLineZoneClass):l.setAttribute("class","dlh-pertchartview-dependencylinezone");
typeof c.dependencyLineZoneStyle!=="undefined"&&l.setAttribute("style",c.dependencyLineZoneStyle);h.appendChild(l);var k=f.createElementNS("http://www.w3.org/2000/svg","path");k.setAttribute("d",e);if(typeof a.isEffortVirtual!=="undefined"?!a.isEffortVirtual:typeof a.effort!=="undefined"&&a.effort>0){e=c.dependencyLineClass;if(typeof a.dependencyLineClass!=="undefined")e=a.dependencyLineClass;typeof e!=="undefined"?k.setAttribute("class",e):k.setAttribute("class","dlhsoft-pertchartview-polyline");
e=c.dependencyLineStyle;if(typeof a.dependencyLineStyle!=="undefined")e=a.dependencyLineStyle}else{e=c.virtualEffortDependencyLineClass;if(typeof a.virtualEffortDependencyLineClass!=="undefined")e=a.virtualEffortDependencyLineClass;typeof e!=="undefined"?k.setAttribute("class",e):k.setAttribute("class","dlhsoft-pertchartview-polyline");e=c.virtualEffortDependencyLineStyle;if(typeof a.virtualEffortDependencyLineStyle!=="undefined")e=a.virtualEffortDependencyLineStyle}typeof e!=="undefined"&&k.setAttribute("style",
e);h.appendChild(k);if(c.isDependencyToolTipVisible&&c.useInlineToolTips&&c.useInlineToolTipsForDependencies){h.addEventListener("mouseover",m(j,h,"mouseover",function(e){var f=c.predecessorItemTemplate(d,a).innerHTML.replaceAll("\n","<br/>");if(!(f==""||f=="<span></span>")){(f=DlhSoft.Controls.ToolTip.get(k))||(f=DlhSoft.Controls.ToolTip.initialize(void 0,k,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+
c.border+"; background-color: White; color: Black; font-family: "+(c.classic?"Arial":"system-ui, Arial")+"; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));f.setContent(c.predecessorItemTemplate(d,a).innerHTML.replaceAll("\n","<br/>"));f.show();var b=h.getBoundingClientRect();f.setHorizontalPosition(f.x+e.clientX-b.left);f.setVerticalPosition(f.y+e.clientY-b.bottom+
10);j.toolTip=f}}));h.addEventListener("mouseout",m(j,h,"mouseout",function(){var a=j.toolTip;a.disable();a.hide()}))}e=f.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("x",t.x);e.setAttribute("y",t.y-6);t=c.dependencyTextClass;if(typeof a.dependencyTextClass!=="undefined")t=a.dependencyTextClass;typeof t!=="undefined"?e.setAttribute("class",t):e.setAttribute("class","dlh-pertchartview-text");t=c.dependencyTextStyle;if(typeof a.dependencyTextStyle!=="undefined")t=a.dependencyTextStyle;
e.setAttribute("style",t);t=a.displayedText;typeof t==="undefined"&&(t="");e.appendChild(f.createTextNode(t));h.appendChild(e);return h}},ca=function(){return function(b,g){var d=b.pertChartView.ownerDocument,a=d.createElementNS("http://www.w3.org/2000/svg","title");a.appendChild(u(d,typeof g.content!=="undefined"?g.content:""));return a}},ma=function(b,g,d,a,j){var d="M ",c=A(b,a)-2,e=F(b,a)-2,f=A(g.item,a),g=F(g.item,a),h=A(b,a),b=F(b,a),t=Math.abs(h-f),l=Math.abs(b-g),k=a.shapeWidth+2,a=a.shapeHeight+
2,n=k/2,s=a/2,p=Math.max(k,a);if(t<p)d=g<=b?d+(f+n-c+","+(g+a-e))+(" L "+(h+n-c)+","+(b-e)):d+(f+n-c+","+(g-e))+(" L "+(h+n-c)+","+(b+a-e));else{d=f<=h?d+(f+k-c+","+(g+s-e)):d+(f-c+","+(g+s-e));d=l<p*4?f<=h?d+(" L "+(h-c)+","+(b+s-e)):d+(" L "+(h+k-c)+","+(b+s-e)):g<=b?d+(" L "+(h+n-c)+","+(b-e)):d+(" L "+(h+n-c)+","+(b+a-e))}j.x=((f<=h?f:h)+(f>=h?f:h))/2+n-c;j.y=((g<=b?g:b)+(g>=b?g:b))/2+s-e;return d},Q=function(b,g,d,a){typeof b.pertChartView!=="undefined"&&b.pertChartView.settings.itemPropertyChangeHandler(b,
g,d,a)},la=function(b,g,d,a,j,c,e){function f(f){c.draggingItem=g;c.dragType="Position";c.style.cursor=b.style.cursor;c.draggingInitialX=f.clientX;c.draggingInitialY=f.clientY;c.draggingInitialThumbXPosition=a;c.draggingInitialThumbYPosition=j}b.addEventListener("mousedown",m(c,b,"mousedown",function(a){if(a.button==0){f(a);a.preventDefault()}},true),true);b.addEventListener("touchstart",m(c,b,"touchstart",function(a){f(a.touches[0]);a.preventDefault()},true),true);if(typeof c.draggableItems==="undefined")c.draggableItems=
[];for(var h=false,t=0;t<c.draggableItems.length;t++)if(c.draggableItems[t]==g){h=true;break}if(!h){var l=function(a){if(!(typeof c.draggingItem==="undefined"||c.draggingItem!=g||c.dragType!="Position")){var j=a.clientX-c.draggingInitialX,f=a.clientY-c.draggingInitialY;var b=a.clientX,h=c;if(typeof h.draggingItem!=="undefined"){var l=new Date;if(!h.lastXDraggingTime||!(l>h.lastXDraggingTime&&l-h.lastXDraggingTime<200)){h.lastXDraggingTime=l;var l=h,t=0;if(l.offsetParent){do{t=t+l.offsetLeft;l=l.offsetParent}while(l)
}b=b-t;if(b<24){b=h.chartContentContainer.scrollLeft;h.chartContentContainer.scrollLeft=h.chartContentContainer.scrollLeft-48;b=b-h.chartContentContainer.scrollLeft;if(typeof h.draggingInitialThumbXPosition!=="undefined")h.draggingInitialThumbXPosition=h.draggingInitialThumbXPosition-b}else if(b>=h.chartContentContainer.clientWidth-24){b=h.chartContentContainer.scrollLeft;h.chartContentContainer.scrollLeft=h.chartContentContainer.scrollLeft+48;b=h.chartContentContainer.scrollLeft-b;if(typeof h.draggingInitialThumbXPosition!==
"undefined")h.draggingInitialThumbXPosition=h.draggingInitialThumbXPosition+b}}}h=a.clientY;a=c;if(typeof a.draggingItem!=="undefined"){b=new Date;if(!a.lastYDraggingTime||!(b>a.lastYDraggingTime&&b-a.lastYDraggingTime<200)){a.lastYDraggingTime=b;b=a;l=0;if(b.offsetParent){do{l=l+b.offsetTop;b=b.offsetParent}while(b)}h=h-l;if(h<24){h=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop-48;h=h-a.chartContentContainer.scrollTop;if(typeof a.draggingInitialThumbYPosition!==
"undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition-h}else if(h>=a.chartContentContainer.clientHeight-24){h=a.chartContentContainer.scrollTop;a.chartContentContainer.scrollTop=a.chartContentContainer.scrollTop+48;h=a.chartContentContainer.scrollTop-h;if(typeof a.draggingInitialThumbYPosition!=="undefined")a.draggingInitialThumbYPosition=a.draggingInitialThumbYPosition+h}}}delete c.draggingItem;c.draggingInitialThumbXPosition+j<0&&(j=-c.draggingInitialThumbXPosition);c.draggingInitialThumbYPosition+
f<0&&(f=-c.draggingInitialThumbYPosition);a=g;f=(c.draggingInitialThumbYPosition+f-e.chartMargin)/(e.itemHeight+e.dependencyTextBlockWidth/e.aspectRatio);e.snapRearrangedItemsToGuidelines&&(f=Math.round(f));a.actualRowIndex=f;f=g;j=(c.draggingInitialThumbXPosition+j-e.chartMargin)/(e.itemWidth+e.dependencyTextBlockWidth);e.snapRearrangedItemsToGuidelines&&(j=Math.round(j));f.actualColumnIndex=j;Q(g,"actualRowIndex",true,false);Q(g,"actualColumnIndex",true,false);typeof g.displayedColumnIndex!=="undefined"&&
delete g.displayedColumnIndex;typeof g.displayedRowIndex!=="undefined"&&delete g.displayedRowIndex;N(g,d,c.chartContent,e,false);c.draggingItem=g;c.draggingPerformed=true}};c.addEventListener("mousemove",m(c,c,"mousemove",function(a){l(a)},true),true);c.addEventListener("touchmove",m(c,c,"touchmove",function(a){l(a.touches[0])},true),true);var k=function(){if(!(typeof c.draggingItem==="undefined"||c.draggingItem!=g||c.dragType!="Position")){N(g,d,c.chartContent,e,true);var a=c.draggingItem;delete c.draggingItem;
c.style.cursor="default";if(c.draggingPerformed){Q(a,"actualColumnIndex",true,true);Q(a,"actualRowIndex",true,true);delete c.draggingPerformed}}};document.addEventListener("mouseup",m(c,document,"mouseup",function(a){a.button==0&&k()},true),true);document.addEventListener("touchend",m(c,document,"touchend",function(){k()},true),true);c.draggableItems.push(g)}},N=function(b,g,d,a,j){var c=b.pertChartView.ownerDocument;if(j){if(typeof d.temporaryRectangle!=="undefined"){j=d.chartArea;j.removeChild(d.temporaryRectangle);
delete d.temporaryRectangle}setTimeout(function(){O(b.chartItem,b,a);e=A(b,a);f=F(b,a);b.chartItem.setAttribute("transform","translate("+e+", "+f+")");C(g,b);setTimeout(function(){ea(d,g,a,true)},0)})}else{if(typeof d.temporaryRectangle!=="undefined")c=d.temporaryRectangle;else{c=c.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("x",0);c.setAttribute("y",0);c.setAttribute("width",a.shapeWidth);c.setAttribute("height",a.shapeHeight);c.setAttribute("rx",a.shapeWidth/10);c.setAttribute("ry",
a.shapeHeight/10);typeof a.temporaryThumbClass!=="undefined"?c.setAttribute("class",a.temporaryThumbClass):c.setAttribute("class","dlh-pertchartview-temporarythumb");c.setAttribute("style",a.temporaryThumbStyle);d.temporaryRectangle=c;j=d.chartArea;j.appendChild(c)}var e=A(b,a)+(a.itemWidth-a.shapeWidth)/2,f=F(b,a)+(a.itemHeight-a.shapeHeight)/2;c.setAttribute("transform","translate("+e+", "+f+")");setTimeout(function(){ea(d,g,a,false)},0)}},ea=function(b,g,d,a){var j=y(g,d),g=J(g,d);if(a||j>b.clientWidth)b.style.width=
j+"px";if(a||g>b.clientHeight)b.style.height=g+"px";b=b.chartArea;a?b.setAttribute("style","width: "+j+"px; height: "+g+"px"):b.setAttribute("style","width: "+Math.max(b.clientWidth,j)+"px; height: "+Math.max(b.clientHeight,g)+"px")},ia=function(b,g){for(var d=b.childNodes.length;d-- >0;)b.removeChild(b.childNodes[d]);b.appendChild(g)},na=function(b,g){for(var d in g)d.indexOf("custom")!=0&&d.indexOf("description")!=0||typeof b[d]==="undefined"&&(b[d]=g[d])},oa=function(b,g,d,a,j,c,e,f){var f={isExport:true,
canUserRearrangeItems:false,isTaskEventToolTipVisible:false,isDependencyToolTipVisible:false,containerClass:f.containerClass,containerStyle:f.containerStyle,border:f.border,theme:f.theme,itemWidth:f.itemWidth,itemHeight:f.itemHeight,aspectRatio:f.aspectRatio,shapeWidth:f.shapeWidth,shapeHeight:f.shapeHeight,shapeClass:f.shapeClass,shapeStyle:f.shapeStyle,shapeCornerRadius:f.shapeCornerRadius,dependencyTextStyle:f.dependencyTextStyle,dependencyLineClass:f.dependencyLineClass,dependencyLineStyle:f.dependencyLineStyle,
virtualEffortDependencyLineClass:f.virtualEffortDependencyLineClass,virtualEffortDependencyLineStyle:f.virtualEffortDependencyLineStyle,dependencyTextBlockWidth:f.dependencyTextBlockWidth,chartMargin:0,target:f.target,timeSpanFormatter:f.timeSpanFormatter,taskEventTemplate:f.taskEventTemplate,dependencyLineTemplate:f.dependencyLineTemplate,classic:f.classic},h=y(e,f),t=J(e,f);f.chartWidth=h+"px";f.chartHeight=t+"px";var l=h+2,h=t+2,k,n,s=false;if(d!=null&&typeof d.createElement!=="undefined")k=d;
else{if(d!=null&&typeof d.focus!=="undefined")n=d;else{n=window.open("",d!=null?d:"_blank",typeof a!=="undefined"&&a&&(typeof c==="undefined"||c)?"width=800,height=480,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":"");s=true}k=n.document;try{for(var p=document.head.getElementsByTagName("link"),d=0;d<p.length;d++){var r=p[d],o=k.adoptNode(r.cloneNode(true));o.href=r.href;k.head.appendChild(o)}}catch(v){}}k.title=typeof b!=="undefined"?b:"Exported chart"+(typeof a!=="undefined"&&a?" (printable)":
"");b=[];for(d=0;d<e.length;d++){p=e[d];r={content:p.content,displayedText:p.displayedText,isShapeVisible:p.isShapeVisible,shapeClass:p.shapeClass,shapeStyle:p.shapeStyle,dependencyTextStyle:p.dependencyTextStyle,displayedRowIndex:p.actualRowIndex,displayedColumnIndex:p.actualColumnIndex,isExported:true};na(r,p);b.push(r);p.exportItem=r}for(d=0;d<e.length;d++){p=e[d];r=p.exportItem;if(typeof p.predecessors!=="undefined"){r.predecessors=[];for(o=0;o<p.predecessors.length;o++){t=p.predecessors[o];r.predecessors.push({item:t.item.exportItem,
content:t.content,displayedText:t.displayedText,effort:t.effort,isEffortVirtual:t.isEffortVirtual,dependencyLineClass:t.dependencyLineClass,dependencyLineStyle:t.dependencyLineStyle,virtualEffortDependencyLineClass:t.virtualEffortDependencyLineClass,virtualEffortDependencyLineStyle:t.virtualEffortDependencyLineStyle,dependencyTextStyle:t.dependencyTextStyle})}}}var m=k.createElement("p");m.innerHTML=typeof g!=="undefined"?g:"";k.body.appendChild(m);var q=k.createElement("div");q.setAttribute("style",
"width: "+l+"px; height: "+h+"px");try{DlhSoft.Controls.Pert.PertChartView.initialize(q,b,f,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(qa){}setTimeout(function(){s&&k.body.setAttribute("style","margin: 0px");var f=k.createElement("div");f.appendChild(q);k.body.replaceChild(f,m);if(j){f.setAttribute("style","width: "+q.offsetHeight+"px; height: "+l+"px; overflow: hidden");f=Math.round((q.offsetWidth-
q.offsetHeight)/2);q.setAttribute("style","width: "+l+"px; transform: rotate(90deg) translateX("+f+"px) translateY("+f+"px); -webkit-transform: rotate(90deg) translateX("+f+"px) translateY("+f+"px)")}k.close();if(typeof n!==void 0){n.focus();typeof a!=="undefined"&&a&&setTimeout(function(){n.print();(typeof c==="undefined"||c)&&setTimeout(function(){n.close()})})}},0)},pa=function(b,g){for(var d=0;d<g.length;d++){var a=g[d];delete a.successorInfo;delete a.effortInfo}typeof b==="undefined"&&(b=0);
d=fa(g);if(d==null)return[];for(var d=[d],a=Y(b,g),j=0;j<a.length;j++)d.push(a[j].dependentItem);return d},Y=function(b,g){for(var d=0;d<g.length;d++){var a=g[d];delete a.successorInfo;delete a.effortInfo}var j=fa(g);if(j==null)return[];a:{for(d=g.length;d-- >0;){a=g[d];if(ga(a).length==0){d=a;break a}}d=null}if(d==null)return[];d=Z(j,d);j=[];for(a=0;a<d.length;a++)j.push(d[a]);for(d=0;d<g.length;d++){a=g[d];delete a.successorInfo;delete a.effortInfo}return j},Z=function(b,g){if(b==null||g==null||
b==g||typeof g.predecessors==="undefined")return[];var d=[],a=[],j,c=null;for(j=0;j<g.predecessors.length;j++){predecessorItem=g.predecessors[j];predecessorItem.dependentItem=g;if(typeof predecessorItem.item!=="undefined"){var e=ha(b,predecessorItem.item);if(e!=null){if((typeof predecessorItem.isEffortVirtual==="undefined"||!predecessorItem.isEffortVirtual)&&predecessorItem.effort>0)e=e+predecessorItem.effort;if(c==null||e>=c){if(c==null||e>c){c=e;a=[]}a.push(predecessorItem)}}}}for(j=0;j<a.length;j++){for(var c=
a[j],e=Z(b,c.item),f=0;f<e.length;f++)d.push(e[f]);d.push(c)}return d},fa=function(b){for(var g=0;g<b.length;g++){var d=b[g];if(typeof d.predecessors==="undefined"||d.predecessors.length==0)return d}return null},ha=function(b,g){if(b==null||g==null)return null;if(b==g)return 0;if(!b.effortInfo)b.effortInfo={};var d=g.index.toString();if(typeof b.effortInfo[d]!=="undefined")return b.effortInfo[d];for(var a=null,j=ga(b),c=0;c<j.length;c++){var e=j[c],f=ha(e.dependentItem,g);if(f!=null){f=f+((typeof predecessorItem.isEffortVirtual===
"undefined"||!predecessorItem.isEffortVirtual)&&e.predecessorItem.effort>0?e.predecessorItem.effort:0);f<0&&(f=0);if(a==null||f>a)a=f}}a!=null&&(b.effortInfo[d]=a);return a},ga=function(b){if(b.successorInfo)return b.successorInfo;for(var g=[],d=b.pertChartView.items,a=0;a<d.length;a++){var j=d[a];if(typeof j.predecessors!=="undefined")for(var c=0;c<j.predecessors.length;c++){var e=j.predecessors[c];typeof e.item!=="undefined"&&e.item==b&&g.push({dependentItem:j,predecessorItem:e})}}return b.successorInfo=
g},P=function(b){for(var g=null,d=0;d<b.length;d++)if(g==null||b[d]>g)g=b[d];return g},U=function(b,g,d){for(var a=0;a<g.length;a++){g[a].pertChartView=b;g[a].index=a}b.items=g;b.settings=d;b.refresh=function(){L(b)};b.refreshItems=function(){for(var a=0;a<g.length;a++){var c=g[a];T(c);D(c)}};b.refreshChartItems=function(){for(var a=0;a<g.length;a++)T(g[a])};b.refreshItem=w;b.refreshChartItem=T;b.refreshPredecessorItems=D;b.refreshItemGraph=da;b.scrollToItem=function(a){var c=A(a,d),e=c-a.pertChartView.chartContentContainer.scrollLeft;
if(e<0)a.pertChartView.chartContentContainer.scrollLeft=c;else if(e>a.pertChartView.chartContentContainer.clientWidth-a.pertChartView.settings.itemWidth)a.pertChartView.chartContentContainer.scrollLeft=c-(a.pertChartView.chartContentContainer.clientWidth-a.pertChartView.settings.itemWidth);c=F(a,d);e=c-a.pertChartView.chartContentContainer.scrollTop;if(e<0)a.pertChartView.chartContentContainer.scrollTop=c;else if(e>a.pertChartView.chartContentContainer.clientHeight-a.pertChartView.settings.itemHeight)a.pertChartView.chartContentContainer.scrollTop=
c-(a.pertChartView.chartContentContainer.clientHeight-a.pertChartView.settings.itemHeight)};b.scrollToLeft=function(){b.chartContentContainer.scrollLeft=0};b.scrollToRight=function(){b.chartContentContainer.scrollLeft=b.chartContent.clientWidth};b.scrollToTop=function(){b.chartContentContainer.scrollTop=0};b.scrollToBottom=function(){b.chartContentContainer.scrollTop=b.chartContent.clientHeight};b.getChartWidth=function(){return y(g,d)};b.getChartHeight=function(){return J(g,d)};b.getItemTop=function(a){return F(a,
d)};b.getItemLeft=function(a){return A(a,d)};b.onItemPropertyChanged=Q;b.initializeTasEventkDraggingThumbs=function(a,c,e,f){la(a,c,b.items,e,f,b,b.settings)};b.exportContent=function(a,c){typeof a==="undefined"&&(a={});oa(a.title,a.preparingMessage,c,false,a.rotate,false,g,d)};b.print=function(a){typeof a==="undefined"&&(a={});oa(a.title,a.preparingMessage,null,true,a.rotate,a.autoClose,g,d)};b.isItemCritical=function(a,c){return pa(c,g).indexOf(a)>=0};b.isDependencyCritical=function(a,c){return Y(c,
g).indexOf(a)>=0};b.getCriticalItems=function(a){return pa(a,g)};b.getCriticalDependencies=function(a){return Y(a,g)};b.repositionEnds=function(){if(g.length!=0){for(var a=false,c=0;c<g.length;c++){for(var e=g[c],f=0,b=0;b<g.length;b++){var d=g[b];if(typeof d.predecessors!=="undefined"){for(var l=0;l<d.predecessors.length;l++)if(typeof d.predecessors[l].item!=="undefined"&&d.predecessors[l].item==e){f++;if(f>1)break}if(f>1)break}}f>1&&(a=true)}c=g[0];c.displayedRowIndex=a?0.5:0;e=g[g.length-1];e.displayedRowIndex=
a?0.5:0;da(c);da(e)}}};return{initialize:I,initializeItems:S,refresh:L,getDefaultStyleDefinitionTemplate:W,getDefaultTaskEventTemplate:ba,getDefaultItemTemplate:X,getDefaultDependencyLineTemplate:ja,getDefaultPredecessorItemTemplate:ca,initializeTaskEventDraggingThumbs:function(b,g,d,a){g.pertChartView.initializeTaskEventDraggingThumbs(b,g,d,a)},defaultTimeSpanFormatter:B}}());
void 0==DlhSoft.Controls.Pert.NetworkDiagramView&&(DlhSoft.Controls.Pert.NetworkDiagramView=function(){var m=function(a,b,c,e,f){a.internalEventListeners&&a.internalEventListeners.push({object:b,event:c,handler:e,useCapture:f});return e},I=function(a,b,c,e){var f=["DlhSoft.Controls.Pert","NetworkDiagramView","DlhSoft.ProjectData.PertChart.HTML.Controls","5","validate","Licensing"];DlhSoft[f[5]][f[4]](a,f[0],f[1],f[2],f[3],e,c);a.isInitializing=true;if(typeof a.initializedItems!=="undefined"){a.initializedItems.forEach(function(a){a.chartItemArea&&
a.chartItemArea.parentNode&&a.chartItemArea.parentNode.removeChild(a.chartItemArea);delete a.networkDiagramView;delete a.chartItem;delete a.chartItemArea});typeof a.draggableItems!=="undefined"&&delete a.draggableItems}a.initializedItems=b.slice();a.internalEventListeners&&a.internalEventListeners.forEach(function(a){a.object.removeEventListener(a.event,a.handler,a.useCapture)});a.internalEventListeners=[];if(typeof a.items!=="undefined")for(e=0;e<a.items.length;e++)delete a.items[e].successors;typeof c!==
"object"&&(c={});S(b,c);$(c,b,a);d(a,b,c);J(b,c);aa(b);var h=E(a,b,c),g=a.ownerDocument,e=g.createElement("div");e.setAttribute("style","font-family: "+(c.classic?"Arial":"system-ui, Arial")+"; font-size: "+(c.classic?"small":"12px")+"; overflow: auto");f=g.createElement("div");typeof c.containerClass!=="undefined"?f.setAttribute("class",c.containerClass):f.setAttribute("class","dlh-networkdiagramview-container");typeof c.containerStyle!=="undefined"&&f.setAttribute("style",c.containerStyle);e.appendChild(f);
var l=g.createElement("div");l.setAttribute("style","border: solid 1px "+c.border+"; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; overflow: hidden");f.appendChild(l);f=g.createElement("div");f.setAttribute("style","overflow: auto");l.appendChild(f);var k=g.createElement("div");k.setAttribute("style","overflow: "+(typeof c.isExport==="undefined"||!c.isExport?"auto":"hidden")+
"; height: "+h);f.appendChild(k);var l=V(b,c),n=A(b,c),s=g.createElement("div");s.setAttribute("style","float: left; overflow: hidden; width: "+l+"px; height: "+n+"px");k.appendChild(s);h=g.createElementNS("http://www.w3.org/2000/svg","svg");h.setAttribute("style","width: "+l+"px; height: "+n+"px");l=c.styleDefinitionTemplate();h.appendChild(l);h.chartAreaDefinitions=l;l=function(){setTimeout(function(){try{var a=s.chartArea,c=a.chartAreaDefinitions;a.removeChild(c);a.childNodes.length>0?a.insertBefore(c,
a.childNodes[0]):a.appendChild(c)}catch(f){}},0)};h.addEventListener("mousedown",m(a,h,"mousedown",l,true),true);g.addEventListener("mouseup",m(a,g,"mouseup",l,true),true);s.appendChild(h);s.chartArea=h;var p;setTimeout(function(){p=a.clientHeight},0);typeof a.heightUpdateTimer!=="undefined"&&clearInterval(a.heightUpdateTimer);a.heightUpdateTimer=setInterval(function(){try{if(!(a.clientHeight<=0)){var f=a.clientHeight;if(f!=p){var e=E(a,b,c);k.style.height=e;p=f}}}catch(h){try{clearInterval(a.heightUpdateTimer)}catch(d){}}},
100);var r=function(a,f,e,h){var d;if(c.mouseHandler||c.mouseMoveHandler&&h=="mousemove"||c.mouseDownHandler&&h=="mousedown"||c.clickHandler&&h=="click"||c.doubleClickHandler&&h=="dblclick"){var l=a.which;!l&&a.button&&(a.button&1?l=1:a.button&4?l=2:a.button&2&&(l=3));d=e.getBoundingClientRect();var k=g.body,r=g.documentElement,e=d.left+(window.pageXOffset||r.scrollLeft||k.scrollLeft)-(r.clientLeft||k.clientLeft||0);d=Math.round(d.top+(window.pageYOffset||r.scrollTop||k.scrollTop)-(r.clientTop||k.clientTop||
0));e=Math.round(e);e=a.pageX-e;d=a.pageY-d;for(k=0;k<b.length;k++){var r=b[k],p=C(r,c),n=K(r,c);if(e>=p&&e<p+c.itemWidth&&d>=n&&d<n+c.itemHeight){c.mouseHandler&&c.mouseHandler(h,r,l,f,a);c.mouseMoveHandler&&h=="mousemove"&&c.mouseMoveHandler(r);c.mouseDownHandler&&h=="mousedown"&&c.mouseDownHandler(r,l);c.itemClickHandler&&h=="click"&&c.itemClickHandler(r);c.itemDoubleClickHandler&&h=="dblclick"&&c.itemDoubleClickHandler(r)}}}};s.addEventListener("mousemove",m(a,s,"mousemove",function(a){r(a,0,
s,"mousemove")}));s.addEventListener("mousedown",m(a,s,"mousedown",function(a){r(a,1,s,"mousedown")}));s.addEventListener("click",m(a,s,"click",function(a){r(a,1,s,"click")}));s.addEventListener("dblclick",m(a,s,"dblclick",function(a){r(a,2,s,"dblclick")}));s.addEventListener("click",m(a,s,"click",function(a){a.srcElement&&a.srcElement.nodeName!="rect"&&a.stopPropagation()},true),true);s.addEventListener("touchmove",m(a,s,"touchmove",function(c){a.draggingItem&&c.preventDefault()},true),true);s.container=
k;a.chartContainer=f;a.chartContent=s;a.chartContentContainer=k;k.isInitializing=true;oa(a,e);F(s,h,b,c);k.isInitializing=false;a.isInitializing=false;a.isInitialized=true;return a},L=function(a){I(a,a.items,a.settings,a.license)},R=function(a){if(typeof a.dateTimeFormatter==="undefined")a.dateTimeFormatter=B;if(typeof a.timeSpanFormatter==="undefined")a.timeSpanFormatter=y;if(typeof a.itemPropertyChangeHandler==="undefined")a.itemPropertyChangeHandler=function(){};if(typeof a.target==="undefined")a.target=
"Standard";if(typeof a.theme==="undefined")a.theme="Modern"},$=function(a,b,c){R(a);if(typeof a.border==="undefined")switch(a.theme){default:a.border="#e0e0e0";break;case "ModernBordered":case "Aero":a.border="#9a9a9a"}if(typeof a.canUserRearrangeItems==="undefined")a.canUserRearrangeItems=true;if(typeof a.snapRearrangedItemsToGuidelines==="undefined")a.snapRearrangedItemsToGuidelines=true;if(typeof a.itemWidth==="undefined")a.itemWidth=220;if(typeof a.itemHeight==="undefined")a.itemHeight=100;if(typeof a.aspectRatio===
"undefined")a.aspectRatio=1;if(typeof a.shapeWidth==="undefined")a.shapeWidth=212;if(typeof a.shapeHeight==="undefined")a.shapeHeight=92;if(typeof a.styleDefinitionTemplate==="undefined")a.styleDefinitionTemplate=ka(c,a);if(typeof a.shapeStyle==="undefined"&&a.shapeClass==null)a.shapeStyle="fill: White; stroke: "+(a.classic?"#0000ff":"#3b87d9")+"; stroke-width: 1px";if(typeof a.milestoneStyle==="undefined"&&a.milestoneClass==null)a.milestoneStyle="fill: White; stroke: "+(a.classic?"#000000":"#3b87d9")+
"; stroke-width: 1px";if(typeof a.temporaryThumbStyle==="undefined"&&a.temporaryThumbClass==null)a.temporaryThumbStyle="fill: none; stroke: #0000ff; stroke-width: 0.65px; stroke-dasharray: 2, 2; ";if(typeof a.dependencyLineStyle==="undefined"&&a.dependencyLineClass==null)a.dependencyLineStyle="stroke: "+(a.classic?"#8080FF":"#3b87d9")+"; stroke-width: 0.65px; fill: none; marker-end: url(#PertArrowMarker)";if(typeof a.dependencyLineZoneStyle==="undefined"&&a.dependencyLineZoneClass==null)a.dependencyLineZoneStyle=
"stroke: White; stroke-opacity: 0; stroke-width: 4px; fill: none";if(typeof a.taskTemplate==="undefined")a.taskTemplate=ca();if(typeof a.minDependencyLineLength==="undefined")a.minDependencyLineLength=48;if(typeof a.diagramMargin==="undefined")a.diagramMargin=16;if(typeof a.isTaskToolTipVisible==="undefined")switch(a.target){default:a.isTaskToolTipVisible=true;break;case "Phone":a.isTaskToolTipVisible=false}if(typeof a.itemTemplate==="undefined")a.itemTemplate=ba(a);if(typeof a.dependencyLineTemplate===
"undefined")a.dependencyLineTemplate=ma();if(typeof a.isDependencyToolTipVisible==="undefined")a.isDependencyToolTipVisible=a.isTaskToolTipVisible;if(typeof a.predecessorItemTemplate==="undefined")a.predecessorItemTemplate=Q(a);if(typeof a.useInlineToolTips==="undefined")a.useInlineToolTips=true;if(typeof a.useInlineToolTipsForDependencies==="undefined")a.useInlineToolTipsForDependencies=true},S=function(a,b){for(var c=new Date,e=0;e<a.length;e++){var f=a[e];if(typeof f==="string"){f={content:f};
a[e]=f}if(typeof f.earlyStart==="string"){try{f.earlyStart=Date.parse(f.earlyStart)}catch(h){f.earlyStart=new Date(parseInt(f.earlyStart))}if(typeof b.isRelativeToTimezone==="undefined"||b.isRelativeToTimezone)f.earlyStart=new Date(f.earlyStart.valueOf()+c.getTimezoneOffset()*60000)}if(typeof f.earlyFinish==="string"){try{f.earlyFinish=Date.parse(f.earlyFinish)}catch(d){f.earlyFinish=new Date(parseInt(f.earlyFinish))}if(typeof b.isRelativeToTimezone==="undefined"||b.isRelativeToTimezone)f.earlyFinish=
new Date(f.earlyFinish.valueOf()+c.getTimezoneO