/* @license dhtmlxGantt v.6.0.2 Professional This software is covered by DHTMLX Commercial License. Usage without proper license is prohibited. (c) Dinamenta, UAB. */!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/codebase/",i(i.s=145)}([function(t,e,i){var n,r=i(3);t.exports={copy:function t(e){var i,n;if(e&&"object"==typeof e)switch(!0){case r.isDate(e):n=new Date(e);break;case r.isArray(e):for(n=new Array(e.length),i=0;i=0}function a(t){return!{a:!0,area:!0}[t.nodeName.loLowerCase()]||!!t.getAttribute("href")}function s(t){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[t.nodeName.toLowerCase()]||!t.hasAttribute("disabled")}function o(t){if(!t)return"";var e=t.className||"";return e.baseVal&&(e=e.baseVal),e.indexOf||(e=""),d(e)}var l=document.createElement("div");function c(t){return t.tagName?t:(t=t||window.event).target||t.srcElement}function d(t){return(String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")}).apply(t)}t.exports={getNodePosition:i,getFocusableNodes:function(t){for(var e=t.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),i=Array.prototype.slice.call(e,0),o=0;o=0){if(!i)return n;var s=0===a||!d(r.charAt(a-1)),l=a+e.length>=r.length||!d(r.charAt(a+e.length));if(s&&l)return n}}n=n.parentNode}return null},locateAttribute:function(t,e){if(e){for(var i=c(t);i;){if(i.getAttribute&&i.getAttribute(e))return i;i=i.parentNode}return null}},getTargetNode:c,getRelativeEventPosition:function(t,e){var n=document.documentElement,r=i(e);return{x:t.clientX+n.scrollLeft-n.clientLeft-r.x+e.scrollLeft,y:t.clientY+n.scrollTop-n.clientTop-r.y+e.scrollTop}},isChildOf:function(t,e){if(!t||!e)return!1;for(;t&&t!=e;)t=t.parentNode;return t===e},hasClass:function(t,e){return"classList"in t?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}}},function(t,e){t.exports=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},function(t,e){var i={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3};function n(t,e){var i=[];if(t.filter)return t.filter(e);for(var n=0;nr.maxWidth&&(i=r.maxWidth),nr.maxHeight&&(n=r.maxHeight),this.setSize(i,n),this.$preResize,this.$preResize=!1},t.prototype.hide=function(){this._hide(!0),this.resize()},t.prototype.show=function(t){this._hide(!1),t&&this.$parent&&this.$parent.show(),this.resize()},t.prototype._hide=function(t){if(!0===t&&this.$view.parentNode)this.$view.parentNode.removeChild(this.$view);else if(!1===t&&!this.$view.parentNode){var e=this.$parent.cellIndex(this.$id);this.$parent.moveView(this,e)}this.$config.hidden=t},t.prototype.$toHTML=function(t,e){void 0===t&&(t=""),e=[e||"",this.$config.css||""].join(" ");var i=this.$config,n="";i.raw?t="string"==typeof i.raw?i.raw:"":(t||(t="
"+(i.html||"")+"
"),i.header&&(n="
"+(i.canCollapse?"
":"")+"
"+i.header+"
"));return"
"+n+t+"
"},t.prototype.$fill=function(t,e){this.$view=t,this.$parent=e,this.init()},t.prototype.getNode=function(){return this.$view.querySelector("gantt_layout_cell")||this.$view},t.prototype.init=function(){var t=this;this._headerClickHandler=function(e){a.locateAttribute(e,"data-cell-id")==t.$id&&t.toggle()},this.$gantt.$services.getService("mouseEvents").delegate("click","gantt_header_arrow",this._headerClickHandler),this.callEvent("onReady",[])},t.prototype.toggle=function(){this.$config.collapsed=!this.$config.collapsed,this.resize()},t.prototype.getSize=function(){var t={height:this.$config.height||0,width:this.$config.width||0,gravity:this.$config.gravity||1,minHeight:this.$config.minHeight||0,minWidth:this.$config.minWidth||0,maxHeight:this.$config.maxHeight||1e5,maxWidth:this.$config.maxWidth||1e5};if(this.$config.collapsed){var e="x"===this.$config.mode;t[e?"width":"height"]=t[e?"maxWidth":"maxHeight"]=this.$config.headerHeight}return t},t.prototype.getContentSize=function(){var t=this.$lastSize.contentX;t!==1*t&&(t=this.$lastSize.width);var e=this.$lastSize.contentY;return e!==1*e&&(e=this.$lastSize.height),{width:t,height:e}},t.prototype._getBorderSizes=function(){var t={top:0,right:0,bottom:0,left:0,horizontal:0,vertical:0};return this._currentBorders&&(this._currentBorders[this._borders.left]&&(t.left=1,t.horizontal++),this._currentBorders[this._borders.right]&&(t.right=1,t.horizontal++),this._currentBorders[this._borders.top]&&(t.top=1,t.vertical++),this._currentBorders[this._borders.bottom]&&(t.bottom=1,t.vertical++)),t},t.prototype.setSize=function(t,e){this.$view.style.width=t+"px",this.$view.style.height=e+"px";var i=this._getBorderSizes(),n=e-i.vertical,r=t-i.horizontal;this.$lastSize={x:t,y:e,contentX:r,contentY:n},this.$config.header?this._sizeHeader():this._sizeContent()},t.prototype._borders={left:"gantt_layout_cell_border_left",right:"gantt_layout_cell_border_right",top:"gantt_layout_cell_border_top",bottom:"gantt_layout_cell_border_bottom"},t.prototype._setBorders=function(t,e){e||(e=this);var i=e.$view;for(var n in this._borders)a.removeClassName(i,this._borders[n]);"string"==typeof t&&(t=[t]);var r={};for(n=0;n=0||navigator.userAgent.indexOf("Trident")>=0,isIE6:!window.XMLHttpRequest&&navigator.userAgent.indexOf("MSIE")>=0,isIE7:navigator.userAgent.indexOf("MSIE 7.0")>=0&&navigator.userAgent.indexOf("Trident")<0,isIE8:navigator.userAgent.indexOf("MSIE 8.0")>=0&&navigator.userAgent.indexOf("Trident")>=0,isOpera:navigator.userAgent.indexOf("Opera")>=0,isChrome:navigator.userAgent.indexOf("Chrome")>=0,isKHTML:navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0,isFF:navigator.userAgent.indexOf("Firefox")>=0,isIPad:navigator.userAgent.search(/iPad/gi)>=0,isEdge:-1!=navigator.userAgent.indexOf("Edge")};t.exports=i},,function(t,e,i){var n=i(2),r=i(20);t.exports=function(t){var e=i(5)(t);function a(){return e.apply(this,arguments)||this}return n(a,e),a.prototype.render=function(t){var e="
";return e+=r.getHtmlSelect(t.options,[{key:"style",value:"width:100%;"}]),e+="
"},a.prototype.set_value=function(t,e,i,n){var r=t.firstChild;!r._dhx_onchange&&n.onchange&&(r.onchange=n.onchange,r._dhx_onchange=!0),void 0===e&&(e=(r.options[0]||{}).value),r.value=e||""},a.prototype.get_value=function(t){return t.firstChild.value},a.prototype.focus=function(e){var i=e.firstChild;t._focus(i,!0)},a}},function(t,e,i){var n=i(0);t.exports={createDropTargetObject:function(t){var e={targetParent:null,targetIndex:0,targetId:null,child:!1,nextSibling:!1,prevSibling:!1};return t&&n.mixin(e,t,!0),e},nextSiblingTarget:function(t,e){var i=this.createDropTargetObject();return i.targetId=t,i.nextSibling=!0,i.targetParent=e.getParent(i.targetId),i.targetIndex=e.getBranchIndex(i.targetId)+1,i},prevSiblingTarget:function(t,e){var i=this.createDropTargetObject();return i.targetId=t,i.prevSibling=!0,i.targetParent=e.getParent(i.targetId),i.targetIndex=e.getBranchIndex(i.targetId),i},firstChildTarget:function(t,e){var i=this.createDropTargetObject();return i.targetId=t,i.targetParent=i.targetId,i.targetIndex=0,i.child=!0,i},lastChildTarget:function(t,e){var i=e.getChildren(t),n=this.createDropTargetObject();return n.targetId=i[i.length-1],n.targetParent=t,n.targetIndex=i.length,n.nextSibling=!0,n}}},function(t,e,i){var n=i(3);function r(t){var e=t.$gantt.$data.tasksStore,i="_attached_"+t.$config.rowStore.name;t[i]&&(e.detachEvent(t[i]),t[i]=null)}t.exports=function(t){var e=t.prototype.init,i=t.prototype.destructor;return{init:function(){e.apply(this,arguments),this._linkToTaskStore()},destructor:function(){r(this),i.apply(this,arguments)},_linkToTaskStore:function(){if(this.$config.rowStore&&this.$gantt.$data.tasksStore){var t=this.$gantt.$data.tasksStore,e=this.$config.rowStore;r(this);var i=this,a=n.delay(function(){i.$gantt.getState().lightbox?a():(i._updateNestedTasks(),e.refresh())},300),s="_attached_"+e.name;i[s]=t.attachEvent("onStoreUpdated",a)}},_updateNestedTasks:function(){var t=this.$gantt,e=t.getDatastore(t.config.resource_store);if(e.$config.fetchTasks){var i=t.config.resource_property;e.silent(function(){var n=[],r={},a={};for(var s in e.eachItem(function(s){"task"!=s.$role?t.getTaskBy(i,s.id).forEach(function(i){var a=t.copy(i);a.id=i.id+"_"+s.id,a.$task_id=i.id,a.$resource_id=s.id,a[e.$parentProperty]=s.id,a.$role="task",n.push(a),r[a.id]=!0}):a[s.id]=!0}),a)r[s]||e.removeItem(s);e.parse(n)})}}}}},function(t,e){t.exports=function(t){var e=[];return{delegate:function(i,n,r,a){e.push([i,n,r,a]),t.$services.getService("mouseEvents").delegate(i,n,r,a)},destructor:function(){for(var i=t.$services.getService("mouseEvents"),n=0;n",this.$grid=t.childNodes[0],this.$grid.innerHTML="
",this.$grid_scale=this.$grid.childNodes[0],this.$grid_data=this.$grid.childNodes[1];var a=this.$getConfig()[this.$config.bind+"_attribute"];if(!a&&this.$config.bind&&(a=this.$config.bind+"_id"),this.$config.item_attribute=a||null,!this.$config.layers){var o=this._createLayerConfig();this.$config.layers=o}var l=s(e,this);l.init(),this._renderHeaderResizers=l.doOnRender,this._mouseDelegates=i(13)(e),this._addLayers(this.$gantt),this._initEvents(),this.callEvent("onReady",[])},_validateColumnWidth:function(t,e){var i=t[e];if(i&&"*"!=i){var n=this.$gantt,r=1*i;isNaN(r)?n.assert(!1,"Wrong "+e+" value of column "+t.name):t[e]=r}},setSize:function(t,e){this.$config.width=this.$state.width=t,this.$state.height=e;for(var i,n=this.getGridColumns(),r=0,a=0,s=n.length;ad.max_width&&(h=d.max_width-d.width),r-=d.width,d.width+=h,l-=h}for(var u=l>0?1:-1;l>0&&1===u||l<0&&-1===u;){var f=l;for(s=e+1;s-1&&((g=n[e].width+l)==this._getColumnWidth(n[e],i,g)&&(n[e].width=g));return this._getColsTotalWidth()},_getColsTotalWidth:function(){for(var t=this.getGridColumns(),e=0,i=0;is+u&&(h.width=u=f-s),s+=u;var g=t._sort&&h.name==t._sort.name?"
":"",_=["gantt_grid_head_cell","gantt_grid_head_"+h.name,d?"gantt_last_cell":"",n.grid_header_class(h.name,h)].join(" "),p="width:"+(u-(d?1:0))+"px;",v=h.label||o["column_"+h.name];v=v||"";var m="
"+v+g+"
";a.push(m)}this.$grid_scale.style.height=e.scale_height+"px",this.$grid_scale.style.lineHeight=l+"px",this.$grid_scale.innerHTML=a.join(""),this._renderHeaderResizers&&this._renderHeaderResizers()},_getGridWidth:function(){return this.$config.width},destructor:function(){this._clearLayers(this.$gantt),this._mouseDelegates&&(this._mouseDelegates.destructor(),this._mouseDelegates=null),this.$grid=null,this.$grid_scale=null,this.$grid_data=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}},r.mixin(l.prototype,o()),t.exports=l},,function(t,e,i){},function(t,e){t.exports=function(t){t.locale={date:{month_full:["January","February","March","April","May","June","July","August","September","October","November","December"],month_short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],day_full:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],day_short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},labels:{new_task:"New task",icon_save:"Save",icon_cancel:"Cancel",icon_details:"Details",icon_edit:"Edit",icon_delete:"Delete",confirm_closing:"",confirm_deleting:"Task will be deleted permanently, are you sure?",section_description:"Description",section_time:"Time period",section_type:"Type",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Cancel"}}}},,,function(t,e,i){var n=i(3),r={getHtmlSelect:function(t,e,i){var r="",s=this;return t=t||[],n.forEach(t,function(t){var e=[{key:"value",value:t.key}];i==t.key&&(e[e.length]={key:"selected",value:"selected"}),t.attributes&&(e=e.concat(t.attributes)),r+=s.getHtmlOption({innerHTML:t.label},e)}),a("select",{innerHTML:r},e)},getHtmlOption:function(t,e){return a("option",t,e)},getHtmlButton:function(t,e){return a("button",t,e)},getHtmlDiv:function(t,e){return a("div",t,e)},getHtmlLabel:function(t,e){return a("label",t,e)},getHtmlInput:function(t){return""}};function a(t,e,i){return e=e||[],"<"+t+s(i||[])+">"+(e.innerHTML||"")+""}function s(t){var e="";return n.forEach(t,function(t){e+=" "+t.key+"='"+t.value+"'"}),e}t.exports=r},function(t,e,i){var n=i(0),r=i(3);function a(t,e,i,n,r){return this.date=t,this.unit=e,this.task=i,this.id=n,this.calendar=r,this}function s(t,e,i,n,r,a){return this.date=t,this.dir=e,this.unit=i,this.task=n,this.id=r,this.calendar=a,this}function o(t,e,i,n,r,a,s){return this.start_date=t,this.duration=e,this.unit=i,this.step=n,this.task=r,this.id=a,this.calendar=s,this}function l(t,e,i,n){return this.start_date=t,this.end_date=e,this.task=i,this.calendar=n,this.unit=null,this.step=null,this}t.exports=function(t){return{getWorkHoursArguments:function(){var t=arguments[0];return t=r.isDate(t)?{date:t}:n.mixin({},t)},setWorkTimeArguments:function(){return arguments[0]},unsetWorkTimeArguments:function(){return arguments[0]},isWorkTimeArguments:function(){var e,i=arguments[0];return i instanceof a?i:((e=i.date?new a(i.date,i.unit,i.task,null,i.calendar):new a(arguments[0],arguments[1],arguments[2],null,arguments[3])).unit=e.unit||t.config.duration_unit,e)},getClosestWorkTimeArguments:function(e){var i,n=arguments[0];return n instanceof s?n:(i=r.isDate(n)?new s(n):new s(n.date,n.dir,n.unit,n.task,null,n.calendar),n.id&&(i.task=n),i.dir=n.dir||"any",i.unit=n.unit||t.config.duration_unit,i)},_getStartEndConfig:function(e){var i,n=l;return e instanceof n?e:(r.isDate(e)?i=new n(arguments[0],arguments[1],arguments[2],arguments[3]):(i=new n(e.start_date,e.end_date,e.task),e.id&&(i.task=e)),i.unit=i.unit||t.config.duration_unit,i.step=i.step||t.config.duration_step,i.start_date=i.start_date||i.start||i.date,i)},getDurationArguments:function(t,e,i,n){return this._getStartEndConfig.apply(this,arguments)},hasDurationArguments:function(t,e,i,n){return this._getStartEndConfig.apply(this,arguments)},calculateEndDateArguments:function(e,i,n,a){var s,l=arguments[0];return l instanceof o?l:(s=r.isDate(l)?new o(arguments[0],arguments[1],arguments[2],void 0,arguments[3],void 0,arguments[4]):new o(l.start_date,l.duration,l.unit,l.step,l.task,null,l.calendar),l.id&&(s.task=l),s.unit=s.unit||t.config.duration_unit,s.step=s.step||t.config.duration_step,s)}}}},function(t,e){function i(t,e,i){for(var n=0;n=i.$level)return!1;for(;i&&this.exists(n);){if((i=this.getItem(n))&&i.id==e)return!0;n=this.getParent(i)}return!1},getSiblings:function(t){if(!this.exists(t))return n.$create();var e=this.getParent(t);return this.getChildren(e)},getNextSibling:function(t){for(var e=this.getSiblings(t),i=0,n=e.length;ii[t]?1:-1}:t;if(e){var r=n;n=function(t,e){return r(e,t)}}var a=this.getChildren(i);if(a){for(var s=[],o=a.length-1;o>=0;o--)s[o]=this.getItem(a[o]);s.sort(n);for(o=0;o=0&&this.splice(t,e||1)},$remove:function(t){this.$removeAt(this.$find(t))},$insertAt:function(t,e){if(e||0===e){var i=this.splice(e,this.length-e);this[e]=t,this.push.apply(this,i)}else this.push(t)},$find:function(t){for(var e=0;en&&(e=Math.min(i.length,e))}this.pull[t.id]=t,this._skip_refresh||this._updateOrder(function(){-1===this.$find(t.id)&&this.$insertAt(t.id,e)}),this.filter()},isVisible:function(t){return this.visibleOrder.$find(t)>-1},getVisibleItems:function(){return this.getIndexRange()},addItem:function(t,e){return r.defined(t.id)||(t.id=r.uid()),this.$initItem&&(t=this.$initItem(t)),!(!this._skip_refresh&&!1===this.callEvent("onBeforeAdd",[t.id,t]))&&(this._addItemInner(t,e),this._skip_refresh||(this.callEvent("onAfterAdd",[t.id,t]),this.callEvent("onStoreUpdated",[t.id,t,"add"])),t.id)},_changeIdInner:function(t,e){this.pull[t]&&(this.pull[e]=this.pull[t]);var i=this._searchVisibleOrder[t];this.pull[e].id=e,this._updateOrder(function(){this[this.$find(t)]=e}),this._searchVisibleOrder[e]=i,delete this._searchVisibleOrder[t],delete this.pull[t]},changeId:function(t,e){this._changeIdInner(t,e),this.callEvent("onIdChange",[t,e])},exists:function(t){return!!this.pull[t]},_moveInner:function(t,e){var i=this.getIdByIndex(t);this._updateOrder(function(){this.$removeAt(t),this.$insertAt(i,Math.min(this.length,e))})},move:function(t,e){var i=this.getIdByIndex(t),n=this.getItem(i);this._moveInner(t,e),this._skip_refresh||this.callEvent("onStoreUpdated",[n.id,n,"move"])},clearAll:function(){this.pull={},this.visibleOrder=n.$create(),this.fullOrder=n.$create(),this._skip_refresh||(this.callEvent("onClearAll",[]),this.refresh())},silent:function(t,e){this._skip_refresh=!0,t.call(e||this),this._skip_refresh=!1},arraysEqual:function(t,e){if(t.length!==e.length)return!1;for(var i=0;i1&&(h+=1),d==o.types.milestone&&(s.left-=Math.round(c/2),s.width=c);var u=document.createElement("div"),f=Math.round(s.width);a.$config.item_attribute&&u.setAttribute(a.$config.item_attribute,e.id),o.show_progress&&d!=o.types.milestone&&function(e,i,n,r,a){var s=1*e.progress||0;n=Math.max(n-2,0);var o=document.createElement("div"),l=Math.round(n*s);l=Math.min(n,l),e.progressColor&&(o.style.backgroundColor=e.progressColor,o.style.opacity=1),o.style.width=l+"px",o.className="gantt_task_progress",o.innerHTML=a.progress_text(e.start_date,e.end_date,e),r.rtl&&(o.style.position="absolute",o.style.right="0px");var c=document.createElement("div");if(c.className="gantt_task_progress_wrapper",c.appendChild(o),i.appendChild(c),t.config.drag_progress&&!t.isReadonly(e)){var d=document.createElement("div"),h=l;r.rtl&&(h=n-l),d.style.left=h+"px",d.className="gantt_task_progress_drag",o.appendChild(d),i.appendChild(d)}}(e,u,f,o,l);var g=function(e,i,n){var r=document.createElement("div");return t.getTaskType(e.type)!=t.config.types.milestone&&(r.innerHTML=n.task_text(e.start_date,e.end_date,e)),r.className="gantt_task_content",r}(e,0,l);e.textColor&&(g.style.color=e.textColor),u.appendChild(g);var _=function(e,i,n,r){var a=r.$getConfig(),s=[e];i&&s.push(i);var o=t.getState(),l=t.getTask(n);if(t.getTaskType(l.type)==a.types.milestone?s.push("gantt_milestone"):t.getTaskType(l.type)==a.types.project&&s.push("gantt_project"),s.push("gantt_bar_"+t.getTaskType(l.type)),t.isSummaryTask(l)&&s.push("gantt_dependent_task"),t.isSplitTask(l)&&s.push("gantt_split_parent"),a.select_task&&n==o.selected_task&&s.push("gantt_selected"),n==o.drag_id&&(s.push("gantt_drag_"+o.drag_mode),o.touch_drag&&s.push("gantt_touch_"+o.drag_mode)),o.link_source_id==n&&s.push("gantt_link_source"),o.link_target_id==n&&s.push("gantt_link_target"),a.highlight_critical_path&&t.isCriticalTask&&t.isCriticalTask(l)&&s.push("gantt_critical_task"),o.link_landing_area&&o.link_target_id&&o.link_source_id&&o.link_target_id!=o.link_source_id){var c=o.link_source_id,d=o.link_from_start,h=o.link_to_start,u=t.isLinkAllowed(c,n,d,h),f="";f=u?h?"link_start_allow":"link_finish_allow":h?"link_start_deny":"link_finish_deny",s.push(f)}return s.join(" ")}("gantt_task_line",l.task_class(e.start_date,e.end_date,e),e.id,a);(e.color||e.progressColor||e.textColor)&&(_+=" gantt_task_inline_color"),u.className=_;var p=["left:"+s.left+"px","top:"+(h+s.top)+"px","height:"+c+"px","line-height:"+Math.max(c<30?c-2:c,0)+"px","width:"+f+"px"];e.color&&p.push("background-color:"+e.color),e.textColor&&p.push("color:"+e.textColor),u.style.cssText=p.join(";");var v=function(t,e,r){var a="gantt_left "+n(!e.rtl,t);return i(t,r.leftside_text,a)}(e,o,l);v&&u.appendChild(v),(v=function(t,e,r){var a="gantt_right "+n(!!e.rtl,t);return i(t,r.rightside_text,a)}(e,o,l))&&u.appendChild(v),t._waiAria.setTaskBarAttr(e,u);var m=t.getState();return t.isReadonly(e)||(o.drag_resize&&!t.isSummaryTask(e)&&d!=o.types.milestone&&r(u,"gantt_task_drag",e,function(t){var e=document.createElement("div");return e.className=t,e},o),o.drag_links&&o.show_links&&r(u,"gantt_link_control",e,function(t){var e=document.createElement("div");e.className=t,e.style.cssText=["height:"+c+"px","line-height:"+c+"px"].join(";");var i=document.createElement("div");i.className="gantt_link_point";var n=!1;return m.link_source_id&&o.touch&&(n=!0),i.style.display=n?"block":"",e.appendChild(i),e},o)),u}}function i(t,e,i){if(!e)return null;var n=e(t.start_date,t.end_date,t);if(!n)return null;var r=document.createElement("div");return r.className="gantt_side_content "+i,r.innerHTML=n,r}function n(e,i){var n=function(e){return e?{$source:[t.config.links.start_to_start],$target:[t.config.links.start_to_start,t.config.links.finish_to_start]}:{$source:[t.config.links.finish_to_start,t.config.links.finish_to_finish],$target:[t.config.links.finish_to_finish]}}(e);for(var r in n)for(var a=i[r],s=0;s=+o.min_date&&((s=r([i,a.rtl?"task_right":"task_left","task_start_date"].join(" "))).setAttribute("data-bind-property","start_date"),e.appendChild(s)),+n.end_date<=+o.max_date&&((s=r([i,a.rtl?"task_left":"task_right","task_end_date"].join(" "))).setAttribute("data-bind-property","end_date"),e.appendChild(s))}return function(i,n){var r=n.$getConfig().type_renderers[t.getTaskType(i.type)],a=e;return r?r.call(t,i,function(e){return a.call(t,e,n)},n):a.call(t,i,n)}}},function(t,e,i){var n=i(0),r=i(31),a=i(12),s=i(2),o=function(t){function e(e,i,n,r){var a=t.apply(this,arguments)||this;return a.$config.bindLinks=null,a}return s(e,t),n.mixin(e.prototype,{init:function(){void 0===this.$config.bind&&(this.$config.bind=this.$getConfig().resource_store),t.prototype.init.apply(this,arguments)},_createLayerConfig:function(){var t=this,e=function(){return t.isVisible()};return{tasks:[{renderer:this.$gantt.$ui.layers.resourceRow,container:this.$task_bars,filter:[e]},{renderer:this.$gantt.$ui.layers.taskBg,container:this.$task_bg,filter:[e]}],links:[]}}},!0),n.mixin(e.prototype,a(e),!0),e}(r);t.exports=o},function(t,e){t.exports=function(){return{getRowTop:function(t){return t*this.$getConfig().row_height},getItemTop:function(t){if(this.$config.rowStore){var e=this.$config.rowStore;if(!e)return 0;if(e.getParent&&e.exists(t)&&e.exists(e.getParent(t))){var i=e.getItem(e.getParent(t));if(this.$gantt.isSplitTask(i))return this.getRowTop(e.getIndexById(i.id))}return this.getRowTop(e.getIndexById(t))}return 0}}}},function(t,e,i){var n=i(120);t.exports=function(t){var e=new n(t);return e.processIgnores=function(e){var i=e.count;if(e.ignore_x={},t.ignore_time||t.config.skip_off_time){var n=t.ignore_time||function(){return!1};i=0;for(var r=0;re)){for(;+t[i]==+t[i+1];)i++;return i}if(!isNaN(r)&&r",this.$task=t.childNodes[0],this.$task.innerHTML="
",this.$task_scale=this.$task.childNodes[0],this.$task_data=this.$task.childNodes[1],this.$task_data.innerHTML="
",this.$task_bg=this.$task_data.childNodes[0],this.$task_links=this.$task_data.childNodes[1],this.$task_bars=this.$task_data.childNodes[2],this._tasks={col_width:0,width:[],full_width:0,trace_x:[],rendered:{}};var e=this.$getConfig(),i=e[this.$config.bind+"_attribute"],n=e[this.$config.bindLinks+"_attribute"];!i&&this.$config.bind&&(i=this.$config.bind+"_id"),!n&&this.$config.bindLinks&&(n=this.$config.bindLinks+"_id"),this.$config.item_attribute=i||null,this.$config.link_attribute=n||null;var r=this._createLayerConfig();this.$config.layers||(this.$config.layers=r.tasks),this.$config.linkLayers||(this.$config.linkLayers=r.links),this._attachLayers(this.$gantt),this.callEvent("onReady",[])},setSize:function(t,e){var i=this.$getConfig();if(1*t===t&&(this.$config.width=t),1*e===e){this.$config.height=e;var n=Math.max(this.$config.height-i.scale_height);this.$task_data.style.height=n+"px"}if(this.refresh(),this.$task_bg.style.backgroundImage="",i.smart_rendering&&this.$config.rowStore){var r=this.$config.rowStore;this.$task_bg.style.height=i.row_height*r.countVisible()+"px"}else this.$task_bg.style.height="";for(var a=this._tasks,s=this.$task_data.childNodes,o=0,l=s.length;o'+this._prepareScaleHtml(t[a],e,i)+"")}return n.join("")},_prepareScaleHtml:function(t,e,i){var n=this.$getConfig(),r=this.$gantt.$services.templates(),a=[],s=null,o=null,l=null;(t.template||t.date)&&(o=t.template||this.$gantt.date.date_to_str(t.date));var d=0,h=t.count;!n.smart_scales||isNaN(e)||isNaN(i)||(d=c(t.left,e),h=c(t.left,i)+1),l=t.css||function(){},!t.css&&n.inherit_scale_class&&(l=r.scale_cell_class);for(var u=d;u"+f+"";a.push(k)}}return a.join("")},dateFromPos:function(t){var e=this._tasks;if(t<0||t>e.full_width||!e.full_width)return null;var i=c(this._tasks.left,t),n=this._tasks.left[i],r=e.width[i]||e.col_width,a=0;r&&(a=(t-n)/r,e.rtl&&(a=1-a));var s=0;return a&&(s=this._getColumnDuration(e,e.trace_x[i])),new Date(e.trace_x[i].valueOf()+Math.round(a*s))},posFromDate:function(t){if(!this.isVisible())return 0;var e=this.columnIndexByDate(t);this.$gantt.assert(e>=0,"Invalid day index");var i=Math.floor(e),n=e%1,r=this._tasks.left[Math.min(i,this._tasks.width.length-1)];return i==this._tasks.width.length&&(r+=this._tasks.width[this._tasks.width.length-1]),n&&(i=r.max_date)return this._tasks.rtl?0:i.length;for(var a=c(i,e),s=+i[a];n[s];)s=+i[++a];var o=this._tasks.trace_index_transition,l=a;if(!s)return o?o[0]:0;var d=(t-i[a])/this._getColumnDuration(this._tasks,i[a]);return o?o[l]+(1-d):l+d},getItemPosition:function(t,e,i){var n,r,a;return this._tasks.rtl?(r=this.posFromDate(e||t.start_date),n=this.posFromDate(i||t.end_date)):(n=this.posFromDate(e||t.start_date),r=this.posFromDate(i||t.end_date)),a=Math.max(r-n,0),{left:n,top:this.getItemTop(t.id),height:this.getItemHeight(),width:a}},getItemHeight:function(){var t=this.$getConfig(),e=t.task_height;if("full"==e){var i=t.task_height_offset||5;e=t.row_height-i}return e=Math.min(e,t.row_height),Math.max(e,0)},getScale:function(){return this._tasks},_getScales:function(){var t=this.$getConfig(),e=this.$scaleHelper,i=[e.primaryScale()].concat(t.subscales);return e.sortScales(i),i},_getColumnDuration:function(t,e){return this.$gantt.date.add(e,t.step,t.unit)-e},refresh:function(){this.$config.bind&&(this.$config.rowStore=this.$gantt.getDatastore(this.$config.bind)),this.$config.bindLinks&&(this.$config.linkStore=this.$gantt.getDatastore(this.$config.bindLinks)),this._initStaticBackgroundRender(),this._render_tasks_scales()},destructor:function(){var t=this.$gantt;this._clearLayers(t),this.$task=null,this.$task_scale=null,this.$task_data=null,this.$task_bg=null,this.$task_links=null,this.$task_bars=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.$config.linkStore&&(this.$config.linkStore=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}},a.mixin(l.prototype,s()),t.exports=l},function(t,e,i){var n=i(2),r=i(1),a=function(t){"use strict";function e(e,i,n){var r=t.apply(this,arguments)||this;return e&&(r.$root=!0),r._parseConfig(i),r.$name="layout",r}return n(e,t),e.prototype.destructor=function(){this.$container&&this.$view&&r.removeNode(this.$view);for(var e=0;e0?t[r].$parent.getNextSibling(t[r].$id):t[r].$parent.getPrevSibling(t[r].$id);"resizer"==s.$name&&(s=n>0?s.$parent.getNextSibling(s.$id):s.$parent.getPrevSibling(s.$id));var o=s.getSize();if(s[i]){var l=a.gravity+o.gravity,c=a[i]+o[i],d=l/c;t[r].$config.gravity=d*e,s.$config[i]=c-e,s.$config.gravity=l-d*e}else t[r].$config[i]=e;var h=this.$gantt.$ui.getView("grid");h&&t[r].$content===h&&!h.$config.scrollable&&(this.$gantt.config.grid_width=e)}},e.prototype.resize=function(e){var i=!1;if(this.$root&&!this._resizeInProgress&&(this.callEvent("onBeforeResize",[]),i=!0,this._resizeInProgress=!0),t.prototype.resize.call(this,!0),t.prototype.resize.call(this,!1),i){var n=[];n=(n=(n=n.concat(this.getCellsByType("viewCell"))).concat(this.getCellsByType("viewLayout"))).concat(this.getCellsByType("hostCell"));for(var r=this.getCellsByType("scroller"),a=0;a=0&&this.$cells[e+1]?this.$cells[e+1]:null},e.prototype.getPrevSibling=function(t){var e=this.cellIndex(t);return e>=0&&this.$cells[e-1]?this.$cells[e-1]:null},e.prototype.cell=function(t){for(var e=0;e=i.childNodes.length?i.appendChild(t.$view):i.insertBefore(t.$view,i.childNodes[e])},e.prototype._parseConfig=function(t){this.$cells=[],this._xLayout=!t.rows;for(var e=t.rows||t.cols||t.views,i=0;i=0;n--){var a=this.$cells[n];a.$fill(i[n],this),a.$config.hidden&&a.$view.parentNode.removeChild(a.$view)}},e.prototype.$toHTML=function(){for(var e=this._xLayout?"x":"y",i=[],n=0;n=1e5&&(c.maxWidth=n),c.maxHeight>=1e5&&(c.maxHeight=a),c.minWidth=c.minWidth!=c.minWidth?0:c.minWidth,c.minHeight=c.minHeight!=c.minHeight?0:c.minHeight,this._xLayout?(c.minWidth+=this.$config.margin*this.$cells.length||0,c.minWidth+=2*this.$config.padding||0,c.minHeight+=2*this.$config.padding||0):(c.minHeight+=this.$config.margin*this.$cells.length||0,c.minHeight+=2*this.$config.padding||0),c},e.prototype._calcFreeSpace=function(t,e,i){var n=i?e.minWidth:e.minHeight,r=e.maxWidth,a=t;return a?(a>r&&(a=r),ar&&(a=r,this._free-=a,this._gravity-=e.gravity),aa&&(n=a),n=0;n--)if(!e[n].$config.hidden){i=n;break}for(n=0;n=i,a="";!r&&e[n+1]&&"scrollbar"==e[n+1].$config.view&&(this._xLayout?r=!0:a="gantt_layout_cell_border_transparent"),this._setBorders(r?[]:[t,a],e[n])}},e.prototype._updateCellVisibility=function(){for(var t,e=this._visibleCells||{},i=!this._visibleCells,n={},r=0;r=0)return null;var i=arguments[1]||this.config.task_attribute,r=n.locateAttribute(e,i);return r?r.getAttribute(i):null},t._locate_css=function(t,e,i){return n.locateClassName(t,e,i)},t._locateHTML=function(t,e){return n.locateAttribute(t,e||this.config.task_attribute)},t.getTaskRowNode=function(t){for(var e=this.$grid_data.childNodes,i=this.config.task_attribute,n=0;n3600&&s<86400){var o=e.getTimezoneOffset()-i;o&&(e=t.date.add(e,o,"minute"))}return e},t.isSplitTask=function(e){return t.assert(e&&e instanceof Object,"Invalid argument task="+e+" of gantt.isSplitTask. Task object was expected"),this.$data.tasksStore._isSplitItem(e)},t._is_icon_open_click=function(t){if(!t)return!1;var e=t.target||t.srcElement;if(!e||!e.className)return!1;var i=n.getClassName(e);return-1!==i.indexOf("gantt_tree_icon")&&(-1!==i.indexOf("gantt_close")||-1!==i.indexOf("gantt_open"))}}},function(t,e){t.exports=function(t){function e(){var e;return t.$ui.getView("timeline")&&(e=t.$ui.getView("timeline")._tasks_dnd),e}t.config.touch_drag=500,t.config.touch=!0,t.config.touch_feedback=!0,t.config.touch_feedback_duration=1,t._prevent_touch_scroll=!1,t._touch_feedback=function(){t.config.touch_feedback&&navigator.vibrate&&navigator.vibrate(t.config.touch_feedback_duration)},t.attachEvent("onGanttReady",t.bind(function(){if("force"!=this.config.touch&&(this.config.touch=this.config.touch&&(-1!=navigator.userAgent.indexOf("Mobile")||-1!=navigator.userAgent.indexOf("iPad")||-1!=navigator.userAgent.indexOf("Android")||-1!=navigator.userAgent.indexOf("Touch"))),this.config.touch){var t=!0;try{document.createEvent("TouchEvent")}catch(e){t=!1}t?this._touch_events(["touchmove","touchstart","touchend"],function(t){return t.touches&&t.touches.length>1?null:t.touches[0]?{target:t.target,pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},function(){return!1}):window.navigator.pointerEnabled?this._touch_events(["pointermove","pointerdown","pointerup"],function(t){return"mouse"==t.pointerType?null:t},function(t){return!t||"mouse"==t.pointerType}):window.navigator.msPointerEnabled&&this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t},function(t){return!t||t.pointerType==t.MSPOINTER_TYPE_MOUSE})}},t));var i=[];t._touch_events=function(n,r,a){for(var s,o=0,l=!1,c=!1,d=null,h=null,u=null,f=0;f5||Math.abs(_)>5)&&(t._touch_scroll_active=c=!0,o=0,s=t.getScrollState()),c){t.scrollTo(s.x+f,s.y+_);var p=t.getScrollState();if(s.x!=p.x&&_>2*f||s.y!=p.y&&f>2*_)return g(i)}}return g(i)}return!0}}]),i.push([this.$container,"contextmenu",function(t){if(l)return g(t)}]),i.push([this.$container,n[1],function(i){if(!a(i))if(i.touches&&i.touches.length>1)l=!1;else{d=r(i),t._locate_css(d,"gantt_hor_scroll")||t._locate_css(d,"gantt_ver_scroll")||(l=!0);var n=e();h=setTimeout(function(){var e=t.locate(d);n&&e&&!t._locate_css(d,"gantt_link_control")&&!t._locate_css(d,"gantt_grid_data")&&(n.on_mouse_down(d),n.drag&&n.drag.start_drag&&(!function(e){var i=t._getTaskLayers(),n=t.getTask(e);if(n&&t.isTaskVisible(e))for(var r=0;r-1&&(i.className=i.className.slice(0,t))},200))})}},function(t,e){t.exports=function(t){t.skins.broadway={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:1,link_arrow_size:7,lightbox_additional_height:86},_second_column_width:90,_third_column_width:80,_lightbox_template:"
 
",_config_buttons_left:{},_config_buttons_right:{gantt_delete_btn:"icon_delete",gantt_save_btn:"icon_save"}}}},function(t,e){t.exports=function(t){t.skins.terrace={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:2,link_arrow_size:6,lightbox_additional_height:75},_second_column_width:90,_third_column_width:70}}},function(t,e){t.exports=function(t){t.skins.meadow={config:{grid_width:350,row_height:27,scale_height:30,link_line_width:2,link_arrow_size:6,lightbox_additional_height:72},_second_column_width:95,_third_column_width:80}}},function(t,e){t.exports=function(t){t.skins.skyblue={config:{grid_width:350,row_height:27,scale_height:27,link_line_width:1,link_arrow_size:8,lightbox_additional_height:75},_second_column_width:95,_third_column_width:80}}},function(t,e){function i(t,e){var i=e.skin;if(!i||t)for(var n=document.getElementsByTagName("link"),r=0;rl.width?l.min_width:l.width,l.width=l.max_width&&l.max_width",e+="
",e+="
",e+=""},l.prototype.set_value=function(e,i,s,l){var u,f=function(t,e){o.resources[e.id]||(o.resources[e.id]=t.querySelector(".gantt_resources"));return o.resources[e.id]}(e,l),g="";!function(t,e){if(!o.filter[e.id]){var i=t.querySelector(".gantt_resources_filter"),n=i.querySelector(".gantt_resources_filter_input"),r=i.querySelector(".switch_unsetted");o.filter[e.id]={container:i,input:n,checkbox:r,filterApplied:!1}}o.filter[e.id]}(e,l),function(e,i,a,s){if(o.eventsInitialized[a.id])return;var l=function(r){var l,c,d,u,f,g=i[a.map_to],_=h(a);f=_.checkbox,u=_.input,d=f.checked,c=function(t){return t.value.trim()}(u),l=function(e,i,r,a){var s,l;if(a){var c=i[e.map_to]||[];if(n.isArray(c)||(c=[c]),0===(c=c.slice()).length){for(var d in c=[],(l=t.copy(e)).options=[],o.resourcesValues[e.id])c.push({resource_id:d,value:o.resourcesValues[e.id][d]});if(0===c.length)return l}else for(var d in o.resourcesValues[e.id]){var h=n.arrayFind(c,function(t){return t.id==d});h||c.push({resource_id:d,value:o.resourcesValues[e.id][d]})}for(var u={},f=0;f=0))return t}}else{if(""===r)return e;s=function(t){if(t.label.indexOf(r)>=0)return t}}return(l=t.copy(e)).options=n.arrayFilter(l.options,s),l}(a,i,c,d),_.filterApplied=!0,s.form_blocks.resources.set_value(e,g,i,l)};function u(e){var i,n,s=e.target;if("checkbox"===e.target.type){i=s.parentNode,(n=i.querySelector(c())).disabled=!s.checked;var l=n.getAttribute("data-item-id"),d=r.locateClassName(e,"gantt_resource_row"),h=d.querySelector(".gantt_resource_amount_input");if(d.setAttribute("data-checked",s.checked),s.checked){"select"===n.nodeName.toLowerCase()&&t.callEvent("onResourcesSelectActivated",[{target:n}]);var u=l,g=a.default_value;a.options.forEach(function(t){t.key==u&&t.default_value&&(g=t.default_value)}),h&&!h.value&&void 0!==g&&(h.value=g,f(a,this)),h.select?h.select():h.focus&&h.focus()}else o.resourcesValues[a.id]&&delete o.resourcesValues[a.id][l]}else"text"!==e.target.type&&"select"!==e.target.nodeName.toLowerCase()||(i=s.parentNode.parentNode,n=e.target,f(a,this))}function f(t,e){var i=c(),n=e.querySelectorAll(i);o.resourcesValues[t.id]=o.resourcesValues[t.id]||{};for(var r=0;r","
","
",t.label,"
","
",function(t,e,i){var n,r="";if(!t)return;n=[{key:"data-item-id",value:t.key},{key:"class",value:"gantt_resource_amount_input"}],i&&n.push({key:"disabled",value:"disabled"});t.options?r+=a.getHtmlSelect(t.options,n,e):(n[n.length]={key:"value",value:e||""},r+=a.getHtmlInput(n));return r}(t,u.value,!u.value),"
","
",t.unit,"
",""].join(""))}),f.innerHTML=g,f.style.zoom="1",f._offsetSizes=f.offsetHeight,f.style.zoom="",t.resizeLightbox(),t._center_lightbox(t.getLightbox())},l.prototype.get_value=function(t,e,i){var r=d(i),a=[],s=c(!0),l=c(!1),u=h(i),f=e[i.map_to]||[],g={};u.filterApplied&&f&&f.length>0&&n.forEach(f,function(t){g[String(t.resource_id)]=t});for(var _=r.querySelectorAll(s),p=r.querySelectorAll(l),v=0;v",n=t.locale.labels[t.config.duration_unit+"s"],r=e.single_date?" style='display:none'":"",a=e.readonly?" disabled='disabled'":"",s="
"+n+"
";return"
"+i+" "+s+"
"},r.prototype.set_value=function(e,i,n,r){var o,l,c,d,h=r,u=e.getElementsByTagName("select"),f=e.getElementsByTagName("input"),g=f[1],_=[f[0],f[2]],p=e.getElementsByTagName("span")[0],v=r._time_format_order;function m(){var i=a.call(t,e,r),o=s.call(t,e,r),l=t.calculateEndDate({start_date:i,duration:o,task:n});p.innerHTML=t.templates.task_date(l)}function y(t){var e=g.value;e=parseInt(e,10),window.isNaN(e)&&(e=0),(e+=t)<1&&(e=1),g.value=e,m()}_[0].onclick=t.bind(function(){y(-1*t.config.duration_step)},this),_[1].onclick=t.bind(function(){y(1*t.config.duration_step)},this),u[0].onchange=m,u[1].onchange=m,u[2].onchange=m,u[3]&&(u[3].onchange=m),g.onkeydown=t.bind(function(e){var i;return(i=(e=e||window.event).charCode||e.keyCode||e.which)==t.constants.KEY_CODES.DOWN?(y(-1*t.config.duration_step),!1):i==t.constants.KEY_CODES.UP?(y(1*t.config.duration_step),!1):void window.setTimeout(m,1)},this),g.onchange=t.bind(m,this),"string"==typeof(o=t._resolve_default_mapping(r))&&(o={start_date:o}),l=n[o.start_date]||new Date,c=n[o.end_date]||t.calculateEndDate({start_date:l,duration:1,task:n}),d=Math.round(n[o.duration])||t.calculateDuration({start_date:l,end_date:c,task:n}),t.form_blocks._fill_lightbox_select(u,0,l,v,h),g.value=d,m()},r.prototype.get_value=function(e,i,n){var r=a(e,n),o=s(e),l=t.calculateEndDate({start_date:r,duration:o,task:i});return"string"==typeof t._resolve_default_mapping(n)?r:{start_date:r,end_date:l,duration:o}},r.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},r}},function(t,e,i){var n=i(2);t.exports=function(t){var e=i(5)(t);function r(){return e.apply(this,arguments)||this}return n(r,e),r.prototype.render=function(t){var e="
";if(t.options&&t.options.length)for(var i=0;i"+t.options[i].label+"";return e+="
"},r.prototype.set_value=function(t,e,i,n){var r;n.options&&n.options.length&&(r=t.querySelector("input[type=radio][value='"+e+"']")||t.querySelector("input[type=radio][value='"+n.default_value+"']"))&&(!t._dhx_onchange&&n.onchange&&(t.onchange=n.onchange,t._dhx_onchange=!0),r.checked=!0)},r.prototype.get_value=function(t,e){var i=t.querySelector("input[type=radio]:checked");return i?i.value:""},r.prototype.focus=function(e){t._focus(e.querySelector("input[type=radio]"))},r}},function(t,e,i){var n=i(3),r=i(2);t.exports=function(t){var e=i(5)(t);function a(){return e.apply(this,arguments)||this}return r(a,e),a.prototype.render=function(t){var e="
";if(t.options&&t.options.length)for(var i=0;i"+t.options[i].label+"";return e+="
"},a.prototype.set_value=function(t,e,i,r){var a=Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]"));!t._dhx_onchange&&r.onchange&&(t.onchange=r.onchange,t._dhx_onchange=!0),n.forEach(a,function(t){t.checked=!!e&&e.indexOf(t.value)>=0})},a.prototype.get_value=function(t){return n.arrayMap(Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]:checked")),function(t){return t.value})},a.prototype.focus=function(e){t._focus(e.querySelector("input[type=checkbox]"))},a}},function(t,e,i){var n=i(2);t.exports=function(t){var e=i(5)(t);function r(){return e.apply(this,arguments)||this}return n(r,e),r.prototype.render=function(e){var i=t.form_blocks.getTimePicker.call(this,e),n="
";return n+=i,e.single_date?(i=t.form_blocks.getTimePicker.call(this,e,!0),n+=""):n+="  –  ",n+=i,n+="
"},r.prototype.set_value=function(e,i,n,r){var a=r,s=e.getElementsByTagName("select"),o=r._time_format_order;if(a.auto_end_date)for(var l=function(){h=new Date(s[o[2]].value,s[o[1]].value,s[o[0]].value,0,0),u=t.calculateEndDate({start_date:h,duration:1,task:n}),t.form_blocks._fill_lightbox_select(s,o.size,u,o,a)},c=0;c<4;c++)s[c].onchange=l;var d=t._resolve_default_mapping(r);"string"==typeof d&&(d={start_date:d});var h=n[d.start_date]||new Date,u=n[d.end_date]||t.calculateEndDate({start_date:h,duration:1,task:n});t.form_blocks._fill_lightbox_select(s,0,h,o,a),t.form_blocks._fill_lightbox_select(s,o.size,u,o,a)},r.prototype.get_value=function(e,i,n){var r,a=e.getElementsByTagName("select"),s=n._time_format_order,o=t.defined(s[3]);function l(t,e,i,n){var r,a=0,s=0;return n=n||0,i&&(r=parseInt(t[e[3]+n].value,10),a=Math.floor(r/60),s=r%60),new Date(t[e[2]+n].value,t[e[1]+n].value,t[e[0]+n].value,a,s)}return r=l(a,s,o),"string"==typeof t._resolve_default_mapping(n)?r:{start_date:r,end_date:function(e,i,n,r){var a=l(e,i,n,i.size);return a<=r?t.date.add(r,t._get_timepicker_step(),"minute"):a}(a,s,o,r)}},r.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},r}},function(t,e,i){var n=i(2);t.exports=function(t){var e=i(5)(t);function r(){return e.apply(this,arguments)||this}return n(r,e),r.prototype.render=function(t){return"
"},r.prototype.set_value=function(e,i){t.form_blocks.textarea._get_input(e).value=i||""},r.prototype.get_value=function(e){return t.form_blocks.textarea._get_input(e).value},r.prototype.focus=function(e){var i=t.form_blocks.textarea._get_input(e);t._focus(i,!0)},r.prototype._get_input=function(t){return t.querySelector("textarea")},r}},function(t,e,i){var n=i(2);t.exports=function(t){var e=i(5)(t);function r(){return e.apply(this,arguments)||this}return n(r,e),r.prototype.render=function(t){return"
"},r.prototype.set_value=function(t,e){t.innerHTML=e||""},r.prototype.get_value=function(t){return t.innerHTML||""},r.prototype.focus=function(){},r}},function(t,e,i){t.exports=function(t){var e=i(1),n=i(3),r=i(57)(t),a=i(56)(t),s=i(55)(t),o=i(10)(t),l=i(54)(t),c=i(53)(t),d=i(52)(t),h=i(51)(t),u=i(50)(t);function f(e,i){var n,r,a="";for(r=0;r
"+t.locale.labels[n]+"
";return a}function g(e,i,n){var r,a,s,o,l,c,d="";switch(n.timeFormat[i]){case"%Y":for(e._time_format_order[2]=i,e._time_format_order.size++,e.year_range&&(isNaN(e.year_range)?e.year_range.push&&(s=e.year_range[0],o=e.year_range[1]):r=e.year_range),r=r||10,a=a||Math.floor(r/2),s=s||n.date.getFullYear()-a,o=o||s+r,l=s;l"+l+"";break;case"%m":for(e._time_format_order[1]=i,e._time_format_order.size++,l=0;l<12;l++)d+="";break;case"%d":for(e._time_format_order[0]=i,e._time_format_order.size++,l=1;l<32;l++)d+="";break;case"%H:%i":for(e._time_format_order[3]=i,e._time_format_order.size++,l=n.first,c=n.date.getDate(),e._time_values=[];l"+t.templates.time_picker(n.date)+"",e._time_values.push(l),n.date.setTime(n.date.valueOf()+60*t._get_timepicker_step()*1e3),l=24*(n.date.getDate()!=c?1:0)*60+60*n.date.getHours()+n.date.getMinutes()}return d}t._lightbox_methods={},t._lightbox_template="
 
",t.$services.getService("state").registerProvider("lightbox",function(){return{lightbox:t._lightbox_id}}),t.showLightbox=function(e){if(e&&!t.isReadonly(this.getTask(e))&&this.callEvent("onBeforeLightbox",[e])){var i=this.getTask(e),n=this.getLightbox(this.getTaskType(i.type));this._center_lightbox(n),this.showCover(),this._fill_lightbox(e,n),this._waiAria.lightboxVisibleAttr(n),this.callEvent("onLightbox",[e])}},t._get_timepicker_step=function(){if(this.config.round_dnd_dates){var e;if(function(t){var e=t.$ui.getView("timeline");return!(!e||!e.isVisible())}(this)){var i=t.getScale();e=n.getSecondsInUnit(i.unit)*i.step/60}return(!e||e>=1440)&&(e=this.config.time_step),e}return this.config.time_step},t.getLabel=function(t,e){for(var i=this._get_typed_lightbox_config(),n=0;n
"+this.locale.labels["button_"+t[i].button]+"
"),this.config.wide_form&&(e+="
"),e+="
"+n.render.call(this,t[i]),e+="
"}}return e},t.resizeLightbox=function(){if(this._lightbox){var t=this._lightbox.childNodes[1];t.style.height="0px",t.style.height=t.scrollHeight+"px",this._lightbox.style.height=t.scrollHeight+this.config.lightbox_additional_height+"px",t.style.height=t.scrollHeight+"px"}},t._center_lightbox=function(t){if(t){t.style.display="block";var e=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,i=window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft,n=window.innerHeight||document.documentElement.clientHeight;t.style.top=e?Math.round(e+Math.max((n-t.offsetHeight)/2,0))+"px":Math.round(Math.max((n-t.offsetHeight)/2,0)+9)+"px",document.documentElement.scrollWidth>document.body.offsetWidth?t.style.left=Math.round(i+(document.body.offsetWidth-t.offsetWidth)/2)+"px":t.style.left=Math.round((document.body.offsetWidth-t.offsetWidth)/2)+"px"}},t.showCover=function(){if(!this._cover){this._cover=document.createElement("DIV"),this._cover.className="gantt_cal_cover";var t=void 0!==document.height?document.height:document.body.offsetHeight,e=document.documentElement?document.documentElement.scrollHeight:0;this._cover.style.height=Math.max(t,e)+"px",document.body.appendChild(this._cover)}},t._init_lightbox_events=function(){t.lightbox_events={},t.lightbox_events.gantt_save_btn=function(){t._save_lightbox()},t.lightbox_events.gantt_delete_btn=function(){t.callEvent("onLightboxDelete",[t._lightbox_id])&&(t.isTaskExists(t._lightbox_id)?t.$click.buttons.delete(t._lightbox_id):t.hideLightbox())},t.lightbox_events.gantt_cancel_btn=function(){t._cancel_lightbox()},t.lightbox_events.default=function(i,n){if(n.getAttribute("data-dhx-button"))t.callEvent("onLightboxButton",[n.className,n,i]);else{var r,a,s=e.getClassName(n);if(-1!=s.indexOf("gantt_custom_button"))if(-1!=s.indexOf("gantt_custom_button_"))for(r=n.parentNode.getAttribute("data-index"),a=n;a&&-1==e.getClassName(a).indexOf("gantt_cal_lsection");)a=a.parentNode;else r=n.getAttribute("data-index"),a=n.parentNode,n=n.firstChild;var o=t._get_typed_lightbox_config();r&&(r*=1,t.form_blocks[o[1*r].type].button_click(r,n,a,a.nextSibling))}},this.event(t.getLightbox(),"click",function(i){var n=(i=i||window.event).target?i.target:i.srcElement,r=e.getClassName(n);return r||(n=n.previousSibling,r=e.getClassName(n)),n&&r&&0===r.indexOf("gantt_btn_set")&&(n=n.firstChild,r=e.getClassName(n)),!(!n||!r)&&(t.defined(t.lightbox_events[n.className])?t.lightbox_events[n.className]:t.lightbox_events.default)(i,n)}),t.getLightbox().onkeydown=function(i){var n=i||window.event,r=i.target||i.srcElement,a=e.getClassName(r).indexOf("gantt_btn_set")>-1;switch((i||n).keyCode){case t.constants.KEY_CODES.SPACE:if((i||n).shiftKey)return;a&&r.click&&r.click();break;case t.keys.edit_save:if((i||n).shiftKey)return;a&&r.click?r.click():t._save_lightbox();break;case t.keys.edit_cancel:t._cancel_lightbox()}}},t._cancel_lightbox=function(){var e=this.getLightboxValues();this.callEvent("onLightboxCancel",[this._lightbox_id,e.$new]),t.isTaskExists(e.id)&&e.$new&&this.silent(function(){t.$data.tasksStore.removeItem(e.id),t._update_flags(e.id,null)}),this.refreshData(),this.hideLightbox()},t._save_lightbox=function(){var t=this.getLightboxValues();this.callEvent("onLightboxSave",[this._lightbox_id,t,!!t.$new])&&(t.$new?(delete t.$new,this.addTask(t)):this.isTaskExists(t.id)&&(this.mixin(this.getTask(t.id),t,!0),this.refreshTask(t.id),this.updateTask(t.id)),this.refreshData(),this.hideLightbox())},t._resolve_default_mapping=function(t){var e=t.map_to;return{time:!0,time_optional:!0,duration:!0,duration_optional:!0}[t.type]&&("auto"==t.map_to?e={start_date:"start_date",end_date:"end_date",duration:"duration"}:"string"==typeof t.map_to&&(e={start_date:t.map_to})),e},t.getLightboxValues=function(){var e={};t.isTaskExists(this._lightbox_id)&&(e=this.mixin({},this.getTask(this._lightbox_id)));for(var i=this._get_typed_lightbox_config(),n=0;n0&&(o+=" "),(a=g(e,r,c))&&(s=t._waiAria.lightboxSelectAttrString(c.timeFormat[r]),o+="");return o},_fill_lightbox_select:function(e,i,n,r){if(e[i+r[0]].value=n.getDate(),e[i+r[1]].value=n.getMonth(),e[i+r[2]].value=n.getFullYear(),t.defined(r[3])){var a=60*n.getHours()+n.getMinutes();a=Math.round(a/t._get_timepicker_step())*t._get_timepicker_step();var s=e[i+r[3]];s.value=a,s.setAttribute("data-value",a)}},template:new r,textarea:new a,select:new o,time:new s,duration:new d,parent:new h,radio:new c,checkbox:new l,resources:new u},t._is_lightbox_timepicker=function(){for(var t=this._get_typed_lightbox_config(),e=0;etask="+e+" of gantt.isUnscheduledTask. Task object was expected"),!!e.unscheduled||!e.start_date},t._isAllowedUnscheduledTask=function(e){return!(!e.unscheduled||!t.config.show_unscheduled)},t.isTaskVisible=function(e){if(!this.isTaskExists(e))return!1;var i=this.getTask(e),n=i.start_date?i.start_date.valueOf():null,r=i.end_date?i.end_date.valueOf():null;return!!(t._isAllowedUnscheduledTask(i)||n&&r&&n<=this._max_date.valueOf()&&r>=this._min_date.valueOf())&&!!(t.getGlobalTaskIndex(e)>=0)},t._defaultTaskDate=function(e,i){var n=!(!i||i==this.config.root_id)&&this.getTask(i),r="";if(n)r=n.start_date;else{var a=this.getTaskByIndex(0);r=a?a.start_date?a.start_date:a.end_date?this.calculateEndDate({start_date:a.end_date,duration:-this.config.duration_step}):"":this.config.start_date||this.getState().min_date}return t.assert(r,"Invalid dates"),new Date(r)},t._set_default_task_timing=function(e){e.start_date=e.start_date||t._defaultTaskDate(e,this.getParent(e)),e.duration=e.duration||this.config.duration_step,e.end_date=e.end_date||this.calculateEndDate(e)},t.createTask=function(e,i,n){(e=e||{},t.defined(e.id)||(e.id=t.uid()),e.start_date||(e.start_date=t._defaultTaskDate(e,i)),void 0===e.text&&(e.text=t.locale.labels.new_task),void 0===e.duration&&(e.duration=1),i)&&(this.setParent(e,i,!0),this.getTask(i).$open=!0);return this.callEvent("onTaskCreated",[e])?(this.config.details_on_create?(e.$new=!0,this.silent(function(){t.$data.tasksStore.addItem(e,n)}),this.selectTask(e.id),this.refreshData(),this.showLightbox(e.id)):this.addTask(e,i,n)&&(this.showTask(e.id),this.selectTask(e.id)),e.id):null},t._update_flags=function(e,i){var n=t.$data.tasksStore;void 0===e?(this._lightbox_id=null,n.silent(function(){n.unselect()}),this._tasks_dnd&&this._tasks_dnd.drag&&(this._tasks_dnd.drag.id=null)):(this._lightbox_id==e&&(this._lightbox_id=i),n.getSelectedId()==e&&n.silent(function(){n.unselect(e),n.select(i)}),this._tasks_dnd&&this._tasks_dnd.drag&&this._tasks_dnd.drag.id==e&&(this._tasks_dnd.drag.id=i))},t._get_task_timing_mode=function(t,e){var i=this.getTaskType(t.type),n={type:i,$no_start:!1,$no_end:!1};return e||i!=t.$rendered_type?(i==this.config.types.project?n.$no_end=n.$no_start=!0:i!=this.config.types.milestone&&(n.$no_end=!(t.end_date||t.duration),n.$no_start=!t.start_date,this._isAllowedUnscheduledTask(t)&&(n.$no_end=n.$no_start=!1)),n):(n.$no_start=t.$no_start,n.$no_end=t.$no_end,n)},t._init_task_timing=function(e){var i=t._get_task_timing_mode(e,!0),n=e.$rendered_type!=i.type,r=i.type;n&&(e.$no_start=i.$no_start,e.$no_end=i.$no_end,e.$rendered_type=i.type),n&&r!=this.config.types.milestone&&r==this.config.types.project&&this._set_default_task_timing(e),r==this.config.types.milestone&&(e.end_date=e.start_date),e.start_date&&e.end_date&&(e.duration=this.calculateDuration(e)),e.end_date||(e.end_date=e.start_date),e.duration=e.duration||0},t.isSummaryTask=function(e){t.assert(e&&e instanceof Object,"Invalid argument task="+e+" of gantt.isSummaryTask. Task object was expected");var i=t._get_task_timing_mode(e);return!(!i.$no_end&&!i.$no_start)},t.resetProjectDates=function(t){var e=this._get_task_timing_mode(t);if(e.$no_end||e.$no_start){var i=this.getSubtaskDates(t.id);this._assign_project_dates(t,i.start_date,i.end_date)}},t.getSubtaskDuration=function(e){var i=0,n=void 0!==e?e:t.config.root_id;return this.eachTask(function(e){this.getTaskType(e.type)==t.config.types.project||this.isUnscheduledTask(e)||(i+=e.duration)},n),i},t.getSubtaskDates=function(e){var i=null,n=null,r=void 0!==e?e:t.config.root_id;return this.eachTask(function(e){this.getTaskType(e.type)==t.config.types.project||this.isUnscheduledTask(e)||(e.start_date&&!e.$no_start&&(!i||i>e.start_date.valueOf())&&(i=e.start_date.valueOf()),e.end_date&&!e.$no_end&&(!n||n=+i.min_date&&+o<=+i.max_date)s=Math.floor(t.columnIndexByDate(o)),i.trace_x[s]||(s-=1,i.rtl&&(s=0)),a=new Date(i.trace_x[s]),r=t.date.add(a,l,c);else{for(s=Math.floor(t.columnIndexByDate(o)),r=t.date[c+"_start"](new Date(i.min_date)),i.trace_x[s]&&(r=t.date[c+"_start"](i.trace_x[s]));+r<+o;){var d=(r=t.date[c+"_start"](t.date.add(r,l,c))).getTimezoneOffset();r=t._correct_dst_change(r,d,r,c),t.date[c+"_start"]&&(r=t.date[c+"_start"](r))}a=t.date.add(r,-1*l,c)}return e.dir&&"future"==e.dir?r:e.dir&&"past"==e.dir?a:Math.abs(o-a)0},_is_work_hour:function(t){for(var e=this._getWorkHours(t),i=t.getHours(),n=0;n=e[n]&&is.valueOf(),this._isWorkTime(a,i)&&((h||u&&f)&&(o=r[i+"_start"](new Date(a)),l=r.add(o,n,i)),h?(h=!1,d=this._nextDate(o,i,n),c+=(l.valueOf()-a.valueOf())/(l.valueOf()-o.valueOf())):u&&f?(u=!1,c+=(s.valueOf()-a.valueOf())/(l.valueOf()-o.valueOf())):c++),a=d;return c},_getHoursPerDay:function(t){for(var e=this._getWorkHours(t),i=0,n=0;n=0?1:-1;return this._calculateEndDate(e,i,n,r*a)},_calculateEndDate:function(t,e,i,n){if(!i)return!1;var r=new Date(t),a=0;for(n=n||1,e=Math.abs(1*e);a0?new Date(s.valueOf()-1):new Date(s.valueOf()+1),i)&&a++,r=s}return r},getClosestWorkTime:function(){var t=this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper,arguments);return this._getClosestWorkTime(t)},_getClosestWorkTime:function(t){if(this._isWorkTime(t.date,t.unit))return t.date;var e=t.unit,i=this.$gantt.date[e+"_start"](new Date(t.date)),n=new Date(i),r=new Date(i),a=!0,s=0,o="any"==t.dir||!t.dir,l=1;"past"==t.dir&&(l=-1);for(var c=this._getUnitOrder(e),d=this.units[c-1];!this._isWorkTime(i,e);){if(d&&!this._isWorkTime(i,d)){var h=this.$gantt.copy(t);return h.date=i,h.unit=d,this._getClosestWorkTime(h)}o&&(i=a?n:r,l*=-1);var u=i.getTimezoneOffset();if(i=this.$gantt.date.add(i,l,e),i=this.$gantt._correct_dst_change(i,u,l,e),this.$gantt.date[e+"_start"]&&(i=this.$gantt.date[e+"_start"](i)),o&&(a?n=i:r=i),a=!a,++s>3e3)return this.$gantt.assert(!1,"Invalid working time check"),!1}return i!=r&&"past"!=t.dir||(i=this.$gantt.date.add(i,1,e)),i}},t.exports=a},function(t,e,i){var n=i(0),r=i(21),a=i(64);function s(t){this.$gantt=t,this._calendars={}}s.prototype={_calendars:{},_getDayHoursForMultiple:function(t,e){for(var i=[],n=!0,r=0,a=this.$gantt.date.day_start(new Date(e)),s=0;s<24;s++)t.reduce(function(t,e){return t&&e._is_work_hour(a)},!0)?(n?(i[r]=s,i[r+1]=s+1,r+=2):i[r-1]+=1,n=!1):n||(n=!0),a=this.$gantt.date.add(a,1,"hour");return i.length||(i=!1),i},mergeCalendars:function(){var t,e=this.createCalendar(),i=[],n=Array.prototype.slice.call(arguments,0);e.worktime.hours=[0,24],e.worktime.dates={};var r=this.$gantt.date.day_start(new Date(2592e5));for(t=0;t<7;t++)i=this._getDayHoursForMultiple(n,r),e.worktime.dates[t]=i,r=this.$gantt.date.add(r,1,"day");for(var a=0;a1e4&&(i=this._getDayHoursForMultiple(n,new Date(+s)),e.worktime.dates[s]=i);return e},_convertWorktimeSettings:function(t){var e=t.days;if(e){t.dates=t.dates||{};for(var i=0;i=3?(r=i,a=n):"string"==typeof arguments[1]?r=arguments[1]:"function"==typeof arguments[1]&&(a=arguments[1]),this._load_type=r,this.callEvent("onLoadStart",[e,r]),this.ajax.get(e,t.bind(function(t){this.on_load(t,r),this.callEvent("onLoadEnd",[e,r]),"function"==typeof a&&a.call(this)},this))},t.parse=function(t,e){this.on_load({xmlDoc:{responseText:t}},e)},t.serialize=function(t){return this[t=t||"json"].serialize()},t.on_load=function(t,e){this.callEvent("onBeforeParse",[]),e||(e="json"),this.assert(this[e],"Invalid data type:'"+e+"'");var i=t.xmlDoc.responseText,n=this[e].parse(i,t);this._process_loading(n)},t._process_loading=function(t){t.collections&&this._load_collections(t.collections),this.$data.tasksStore.parse(t.data);var e=t.links||(t.collections?t.collections.links:[]);if(this.$data.linksStore.parse(e),this.callEvent("onParse",[]),this.render(),this.config.initial_scroll){var i=this.getTaskByIndex(0),n=i?i.id:this.config.root_id;this.isTaskExists(n)&&this.showTask(n)}},t._load_collections=function(t){var e=!1;for(var i in t)if(t.hasOwnProperty(i)){e=!0;var n=t[i],r=this.serverList[i];if(!r)continue;r.splice(0,r.length);for(var a=0;a"},_copyObject:function(t){return""},serialize:function(){for(var e=[],i=[],n=t.json.serialize(),r=0,a=n.data.length;r"+e.join("")+""+i.join("")+""}},t.oldxml={parse:function(e,i){i=t.xml._getXML(e,i,"projects");for(var n={collections:{links:[]}},r=n.data=[],a=t.ajax.xpath("//task",i),s=0;s","gm"),i=new RegExp(" +","gm");function n(t){return(t+"").replace(e," ").replace(i," ")}var r=new RegExp("'","gm");function a(t){return(t+"").replace(r,"'")}for(var s in t._waiAria={getAttributeString:function(t){var e=[" "];for(var i in t){var r=a(n(t[i]));e.push(i+"='"+r+"'")}return e.push(" "),e.join(" ")},getTimelineCellAttr:function(e){return t._waiAria.getAttributeString({"aria-label":e})},_taskCommonAttr:function(e,i){e.start_date&&e.end_date&&(i.setAttribute("aria-label",n(t.templates.tooltip_text(e.start_date,e.end_date,e))),t.isReadonly(e)&&i.setAttribute("aria-readonly",!0),e.$dataprocessor_class&&i.setAttribute("aria-busy",!0),i.setAttribute("aria-selected",t.getState().selected_task==e.id||t.isSelectedTask&&t.isSelectedTask(e.id)?"true":"false"))},setTaskBarAttr:function(e,i){this._taskCommonAttr(e,i),!t.isReadonly(e)&&t.config.drag_move&&(e.id!=t.getState().drag_id?i.setAttribute("aria-grabbed",!1):i.setAttribute("aria-grabbed",!0))},taskRowAttr:function(e,i){this._taskCommonAttr(e,i),!t.isReadonly(e)&&t.config.order_branch&&i.setAttribute("aria-grabbed",!1),i.setAttribute("role","row"),i.setAttribute("aria-level",e.$level),t.hasChild(e.id)&&i.setAttribute("aria-expanded",e.$open?"true":"false")},linkAttr:function(e,i){var r=t.config.links,a=e.type==r.finish_to_start||e.type==r.start_to_start,s=e.type==r.start_to_start||e.type==r.start_to_finish,o=t.locale.labels.link+" "+t.templates.drag_link(e.source,s,e.target,a);i.setAttribute("aria-label",n(o)),t.isReadonly(e)&&i.setAttribute("aria-readonly",!0)},gridSeparatorAttr:function(t){t.setAttribute("role","separator")},lightboxHiddenAttr:function(t){t.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(t){t.setAttribute("aria-hidden","false")},lightboxAttr:function(t){t.setAttribute("role","dialog"),t.setAttribute("aria-hidden","true"),t.firstChild.setAttribute("role","heading")},lightboxButtonAttrString:function(e){return this.getAttributeString({role:"button","aria-label":t.locale.labels[e],tabindex:"0"})},lightboxHeader:function(t,e){t.setAttribute("aria-label",e)},lightboxSelectAttrString:function(e){var i="";switch(e){case"%Y":i=t.locale.labels.years;break;case"%m":i=t.locale.labels.months;break;case"%d":i=t.locale.labels.days;break;case"%H:%i":i=t.locale.labels.hours+t.locale.labels.minutes}return t._waiAria.getAttributeString({"aria-label":i})},lightboxDurationInputAttrString:function(e){return this.getAttributeString({"aria-label":t.locale.labels.column_duration,"aria-valuemin":"0"})},gridAttrString:function(){return[" role='treegrid'",t.config.multiselect?"aria-multiselectable='true'":"aria-multiselectable='false'"," "].join(" ")},gridScaleRowAttrString:function(){return"role='row'"},gridScaleCellAttrString:function(e,i){var n="";if("add"==e.name)n=this.getAttributeString({role:"button","aria-label":t.locale.labels.new_task});else{var r={role:"columnheader","aria-label":i};t._sort&&t._sort.name==e.name&&("asc"==t._sort.direction?r["aria-sort"]="ascending":r["aria-sort"]="descending"),n=this.getAttributeString(r)}return n},gridDataAttrString:function(){return"role='rowgroup'"},gridCellAttrString:function(t,e){return this.getAttributeString({role:"gridcell","aria-label":e})},gridAddButtonAttrString:function(e){return this.getAttributeString({role:"button","aria-label":t.locale.labels.new_task})},messageButtonAttrString:function(t){return"tabindex='0' role='button' aria-label='"+t+"'"},messageInfoAttr:function(t){t.setAttribute("role","alert")},messageModalAttr:function(t,e){t.setAttribute("role","dialog"),e&&t.setAttribute("aria-labelledby",e)},quickInfoAttr:function(t){t.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' "},quickInfoHeader:function(t,e){t.setAttribute("aria-label",e)},quickInfoButtonAttrString:function(e){return t._waiAria.getAttributeString({role:"button","aria-label":e,tabindex:"0"})},tooltipAttr:function(t){t.setAttribute("role","tooltip")},tooltipVisibleAttr:function(t){t.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(t){t.setAttribute("aria-hidden","true")}},t._waiAria)t._waiAria[s]=function(e){return function(){return t.config.wai_aria_attributes?e.apply(this,arguments):""}}(t._waiAria[s])}},function(t,e){t.exports=function(t){t.getGridColumn=function(e){for(var i=t.config.columns,n=0;n=0?"&":"?",r=t.getScrollState().y||0;t.load(i+n+"parent_id="+encodeURIComponent(e),this._load_type,function(){r&&t.scrollTo(null,r)}),t.setUserData(e,"was_rendered",!0)}})}},function(t,e){t.exports=function(t){function e(e){return function(){return!t.config.auto_types||t.getTaskType(t.config.types.project)!=t.config.types.project||e.apply(this,arguments)}}function i(e){t.batchUpdate(function(){!function e(i){!function(e){e=e.id||e;var i=t.getTask(e),n=a(i);!1!==n&&r(i,n)}(i);var n=t.getParent(i);n!=t.config.root_id&&e(n)}(e)})}var n;function r(e,i){e.type=i,t.updateTask(e.id)}function a(e){var i=t.config.types,n=t.hasChild(e.id),r=t.getTaskType(e.type);return n&&r===i.task?i.project:!n&&r===i.project&&i.task}var s,o,l=!0;function c(e){e!=t.config.root_id&&t.isTaskExists(e)&&i(e)}t.attachEvent("onParse",e(function(){l=!1,t.batchUpdate(function(){t.eachTask(function(t){var e=a(t);!1!==e&&r(t,e)})}),l=!0})),t.attachEvent("onAfterTaskAdd",function(){l&&e(i)}),t.attachEvent("onAfterTaskUpdate",function(){l&&e(i)}),t.attachEvent("onBeforeTaskDelete",e(function(e,i){return n=t.getParent(e),!0})),t.attachEvent("onAfterTaskDelete",e(function(t,e){c(n)})),t.attachEvent("onRowDragStart",e(function(e,i,n){return s=t.getParent(e),!0})),t.attachEvent("onRowDragEnd",e(function(t,e){c(s),i(t)})),t.attachEvent("onBeforeTaskMove",e(function(e,i,n){return o=t.getParent(e),!0})),t.attachEvent("onAfterTaskMove",e(function(t,e,n){document.querySelector(".gantt_drag_marker")||(c(o),i(t))}))}},function(t,e){t.exports=function(t){function e(e){return function(){return!t.config.placeholder_task||e.apply(this,arguments)}}function i(){var e=t.getTaskBy("type",t.config.types.placeholder);if(!e.length||!t.isTaskExists(e[0].id)){var i={unscheduled:!0,type:t.config.types.placeholder,duration:0,text:t.locale.labels.new_task};if(!1===t.callEvent("onTaskCreated",[i]))return;t.addTask(i)}}function n(e){var i=t.getTask(e);i.type==t.config.types.placeholder&&(i.start_date&&i.end_date&&i.unscheduled&&(i.unscheduled=!1),t.batchUpdate(function(){var e=t.copy(i);t.silent(function(){t.deleteTask(i.id)}),delete e["!nativeeditor_status"],e.type=t.config.types.task,e.id=t.uid(),t.addTask(e)}))}t.config.types.placeholder="placeholder",t.attachEvent("onDataProcessorReady",e(function(i){i&&!i._silencedPlaceholder&&(i._silencedPlaceholder=!0,i.attachEvent("onBeforeUpdate",e(function(e,n,r){return r.type!=t.config.types.placeholder||(i.setUpdated(e,!1),!1)})))}));var r=!1;t.attachEvent("onGanttReady",function(){r||(r=!0,t.attachEvent("onAfterTaskUpdate",e(n)),t.attachEvent("onAfterTaskAdd",e(function(e,n){n.type!=t.config.types.placeholder&&(t.getTaskBy("type",t.config.types.placeholder).forEach(function(e){t.silent(function(){t.isTaskExists(e.id)&&t.deleteTask(e.id)})}),i())})),t.attachEvent("onParse",e(i)))}),t.attachEvent("onBeforeUndoStack",function(e){for(var i=0;i"+_+""),p&&(_="
"+_),_&&(y.innerHTML=_),c.push(y)}}var k=null;if(c.length){for(k=document.createElement("div"),u=0;u0&&g+_>=v+2&&(l=0),s&&!y?s=0:s<0&&!m?s=0:s>0&&m+y>=k&&(s=0);var b=t.config.autoscroll_step;b&&b<2&&(b=2),s*=b||i,l*=b||i,(s||l)&&function(e,i){var n=t.getScrollState(),r=null,a=null;e&&(r=n.x+e,r=Math.min(n.width,r),r=Math.max(0,r));i&&(a=n.y+i,a=Math.min(n.height,a),a=Math.max(0,a));t.scrollTo(r,a)}(s,l)}function p(t,i,n){return t-e<0&&ti-e&&t>n?1:0}t.attachEvent("onGanttReady",function(){t.eventRemove(document.body,"mousemove",g),t.event(document.body,"mousemove",g)})}},function(t,e,i){t.exports=function(t){for(var e=[i(80),i(79),i(78),i(77),i(76),i(75),i(74),i(73)],n=0;nr.indexOf("/task")?"links":"tasks",i.setGanttMode(n);var a=e.apply(i,arguments);return i.setGanttMode(n),a},i._getRowData=t.bind(function(e,n){var a;a="tasks"==i._ganttMode?this.isTaskExists(e)?this.getTask(e):{id:e}:this.isLinkExists(e)?this.getLink(e):{id:e},a=t.copy(a);var s={};for(var o in a)if("$"!=o.substr(0,1)){var l=a[o];r.isDate(l)?s[o]=this.templates.xml_format(l):s[o]=null===l?"":l}var c=this._get_task_timing_mode(a);return c.$no_start&&(a.start_date="",a.duration=""),c.$no_end&&(a.end_date="",a.duration=""),s[i.action_param]=this.getUserData(e,i.action_param),s},t)}.call(this,t,s),function(t,e){t._change_id=t.bind(function(t,i){"tasks"!=e._ganttMode?this.changeLinkId(t,i):this.changeTaskId(t,i)},this),t._row_style=function(i,n){"tasks"==e._ganttMode&&t.isTaskExists(i)&&(t.getTask(i).$dataprocessor_class=n,t.refreshTask(i))},t._delete_task=function(t,e){},t._sendTaskOrder=function(t,i){i.$drop_target&&(e.setGanttMode("tasks"),this.getTask(t).target=i.$drop_target,e.setUpdated(t,!0,"order"),delete this.getTask(t).$drop_target)},this._dp=e}.call(this,t,s),function(t,e){function n(i){for(var n=e.updatedRows.slice(),r=!1,a=0;a-1?e.indexOf("?"):e.length),this.serverProcessor=e+("/"==e.slice(-1)?"":"/")+i}else this.serverProcessor=e+t.ajax.urlSeparator(e)+"gantt_mode="+this._ganttMode;return!0})}.call(this,t,s),s.attachEvent("onDestroy",function(){!function(t,i){delete i.$gantt,delete i.setGanttMode,delete i._getRowData,i.afterUpdate=e,delete t._dp,delete t._change_id,delete t._row_style,delete t._delete_task,delete t._sendTaskOrder,r.forEach(a,function(e){t.detachEvent(e)}),a=[]}(t,s)}),n(t,s),t.callEvent("onDataProcessorReady",[s])},t.getUserData=function(t,e){return this.userdata||(this.userdata={}),this.userdata[t]&&this.userdata[t][e]?this.userdata[t][e]:""},t.setUserData=function(t,e,i){this.userdata||(this.userdata={}),this.userdata[t]||(this.userdata[t]={}),this.userdata[t][e]=i}}},function(t,e){t.exports={bindDataStore:function(t,e){var i=e.getDatastore(t),n=function(t,e){var n=e.getLayers(),r=i.getItem(t);if(r&&i.isVisible(t))for(var a=0;ar||+i.end_date<+n)return!1}return!0}),s.attachEvent("onIdChange",function(e,i){t._update_flags(e,i)}),s.attachEvent("onAfterUpdate",function(e){if(t._update_parents(e),t.getState("batchUpdate").batch_update)return!0;for(var i=s.getItem(e),n=0;nl[1]&&(t.config.grid_width=l[1]),r&&t.config.show_chart)if(a.$config.width=t.config.grid_width-1,i)a.$parent.$config.width=t.config.grid_width,a.$parent.$config.group&&t.$layout._syncCellSizes(a.$parent.$config.group,a.$parent.$config.width);else if(r&&!n.isChildOf(r.$task,e.$view)){if(!a.$config.original_grid_width){var c=t.skins[t.skin];c&&c.config&&c.config.grid_width?a.$config.original_grid_width=c.config.grid_width:a.$config.original_grid_width=0}t.config.grid_width=a.$config.original_grid_width,a.$parent.$config.width=t.config.grid_width}else a.$parent._setContentSize(a.$config.width,a.$config.height),t.$layout._syncCellSizes(a.$parent.$config.group,t.config.grid_width);else r&&n.isChildOf(r.$task,e.$view)&&(a.$config.original_grid_width=t.config.grid_width),i||(a.$parent.$config.width=0)}i=!1}}),this._initScrollStateEvents(e)},_initScrollStateEvents:function(e){t._getVerticalScrollbar=this.getVerticalScrollbar,t._getHorizontalScrollbar=this.getHorizontalScrollbar;var i=this.getVerticalScrollbar(),n=this.getHorizontalScrollbar();i&&i.attachEvent("onScroll",function(e,i,n){var r=t.getScrollState();t.callEvent("onGanttScroll",[r.x,e,r.x,i])}),n&&n.attachEvent("onScroll",function(e,i,n){var r=t.getScrollState();t.callEvent("onGanttScroll",[e,r.y,i,r.y])}),e.attachEvent("onResize",function(){i&&!t.$scroll_ver&&(t.$scroll_ver=i.$scroll_ver),n&&!t.$scroll_hor&&(t.$scroll_hor=n.$scroll_hor)})},_findGridResizer:function(t,e){for(var i,n=t.getCellsByType("resizer"),r=!0,a=0;a"+e.templates.drag_link(i.link_source_id,i.link_from_start,i.link_target_id,i.link_to_start)+"";t.innerHTML=a}function _(){s=o=r=null,a=!0}function p(t,e,i,n){return e>=t?n<=i?1:4:n<=i?2:3}u.attachEvent("onBeforeDragStart",e.bind(function(i,r){var a=r.target||r.srcElement;if(_(),e.getState().drag_id)return!1;if(n.locateClassName(a,"gantt_link_point")){n.locateClassName(a,"task_start_date")&&(o=!0);var l=e.locate(r);s=l;var c=e.getTask(l);if(e.isReadonly(c))return _(),!1;return this._dir_start=f(c,!!o,0,t.$getConfig(),!0),!0}return!1},this)),u.attachEvent("onAfterDragStart",e.bind(function(t,i){e.config.touch&&e.refreshData(),g(u.config.marker)},this)),u.attachEvent("onDragMove",e.bind(function(s,o){var c=u.config,d=u.getPosition(o);!function(t,e){t.style.left=e.x+5+"px",t.style.top=e.y+5+"px"}(c.marker,d);var h=!!n.locateClassName(o,"gantt_link_control"),_=r,v=i,m=a,y=e.locate(o),k=!0;if(h&&(k=!n.locateClassName(o,"task_end_date"),h=!!y),r=y,i=h,a=k,h){var b=e.getTask(y),$=t.$getConfig(),x=n.locateClassName(o,"gantt_link_control"),w=0;x&&(w=Math.floor(x.offsetWidth/2)),this._dir_end=f(b,!!a,w,$)}else this._dir_end=n.getRelativeEventPosition(o,t.$task_data);var S=!(v==h&&_==y&&m==k);return S&&(_&&e.refreshTask(_,!1),y&&e.refreshTask(y,!1)),S&&g(c.marker),function(i,n,r,a){var s=function(){u._direction||(u._direction=document.createElement("div"),t.$task_links.appendChild(u._direction));return u._direction}(),o=l(),c=["gantt_link_direction"];e.templates.link_direction_class&&c.push(e.templates.link_direction_class(o.link_source_id,o.link_from_start,o.link_target_id,o.link_to_start));var d=Math.sqrt(Math.pow(r-i,2)+Math.pow(a-n,2));if(!(d=Math.max(0,d-3)))return;s.className=c.join(" ");var h=(a-n)/(r-i),f=Math.atan(h);2==p(i,r,n,a)?f+=Math.PI:3==p(i,r,n,a)&&(f-=Math.PI);var g=Math.sin(f),_=Math.cos(f),v=Math.round(n),m=Math.round(i),y=["-webkit-transform: rotate("+f+"rad)","-moz-transform: rotate("+f+"rad)","-ms-transform: rotate("+f+"rad)","-o-transform: rotate("+f+"rad)","transform: rotate("+f+"rad)","width:"+Math.round(d)+"px"];if(-1!=window.navigator.userAgent.indexOf("MSIE 8.0")){y.push('-ms-filter: "'+function(t,e){return"progid:DXImageTransform.Microsoft.Matrix(M11 = "+e+",M12 = -"+t+",M21 = "+t+",M22 = "+e+",SizingMethod = 'auto expand')"}(g,_)+'"');var k=Math.abs(Math.round(i-r)),b=Math.abs(Math.round(a-n));switch(p(i,r,n,a)){case 1:v-=b;break;case 2:m-=k,v-=b;break;case 3:m-=k}}y.push("top:"+v+"px"),y.push("left:"+m+"px"),s.style.cssText=y.join(";")}(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y),!0},this)),u.attachEvent("onDragEnd",e.bind(function(){var t=l();if(t.link_source_id&&t.link_target_id&&t.link_source_id!=t.link_target_id){var i=e._get_link_type(t.link_from_start,t.link_to_start),n={source:t.link_source_id,target:t.link_target_id,type:i};n.type&&e.isLinkAllowed(n)&&e.addLink(n)}_(),e.config.touch?e.refreshData():(t.link_source_id&&e.refreshTask(t.link_source_id,!1),t.link_target_id&&e.refreshTask(t.link_target_id,!1)),u._direction&&(u._direction.parentNode&&u._direction.parentNode.removeChild(u._direction),u._direction=null)},this))};t.exports={createLinkDND:function(){return{init:r}}}},function(t,e,i){var n=i(1),r=i(0),a=i(33);t.exports={createTaskDND:function(){var t;return{extend:function(e){e.roundTaskDates=function(e){t.round_task_dates(e)}},init:function(e,i){return t=function(t,e){var i=e.$services;return{drag:null,dragMultiple:{},_events:{before_start:{},before_finish:{},after_finish:{}},_handlers:{},init:function(){this._domEvents=e._createDomEventScope(),this.clear_drag_state();var t=e.config.drag_mode;this.set_actions(),i.getService("state").registerProvider("tasksDnd",r.bind(function(){return{drag_id:this.drag?this.drag.id:void 0,drag_mode:this.drag?this.drag.mode:void 0,drag_from_start:this.drag?this.drag.left:void 0}},this));var n={before_start:"onBeforeTaskDrag",before_finish:"onBeforeTaskChanged",after_finish:"onAfterTaskDrag"};for(var a in this._events)for(var s in t)this._events[a][s]=n[a];this._handlers[t.move]=this._move,this._handlers[t.resize]=this._resize,this._handlers[t.progress]=this._resize_progress},set_actions:function(){var i=t.$task_data;this._domEvents.attach(i,"mousemove",e.bind(function(t){this.on_mouse_move(t||event)},this)),this._domEvents.attach(i,"mousedown",e.bind(function(t){this.on_mouse_down(t||event)},this)),this._domEvents.attach(i,"mouseup",e.bind(function(t){this.on_mouse_up(t||event)},this))},clear_drag_state:function(){this.drag={id:null,mode:null,pos:null,start_x:null,start_y:null,obj:null,left:null},this.dragMultiple={}},_resize:function(i,n,r){var a=t.$getConfig(),s=this._drag_task_coords(i,r);r.left?(i.start_date=e.dateFromPos(s.start+n),i.start_date||(i.start_date=new Date(e.getState().min_date))):(i.end_date=e.dateFromPos(s.end+n),i.end_date||(i.end_date=new Date(e.getState().max_date))),i.end_date-i.start_datec){var d=c-o.end;(d50||this._is_number(r)&&this._is_number(s)&&this._mouse_position_change({x:r,y:s},i)>20)&&this._start_dnd(t)}if(this.drag.mode){if(!a(this,40))return;this._update_on_move(t)}},_update_item_on_move:function(t,i,n,r,a){var s=e.getTask(i),o=e.mixin({},s),l=e.mixin({},s);this._handlers[n].apply(this,[l,t,r]),e.mixin(s,l,!0),e.callEvent("onTaskDrag",[s.id,n,l,o,a]),e.mixin(s,l,!0),e.refreshTask(i)},_update_on_move:function(i){var a=this.drag,s=t.$getConfig();if(a.mode){var o=n.getRelativeEventPosition(i,t.$task_data);if(a.pos&&a.pos.x==o.x)return;a.pos=o;var l=e.dateFromPos(o.x);if(!l||isNaN(l.getTime()))return;var c=o.x-a.start_x,d=e.getTask(a.id);if(this._handlers[a.mode]){if(e.isSummaryTask(d)&&e.config.drag_project&&a.mode==s.drag_mode.move){var h={};h[a.id]=r.copy(a);var u=this._find_max_shift(r.mixin(h,this.dragMultiple),c);for(var f in void 0!==u&&(c=u),this._update_item_on_move(c,a.id,a.mode,a,i),this.dragMultiple){var g=this.dragMultiple[f];this._update_item_on_move(c,g.id,g.mode,g,i)}}else this._update_item_on_move(c,a.id,a.mode,a,i);e._update_parents(a.id)}}},on_mouse_down:function(i,r){if(2!=i.button||void 0===i.button){var a=t.$getConfig(),s=e.locate(i),o=null;if(e.isTaskExists(s)&&(o=e.getTask(s)),!e.isReadonly(o)&&!this.drag.mode){this.clear_drag_state(),r=r||i.target||i.srcElement;var l=n.getClassName(r),c=this._get_drag_mode(l,r);if(!l||!c)return r.parentNode?this.on_mouse_down(i,r.parentNode):void 0;if(c)if(c.mode&&c.mode!=a.drag_mode.ignore&&a["drag_"+c.mode]){if(s=e.locate(r),o=e.copy(e.getTask(s)||{}),e.isReadonly(o))return this.clear_drag_state(),!1;if(e.isSummaryTask(o)&&!a.drag_project&&c.mode!=a.drag_mode.progress)return void this.clear_drag_state();c.id=s;var d=n.getRelativeEventPosition(i,e.$task_data);c.start_x=d.x,c.start_y=d.y,c.obj=o,this.drag.start_drag=c,this.drag.timestamp=Date.now()}else this.clear_drag_state();else if(e.checkEvent("onMouseDown")&&e.callEvent("onMouseDown",[l.split(" ")[0]])&&r.parentNode)return this.on_mouse_down(i,r.parentNode)}}},_fix_dnd_scale_time:function(i,n){var r=t.$getConfig(),a=e.getScale().unit,s=e.getScale().step;function o(i){if(e.config.correct_work_time){var n=t.$getConfig();e.isWorkTime(i.start_date,void 0,i)||(i.start_date=e.calculateEndDate({start_date:i.start_date,duration:-1,unit:n.duration_unit,task:i}))}}r.round_dnd_dates||(a="minute",s=r.time_step),n.mode==r.drag_mode.resize?n.left?(i.start_date=e.roundDate({date:i.start_date,unit:a,step:s}),o(i)):(i.end_date=e.roundDate({date:i.end_date,unit:a,step:s}),function(i){if(e.config.correct_work_time){var n=t.$getConfig();e.isWorkTime(new Date(i.end_date-1),void 0,i)||(i.end_date=e.calculateEndDate({start_date:i.end_date,duration:1,unit:n.duration_unit,task:i}))}}(i)):n.mode==r.drag_mode.move&&(i.start_date=e.roundDate({date:i.start_date,unit:a,step:s}),o(i),i.end_date=e.calculateEndDate(i))},_fix_working_times:function(i,n){var r=t.$getConfig();(n=n||{mode:r.drag_mode.move}).mode==r.drag_mode.resize?n.left?i.start_date=e.getClosestWorkTime({date:i.start_date,dir:"future",task:i}):i.end_date=e.getClosestWorkTime({date:i.end_date,dir:"past",task:i}):n.mode==r.drag_mode.move&&e.correctTaskWorkTime(i)},_finalize_mouse_up:function(t,i,n,r){var a=e.getTask(t);if(i.work_time&&i.correct_work_time&&this._fix_working_times(a,n),this._fix_dnd_scale_time(a,n),this._fireEvent("before_finish",n.mode,[t,n.mode,e.copy(n.obj),r])){var s=t;e._init_task_timing(a),this.clear_drag_state(),e.updateTask(a.id),this._fireEvent("after_finish",n.mode,[s,n.mode,r])}else this.clear_drag_state(),t==n.id&&(n.obj._dhx_changed=!1,e.mixin(a,n.obj,!0)),e.refreshTask(a.id)},on_mouse_up:function(i){var n=this.drag;if(n.mode&&n.id){var r=t.$getConfig(),a=e.getTask(n.id),s=this.dragMultiple;if(e.isSummaryTask(a)&&r.drag_project&&n.mode==r.drag_mode.move)for(var o in s)this._finalize_mouse_up(s[o].id,r,s[o],i);this._finalize_mouse_up(n.id,r,n,i)}this.clear_drag_state()},_get_drag_mode:function(e,i){var n=t.$getConfig().drag_mode,r={mode:null,left:null};switch((e||"").split(" ")[0]){case"gantt_task_line":case"gantt_task_content":r.mode=n.move;break;case"gantt_task_drag":r.mode=n.resize;var a=i.getAttribute("data-bind-property");r.left="start_date"==a;break;case"gantt_task_progress_drag":r.mode=n.progress;break;case"gantt_link_control":case"gantt_link_point":r.mode=n.ignore;break;default:r=null}return r},_start_dnd:function(i){var n=this.drag=this.drag.start_drag;delete n.start_drag;var r=t.$getConfig(),a=n.id;if(r["drag_"+n.mode]&&e.callEvent("onBeforeDrag",[a,n.mode,i])&&this._fireEvent("before_start",n.mode,[a,n.mode,i])){delete n.start_drag;var s=e.getTask(a);e.isSummaryTask(s)&&e.config.drag_project&&n.mode==r.drag_mode.move&&e.eachTask(function(t){this.dragMultiple[t.id]=e.mixin({id:t.id,obj:t},this.drag)},s.id,this),e.callEvent("onTaskDragStart",[])}else this.clear_drag_state()},_fireEvent:function(t,i,n){e.assert(this._events[t],"Invalid stage:{"+t+"}");var r=this._events[t][i];return e.assert(r,"Unknown after drop mode:{"+i+"}"),e.assert(n,"Invalid event arguments"),!e.checkEvent(r)||e.callEvent(r,n)},round_task_dates:function(e){var i=this.drag,n=t.$getConfig();i||(i={mode:n.drag_mode.move}),this._fix_dnd_scale_time(e,i)},destructor:function(){this._domEvents.detachAll()}}}(e,i),e._tasks_dnd=t,t.init(i)},destructor:function(){t.destructor(),t=null}}}}},function(t,e,i){var n=i(0),r=i(95),a=i(94),s=i(1),o=function(t){var e=t.$services;return{onCreated:function(e){var s=e.$config;s.bind=n.defined(s.bind)?s.bind:"task",s.bindLinks=n.defined(s.bindLinks)?s.bindLinks:"link",e._linksDnD=a.createLinkDND(),e._tasksDnD=r.createTaskDND(),e._tasksDnD.extend(e),this._mouseDelegates=i(13)(t)},onInitialized:function(e){this._attachDomEvents(t),this._attachStateProvider(t,e),e._tasksDnD.init(e,t),e._linksDnD.init(e,t),"timeline"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){this._clearDomEvents(t),this._clearStateProvider(t)},extendDom:function(e){t.$task=e.$task,t.$task_scale=e.$task_scale,t.$task_data=e.$task_data,t.$task_bg=e.$task_bg,t.$task_links=e.$task_links,t.$task_bars=e.$task_bars},_clearDomEvents:function(){this._mouseDelegates.destructor(),this._mouseDelegates=null},_attachDomEvents:function(t){function e(e,i){if(e&&this.callEvent("onLinkDblClick",[e,i])){var n=this.getLink(e);if(this.isReadonly(n))return;var r=this.locale.labels.link+" "+this.templates.link_description(this.getLink(e))+" "+this.locale.labels.confirm_link_deleting;window.setTimeout(function(){t._dhtmlx_confirm(r,"",function(){t.deleteLink(e)})},this.config.touch?300:1)}}this._mouseDelegates.delegate("click","gantt_task_link",t.bind(function(t,e){var i=this.locate(t,this.config.link_attribute);i&&this.callEvent("onLinkClick",[i,t])},t),this.$task),this._mouseDelegates.delegate("click","gantt_scale_cell",t.bind(function(e,i){var n=s.getRelativeEventPosition(e,t.$task_data),r=t.dateFromPos(n.x),a=Math.floor(t.columnIndexByDate(r)),o=t.getScale().trace_x[a];t.callEvent("onScaleClick",[e,o])},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_task_link",t.bind(function(i,n,r){n=this.locate(i,t.config.link_attribute),e.call(this,n,i)},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_link_point",t.bind(function(t,i,n){i=this.locate(t);var r=this.getTask(i),a=null;return n.parentNode&&s.getClassName(n.parentNode)&&(a=s.getClassName(n.parentNode).indexOf("_left")>-1?r.$target[0]:r.$source[0]),a&&e.call(this,a,t),!1},t),this.$task)},_attachStateProvider:function(t,i){var n=i;e.getService("state").registerProvider("tasksTimeline",function(){return{scale_unit:n._tasks?n._tasks.unit:void 0,scale_step:n._tasks?n._tasks.step:void 0}})},_clearStateProvider:function(){e.getService("state").unregisterProvider("tasksTimeline")}}};t.exports=o},function(t,e,i){var n=i(1);function r(t,e){var i=n.getNodePosition(e.$grid_data);return t.x+=i.x-e.$grid.scrollLeft,t.y+=i.y-e.$grid_data.scrollTop,t}t.exports={removeLineHighlight:function(t){t.markerLine&&t.markerLine.parentNode&&t.markerLine.parentNode.removeChild(t.markerLine),t.markerLine=null},highlightPosition:function(t,e,i){var a=function(t,e){var i=n.getNodePosition(e.$grid_data),r=n.getRelativeEventPosition(t,e.$grid_data),a=e.$config.rowStore,s=i.x,o=r.y-10,l=e.$getConfig();oi.y+c-l.row_height&&(o=i.y+c-l.row_height),i.x=s,i.y=o,i}(t,i);e.marker.style.left="10px",e.marker.style.top=a.y+"px";var s=e.markerLine;s||((s=document.createElement("div")).className="gantt_drag_marker gantt_grid_dnd_marker",s.innerHTML="
",s.style.pointerEvents="none",document.body.appendChild(s),e.markerLine=s),t.child?function(t,e,i){var n=t.targetParent,a=r({x:0,y:i.getItemTop(n)},i);e.innerHTML="
",e.style.width=i.$grid_data.offsetWidth+"px",e.style.top=a.y+"px",e.style.left=a.x+"px",e.style.height=i.getItemHeight(n)+"px"}(t,s,i):function(t,e,i){var n=function(t,e){var i=e.$config.rowStore,n={x:0,y:0},a=e.$grid_data.querySelector(".gantt_tree_indent"),s=15,o=0;if(a&&(s=a.offsetWidth),t.targetId!==i.$getRootId()){var l=e.getItemTop(t.targetId),c=e.getItemHeight(t.targetId);if(o=i.exists(t.targetId)?i.calculateItemLevel(i.getItem(t.targetId)):0,t.prevSibling)n.y=l;else if(t.nextSibling){var d=0;i.eachItem(function(t){-1!==i.getIndexById(t.id)&&d++},t.targetId),n.y=l+c+d*c}else n.y=l+c,o+=1}return n.x=40+o*s,n.width=Math.max(e.$grid_data.offsetWidth-n.x,0),r(n,e)}(t,i);e.innerHTML="
",e.style.left=n.x+"px",e.style.height="4px",e.style.top=n.y-2+"px",e.style.width=n.width+"px"}(t,s,i)}}},function(t,e,i){var n=i(11);t.exports=function(t,e,i,r){var a;if(t!==r.$getRootId())a=e<.25?n.prevSiblingTarget(t,r):!(e>.6)||r.hasChild(t)&&r.getItem(t).$open?n.firstChildTarget(t,r):n.nextSiblingTarget(t,r);else{var s=r.$getRootId();a=r.hasChild(s)&&i>=0?n.lastChildTarget(s,r):n.firstChildTarget(s,r)}return a}},function(t,e,i){var n=i(11);function r(t,e,i,r){for(var a=t;i.exists(a);){var s=i.calculateItemLevel(i.getItem(a));if((s===e||s===e-1)&&i.getBranchIndex(a)>-1)break;a=r?i.getPrev(a):i.getNext(a)}return i.exists(a)?i.calculateItemLevel(i.getItem(a))===e?r?n.nextSiblingTarget(a,i):n.prevSiblingTarget(a,i):n.firstChildTarget(a,i):null}function a(t,e,i){return r(t,e,i,!0)}function s(t,e,i){return r(t,e,i,!1)}t.exports=function(t,e,i,r,o){var l;if(t!==r.$getRootId())e<.5?r.calculateItemLevel(r.getItem(t))===o?l=n.prevSiblingTarget(t,r):(l=a(t,o,r))&&(l=s(t,o,r)):r.calculateItemLevel(r.getItem(t))===o?l=n.nextSiblingTarget(t,r):(l=s(t,o,r))&&(l=a(t,o,r));else{var c=r.$getRootId(),d=r.getChildren(c);l=n.createDropTargetObject(),l=d.length&&i>=0?a(function(t){for(var e=t.getNext();t.exists(e);){var i=t.getNext(e);if(!t.exists(i))return e;e=i}return null}(r),o,r):s(c,o,r)}return l}},function(t,e,i){var n=i(1),r=i(11),a=i(99),s=i(98),o=i(97);t.exports={init:function(t,e){var i=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var l=new i(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(l.config.sensitivity=e.$getConfig().dnd_sensitivity),l.attachEvent("onBeforeDragStart",t.bind(function(i,n){var r=c(n);if(!r)return!1;t.hideQuickInfo&&t._hideQuickInfo();var a=r.getAttribute(e.$config.item_attribute),s=e.$config.rowStore.getItem(a);return!t.isReadonly(s)&&(l.config.initial_open_state=s.$open,!!t.callEvent("onRowDragStart",[a,n.target||n.srcElement,n])&&void 0)},t)),l.attachEvent("onAfterDragStart",t.bind(function(t,i){var n=c(i);l.config.marker.innerHTML=n.outerHTML;var a=l.config.marker.firstChild;a&&(l.config.marker.style.opacity=.4,a.style.position="static",a.style.pointerEvents="none"),l.config.id=n.getAttribute(e.$config.item_attribute);var s=e.$config.rowStore,o=s.getItem(l.config.id);l.config.level=s.calculateItemLevel(o),l.config.drop_target=r.createDropTargetObject({targetParent:s.getParent(o.id),targetIndex:s.getBranchIndex(o.id),targetId:o.id,nextSibling:!0}),o.$open=!1,o.$transparent=!0,this.refreshData()},t)),l.attachEvent("onDragMove",t.bind(function(i,n){var a=d(n);return a&&!1!==t.callEvent("onBeforeRowDragMove",[l.config.id,a.targetParent,a.targetIndex])||(a=r.createDropTargetObject(l.config.drop_target)),o.highlightPosition(a,l.config,e),l.config.drop_target=a,this.callEvent("onRowDragMove",[l.config.id,a.targetParent,a.targetIndex]),!0},t)),l.attachEvent("onDragEnd",t.bind(function(){var t=e.$config.rowStore,i=t.getItem(l.config.id);o.removeLineHighlight(l.config),i.$transparent=!1,i.$open=l.config.initial_open_state;var n=l.config.drop_target;!1===this.callEvent("onBeforeRowDragEnd",[l.config.id,n.targetParent,n.targetIndex])?i.$drop_target=null:(t.move(l.config.id,n.targetIndex,n.targetParent),this.callEvent("onRowDragEnd",[l.config.id,n.targetParent,n.targetIndex])),t.refresh(i.id)},t))}function c(t){return n.locateAttribute(t,e.$config.item_attribute)}function d(t){var i=function(t){var i=n.getRelativeEventPosition(t,e.$grid_data).y,r=e.$config.rowStore;if((i=i||0)<0)return r.$getRootId();var a=Math.floor(i/e.getItemHeight());return a>r.countVisible()-1?r.$getRootId():r.getIdByIndex(a)}(t),r=null,o=e.$config.rowStore,c=!e.$getConfig().order_branch_free,d=n.getRelativeEventPosition(t,e.$grid_data).y;return i!==o.$getRootId()&&(r=(d-e.getItemTop(i))/e.getItemHeight()),c?a(i,r,d,o,l.config.level):s(i,r,d,o)}}}},function(t,e,i){var n=i(1);t.exports={init:function(t,e){var i=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var r=new i(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(r.config.sensitivity=e.$getConfig().dnd_sensitivity),r.attachEvent("onBeforeDragStart",t.bind(function(i,n){var o=a(n);if(!o)return!1;t.hideQuickInfo&&t._hideQuickInfo();var l=o.getAttribute(e.$config.item_attribute),c=s().getItem(l);return!t.isReadonly(c)&&(r.config.initial_open_state=c.$open,!!t.callEvent("onRowDragStart",[l,n.target||n.srcElement,n])&&void 0)},t)),r.attachEvent("onAfterDragStart",t.bind(function(t,i){var n=a(i);r.config.marker.innerHTML=n.outerHTML;var o=r.config.marker.firstChild;o&&(o.style.position="static"),r.config.id=n.getAttribute(e.$config.item_attribute);var l=s(),c=l.getItem(r.config.id);r.config.index=l.getBranchIndex(r.config.id),r.config.parent=c.parent,c.$open=!1,c.$transparent=!0,this.refreshData()},t)),r.lastTaskOfLevel=function(t){for(var e=null,i=s().getItems(),n=0,r=i.length;ni.y+c-l.row_height&&(o=i.y+c-l.row_height),i.x=a,i.y=o,i},t),r._getTargetY=t.bind(function(t){var i=n.getNodePosition(e.$grid_data),r=t.pageY-i.y+(e.$state.scrollTop||0);return r<0&&(r=0),r},t),r._getTaskByY=t.bind(function(t,i){var n=e.$getConfig(),r=s();t=t||0;var a=Math.floor(t/n.row_height);return(a=ir.countVisible()-1?null:r.getIdByIndex(a)},t),r.attachEvent("onDragMove",t.bind(function(t,i){var n=r.config,a=r._getGridPos(i),o=e.$getConfig(),l=s();n.marker.style.left=a.x+10+"px",n.marker.style.top=a.y+"px";var c=l.getItem(r.config.id),d=r._getTargetY(i),h=r._getTaskByY(d,l.getIndexById(c.id));function u(t,e){return!l.isChildOf(f.id,e.id)&&(t.$level==e.$level||o.order_branch_free)}if(l.exists(h)||(h=r.lastTaskOfLevel(o.order_branch_free?c.$level:0))==r.config.id&&(h=null),l.exists(h)){var f=l.getItem(h);if(l.getIndexById(f.id)*o.row_height+o.row_height/2=0;)v=l.getIdByIndex(g-y),m=l.getItem(v),y++;if(c.id==f.id)return;u(f,c)&&c.id!=f.id?l.move(c.id,0,0,f.id):f.$level!=c.$level-1||l.getChildren(f.id).length?m&&u(m,c)&&c.id!=m.id&&l.move(c.id,-1,l.getParent(m.id)):l.move(c.id,0,f.id)}return!0},t)),r.attachEvent("onDragEnd",t.bind(function(){var t=s(),e=t.getItem(r.config.id);e.$transparent=!1,e.$open=r.config.initial_open_state,!1===this.callEvent("onBeforeRowDragEnd",[r.config.id,r.config.parent,r.config.index])?(t.move(r.config.id,r.config.index,r.config.parent),e.$drop_target=null):this.callEvent("onRowDragEnd",[r.config.id,e.$drop_target]),t.refresh(e.id)},t))}function a(t){return n.locateAttribute(t,e.$config.item_attribute)}function s(){return t.getDatastore(e.$config.bind)}}}},function(t,e,i){var n=i(0),r=i(101),a=i(100),s=function(t){return{onCreated:function(e){e.$config=n.mixin(e.$config,{bind:"task"}),"grid"==e.$config.id&&(this.extendGantt(e),t.ext.inlineEditors=t.ext._inlineEditors.createEditors(e),t.ext.inlineEditors.init()),this._mouseDelegates=i(13)(t)},onInitialized:function(e){var i=e.$getConfig();i.order_branch&&("marker"==i.order_branch?a.init(e.$gantt,e):r.init(e.$gantt,e)),this.initEvents(e,t),"grid"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){"grid"==e.$config.id&&t.ext.inlineEditors.destructor(),this.clearEvents(e,t)},initEvents:function(t,e){this._mouseDelegates.delegate("click","gantt_row",e.bind(function(i,n,r){var a=t.$getConfig();if(null!==n){var s=this.getTask(n);a.scroll_on_click&&!e._is_icon_open_click(i)&&this.showDate(s.start_date),e.callEvent("onTaskRowClick",[n,r])}},e),t.$grid),this._mouseDelegates.delegate("click","gantt_grid_head_cell",e.bind(function(i,n,r){var a=r.getAttribute("data-column-id");if(e.callEvent("onGridHeaderClick",[a,i])){var s=t.$getConfig();if("add"!=a){if(s.sort){for(var o,l=a,c=0;c",u=""):(h=g.template?g.template(e):e[g.name],n.isDate(h)&&(h=s.date_grid(h,e)),u=h,h="
"+h+"
");var _="gantt_cell"+(f?" gantt_last_cell":""),p=[];if(g.tree){for(var v=0;v"+p.join("")+"",l.push(d)}if(_=t.getGlobalTaskIndex(e.id)%2==0?"":" odd",_+=e.$transparent?" gantt_transparent":"",_+=e.$dataprocessor_class?" "+e.$dataprocessor_class:"",s.grid_row_class){var k=s.grid_row_class.call(t,e.start_date,e.end_date,e);k&&(_+=" "+k)}o.getSelectedId()==e.id&&(_+=" gantt_selected");var b=document.createElement("div");b.className="gantt_row"+_+" gantt_row_"+t.getTaskType(e.type);var $=i.getItemHeight();return b.style.height=$+"px",b.style.lineHeight=$+"px",a.smart_rendering&&(b.style.position="absolute",b.style.left="0px",b.style.top=i.getItemTop(e.id)+"px"),i.$config.item_attribute&&b.setAttribute(i.$config.item_attribute,e.id),t._waiAria.taskRowAttr(e,b),b.innerHTML=l.join(""),b}}},function(t,e){t.exports=function(t){var e={current_pos:null,dirs:{left:"left",right:"right",up:"up",down:"down"},path:[],clear:function(){this.current_pos=null,this.path=[]},point:function(e){this.current_pos=t.copy(e)},get_lines:function(t){this.clear(),this.point(t[0]);for(var e=1;et.x?this.dirs.right:e.y>t.y?this.dirs.down:this.dirs.up}},i={path:[],clear:function(){this.path=[]},current:function(){return this.path[this.path.length-1]},point:function(e){return e?(this.path.push(t.copy(e)),e):this.current()},point_to:function(i,n,r){r=r?{x:r.x,y:r.y}:t.copy(this.point());var a=e.dirs;switch(i){case a.left:r.x-=n;break;case a.right:r.x+=n;break;case a.up:r.y-=n;break;case a.down:r.y+=n}return this.point(r)},get_points:function(i,n){var r=this.get_endpoint(i,n),a=t.config,s=r.e_y-r.y,o=r.e_x-r.x,l=e.dirs;this.clear(),this.point({x:r.x,y:r.y});var c=2*a.link_arrow_size,d=this.get_line_type(i,n.$getConfig()),h=r.e_x>r.x;if(d.from_start&&d.to_start)this.point_to(l.left,c),h?(this.point_to(l.down,s),this.point_to(l.right,o)):(this.point_to(l.right,o),this.point_to(l.down,s)),this.point_to(l.right,c);else if(!d.from_start&&d.to_start)if(h=r.e_x>r.x+2*c,this.point_to(l.right,c),h)o-=c,this.point_to(l.down,s),this.point_to(l.right,o);else{o-=2*c;var u=s>0?1:-1;this.point_to(l.down,u*(a.row_height/2)),this.point_to(l.right,o),this.point_to(l.down,u*(Math.abs(s)-a.row_height/2)),this.point_to(l.right,c)}else d.from_start||d.to_start?d.from_start&&!d.to_start&&(h=r.e_x>r.x-2*c,this.point_to(l.left,c),h?(o+=2*c,u=s>0?1:-1,this.point_to(l.down,u*(a.row_height/2)),this.point_to(l.right,o),this.point_to(l.down,u*(Math.abs(s)-a.row_height/2)),this.point_to(l.left,c)):(o+=c,this.point_to(l.down,s),this.point_to(l.right,o))):(this.point_to(l.right,c),h?(this.point_to(l.right,o),this.point_to(l.down,s)):(this.point_to(l.down,s),this.point_to(l.right,o)),this.point_to(l.left,c));return this.path},get_line_type:function(e,i){var n=i.links,r=!1,a=!1;return e.type==n.start_to_start?r=a=!0:e.type==n.finish_to_finish?r=a=!1:e.type==n.finish_to_start?(r=!1,a=!0):e.type==n.start_to_finish?(r=!0,a=!1):t.assert(!1,"Invalid link type"),i.rtl&&(r=!r,a=!a),{from_start:r,to_start:a}},get_endpoint:function(e,i){var r=i.$getConfig(),a=this.get_line_type(e,r),s=a.from_start,o=a.to_start,l=t.getTask(e.source),c=t.getTask(e.target),d=n(l,i),h=n(c,i);return{x:s?d.left:d.left+d.width,e_x:o?h.left:h.left+h.width,y:d.top,e_y:h.top}}};function n(e,i){var n=i.$getConfig(),r=i.getItemPosition(e);if(t.getTaskType(e.type)==n.types.milestone){var a=t.getTaskHeight(),s=Math.sqrt(2*a*a);r.left-=s/2,r.width=s}return r}return function(n,r){var a=r.$getConfig(),s=i.get_endpoint(n,r),o=s.e_y-s.y;if(!(s.e_x-s.x||o))return null;var l=i.get_points(n,r),c=e.get_lines(l,r),d=document.createElement("div"),h="gantt_task_link";n.color&&(h+=" gantt_link_inline_color");var u=t.templates.link_class?t.templates.link_class(n):"";u&&(h+=" "+u),a.highlight_critical_path&&t.isCriticalLink&&t.isCriticalLink(n)&&(h+=" gantt_critical_link"),d.className=h,r.$config.link_attribute&&d.setAttribute(r.$config.link_attribute,n.id);for(var f=0;f0){var h=document.createElement("div");h.style.width=c+"px",d="gantt_task_cell"+(l==s-1?" gantt_last_cell":""),(f=r.task_cell_class(e,a.trace_x[l]))&&(d+=" "+f),h.className=d,o.appendChild(h)}}var u=t.getGlobalTaskIndex(e.id)%2!=0,f=r.task_row_class(e.start_date,e.end_date,e),g="gantt_task_row"+(u?" odd":"")+(f?" "+f:"");return i.$config.rowStore.getSelectedId()==e.id&&(g+=" gantt_selected"),o.className=g,n.smart_rendering&&(o.style.position="absolute",o.style.top=i.getItemTop(e.id)+"px",o.style.width="100%"),o.style.height=n.row_height+"px",i.$config.item_attribute&&o.setAttribute(i.$config.item_attribute,e.id),o}}},function(t,e,i){t.exports=function(t){var e=i(27)(t);return function(i,n){if(t.isSplitTask(i)){for(var r=document.createElement("div"),a=t.getTaskPosition(i),s=t.getChildren(i.id),o=0;o";n.innerHTML=r},hide:function(){},set_value:function(e,i,n,r){this.get_input(r).value=s(e,n.editor,t)},get_value:function(t,e,i){return a(this.get_input(i).value||"",e.editor)},save:function(e,i,n){var r=o(t.getTask(e),this.get_value(e,i,n));(r.add.length||r.remove.length)&&t.batchUpdate(function(){r.add.forEach(function(e){t.addLink(e)}),r.remove.forEach(function(e){t.deleteLink(e)}),t.autoSchedule&&t.autoSchedule()})},is_changed:function(e,i,n,r){var o=this.get_value(i,n,r),l=a(s(e,n.editor,t),n.editor);return o.join()!==l.join()}},!0),r}},function(t,e,i){t.exports=function(t){var e=i(7)(t),n=i(0),r="%Y-%m-%d",a=null,s=null;function o(){return e.apply(this,arguments)||this}return i(2)(o,e),n.mixin(o.prototype,{show:function(e,i,n,o){a||(a=t.date.date_to_str(r)),s||(s=t.date.str_to_date(r));var l="
";o.innerHTML=l},set_value:function(t,e,i,n){this.get_input(n).value=a(t)},is_valid:function(t,e,i,n){return!(!t||isNaN(t.getTime()))},get_value:function(t,e,i){var n;try{n=s(this.get_input(i).value||"")}catch(t){n=null}return n}},!0),o}},function(t,e,i){t.exports=function(t){var e=i(7)(t),n=i(0);function r(){return e.apply(this,arguments)||this}return i(2)(r,e),n.mixin(r.prototype,{show:function(t,e,i,n){for(var r="
",n.innerHTML=r},get_input:function(t){return t.querySelector("select")}},!0),r}},function(t,e,i){t.exports=function(t){var e=i(7)(t),n=i(0);function r(){return e.apply(this,arguments)||this}return i(2)(r,e),n.mixin(r.prototype,{show:function(t,e,i,n){var r="
";n.innerHTML=r},get_value:function(t,e,i){return this.get_input(i).value||""},is_valid:function(t,e,i,n){return!isNaN(parseInt(t,10))}},!0),r}},function(t,e,i){t.exports=function(t){var e=i(7)(t),n=i(0);function r(){return e.apply(this,arguments)||this}return i(2)(r,e),n.mixin(r.prototype,{show:function(t,e,i,n){var r="
";n.innerHTML=r}},!0),r}},function(t,e){t.exports={init:function(t,e){var i=t,n=e.$gantt,r=null,a=n.ext.keyboardNavigation;a.attachEvent("onBeforeFocus",function(e){var n=t.locateCell(e);if(clearTimeout(r),n){var a=n.columnName,s=n.id,o=i.getState();if(i.isVisible()&&o.id==s&&o.columnName===a)return!1}return!0}),a.attachEvent("onFocus",function(e){var n=t.locateCell(e),a=t.getState();return clearTimeout(r),!n||n.id==a.id&&n.columnName==a.columnName||i.isVisible()&&i.save(),!0}),t.attachEvent("onHide",function(){clearTimeout(r)}),a.attachEvent("onBlur",function(){return r=setTimeout(function(){i.save()}),!0}),n.attachEvent("onTaskDblClick",function(e,i){var n=t.getState(),r=t.locateCell(i.target);return!r||!t.isVisible()||r.columnName!=n.columnName}),n.attachEvent("onTaskClick",function(e,i){if(n._is_icon_open_click(i))return!0;var r=t.getState(),a=t.locateCell(i.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),n.attachEvent("onEmptyClick",function(){return i.save(),!0}),a.attachEvent("onKeyDown",function(e,r){var s=t.locateCell(r.target),o=!!s&&t.getEditorConfig(s.columnName),l=t.getState(),c=n.constants.KEY_CODES,d=r.keyCode,h=!1;switch(d){case c.ENTER:t.isVisible()?(t.save(),r.preventDefault(),h=!0):o&&!(r.ctrlKey||r.metaKey||r.shiftKey)&&(i.startEdit(s.id,s.columnName),r.preventDefault(),h=!0);break;case c.ESC:t.isVisible()&&(t.hide(),r.preventDefault(),h=!0);break;case c.UP:case c.DOWN:break;case c.LEFT:case c.RIGHT:"date"===l.editorType&&(h=!0);break;case c.SPACE:t.isVisible()&&(h=!0),o&&!t.isVisible()&&(i.startEdit(s.id,s.columnName),r.preventDefault(),h=!0);break;case c.DELETE:o&&!t.isVisible()&&(i.startEdit(s.id,s.columnName),h=!0);break;case c.TAB:if(t.isVisible()){r.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);var u=t.getState();u.id&&a.focus({type:"taskCell",id:u.id,column:u.columnName}),r.preventDefault(),h=!0}break;default:t.isVisible()?h=!0:(d>=48&&d<=57||d>95&&d<112||d>=64&&d<=91||d>185&&d<193||d>218&&d<223)&&o&&!t.isVisible()&&(i.startEdit(s.id,s.columnName),h=!0)}return!h})},onShow:function(t,e,i){},onHide:function(t,e,i){i.$gantt.focus()},destroy:function(){}}},function(t,e){t.exports={init:function(t,e){var i=e.$gantt;i.attachEvent("onTaskClick",function(e,n){if(i._is_icon_open_click(n))return!0;var r=t.getState(),a=t.locateCell(n.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),i.attachEvent("onEmptyClick",function(){return t.hide(),!0}),i.attachEvent("onTaskDblClick",function(e,i){var n=t.getState(),r=t.locateCell(i.target);return!r||!t.isVisible()||r.columnName!=n.columnName})},onShow:function(t,e,i){if(!i.$getConfig().keyboard_navigation){var n=i.$gantt;e.onkeydown=function(e){e=e||window.event;var i=n.constants.KEY_CODES;if(!(e.defaultPrevented||e.shiftKey&&e.keyCode!=i.TAB)){var r=!0;switch(e.keyCode){case n.keys.edit_save:t.save();break;case n.keys.edit_cancel:t.hide();break;case i.TAB:e.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);break;default:r=!1}r&&e.preventDefault()}}}},onHide:function(){},destroy:function(){}}},function(t,e,i){var n=i(113),r=i(112);t.exports=function(t){var e=null;return{setMapping:function(t){e=t},getMapping:function(){return e||(t.config.keyboard_navigation_cells?r:n)}}}},function(t,e,i){var n=i(114),r=i(111),a=i(110),s=i(109),o=i(108),l=i(107),c=i(0),d=i(1),h=i(4);function u(t){t.config.editor_types={text:new(r(t)),number:new(a(t)),select:new(s(t)),date:new(o(t)),predecessor:new(l(t))}}t.exports=function(t){var e=n(t),i={};h(i);var r={init:u,createEditors:function(n){function r(t,e){var i=function(t,e){for(var i=n.getItemTop(t),r=n.getItemHeight(t),a=n.getGridColumns(),s=0,o=0,l=0;l0?t.getNext(this._itemId):t.getPrev(this._itemId)},editNextRow:function(){var t=this.getNextCell(1);t&&this.startEdit(t,this._columnName)},editPrevRow:function(){var t=this.getNextCell(-1);t&&this.startEdit(t,this._columnName)},destructor:function(){a.forEach(function(t){s.detachEvent(t)}),s=null,this.hide(),this.detachAllEvents()}};return c.mixin(o,e),c.mixin(o,i),o}};return c.mixin(r,e),c.mixin(r,i),r}},function(t,e,i){var n=i(0),r=i(28),a=i(12),s=i(2),o=function(t){function e(e,i,n,r){var a=t.apply(this,arguments)||this;return a.$config.bindLinks=null,a}return s(e,t),n.mixin(e.prototype,{_createLayerConfig:function(){var t=this,e=function(){return t.isVisible()};return{tasks:[{renderer:this.$gantt.$ui.layers.resourceHistogram,container:this.$task_bars,filter:[e]},{renderer:this.$gantt.$ui.layers.taskBg,container:this.$task_bg,filter:[e]}],links:[]}}},!0),n.mixin(e.prototype,a(t),!0),e}(r);t.exports=o},function(t,e,i){var n=i(1),r=i(0),a=i(12),s=i(14),o=i(2),l=function(t){function e(e,i,n,r){return t.apply(this,arguments)||this}return o(e,t),r.mixin(e.prototype,{init:function(){void 0===this.$config.bind&&(this.$config.bind=this.$getConfig().resource_store),t.prototype.init.apply(this,arguments)},_initEvents:function(){var e=this.$gantt;t.prototype._initEvents.apply(this,arguments),this._mouseDelegates.delegate("click","gantt_row",e.bind(function(t,e,i){var r=this.$config.rowStore;if(!r)return!0;var a=n.locateAttribute(t,this.$config.item_attribute);return a&&r.select(a.getAttribute(this.$config.item_attribute)),!1},this),this.$grid)}},!0),r.mixin(e.prototype,a(e),!0),e}(s);t.exports=l},function(t,e,i){var n=i(1);t.exports=function(t,e){var i={column_before_start:t.bind(function(t,i,r){var a=e.$getConfig();if(!n.locateAttribute(r,a.grid_resizer_column_attribute))return!1;var s=this.locate(r,a.grid_resizer_column_attribute),o=e.getGridColumns()[s];return!1!==e.callEvent("onColumnResizeStart",[s,o])&&void 0},t),column_after_start:t.bind(function(t,i,n){var r=e.$getConfig(),a=this.locate(n,r.grid_resizer_column_attribute);t.config.marker.innerHTML="",t.config.marker.className+=" gantt_grid_resize_area",t.config.marker.style.height=e.$grid.offsetHeight+"px",t.config.marker.style.top="0px",t.config.drag_index=a},t),column_drag_move:t.bind(function(i,r,a){var s=e.$getConfig(),o=i.config,l=e.getGridColumns(),c=parseInt(o.drag_index,10),d=l[c],h=n.getNodePosition(e.$grid_scale),u=parseInt(o.marker.style.left,10),f=d.min_width?d.min_width:s.min_grid_column_width,g=e.$grid_data.offsetWidth,_=0,p=0;s.rtl?u=h.x+h.width-1-u:u-=h.x-1;for(var v=0;vg&&(u=g)}else if(!e.$config.scrollable){var y=u,k=0;for(v=c+1;vt.$container.offsetWidth&&(u=t.$container.offsetWidth-k)}return o.left=u-1,p=Math.abs(u-_),d.max_width&&p>d.max_width&&(p=d.max_width),s.rtl&&(_=h.width-_+2-p),o.marker.style.top=h.y+"px",o.marker.style.left=h.x-1+_+"px",o.marker.style.width=p+"px",e.callEvent("onColumnResize",[c,l[c],p-1]),!0},t),column_drag_end:t.bind(function(i,n,r){for(var a=e.$getConfig(),s=e.getGridColumns(),o=0,l=parseInt(i.config.drag_index,10),c=s[l],d=0;d",d.setAttribute(n.grid_resizer_column_attribute,o),t._waiAria.gridSeparatorAttr(d),e.$grid_scale.appendChild(d),d.style.left=Math.max(0,l)+"px"}}}}}},function(t,e,i){var n=i(0),r=i(8),a=function(t,e){var i={},n="gantt-static-bg-styles-"+t.uid();function r(t){var e=/^rgba?\(([\d]{1,3}), *([\d]{1,3}), *([\d]{1,3}) *(,( *[\d.]+ *))?\)$/i.exec(t);return e?{r:1*e[1],g:1*e[2],b:1*e[3],a:255*e[5]||255}:null}function a(t){return i[t]||null}function s(t,e,i){return(t+""+e+i.bottomBorderColor+i.rightBorderColor).replace(/[^\w\d]/g,"")}function o(t,e){i[t]=e}function l(t,e,i){var n=Math.floor(500/t)||1,a=Math.floor(500/e)||1,s=document.createElement("canvas");s.height=e*a,s.width=t*n;var o=s.getContext("2d");return function(t,e,i,n,a,s){var o=a.createImageData(e*n,t*i);o.imageSmoothingEnabled=!1;for(var c=1*s.rightBorderWidth,d=r(s.rightBorderColor),h=0,u=0,f=0,g=1;g<=n;g++)for(h=g*e-1,f=0;fh){for(var _=r,p=0,v=Math.floor(h/i.row_height)*i.row_height,m=l;_>0;){var y=Math.min(_,v);_-=v,(a=document.createElement("div")).style.height=y+"px",a.style.position="absolute",a.style.top=p+"px",a.style.left=d+"px",a.style.whiteSpace="no-wrap",a.className=t[s||g],f==c.length-1&&(m=g+m-1),a.style.width=m+"px",o.push(a),p+=y}l=0,d+=m}g&&(l+=g,s=g)}return o}(function(t,e,i){var r={},d=function(t){for(var e=t.width,i={},n=0;nr.length-1||a<=0||n>r.length-1)){var s=t-this.getSum(r,i,n);this.adjustSize(s,r,i,n),this.adjustSize(-s,r,n+1),e.full_width=this.getSum(r)}},splitSize:function(t,e){for(var i=[],n=0;ni(e.unit,e.step)?-1:0});for(var n=0;n=0;d--){var h=d==t.length-1,u=this.initScaleConfig(t[d],r,a);h&&this.processIgnores(u),this.initColSizes(u,e,l,o[d]),this.limitVisibleRange(u),h&&(l=u.full_width),c.unshift(u)}for(d=0;d=+l&&(l=e.add(c,n,i));+c<+l;){s.call(this,new Date(c));var d=c.getTimezoneOffset();c=e.add(c,n,i),c=t._correct_dst_change(c,d,n,i),e[i+"_start"]&&(c=e[i+"_start"](c))}},limitVisibleRange:function(t){var i=t.trace_x,n=t.width.length-1,r=0;if(+i[0]<+t.min_date&&0!=n){var a=Math.floor(t.width[0]*((i[1]-t.min_date)/(i[1]-i[0])));r+=t.width[0]-a,t.width[0]=a,i[0]=new Date(t.min_date)}var s=i.length-1,o=i[s],l=e.add(o,t.step,t.unit);if(+l>+t.max_date&&s>0&&(a=t.width[s]-Math.floor(t.width[s]*((l-t.max_date)/(l-o))),r+=t.width[s]-a,t.width[s]=a),r){for(var c=this.getSum(t.width),d=0,h=0;h
"},e.prototype._getRootParent=function(){for(var t=this.$parent;t&&t.$parent;)t=t.$parent;if(t)return t},e.prototype._eachView=function(){var t=[];return function t(e,i){if(i.push(e),e.$cells)for(var n=0;nh[o]&&h[s]>e&&d>h[o]-l+2&&(e=d+(n?0:2),i=h[o]);else{var u=Math.max(h[s]-d,0);(d+=u)>Math.max(h[o]-u,0)&&d>e&&(e=d,i=h[o])}}return{outerScroll:i,innerScroll:e}},e.prototype.scroll=function(t){this._isHorizontal()?this.scrollHorizontally(t):this.scrollVertically(t)},e.prototype.getScrollState=function(){return{visible:this.isVisible(),direction:this.$config.scroll,size:this.$config.outerSize,scrollSize:this.$config.scrollSize||0,position:this.$config.scrollPosition||0}},e.prototype.setSize=function(e,i){t.prototype.setSize.apply(this,arguments);var n=this._getScrollSize(),r=(this._isVertical()?i:e)-this._getScrollOffset()+(this._isHorizontal()?1:0);n.innerScroll&&r>n.outerScroll&&(n.innerScroll+=r-n.outerScroll),this.$config.scrollSize=n.innerScroll,this.$config.width=e,this.$config.height=i,this._setScrollSize(n.innerScroll)},e.prototype.isVisible=function(){return!(!this.$parent||!this.$parent.$view.parentNode)},e.prototype.shouldShow=function(){var t=this._getScrollSize();return!(!t.innerScroll&&this.$parent&&this.$parent.$view.parentNode)&&!(!t.innerScroll||this.$parent&&this.$parent.$view.parentNode)},e.prototype.shouldHide=function(){return!(this._getScrollSize().innerScroll||!this.$parent||!this.$parent.$view.parentNode)},e.prototype.toggleVisibility=function(){this.shouldHide()?this.hide():this.shouldShow()&&this.show()},e.prototype._getScaleOffset=function(t){var e=0;return!t||"timeline"!=t.$config.view&&"grid"!=t.$config.view||(e=t.$content.$getConfig().scale_height),e},e.prototype._getScrollOffset=function(){var t=0;if(this._isVertical()){var e=this.$parent.$parent;t=Math.max(this._getScaleOffset(e.getPrevSibling(this.$parent.$id)),this._getScaleOffset(e.getNextSibling(this.$parent.$id)))}else for(var i=this._getLinkedViews(),n=0;nMath.abs(a)){if(this._isVertical())return;if(i.x)return!0;if(!this.$scroll_hor||!this.$scroll_hor.offsetWidth)return!0;var o=r/-40,l=this._oldLeft,c=l+30*o;if(this.scrollHorizontally(c),this.$scroll_hor.scrollLeft=c,l==this.$scroll_hor.scrollLeft)return!0;this._oldLeft=this.$scroll_hor.scrollLeft}else{if(this._isHorizontal())return;if(i.y)return!0;if(!this.$scroll_ver||!this.$scroll_ver.offsetHeight)return!0;o=a/-40;void 0===a&&(o=t.detail);var d=this._oldTop,h=this.$scroll_ver.scrollTop+30*o;if(this.scrollVertically(h),this.$scroll_ver.scrollTop=h,d==this.$scroll_ver.scrollTop)return!0;this._oldTop=this.$scroll_ver.scrollTop}return t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,!1}},e}(i(6));t.exports=o},function(t,e,i){var n=i(2),r=i(1),a=i(0),s=i(6),o=function(t){"use strict";function e(e,i,n){var r,a,s=t.apply(this,arguments)||this;return s._moveHandler=function(t){s._moveResizer(s._resizer,t.pageX,t.pageY)},s._upHandler=function(){var t=s._getNewSizes();!1!==s.callEvent("onResizeEnd",[r,a,t?t.back:0,t?t.front:0])&&s._setSizes(),s._setBackground(!1),s._clearResizer(),s._clearListeneres()},s._clearListeneres=function(){this.$domEvents.detach(document,"mouseup",s._upHandler),this.$domEvents.detach(document,"mousemove",s._moveHandler),this.$domEvents.detach(document,"mousemove",s._startOnMove),this.$domEvents.detach(document,"mouseup",s._cancelDND)},s._callStartDNDEvent=function(){if(this._xMode?(r=this._behind.$config.width||this._behind.$view.offsetWidth,a=this._front.$config.width||this._front.$view.offsetWidth):(r=this._behind.$config.height||this._behind.$view.offsetHeight,a=this._front.$config.height||this._front.$view.offsetHeight),!1===s.callEvent("onResizeStart",[r,a]))return!1},s._startDND=function(t){if(!1!==this._callStartDNDEvent()){var e=!1;this._eachGroupItem(function(t){t._getSiblings(),!1===t._callStartDNDEvent()&&(e=!0)}),e||(s._moveHandler(t),s.$domEvents.attach(document,"mousemove",s._moveHandler),s.$domEvents.attach(document,"mouseup",s._upHandler))}},s._cancelDND=function(){s._setBackground(!1),s._clearResizer(),s._clearListeneres()},s._startOnMove=function(t){s._isPosChanged(t)&&(s._clearListeneres(),s._startDND(t))},s._downHandler=function(t){s._getSiblings(),s._behind.$config.collapsed||s._front.$config.collapsed||(s._setBackground(!0),s._resizer=s._setResizer(),s._positions={x:t.pageX,y:t.pageY,timestamp:Date.now()},s.$domEvents.attach(document,"mousemove",s._startOnMove),s.$domEvents.attach(document,"mouseup",s._cancelDND))},s.$name="resizer",s}return n(e,t),e.prototype.init=function(){t.prototype.init.call(this),this._xMode="x"===this.$config.mode,this._xMode&&!this.$config.width?this.$config.width=this.$config.minWidth=1:this._xMode||this.$config.height||(this.$config.height=this.$config.minHeight=1),this.$config.margin=-1,this.$domEvents.attach(this.$view,"mousedown",this._downHandler)},e.prototype.$toHTML=function(){var t=this.$config.mode,e=this.$config.css||"";return"
"},e.prototype._clearResizer=function(){this._resizer&&(this._resizer.parentNode&&this._resizer.parentNode.removeChild(this._resizer),this._resizer=null)},e.prototype._isPosChanged=function(t){return!!this._positions&&(Math.abs(this._positions.x-t.pageX)>3||Math.abs(this._positions.y-t.pageY)>3||Date.now()-this._positions.timestamp>300)},e.prototype._getSiblings=function(){var t=this.$parent.getCells();this.$config.prev&&(this._behind=this.$factory.getView(this.$config.prev),this._behind instanceof s||(this._behind=this._behind.$parent)),this.$config.next&&(this._front=this.$factory.getView(this.$config.next),this._front instanceof s||(this._front=this._behind.$parent));for(var e=0;ethis._front.$config.maxWidth)return;Math.abs(i)>=n&&(i=-Math.abs(n-2)),n-Math.abs(i)<=r&&(i=-Math.abs(n-r))}else l=a-Math.abs(i),o=n+i,n+i>this._behind.$config.maxWidth&&(i=this._behind.$config.maxWidth-n),Math.abs(i)>=a&&(i=a-2),a-Math.abs(i)<=s&&(i=Math.abs(a-s));return-1===c?(l=a-i,o=n-Math.abs(i)):(l=a-Math.abs(i),o=n+i),{size:i,newFrontSide:l,newBehindSide:o}},e.prototype._getGroupName=function(){return this._getSiblings(),this._front.$config.group||this._behind.$config.group},e.prototype._eachGroupItem=function(t,e){for(var i=this.$factory.getView("main"),n=this._getGroupName(),r=i.getCellsByType("resizer"),a=0;an.newBehindSide&&(n=r[s])}return n},e.prototype._moveResizer=function(t,e,i){if(0!==e){var n=this._getGroupResizePosition(e,i);n&&1!==Math.abs(n.size)&&(this._xMode?(t.style.left=n.size+"px",this._positions.nextX=n.size||0):(t.style.top=n.size+"px",this._positions.nextY=n.size||0),this.callEvent("onResize",[n.newBehindSide,n.newFrontSide]))}},e.prototype._setGravity=function(t){var e=this._xMode?"offsetWidth":"offsetHeight",i=this._xMode?this._positions.nextX:this._positions.nextY,n=this._front.$view[e],r=this._behind.$view[e],a=(n-i)/n*this._front.getSize().gravity,s=(r+i)/r*this._behind.getSize().gravity;"front"!==t&&(this._front.$config.gravity=a),"behind"!==t&&(this._behind.$config.gravity=s)},e.prototype._getNewSizes=function(){var t=this._xMode?this._behind.$config.width:this._behind.$config.height,e=this._xMode?this._front.$config.width:this._front.$config.height,i=this._xMode?this._positions.nextX:this._positions.nextY;return e||t?{front:e?e-i||1:0,back:t?t+i||1:0}:null},e.prototype._assignNewSizes=function(t){this._getSiblings();var e=this._xMode?"width":"height";t?(t.front?this._front.$config[e]=t.front:this._setGravity("behind"),t.back?this._behind.$config[e]=t.back:this._setGravity("front")):this._setGravity()},e.prototype._setSizes=function(){this._resizer&&this.$view.removeChild(this._resizer);var t=this._getNewSizes();if(this._positions.nextX||this._positions.nextY){this._assignNewSizes(t);var e=this._xMode?"width":"height";this._front.$config.group?this.$gantt.$layout._syncCellSizes(this._front.$config.group,this._front.$config[e]):this._behind.$config.group&&this.$gantt.$layout._syncCellSizes(this._behind.$config.group,this._behind.$config[e]),this._getGroupName()?this.$factory.getView("main").resize():this.$parent.resize()}},e}(s);t.exports=o},function(t,e,i){var n=i(2),r=i(0),a=function(t){"use strict";function e(e,i,n){var a=t.apply(this,arguments)||this;if(i.view){i.id&&(this.$id=r.uid());var s=r.copy(i);if(delete s.config,delete s.templates,this.$content=this.$factory.createView(i.view,this,s,this),!this.$content)return!1}return a.$name="viewCell",a}return n(e,t),e.prototype.destructor=function(){this.clear(),t.prototype.destructor.call(this)},e.prototype.clear=function(){if(this.$initialized=!1,this.$content){var e=this.$content.unload||this.$content.destructor;e&&e.call(this.$content)}t.prototype.clear.call(this)},e.prototype.scrollTo=function(e,i){this.$content&&this.$content.scrollTo?this.$content.scrollTo(e,i):t.prototype.scrollTo.call(this,e,i)},e.prototype._setContentSize=function(t,e){var i=this._getBorderSizes(),n=t+i.horizontal,r=e+i.vertical;this.$config.width=n,this.$config.height=r},e.prototype.setSize=function(e,i){if(t.prototype.setSize.call(this,e,i),!this.$preResize&&this.$content&&!this.$initialized){this.$initialized=!0;var n=this.$view.childNodes[0],r=this.$view.childNodes[1];r||(r=n),this.$content.init(r)}},e.prototype.setContentSize=function(){!this.$preResize&&this.$content&&this.$initialized&&this.$content.setSize(this.$lastSize.contentX,this.$lastSize.contentY)},e.prototype.getContentSize=function(){var e=t.prototype.getContentSize.call(this);if(this.$content&&this.$initialized){var i=this.$content.getSize();e.width=void 0===i.contentX?i.width:i.contentX,e.height=void 0===i.contentY?i.height:i.contentY}var n=this._getBorderSizes();return e.width+=n.horizontal,e.height+=n.vertical,e},e}(i(6));t.exports=a},function(t,e,i){var n=i(2),r=i(32),a=i(6),s=function(t){"use strict";function e(e,i,n){for(var r=t.apply(this,arguments)||this,a=0;a-1&&s.click?s.click():(a(i,!0),n=!0)}27==e&&(a(i,!1),n=!0)}return n?(t.preventDefault&&t.preventDefault(),!(t.cancelBubble=!0)):void 0}}function o(t){o.cover||(o.cover=document.createElement("div"),o.cover.onkeydown=s,o.cover.className="dhx_modal_cover",document.body.appendChild(o.cover)),o.cover.style.display=t?"inline-block":"none"}function l(e,i,n){var r=t._waiAria.messageButtonAttrString(e),a=i.toLowerCase().replace(/ /g,"_");return"
"+e+"
"}function c(){for(var t=[].slice.apply(arguments,[0]),e=0;e'+r.title+""),u+='
'+(r.content?"":r.text)+'
',s&&(u+=l(c(r.ok,t.locale.labels.message_ok,"OK"),"ok",!0)),o&&(u+=l(c(r.cancel,t.locale.labels.message_cancel,"Cancel"),"cancel",!1)),r.buttons)for(var f=0;f",i.className="gantt-info dhtmlx-info gantt-"+e.type+" dhtmlx-"+e.type,i.onclick=function(){p.hide(e.id),e=null},t._waiAria.messageInfoAttr(i),"bottom"==p.position&&p.area.firstChild?p.area.insertBefore(i,p.area.firstChild):p.area.appendChild(i),e.expire>0&&(p.timers[e.id]=window.setTimeout(function(){p.hide(e.id)},e.expire)),p.pull[e.id]=i,i=null,e.id}(e)}};p.seed=(new Date).valueOf(),p.uid=n.uid,p.expire=4e3,p.keyboard=!0,p.position="top",p.pull={},p.timers={},p.hideAll=function(){for(var t in p.pull)p.hide(t)},p.hide=function(t){var e=p.pull[t];e&&e.parentNode&&(window.setTimeout(function(){e.parentNode.removeChild(e),e=null},2e3),e.className+=" hidden",p.timers[t]&&window.clearTimeout(p.timers[t]),delete p.pull[t])};var v=[];return t.attachEvent("onMessagePopup",function(t){v.push(t)}),t.attachEvent("onAfterMessagePopup",function(t){for(var e=0;e
"},grid_folder:function(t){return"
"},grid_file:function(t){return"
"},grid_open:function(t){return"
"},grid_blank:function(t){return"
"},date_grid:function(e,i){return i&&t.isUnscheduledTask(i)&&t.config.show_unscheduled?t.templates.task_unscheduled_time(i):t.templates.grid_date_format(e)},task_time:function(e,i,n){return t.isUnscheduledTask(n)&&t.config.show_unscheduled?t.templates.task_unscheduled_time(n):t.templates.task_date(e)+" - "+t.templates.task_date(i)},task_unscheduled_time:function(t){return""},time_picker:r(a.time_picker),link_class:function(t){return""},link_description:function(e){var i=t.getTask(e.source),n=t.getTask(e.target);return""+i.text+""+n.text+""},drag_link:function(e,i,n,r){e=t.getTask(e);var a=t.locale.labels,s=""+e.text+" "+(i?a.link_start:a.link_end)+"
";return n&&(s+=" "+(n=t.getTask(n)).text+" "+(r?a.link_start:a.link_end)+"
"),s},drag_link_class:function(e,i,n,r){var a="";return e&&n&&(a=" "+(t.isLinkAllowed(e,n,i,r)?"gantt_link_allow":"gantt_link_deny")),"gantt_link_tooltip"+a},tooltip_date_format:n.date_to_str("%Y-%m-%d"),tooltip_text:function(e,i,n){return"Task: "+n.text+"
Start date: "+t.templates.tooltip_date_format(e)+"
End date: "+t.templates.tooltip_date_format(i)}})},initTemplate:i}}},function(t,e,i){var n=i(4),r=i(0),a=i(33);t.exports=function(t){function e(t){return{target:t.target||t.srcElement,pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,metaKey:t.metaKey,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey}}function i(i,a){this._obj=i,this._settings=a||{},n(this);var s=this.getInputMethods();this._drag_start_timer=null,t.attachEvent("onGanttScroll",r.bind(function(t,e){this.clearDragTimer()},this));for(var o=0;othis.config.sensitivity},initDnDMarker:function(){var t=this.config.marker=document.createElement("div");t.className="gantt_drag_marker",t.innerHTML="Dragging object",document.body.appendChild(t)},backupEventTarget:function(i,n){if(t.config.touch){var r=n(i),a=r.target||r.srcElement,s=a.cloneNode(!0);this.config.original_target=e(r),this.config.original_target.target=s,this.config.backup_element=a,a.parentNode.appendChild(s),a.style.display="none",document.body.appendChild(a)}},getInputMethods:function(){var e=[];if(e.push({move:"mousemove",down:"mousedown",up:"mouseup",accessor:function(t){return t}}),t.config.touch){var i=!0;try{document.createEvent("TouchEvent")}catch(t){i=!1}i?e.push({move:"touchmove",down:"touchstart",up:"touchend",accessor:function(t){return t.touches&&t.touches.length>1?null:t.touches[0]?{target:document.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY),pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t}}):window.navigator.pointerEnabled?e.push({move:"pointermove",down:"pointerdown",up:"pointerup",accessor:function(t){return"mouse"==t.pointerType?null:t}}):window.navigator.msPointerEnabled&&e.push({move:"MSPointerMove",down:"MSPointerDown",up:"MSPointerUp",accessor:function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t}})}return e},clearDragTimer:function(){this._drag_start_timer&&(clearTimeout(this._drag_start_timer),this._drag_start_timer=null)},dragStart:function(e,i,n){this.config&&this.config.started||(this.config={obj:e,marker:null,started:!1,pos:this.getPosition(i),sensitivity:4},this._settings&&r.mixin(this.config,this._settings,!0),this.traceDragEvents(e,n),t._prevent_touch_scroll=!0,document.body.className+=" gantt_noselect",t.config.touch&&this.dragMove(e,i,n.accessor))},dragMove:function(e,i,n){var r=n(i);if(r){if(!this.config.marker&&!this.config.started){var a=this.getPosition(r);if(t.config.touch||this.checkPositionChange(a)){if(this.config.started=!0,this.config.ignore=!1,!1===this.callEvent("onBeforeDragStart",[e,this.config.original_target]))return this.config.ignore=!0,!0;this.backupEventTarget(i,n),this.initDnDMarker(),t._touch_feedback(),this.callEvent("onAfterDragStart",[e,this.config.original_target])}else this.config.ignore=!0}return this.config.ignore?void 0:(r.pos=this.getPosition(r),this.config.marker.style.left=r.pos.x+"px",this.config.marker.style.top=r.pos.y+"px",this.callEvent("onDragMove",[e,r]),!1)}},dragEnd:function(e){var i=this.config.backup_element;i&&i.parentNode&&i.parentNode.removeChild(i),t._prevent_touch_scroll=!1,this.config.marker&&(this.config.marker.parentNode.removeChild(this.config.marker),this.config.marker=null,this.callEvent("onDragEnd",[])),this.config.started=!1,document.body.className=document.body.className.replace(" gantt_noselect","")},getPosition:function(t){var e=0,i=0;return(t=t||window.event).pageX||t.pageY?(e=t.pageX,i=t.pageY):(t.clientX||t.clientY)&&(e=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i=t.clientY+document.body.scrollTop+document.documentElement.scrollTop),{x:e,y:i}}},i}},function(t,e){t.exports=function(t){var e={init:function(){for(var e=t.locale,i=e.date.month_short,n=e.date.month_short_hash={},r=0;r=9?9:i>=6?6:i>=3?3:0,t.setMonth(e),t},year_start:function(t){return t.setMonth(0),this.month_start(t)},day_start:function(t){return this.date_part(t)},hour_start:function(t){return t.getMinutes()&&t.setMinutes(0),this.minute_start(t),t},minute_start:function(t){return t.getSeconds()&&t.setSeconds(0),t.getMilliseconds()&&t.setMilliseconds(0),t},_add_days:function(t,e){var i=new Date(t.valueOf());return i.setDate(i.getDate()+e),e>=0&&!t.getHours()&&i.getHours()&&(i.getDate()<=t.getDate()||i.getMonth()11?"pm":"am")+"';case"%A":return'"+(date.getHours()>11?"PM":"AM")+"';case"%s":return'"+to_fixed(date.getSeconds())+"';case"%W":return'"+to_fixed(getISOWeek(date))+"';case"%w":return'"+to_fixed(getWeek(date))+"';default:return t}}),n&&(i=i.replace(/date\.get/g,"date.getUTC"));var r=new Function("date","to_fixed","locale","getISOWeek","getWeek",'return "'+i+'";');return function(i){return r(i,e.to_fixed,t.locale,e.getISOWeek,e.getWeek)}},str_to_date:function(e,i){for(var n="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",r=e.match(/%[a-zA-Z]/g),a=0;a50?1900:2000);";break;case"%g":case"%G":case"%h":case"%H":n+="set[3]=temp["+a+"]||0;";break;case"%i":n+="set[4]=temp["+a+"]||0;";break;case"%Y":n+="set[0]=temp["+a+"]||0;";break;case"%a":case"%A":n+="set[3]=set[3]%12+((temp["+a+"]||'').toLowerCase()=='am'?0:12);";break;case"%s":n+="set[5]=temp["+a+"]||0;";break;case"%M":n+="set[1]=locale.date.month_short_hash[temp["+a+"]]||0;";break;case"%F":n+="set[1]=locale.date.month_full_hash[temp["+a+"]]||0;"}var s="set[0],set[1],set[2],set[3],set[4],set[5]";i&&(s=" Date.UTC("+s+")");var o=new Function("date","locale","var set=[0,0,1,0,0,0]; "+n+" return new Date("+s+");");return function(e){return o(e,t.locale)}},getISOWeek:function(e){return t.date._getWeekNumber(e,!0)},_getWeekNumber:function(t,e){if(!t)return!1;var i=t.getDay();e&&0===i&&(i=7);var n=new Date(t.valueOf());n.setDate(t.getDate()+(4-i));var r=n.getFullYear(),a=Math.round((n.getTime()-new Date(r,0,1).getTime())/864e5);return 1+Math.floor(a/7)},getWeek:function(e){return t.date._getWeekNumber(e,t.config.start_on_monday)},getUTCISOWeek:function(e){return t.date.getISOWeek(e)},convert_to_utc:function(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())},parseDate:function(e,i){return e&&!e.getFullYear&&(t.defined(i)&&(i="string"==typeof i?t.defined(t.templates[i])?t.templates[i]:t.date.str_to_date(i):t.templates.xml_date),e=e?i(e):null),e}};return e}},function(t,e,i){var n=i(8);t.exports=function(t){return{cache:!0,method:"get",parse:function(t){return"string"!=typeof t?t:(t=t.replace(/^[\s]+/,""),window.DOMParser&&!n.isIE?e=(new window.DOMParser).parseFromString(t,"text/xml"):window.ActiveXObject!==window.undefined&&((e=new window.ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)),e);var e},xmltop:function(e,i,n){if(void 0===i.status||i.status<400){var r=i.responseXML?i.responseXML||i:this.parse(i.responseText||i);if(r&&null!==r.documentElement&&!r.getElementsByTagName("parsererror").length)return r.getElementsByTagName(e)[0]}return-1!==n&&t.callEvent("onLoadXMLError",["Incorrect XML",arguments[1],n]),document.createElement("DIV")},xpath:function(t,e){if(e.nodeName||(e=e.responseXML||e),n.isIE)return e.selectNodes(t)||[];for(var i,r=[],a=(e.ownerDocument||e).evaluate(t,e,null,XPathResult.ANY_TYPE,null);i=a.iterateNext();)r.push(i);return r},query:function(t){this._call(t.method||"GET",t.url,t.data||"",t.async||!0,t.callback,null,t.headers)},get:function(t,e){this._call("GET",t,null,!0,e)},getSync:function(t){return this._call("GET",t,null,!1)},put:function(t,e,i){this._call("PUT",t,e,!0,i)},del:function(t,e,i){this._call("DELETE",t,e,!0,i)},post:function(t,e,i){1==arguments.length?e="":2!=arguments.length||"function"!=typeof e&&"function"!=typeof window[e]?e=String(e):(i=e,e=""),this._call("POST",t,e,!0,i)},postSync:function(t,e){return e=null===e?"":String(e),this._call("POST",t,e,!1)},getLong:function(t,e){this._call("GET",t,null,!0,e,{url:t})},postLong:function(t,e,i){2!=arguments.length||"function"!=typeof e&&(window[e],0)||(i=e,e=""),this._call("POST",t,e,!0,i,{url:t,postData:e})},_call:function(e,i,r,a,s,o,l){var c=window.XMLHttpRequest&&!n.isIE?new XMLHttpRequest:new window.ActiveXObject("Microsoft.XMLHTTP"),d=null!==navigator.userAgent.match(/AppleWebKit/)&&null!==navigator.userAgent.match(/Qt/)&&null!==navigator.userAgent.match(/Safari/);if(a&&(c.onreadystatechange=function(){if(4==c.readyState||d&&3==c.readyState){if((200!=c.status||""===c.responseText)&&!t.callEvent("onAjaxError",[c]))return;window.setTimeout(function(){"function"==typeof s&&s.apply(window,[{xmlDoc:c,filePath:i}]),o&&(void 0!==o.postData?this.postLong(o.url,o.postData,s):this.getLong(o.url,s)),s=null,c=null},1)}}),"GET"!=e||this.cache||(i+=(i.indexOf("?")>=0?"&":"?")+"dhxr"+(new Date).getTime()+"=1"),c.open(e,i,a),l)for(var h in l)c.setRequestHeader(h,l[h]);else"POST"==e.toUpperCase()||"PUT"==e||"DELETE"==e?c.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):"GET"==e&&(r=null);if(c.setRequestHeader("X-Requested-With","XMLHttpRequest"),c.send(r),!a)return{xmlDoc:c,filePath:i}},urlSeparator:function(t){return-1!=t.indexOf("?")?"&":"?"}}}},function(t,e){t.exports=function(){return{layout:{css:"gantt_container",rows:[{cols:[{view:"grid",scrollX:"scrollHor",scrollY:"scrollVer"},{resizer:!0,width:1},{view:"timeline",scrollX:"scrollHor",scrollY:"scrollVer"},{view:"scrollbar",id:"scrollVer"}]},{view:"scrollbar",id:"scrollHor",height:20}]},links:{finish_to_start:"0",start_to_start:"1",finish_to_finish:"2",start_to_finish:"3"},types:{task:"task",project:"project",milestone:"milestone"},auto_types:!1,duration_unit:"day",work_time:!1,correct_work_time:!1,skip_off_time:!1,cascade_delete:!0,autosize:!1,autosize_min_width:0,autoscroll:!0,autoscroll_speed:30,show_links:!0,show_task_cells:!0,static_background:!1,branch_loading:!1,branch_loading_property:"$has_child",show_loading:!1,show_chart:!0,show_grid:!0,min_duration:36e5,xml_date:"%d-%m-%Y %H:%i",api_date:"%d-%m-%Y %H:%i",start_on_monday:!0,server_utc:!1,show_progress:!0,fit_tasks:!1,select_task:!0,scroll_on_click:!0,preserve_scroll:!0,readonly:!1,date_grid:"%Y-%m-%d",drag_links:!0,drag_progress:!0,drag_resize:!0,drag_project:!1,drag_move:!0,drag_mode:{resize:"resize",progress:"progress",move:"move",ignore:"ignore"},round_dnd_dates:!0,link_wrapper_width:20,root_id:0,autofit:!1,columns:[{name:"text",tree:!0,width:"*",resize:!0},{name:"start_date",align:"center",resize:!0},{name:"duration",align:"center"},{name:"add",width:44}],step:1,scale_unit:"day",scale_offset_minimal:!0,subscales:[],inherit_scale_class:!1,time_step:60,duration_step:1,date_scale:"%d %M",task_date:"%d %F %Y",time_picker:"%H:%i",task_attribute:"task_id",link_attribute:"link_id",layer_attribute:"data-layer",buttons_left:["gantt_save_btn","gantt_cancel_btn"],_migrate_buttons:{dhx_save_btn:"gantt_save_btn",dhx_cancel_btn:"gantt_cancel_btn",dhx_delete_btn:"gantt_delete_btn"},buttons_right:["gantt_delete_btn"],lightbox:{sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"time",type:"duration",map_to:"auto"}],project_sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"type",type:"typeselect",map_to:"type"},{name:"time",type:"duration",readonly:!0,map_to:"auto"}],milestone_sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"type",type:"typeselect",map_to:"type"},{name:"time",type:"duration",single_date:!0,map_to:"auto"}]},drag_lightbox:!0,sort:!1,details_on_create:!0,details_on_dblclick:!0,initial_scroll:!0,task_scroll_offset:100,order_branch:!1,order_branch_free:!1,task_height:"full",min_column_width:70,min_grid_column_width:70,grid_resizer_column_attribute:"column_index",grid_resizer_attribute:"grid_resizer",keep_grid_width:!1,grid_resize:!1,show_unscheduled:!0,readonly_property:"readonly",editable_property:"editable",calendar_property:"calendar_id",resource_calendars:{},type_renderers:{},open_tree_initially:!1,optimize_render:!0,prevent_default_scroll:!1,show_errors:!0,wai_aria_attributes:!0,smart_scales:!0,rtl:!1,placeholder_task:!1}}},function(t,e){t.exports=function(){var t={};return{services:{config:"config",templates:"templates",locale:"locale"},setService:function(e,i){t[e]=i},getService:function(e){return t[e]?t[e]():null},config:function(){return this.getService("config")},templates:function(){return this.getService("templates")},locale:function(){return this.getService("locale")},destructor:function(){for(var e in t)if(t[e]){var i=t[e];i&&i.destructor&&i.destructor()}t=null}}}},function(t,e){t.exports=function(t){t.$inject=function(t){return t(this.$services)}}},function(t,e){t.exports={KEY_CODES:{UP:38,DOWN:40,LEFT:37,RIGHT:39,SPACE:32,ENTER:13,DELETE:46,ESC:27,TAB:9}}},function(t,e,i){i(16),t.exports=function(){var t=new function(){this.constants=i(142),this.version="6.0.2",this.templates={},this.ext={},this.keys={edit_save:this.constants.KEY_CODES.ENTER,edit_cancel:this.constants.KEY_CODES.ESC}};i(141)(t),t.$services=t.$inject(i(140)),t.config=t.$inject(i(139)),t.ajax=i(138)(t),t.date=i(137)(t);var e=i(136)(t);t.$services.setService("dnd",function(){return e}),t.$services.setService("config",function(){return t.config}),t.$services.setService("date",function(){return t.date}),t.$services.setService("locale",function(){return t.locale}),t.$services.setService("templates",function(){return t.templates});var n=i(135)(t);t.$services.setService("templateLoader",function(){return n}),i(4)(t);var r=new(i(134));r.registerProvider("global",function(){return{min_date:t._min_date,max_date:t._max_date,selected_task:t.$data.tasksStore.getSelectedId()}}),t.getState=r.getState,t.$services.setService("state",function(){return r});var a=i(0);a.mixin(t,a),t.env=i(8);var s=i(133)();t.event=s.attach,t.eventRemove=s.detach,t._eventRemoveAll=s.detachAll,t._createDomEventScope=s.extend,a.mixin(t,i(132)(t));var o=i(131).init(t);t.$ui=o.factory,t.$ui.layers=o.render,t.$mouseEvents=o.mouseEvents,t.$services.setService("mouseEvents",function(){return t.$mouseEvents}),t.mixin(t,o.layersApi),i(92)(t),t.$services.setService("layers",function(){return o.layersService});var l=i(91);return t.mixin(t,l()),i(90)(t),i(84)(t),i(81)(t),i(72)(t),i(71)(t),i(69)(t),i(68)(t),i(67)(t),i(66)(t),i(59)(t),i(58)(t),i(49)(t),i(48)(t),i(46)(t),i(45)(t),i(44)(t),i(43)(t),i(42)(t),i(41)(t),i(40)(t),i(39)(t),i(38)(t),i(37)(t),i(17)(t),i(36)(t),i(34)(t),t}},function(t,e){t.exports=function(t){}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(144),r=i(143);n(window.gantt=r())}]); //# sourceMappingURL=dhtmlxgantt.js.map