/* @license dhtmlxGantt v.6.3.5 Standard This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects. To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com (c) XB Software Ltd. */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("dhtmlxgantt",[],e):"object"==typeof exports?exports.dhtmlxgantt=e():t.dhtmlxgantt=e()}(window,function(){return 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}return 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=161)}([function(t,e,i){var n,r=i(2);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 o(t){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[t.nodeName.toLowerCase()]||!t.hasAttribute("disabled")}function s(t){if(!t)return"";var e=t.className||"";return e.baseVal&&(e=e.baseVal),e.indexOf||(e=""),u(e)}var l=document.createElement("div");function c(t){return t.tagName?t:(t=t||window.event).target||t.srcElement}function u(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),s=0;s=0){if(!i)return n;var o=0===a||!u(r.charAt(a-1)),l=a+e.length>=r.length||!u(r.charAt(a+e.length));if(o&&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)},closest:function(t,e){if(t.closest)return t.closest(e);if(t.matches||t.msMatchesSelector||t.webkitMatchesSelector){var i=t;if(!document.documentElement.contains(i))return null;do{if((i.matches||i.msMatchesSelector||i.webkitMatchesSelector).call(i,e))return i;i=i.parentElement||i.parentNode}while(null!==i&&1===i.nodeType);return null}return console.error("Your browser is not supported"),null}}},function(t,e){var i={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3};function n(t){return!(!t||"object"!=typeof t)&&!!(t.getFullYear&&t.getMonth&&t.getDate)}function r(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(3),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,i){var n=this.createDropTargetObject();return n.targetId=e,n.nextSibling=!0,n.targetParent=i.getParent(n.targetId),n.targetIndex=i.getBranchIndex(n.targetId),(i.getParent(t)!=n.targetParent||n.targetIndexi.getBranchIndex(t)&&(n.targetIndex-=1),n},firstChildTarget:function(t,e,i){var n=this.createDropTargetObject();return n.targetId=e,n.targetParent=n.targetId,n.targetIndex=0,n.child=!0,n},lastChildTarget:function(t,e,i){var n=i.getChildren(e),r=this.createDropTargetObject();return r.targetId=n[n.length-1],r.targetParent=e,r.targetIndex=n.length,r.nextSibling=!0,r}}},function(t,e){t.exports=function(t,e){if(!t.start_date||!t.end_date)return null;var i=e.posFromDate(t.start_date),n=e.posFromDate(t.end_date),r=Math.min(i,n)-200,a=Math.max(i,n)+200,o=e.$getConfig();return{top:e.getItemTop(t.id),height:o.row_height,left:r,width:a-r}}},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;nr.length-1||a<=0||n>r.length-1)){var o=t-this.getSum(r,i,n);this.adjustSize(o,r,i,n),this.adjustSize(-o,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;u--){var d=u==t.length-1,h=this.initScaleConfig(t[u],r,a);d&&this.processIgnores(h),this.initColSizes(h,e,l,s[u]),this.limitVisibleRange(h),d&&(l=h.full_width),c.unshift(h)}for(u=0;u=+l&&(l=e.add(c,n,i));+c<+l;){o.call(this,new Date(c));var u=c.getTimezoneOffset();c=e.add(c,n,i),c=t._correct_dst_change(c,u,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 o=i.length-1,s=i[o],l=e.add(s,t.step,t.unit);if(+l>+t.max_date&&o>0&&(a=t.width[o]-Math.floor(t.width[o]*((l-t.max_date)/(l-s))),r+=t.width[o]-a,t.width[o]=a),r){for(var c=this.getSum(t.width),u=0,d=0;de)){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",[]),this.$gantt.ext.dragTimeline&&(this._timelineDragScroll=this.$gantt.ext.dragTimeline.create(),this._timelineDragScroll.attach(this))},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,o=this.$task_data.childNodes,s=0,l=o.length;s'+this._prepareScaleHtml(t[a],e,i)+"")}return n.join("")},_prepareScaleHtml:function(t,e,i){var n=this.$getConfig(),r=this.$gantt.$services.templates(),a=[],o=null,s=null,l=t.format||t.template||t.date;"string"==typeof l&&(l=this.$gantt.date.date_to_str(l));var u=0,d=t.count;!n.smart_scales||isNaN(e)||isNaN(i)||(u=c(t.left,e),d=c(t.left,i)+1),s=t.css||function(){},!t.css&&n.inherit_scale_class&&(s=r.scale_cell_class);for(var h=u;h"+f+"";a.push(b)}}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 o=0;return a&&(o=this._getColumnDuration(e,e.trace_x[i])),new Date(e.trace_x[i].valueOf()+Math.round(a*o))},posFromDate:function(t){if(!this.isVisible())return 0;if(!t)return 0;var e=String(t.valueOf());if(void 0!==this._posFromDateCache[e])return this._posFromDateCache[e];var i=this.columnIndexByDate(t);this.$gantt.assert(i>=0,"Invalid day index");var n=Math.floor(i),r=i%1,a=this._tasks.left[Math.min(n,this._tasks.width.length-1)];n==this._tasks.width.length&&(a+=this._tasks.width[this._tasks.width.length-1]),r&&(n=r.max_date)return this._tasks.rtl?0:i.length;var a=c(i,e),o=this._getClosestVisibleColumn(a,i,n),s=i[o],l=this._tasks.trace_index_transition;if(!s)return l?l[0]:0;var u=(t-i[o])/this._getColumnDuration(this._tasks,i[o]);return l?l[o]+(1-u):o+u},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(t)].concat(e.getSubScales(t));return e.sortScales(i),i},_getColumnDuration:function(t,e){return this.$gantt.date.add(e,t.step,t.unit)-e},_bindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);if(this.$config.rowStore=t,t&&!t._timelineCacheAttached){var e=this;t._timelineCacheAttached=t.attachEvent("onBeforeFilter",function(){e._resetTopPositionHeight()})}}},_unbindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);t._timelineCacheAttached&&(t.detachEvent(t._timelineCacheAttached),t._timelineCacheAttached=!1)}},refresh:function(){this._bindStore(),this.$config.bindLinks&&(this.$config.linkStore=this.$gantt.getDatastore(this.$config.bindLinks)),this._resetTopPositionHeight(),this._initStaticBackgroundRender(),this._render_tasks_scales()},destructor:function(){var t=this.$gantt;this._clearLayers(t),this._unbindStore(),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._timelineDragScroll&&(this._timelineDragScroll.destructor(),this._timelineDragScroll=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}},t.exports=l},function(t,e){t.exports=function(t){return t.config.smart_rendering&&t._smart_render}},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},,function(t,e,i){},function(t,e,i){var n=i(0);t.exports=function t(e,i){e=e||n.event,i=i||n.eventRemove;var r=[],a={attach:function(t,i,n,a){r.push({element:t,event:i,callback:n,capture:a}),e(t,i,n,a)},detach:function(t,e,n,a){i(t,e,n,a);for(var o=0;o"}};function a(t,e,i){return e=e||[],"<"+t+o(i||[])+">"+(e.innerHTML||"")+""}function o(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(2);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 o(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 s(t,e,i,n,r,a,o){return this.start_date=t,this.duration=e,this.unit=i,this.step=n,this.task=r,this.id=a,this.calendar=o,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 e=arguments[0];if(e=r.isDate(e)?{date:e}:n.mixin({},e),!r.isValidDate(e.date))throw t.assert(!1,"Invalid date argument for getWorkHours method"),new Error("Invalid date argument for getWorkHours method");return e},setWorkTimeArguments:function(){return arguments[0]},unsetWorkTimeArguments:function(){return arguments[0]},isWorkTimeArguments:function(){var e,i=arguments[0];if(i instanceof a)return i;if((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,!r.isValidDate(e.date))throw t.assert(!1,"Invalid date argument for isWorkTime method"),new Error("Invalid date argument for isWorkTime method");return e},getClosestWorkTimeArguments:function(e){var i,n=arguments[0];if(n instanceof o)return n;if(i=r.isDate(n)?new o(n):new o(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,!r.isValidDate(i.date))throw t.assert(!1,"Invalid date argument for getClosestWorkTime method"),new Error("Invalid date argument for getClosestWorkTime method");return i},_getStartEndConfig:function(e){var i,n=l;if(e instanceof n)return e;if(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,!r.isValidDate(i.start_date))throw t.assert(!1,"Invalid start_date argument for getDuration method"),new Error("Invalid start_date argument for getDuration method");if(!r.isValidDate(i.end_date))throw t.assert(!1,"Invalid end_date argument for getDuration method"),new Error("Invalid end_date argument for getDuration method");return 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 o,l=arguments[0];if(l instanceof s)return l;if(o=r.isDate(l)?new s(arguments[0],arguments[1],arguments[2],void 0,arguments[3],void 0,arguments[4]):new s(l.start_date,l.duration,l.unit,l.step,l.task,null,l.calendar),l.id&&(o.task=l,o.unit=null,o.step=null),o.unit=o.unit||t.config.duration_unit,o.step=o.step||t.config.duration_step,!r.isValidDate(o.start_date))throw t.assert(!1,"Invalid start_date argument for calculateEndDate method"),new Error("Invalid start_date argument for calculateEndDate method");return o}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){var t=this;this.canParse=function(e){return!isNaN(t.parse(e))},this.format=function(t){return String(t)},this.parse=function(t){return parseInt(t,10)}}return t.create=function(e){return void 0===e&&(e=null),new t},t}();e.default=n},function(t,e){function i(t,e,i){for(var n=0;n=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&&(d+=1),u==s.types.milestone&&(o.left-=Math.round(c/2),o.width=c);var h=document.createElement("div"),f=Math.round(o.width);a.$config.item_attribute&&h.setAttribute(a.$config.item_attribute,e.id),s.show_progress&&u!=s.types.milestone&&function(e,i,n,r,a){var o=1*e.progress||0;n=Math.max(n-2,0);var s=document.createElement("div"),l=Math.round(n*o);l=Math.min(n,l),e.progressColor&&(s.style.backgroundColor=e.progressColor,s.style.opacity=1),s.style.width=l+"px",s.className="gantt_task_progress",s.innerHTML=a.progress_text(e.start_date,e.end_date,e),r.rtl&&(s.style.position="absolute",s.style.right="0px");var c=document.createElement("div");if(c.className="gantt_task_progress_wrapper",c.appendChild(s),i.appendChild(c),t.config.drag_progress&&!t.isReadonly(e)){var u=document.createElement("div"),d=l;r.rtl&&(d=n-l),u.style.left=d+"px",u.className="gantt_task_progress_drag",s.appendChild(u),i.appendChild(u)}}(e,h,f,s,l);var _=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&&(_.style.color=e.textColor),h.appendChild(_);var g=function(e,i,n,r){var a=r.$getConfig(),o=[e];i&&o.push(i);var s=t.getState(),l=t.getTask(n);if(t.getTaskType(l.type)==a.types.milestone?o.push("gantt_milestone"):t.getTaskType(l.type)==a.types.project&&o.push("gantt_project"),o.push("gantt_bar_"+t.getTaskType(l.type)),t.isSummaryTask(l)&&o.push("gantt_dependent_task"),t.isSplitTask(l)&&(a.open_split_tasks&&!l.$open||!a.open_split_tasks)&&o.push("gantt_split_parent"),a.select_task&&t.isSelectedTask(n)&&o.push("gantt_selected"),n==s.drag_id&&(o.push("gantt_drag_"+s.drag_mode),s.touch_drag&&o.push("gantt_touch_"+s.drag_mode)),s.link_source_id==n&&o.push("gantt_link_source"),s.link_target_id==n&&o.push("gantt_link_target"),a.highlight_critical_path&&t.isCriticalTask&&t.isCriticalTask(l)&&o.push("gantt_critical_task"),s.link_landing_area&&s.link_target_id&&s.link_source_id&&s.link_target_id!=s.link_source_id){var c=s.link_source_id,u=s.link_from_start,d=s.link_to_start,h=t.isLinkAllowed(c,n,u,d),f="";f=h?d?"link_start_allow":"link_finish_allow":d?"link_start_deny":"link_finish_deny",o.push(f)}return o.join(" ")}("gantt_task_line",l.task_class(e.start_date,e.end_date,e),e.id,a);(e.color||e.progressColor||e.textColor)&&(g+=" gantt_task_inline_color"),h.className=g;var p=["left:"+o.left+"px","top:"+(d+o.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),h.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,s,l);v&&h.appendChild(v),(v=function(t,e,r){var a="gantt_right "+n(!!e.rtl,t);return i(t,r.rightside_text,a)}(e,s,l))&&h.appendChild(v),t._waiAria.setTaskBarAttr(e,h);var m=t.getState();return t.isReadonly(e)||(s.drag_resize&&!t.isSummaryTask(e)&&u!=s.types.milestone&&r(h,"gantt_task_drag",e,function(t){var e=document.createElement("div");return e.className=t,e},s),s.drag_links&&s.show_links&&r(h,"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&&s.touch&&(n=!0),i.style.display=n?"block":"",e.appendChild(i),e},s)),h}}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],o=0;o=+s.min_date&&((o=r([i,a.rtl?"task_right":"task_left","task_start_date"].join(" "))).setAttribute("data-bind-property","start_date"),e.appendChild(o)),+n.end_date<=+s.max_date&&((o=r([i,a.rtl?"task_left":"task_right","task_end_date"].join(" "))).setAttribute("data-bind-property","end_date"),e.appendChild(o))}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(1),r=i(0),a=i(4),o=i(130),s=i(30),l=function(t,e,i,n){this.$config=r.mixin({},e||{}),this.$gantt=n,this.$parent=t,a(this),this.$state={},r.mixin(this,s())};l.prototype={init:function(t){var e=this.$gantt,n=e._waiAria.gridAttrString(),r=e._waiAria.gridDataAttrString();t.innerHTML="
",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 s=this._createLayerConfig();this.$config.layers=s}var l=o(e,this);l.init(),this._renderHeaderResizers=l.doOnRender,this._mouseDelegates=i(12)(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.$config.height=this.$state.height=e;for(var i,n=this.getGridColumns(),r=0,a=0,o=n.length;au.max_width&&(d=u.max_width-u.width),r-=u.width,u.width+=d,l-=d}for(var h=l>0?1:-1;l>0&&1===h||l<0&&-1===h;){var f=l;for(o=e+1;o-1&&((_=n[e].width+l)==this._getColumnWidth(n[e],i,_)&&(n[e].width=_));return this._getColsTotalWidth()},_getColsTotalWidth:function(){for(var t=this.getGridColumns(),e=0,i=0;io+h&&(d.width=h=f-o),o+=h;var _=t._sort&&d.name==t._sort.name?"
":"",g=["gantt_grid_head_cell","gantt_grid_head_"+d.name,u?"gantt_last_cell":"",n.grid_header_class(d.name,d)].join(" "),p="width:"+(h-(u?1:0))+"px;",v=d.label||s["column_"+d.name]||s[d.name];v=v||"";var m="
"+v+_+"
";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._unbindStore(),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()}},t.exports=l},function(t,e){t.exports=function(){var t={};return{_resetTopPositionHeight:function(){t={}},getRowTop:function(t){return t*this.$getConfig().row_height},getItemTop:function(e){if(this.$config.rowStore){if(void 0!==t[e])return t[e];var i=this.$config.rowStore;if(!i)return 0;var n=i.getIndexById(e);if(-1===n&&i.getParent&&i.exists(e)){var r=i.getParent(e);if(i.exists(r)){var a=i.getItem(r);if(this.$gantt.isSplitTask(a))return this.getRowTop(i.getIndexById(a.id))}}return t[e]=this.getRowTop(n),t[e]}return 0}}}},function(t,e,i){var n=i(3),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"==o.$name&&(o=n>0?o.$parent.getNextSibling(o.$id):o.$parent.getPrevSibling(o.$id));var s=o.getSize();if(o[i]){var l=a.gravity+s.gravity,c=a[i]+s[i],u=l/c;t[r].$config.gravity=u*e,o.$config[i]=c-e,o.$config.gravity=l-u*e}else t[r].$config[i]=e;var d=this.$gantt.$ui.getView("grid");d&&t[r].$content===d&&!d.$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;r1)for(var i=1;i=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&&o<86400){var s=e.getTimezoneOffset()-i;s&&(e=t.date.add(e,s,"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){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",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty"}}}},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 o,s=0,l=!1,c=!1,u=null,d=null,h=null,f=0;f5||Math.abs(g)>5)&&(t._touch_scroll_active=c=!0,s=0,o=t.getScrollState()),c){t.scrollTo(o.x+f,o.y+g);var p=t.getScrollState();if(o.x!=p.x&&g>2*f||o.y!=p.y&&f>2*g)return _(i)}}return _(i)}return!0}}]),i.push([this.$container,"contextmenu",function(t){if(l)return _(t)}]),i.push([this.$container,n[1],function(i){if(!a(i))if(i.touches&&i.touches.length>1)l=!1;else{u=r(i),t._locate_css(u,"gantt_hor_scroll")||t._locate_css(u,"gantt_ver_scroll")||(l=!0);var n=e();d=setTimeout(function(){var e=t.locate(u);n&&e&&!t._locate_css(u,"gantt_link_control")&&!t._locate_css(u,"gantt_grid_data")&&(n.on_mouse_down(u),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",a=[];for(var o in t.config.constraint_types)a.push({key:t.config.constraint_types[o],label:t.locale.labels[t.config.constraint_types[o]]});return e.options=e.options||a,n+=""+r.getHtmlSelect(e.options,[{key:"data-type",value:"constraint-type"}])+"",n+="",n+=""},a.prototype.set_value=function(e,i,n,r){var a=e.querySelector("[data-constraint-type-select] select"),o=e.querySelectorAll("[data-constraint-time-select] select"),l=r._time_format_order,c=t._resolve_default_mapping(r);a._eventsInitialized||(a.addEventListener("change",function(t){s(o,t.target.value)}),a._eventsInitialized=!0);var u=n[c.constraint_date]||new Date;t.form_blocks._fill_lightbox_select(o,0,u,l,r);var d=n[c.constraint_type]||t.getConstraintType(n);a.value=d,s(o,d)},a.prototype.get_value=function(e,i,n){var r=e.querySelector("[data-constraint-type-select] select"),a=e.querySelectorAll("[data-constraint-time-select] select"),s=r.value,l=null;return o(s)||(l=t.form_blocks.getTimePickerValue(a,n)),{constraint_type:s,constraint_date:l}},a.prototype.focus=function(e){t._focus(e.querySelector("select"))},a}},function(t,e,i){var n=i(3);t.exports=function(t){var e=i(9)(t);function r(){return e.apply(this,arguments)||this}function a(e,i){var n=[],r=[];i&&(n=t.getTaskByTime(),e.allow_root&&n.unshift({id:t.config.root_id,text:e.root_label||""}),n=function(e,i,n){var r=i.filter||function(){return!0};e=e.slice(0);for(var a=0;a",n=" "+t.locale.labels[t.config.duration_unit+"s"]+" ",r=e.single_date?" style='display:none'":"",a=e.readonly?" disabled='disabled'":"",o=t._waiAria.lightboxDurationInputAttrString(e),s="gantt_duration_value";e.formatter&&(n="",s+=" gantt_duration_value_formatted");var l="
"+n+"
";return"
"+i+" "+l+"
"},a.prototype.set_value=function(e,i,n,r){var a,c,u,d,h=e.getElementsByTagName("select"),f=e.getElementsByTagName("input"),_=f[1],g=[f[0],f[2]],p=e.getElementsByTagName("span")[0],v=r._time_format_order;function m(){var i=s.call(t,e,r),a=l.call(t,e,r),o=t.calculateEndDate({start_date:i,duration:a,task:n}),c=t.templates.task_end_date||t.templates.task_date;p.innerHTML=c(o)}function y(t){var e=_.value;e=o(r).parse(e),window.isNaN(e)&&(e=0),(e+=t)<1&&(e=1),_.value=o(r).format(e),m()}g[0].onclick=t.bind(function(){y(-1*t.config.duration_step)},this),g[1].onclick=t.bind(function(){y(1*t.config.duration_step)},this),h[0].onchange=m,h[1].onchange=m,h[2].onchange=m,h[3]&&(h[3].onchange=m),_.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),_.onchange=t.bind(m,this),"string"==typeof(a=t._resolve_default_mapping(r))&&(a={start_date:a}),c=n[a.start_date]||new Date,u=n[a.end_date]||t.calculateEndDate({start_date:c,duration:1,task:n}),d=Math.round(n[a.duration])||t.calculateDuration({start_date:c,end_date:u,task:n}),d=o(r).format(d),t.form_blocks._fill_lightbox_select(h,0,c,v,r),_.value=d,m()},a.prototype.get_value=function(e,i,n){var r=s(e,n),a=l(e,n),o=t.calculateEndDate({start_date:r,duration:a,task:i});return"string"==typeof t._resolve_default_mapping(n)?r:{start_date:r,end_date:o,duration:a}},a.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},a}},function(t,e,i){var n=i(3);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(2),r=i(3);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(3);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,o=e.getElementsByTagName("select"),s=r._time_format_order;if(a.auto_end_date)for(var l=function(){d=new Date(o[s[2]].value,o[s[1]].value,o[s[0]].value,0,0),h=t.calculateEndDate({start_date:d,duration:1,task:n}),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},c=0;c<4;c++)o[c].onchange=l;var u=t._resolve_default_mapping(r);"string"==typeof u&&(u={start_date:u});var d=n[u.start_date]||new Date,h=n[u.end_date]||t.calculateEndDate({start_date:d,duration:1,task:n});t.form_blocks._fill_lightbox_select(o,0,d,s,a),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},r.prototype.get_value=function(e,i,n){var r,a=e.getElementsByTagName("select"),o=n._time_format_order;return r=t.form_blocks.getTimePickerValue(a,n),"string"==typeof t._resolve_default_mapping(n)?r:{start_date:r,end_date:function(e,i,r){var a=t.form_blocks.getTimePickerValue(e,n,i.size);return a<=r?t.date.add(r,t._get_timepicker_step(),"minute"):a}(a,o,r)}},r.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},r}},function(t,e,i){var n=i(3);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(3);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(2),r=i(59)(t),a=i(58)(t),o=i(57)(t),s=i(9)(t),l=i(56)(t),c=i(55)(t),u=i(54)(t),d=i(53)(t),h=i(9)(t),f=i(52)(t);function _(e,i){var n,r,a="";for(r=0;r
"+t.locale.labels[n]+"
";return a}function g(e,i,n){var r,a,o,s,l,c,u="";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&&(o=e.year_range[0],s=e.year_range[1]):r=e.year_range),r=r||10,a=a||Math.floor(r/2),o=o||n.date.getFullYear()-a,s=s||o+r,l=o;l"+l+"";break;case"%m":for(e._time_format_order[1]=i,e._time_format_order.size++,l=0;l<12;l++)u+="";break;case"%d":for(e._time_format_order[0]=i,e._time_format_order.size++,l=1;l<32;l++)u+="";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 u}t._lightbox_methods={},t._lightbox_template="
 
",t.$services.getService("state").registerProvider("lightbox",function(){return{lightbox:t._lightbox_id}}),t.showLightbox=function(t){if(this.callEvent("onBeforeLightbox",[t])){var e=this.getTask(t),i=this.getLightbox(this.getTaskType(e.type));this._center_lightbox(i),this.showCover(),this._fill_lightbox(t,i),this._waiAria.lightboxVisibleAttr(i),this.callEvent("onLightbox",[t])}},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,o=e.getClassName(n);if(-1!=o.indexOf("gantt_custom_button"))if(-1!=o.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 s=t._get_typed_lightbox_config();r&&(r*=1,t.form_blocks[s[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,t.parent,this.getTaskIndex(t.id))):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]?"constraint"===t.type&&(t.map_to&&"string"!=typeof t.map_to||(e={constraint_type:"constraint_type",constraint_date:"constraint_date"})):"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&&(s+=" "),(a=g(e,r,c))&&(o=t._waiAria.lightboxSelectAttrString(c.timeFormat[r]),s+="");return s},getTimePickerValue:function(e,i,n){var r,a=i._time_format_order,o=t.defined(a[3]),s=0,l=0,c=n||0;return o&&(r=parseInt(e[a[3]+c].value,10),s=Math.floor(r/60),l=r%60),new Date(e[a[2]+c].value,e[a[1]+c].value,e[a[0]+c].value,s,l)},_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 o=e[i+r[3]];o.value=a,o.setAttribute("data-value",a)}},template:new r,textarea:new a,select:new s,time:new o,duration:new u,parent:new d,radio:new c,checkbox:new l,resources:new h,constraint:new f},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._isTaskInTimelineLimits=function(t){var e=t.start_date?t.start_date.valueOf():null,i=t.end_date?t.end_date.valueOf():null;return!!(e&&i&&e<=this._max_date.valueOf()&&i>=this._min_date.valueOf())},t.isTaskVisible=function(t){if(!this.isTaskExists(t))return!1;var e=this.getTask(t);return!(!this._isAllowedUnscheduledTask(e)&&!this._isTaskInTimelineLimits(e))&&!!(this.getGlobalTaskIndex(t)>=0)},t._getProjectEnd=function(){if(t.config.project_end)return t.config.project_end;var e=t.getTaskByTime();return(e=e.sort(function(t,e){return+t.end_date>+e.end_date?1:-1})).length?e[e.length-1].end_date:null},t._getProjectStart=function(){if(t.config.project_start)return t.config.project_start;if(t.config.start_date)return t.config.start_date;if(t.getState().min_date)return t.getState().min_date;var e=t.getTaskByTime();return(e=e.sort(function(t,e){return+t.start_date>+e.start_date?1:-1})).length?e[0].start_date:null},t._defaultTaskDate=function(e,i){var n=!(!i||i==t.config.root_id)&&t.getTask(i),r=null;if(n)r=t.config.schedule_from_end?t.calculateEndDate({start_date:n.end_date,duration:-t.config.duration_step,task:e}):n.start_date;else if(t.config.schedule_from_end)r=t.calculateEndDate({start_date:t._getProjectEnd(),duration:-t.config.duration_step,task:e});else{var a=t.getTaskByIndex(0);r=a?a.start_date?a.start_date:a.end_date?t.calculateEndDate({start_date:a.end_date,duration:-t.config.duration_step,task:e}):null:t.config.start_date||t.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,t.getParent(e)),e.duration=e.duration||t.config.duration_step,e.end_date=e.end_date||t.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),this.isTaskExists(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&&+s<=+i.max_date)o=Math.floor(t.columnIndexByDate(s)),i.trace_x[o]||(o-=1,i.rtl&&(o=0)),a=new Date(i.trace_x[o]),r=t.date.add(a,l,c);else{for(o=Math.floor(t.columnIndexByDate(s)),r=t.date[c+"_start"](new Date(i.min_date)),i.trace_x[o]&&(r=t.date[c+"_start"](i.trace_x[o]));+r<+s;){var u=(r=t.date[c+"_start"](t.date.add(r,l,c))).getTimezoneOffset();r=t._correct_dst_change(r,u,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(s-a)0},_is_work_hour:function(t){for(var e=this._getWorkHours(t),i=t.getHours(),n=0;n=e[n]&&io.valueOf(),this._isWorkTime(a,i)&&((d||h&&f)&&(s=r[i+"_start"](new Date(a)),l=r.add(s,n,i)),d?(d=!1,u=this._nextDate(s,i,n),c+=(l.valueOf()-a.valueOf())/(l.valueOf()-s.valueOf())):h&&f?(h=!1,c+=(o.valueOf()-a.valueOf())/(l.valueOf()-s.valueOf())):c++),a=u;return c},_getMinutesPerDay:function(t){return 60*this._getHoursPerDay(t)},_getHoursPerDay:function(t){for(var e=this._getWorkHours(t),i=0,n=0;n=0?1:-1;return i=Math.abs(1*i),this._calculateEndDate(e,i,n,r*a)},_calculateEndDate:function(t,e,i,n){return!!i&&(1==n&&"minute"==i?this._calculateMinuteEndDate(t,e,n):1==n&&"hour"==i?this._calculateHourEndDate(t,e,n):this._addInterval(t,e,i,n,null).end)},_addInterval:function(t,e,i,n,r){for(var a=0,o=t;a0?new Date(s.valueOf()-1):new Date(s.valueOf()+1),i)&&a++,o=s}return{end:o,start:t,added:a}},_calculateHourEndDate:function(t,e,i){var n=new Date(t),r=0;i=i||1,e=Math.abs(1*e);var a=this._addInterval(n,e,"hour",i,function(t){return!(t.getHours()||t.getMinutes()||t.getSeconds()||t.getMilliseconds())});if(r=a.added,n=a.end,(c=e-r)&&c>24){for(var o=n;r0?new Date(s.valueOf()-1):new Date(s.valueOf()+1),"day")){var l=this._getHoursPerDay(o);if(r+l>=e)break;r+=l}o=s}n=o}if(r0?1:-1),r+=60*s)}if(r0?this._getClosestWorkTimeFuture(a,r):this._getClosestWorkTimePast(a,r),!this._isWorkTime(a,e)));){if(++o>3e3)return this.$gantt.assert(!1,"Invalid working time check"),!1;var s=a.getTimezoneOffset();a=this.$gantt.date.add(a,i,e),a=this.$gantt._correct_dst_change(a,s,i,e),this.$gantt.date[e+"_start"]&&(a=this.$gantt.date[e+"_start"](a))}return a}},t.exports=a},function(t,e,i){var n=i(0),r=i(21),a=i(69);function o(t){this.$gantt=t,this._calendars={}}o.prototype={_calendars:{},_getDayHoursForMultiple:function(t,e){for(var i=[],n=!0,r=0,a=this.$gantt.date.day_start(new Date(e)),o=0;o<24;o++)t.reduce(function(t,e){return t&&e._is_work_hour(a)},!0)?(n?(i[r]=o,i[r+1]=o+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(+o)),e.worktime.dates[o]=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){if(t.xmlDoc&&404===t.xmlDoc.status)this.assert(!1,"Failed to load the data from "+t.xmlDoc.responseURL+", server returns 404");else{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),o=0;o","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 o 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))),e.$dataprocessor_class&&i.setAttribute("aria-busy",!0),i.setAttribute("aria-selected",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,o=e.type==r.start_to_start||e.type==r.start_to_finish,s=t.locale.labels.link+" "+t.templates.drag_link(e.source,o,e.target,a);i.setAttribute("aria-label",n(s)),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(e,i,n){var r={role:"gridcell","aria-label":i};return e.editor&&!t.isReadonly(n)||(r["aria-readonly"]=!0),this.getAttributeString(r)},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[o]=function(e){return function(){return t.config.wai_aria_attributes?e.apply(this,arguments):""}}(t._waiAria[o])}},function(t,e){t.exports=function(t){t.getGridColumn=function(e){for(var i=t.config.columns,n=0;ne._levels.length-1||e.setLevel(t)},this.getCurrentLevel=function(){return e._activeLevelIndex},this.getLevels=function(){return e._levels},this.setLevel=function(t){var i=e._getZoomIndexByName(t);-1===i&&e.$gantt.assert(-1!==i,"Invalid zoom level for gantt.ext.zoom.setLevel. "+t+" is not an expected value."),e._setLevel(i,0)},this._getZoomIndexByName=function(t){var i=-1;if("string"==typeof t){if(!isNaN(Number(t))&&e._levels[Number(t)])i=Number(t);else for(var n=0;n0&&(r=!0),t.preventDefault(),t.stopPropagation(),e._setScaleSettings(r,n)},this._setScaleDates=function(){e._initialStartDate&&e._initialEndDate&&(e.$gantt.config.start_date=e._initialStartDate,e.$gantt.config.end_date=e._initialEndDate)},this.$gantt=t,this._domEvents=this.$gantt._createDomEventScope()}return t.prototype.init=function(t){var e=this;this._initialStartDate=t.startDate,this._initialEndDate=t.endDate,this._activeLevelIndex=t.activeLevelIndex?t.activeLevelIndex:0,this._levels=this._mapScales(t.levels||o),this._handler=t.handler||this._defaultHandler,this._minColumnWidth=t.minColumnWidth||60,this._maxColumnWidth=t.maxColumnWidth||240,this._widthStep=t.widthStep||3/8*t.minColumnWidth,this._useKey=t.useKey,this._initialized||(r(this),this.$gantt.attachEvent("onGanttScroll",function(){e._getVisibleDate()})),this._domEvents.detachAll(),"wheel"===t.trigger&&(this.$gantt.$root?this._attachWheelEvent(t):this.$gantt.attachEvent("onGanttReady",function(){e._attachWheelEvent(t)})),this._initialized=!0,this.setLevel(this._activeLevelIndex)},t.prototype._mapScales=function(t){return t.map(function(t){return Array.isArray(t)?{scales:t}:t})},t.prototype._setScaleSettings=function(t,e){t?this._stepUp(e):this._stepDown(e)},t.prototype._stepUp=function(t){if(!(this._activeLevelIndex>=this._levels.length-1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var i=this.$gantt.config.min_column_width+this._widthStep;i>this._maxColumnWidth&&(i=this._minColumnWidth,e++),this.$gantt.config.min_column_width=i}else e++;this._setLevel(e,t)}},t.prototype._stepDown=function(t){if(!(this._activeLevelIndex<1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var i=this.$gantt.config.min_column_width-this._widthStep;i0&&r<=i.x_end&&a>=i.x}function h(e,i,n){var r=t.config.resource_property,a=[];if(t.getDatastore("task").exists(i)){var o=t.getTask(i);a=o[r]||[]}Array.isArray(a)||(a=[a]);for(var s=0;s"+s+""),l&&(s="
"+s),s&&(c.innerHTML=s),c}return null}return{render:function(t,r,a){var c=r.$getConfig(),u=r.$getTemplates(),h=r.getScale(),f=l(t,c.resource_property,h,r),_=[],g={},p=t.capacity||r.$config.capacity||24;e[t.id]={},i[t.id]=null,n[t.id]=null;for(var v=!!a,m=0;m0&&g+p>=m+2&&(l=0),o&&!b?o=0:o<0&&!y?o=0:o>0&&y+b>=k&&(o=0);var w=t.config.autoscroll_step;w&&w<2&&(w=2),o*=w||i,l*=w||i,(o||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)}(o,l)}function v(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){t.ext||(t.ext={});for(var e=[i(87),i(86),i(85),i(84),i(83),i(82),i(81),i(80),i(79)],n=0;n-1?t.indexOf("?"):t.length),this.serverProcessor=t+("/"===t.slice(-1)?"":"/")+i}else{var n=this._ganttMode+"s";this.serverProcessor=t+e.ajax.urlSeparator(t)+"gantt_mode="+n}return!0}),t.attachEvent("insertCallback",function(t,i,n,r){var a=t.data||e.xml._xmlNodeToJSON(t.firstChild),o={add:e.addTask,isExist:e.isTaskExists};"links"===r&&(o.add=e.addLink,o.isExist=e.isLinkExists),o.isExist.call(e,i)||(a.id=i,o.add.call(e,a))}),t.attachEvent("updateCallback",function(t,i){var n=t.data||e.xml._xmlNodeToJSON(t.firstChild);if(e.isTaskExists(i)){var r=e.getTask(i);for(var a in n){var o=n[a];switch(a){case"id":continue;case"start_date":case"end_date":o=e.templates.xml_date!==e.templates.parse_date?e.templates.xml_date(o):e.templates.parse_date(o);break;case"duration":r.end_date=e.calculateEndDate({start_date:r.start_date,duration:o,task:r})}r[a]=o}e.updateTask(i),e.refreshData()}}),t.attachEvent("deleteCallback",function(t,i,n,r){var a={delete:e.deleteTask,isExist:e.isTaskExists};"links"===r&&(a.delete=e.deleteLink,a.isExist=e.isLinkExists),a.isExist.call(e,i)&&a.delete.call(e,i)})},t.prototype.detach=function(){var t=this;n.forEach(this._dataProcessorHandlers,function(e){t.$gantt.detachEvent(e)}),this._dataProcessorHandlers=[]},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(4),r=i(2),a=i(0),o=i(91),s=i(90),l=i(89);e.createDataProcessor=function(t){var e,i;t instanceof Function?e=t:t.hasOwnProperty("router")?e=t.router:t.hasOwnProperty("link")&&t.hasOwnProperty("task")&&(e=t),i=e?"CUSTOM":t.mode||"REST-JSON";var n=new c(t.url);return n.init(this),n.setTransactionMode({mode:i,router:e},t.batchUpdate),n};var c=function(){function t(t){this.serverProcessor=t,this.action_param="!nativeeditor_status",this.object=null,this.updatedRows=[],this.autoUpdate=!0,this.updateMode="cell",this._headers=null,this._payload=null,this._postDelim="_",this._waitMode=0,this._in_progress={},this._storage=l.default.create(),this._invalid={},this.messages=[],this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",clear:"font-weight:normal;text-decoration:none;"},this.enableUTFencoding(!0),n(this)}return t.prototype.setTransactionMode=function(t,e){"object"==typeof t?(this._tMode=t.mode||this._tMode,a.defined(t.headers)&&(this._headers=t.headers),a.defined(t.payload)&&(this._payload=t.payload)):(this._tMode=t,this._tSend=e),"REST"===this._tMode&&(this._tSend=!1,this._endnm=!0),"JSON"!==this._tMode&&"REST-JSON"!==this._tMode||(this._tSend=!1,this._endnm=!0,this._serializeAsJson=!0,this._headers=this._headers||{},this._headers["Content-type"]="application/json"),"CUSTOM"===this._tMode&&(this._tSend=!1,this._endnm=!0,this._router=t.router)},t.prototype.escape=function(t){return this._utf?encodeURIComponent(t):escape(t)},t.prototype.enableUTFencoding=function(t){this._utf=!!t},t.prototype.setDataColumns=function(t){this._columns="string"==typeof t?t.split(","):t},t.prototype.getSyncState=function(){return!this.updatedRows.length},t.prototype.enableDataNames=function(t){this._endnm=!!t},t.prototype.enablePartialDataSend=function(t){this._changed=!!t},t.prototype.setUpdateMode=function(t,e){this.autoUpdate="cell"===t,this.updateMode=t,this.dnd=e},t.prototype.ignore=function(t,e){this._silent_mode=!0,t.call(e||window),this._silent_mode=!1},t.prototype.setUpdated=function(t,e,i){if(!this._silent_mode){var n=this.findRow(t);i=i||"updated";var r=this.$gantt.getUserData(t,this.action_param);r&&"updated"===i&&(i=r),e?(this.set_invalid(t,!1),this.updatedRows[n]=t,this.$gantt.setUserData(t,this.action_param,i),this._in_progress[t]&&(this._in_progress[t]="wait")):this.is_invalid(t)||(this.updatedRows.splice(n,1),this.$gantt.setUserData(t,this.action_param,"")),this.markRow(t,e,i),e&&this.autoUpdate&&this.sendData(t)}},t.prototype.markRow=function(t,e,i){var n="",r=this.is_invalid(t);if(r&&(n=this.styles[r],e=!0),this.callEvent("onRowMark",[t,e,i,r])&&(n=this.styles[e?i:"clear"]+n,this.$gantt[this._methods[0]](t,n),r&&r.details)){n+=this.styles[r+"_cell"];for(var a=0;aa.indexOf("/task")?"link":"task",this.setGanttMode(r);var o=this.$gantt.ajax;if(window.JSON){var s=void 0;try{s=JSON.parse(e.xmlDoc.responseText)}catch(t){e.xmlDoc.responseText.length||(s={})}if(s){var l=s.action||this.getState(i)||"updated",c=s.sid||i[0],u=s.tid||i[0];return t.afterUpdateCallback(c,u,l,s,r),t.finalizeUpdate(),void this.setGanttMode(r)}}var d=o.xmltop("data",e.xmlDoc);if(!d)return this.cleanUpdate(i);var h=o.xpath("//data/action",d);if(!h.length)return this.cleanUpdate(i);for(var f=0;f=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 o=[],s=a.length-1;s>=0;s--)o[s]=this.getItem(a[s]);o.sort(n);for(s=0;sr||+i.end_date<+n)return!1}return!0}),o.attachEvent("onIdChange",function(e,i){t._update_flags(e,i)}),o.attachEvent("onAfterUpdate",function(e){if(t._update_parents(e),t.getState("batchUpdate").batch_update)return!0;for(var i=o.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,null),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;aa.bottom&&(d.y=a.bottom-r.height-s),d.right>a.right&&(d.x=a.right-r.width-o),d}function v(t){var i=u(),n=["gantt_link_tooltip"];i.link_source_id&&i.link_target_id&&(e.isLinkAllowed(i.link_source_id,i.link_target_id,i.link_from_start,i.link_to_start)?n.push("gantt_allowed_link"):n.push("gantt_invalid_link"));var r=e.templates.drag_link_class(i.link_source_id,i.link_from_start,i.link_target_id,i.link_to_start);r&&n.push(r);var 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 m(){o=s=r=null,a=!0}function y(i,n,r,a){var o=function(){_._direction&&_._direction.parentNode||(_._direction=document.createElement("div"),t.$task_links.appendChild(_._direction));return _._direction}(),s=u(),l=["gantt_link_direction"];e.templates.link_direction_class&&l.push(e.templates.link_direction_class(s.link_source_id,s.link_from_start,s.link_target_id,s.link_to_start));var c=Math.sqrt(Math.pow(r-i,2)+Math.pow(a-n,2));if(c=Math.max(0,c-3)){o.className=l.join(" ");var d=(a-n)/(r-i),h=Math.atan(d);2==b(i,r,n,a)?h+=Math.PI:3==b(i,r,n,a)&&(h-=Math.PI);var f=Math.sin(h),g=Math.cos(h),p=Math.round(n),v=Math.round(i),m=["-webkit-transform: rotate("+h+"rad)","-moz-transform: rotate("+h+"rad)","-ms-transform: rotate("+h+"rad)","-o-transform: rotate("+h+"rad)","transform: rotate("+h+"rad)","width:"+Math.round(c)+"px"];if(-1!=window.navigator.userAgent.indexOf("MSIE 8.0")){m.push('-ms-filter: "'+function(t,e){return"progid:DXImageTransform.Microsoft.Matrix(M11 = "+e+",M12 = -"+t+",M21 = "+t+",M22 = "+e+",SizingMethod = 'auto expand')"}(f,g)+'"');var y=Math.abs(Math.round(i-r)),k=Math.abs(Math.round(a-n));switch(b(i,r,n,a)){case 1:p-=k;break;case 2:v-=y,p-=k;break;case 3:v-=y}}m.push("top:"+p+"px"),m.push("left:"+v+"px"),o.style.cssText=m.join(";")}}function b(t,e,i,n){return e>=t?n<=i?1:4:n<=i?2:3}_.attachEvent("onBeforeDragStart",e.bind(function(i,r){var a=r.target||r.srcElement;if(m(),e.getState().drag_id)return!1;if(n.locateClassName(a,"gantt_link_point")){n.locateClassName(a,"task_start_date")&&(s=!0);var l=e.locate(r);o=l;var c=e.getTask(l);if(e.isReadonly(c))return m(),!1;return this._dir_start=g(c,!!s,0,t.$getConfig(),!0),!0}return!1},this)),_.attachEvent("onAfterDragStart",e.bind(function(t,i){e.config.touch&&e.refreshData(),v(_.config.marker)},this)),_.attachEvent("onDragMove",e.bind(function(o,s){var l=_.config,c=p(s,l.marker);!function(t,e){t.style.left=e.x+"px",t.style.top=e.y+"px"}(l.marker,c);var u=!!n.locateClassName(s,"gantt_link_control"),d=r,h=i,f=a,m=e.locate(s),b=!0;if(n.isChildOf(s.target||s.srcElement,e.$root)||(u=!1,m=null),u&&(b=!n.locateClassName(s,"task_end_date"),u=!!m),r=m,i=u,a=b,u){var k=e.getTask(m),w=t.$getConfig(),x=n.locateClassName(s,"gantt_link_control"),$=0;x&&($=Math.floor(x.offsetWidth/2)),this._dir_end=g(k,!!a,$,w)}else this._dir_end=n.getRelativeEventPosition(s,t.$task_data),e.env.isEdge&&(this._dir_end.y+=window.scrollY);var S=!(h==u&&d==m&&f==b);return S&&(d&&e.refreshTask(d,!1),m&&e.refreshTask(m,!1)),S&&v(l.marker),y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y),!0},this)),_.attachEvent("onDragEnd",e.bind(function(){var t=u();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.callEvent("onLinkCreated",[n])&&e.addLink(n)}m(),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)),_._direction&&(_._direction.parentNode&&_._direction.parentNode.removeChild(_._direction),_._direction=null)},this)),e.attachEvent("onGanttRender",e.bind(function(){_._direction&&y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y)},this))};t.exports={createLinkDND:function(){return{init:r}}}},function(t,e,i){var n=i(1),r=i(0),a=i(34),o=i(2);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 o in t)this._events[a][o]=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(e.$root,"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(),o=this._drag_task_coords(i,r);r.left?(i.start_date=e.dateFromPos(o.start+n),i.start_date||(i.start_date=new Date(e.getState().min_date))):(i.end_date=e.dateFromPos(o.end+n),i.end_date||(i.end_date=new Date(e.getState().max_date)));var s=this._calculateMinDuration(a.min_duration,a.duration_unit);i.end_date-i.start_datec){var u=c-s.end;(un||void 0===n)&&(n=d)}}return n},_move:function(t,i,n){var r=this._drag_task_coords(t,n),a=e.dateFromPos(r.start+i),o=e.dateFromPos(r.end+i);a?o?(t.start_date=a,t.end_date=o):(t.end_date=new Date(e.getState().max_date),t.start_date=e.dateFromPos(e.posFromDate(t.end_date)-(r.end-r.start))):(t.start_date=new Date(e.getState().min_date),t.end_date=e.dateFromPos(e.posFromDate(t.start_date)+(r.end-r.start)))},_drag_task_coords:function(t,i){return{start:i.obj_s_x=i.obj_s_x||e.posFromDate(t.start_date),end:i.obj_e_x=i.obj_e_x||e.posFromDate(t.end_date)}},_mouse_position_change:function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)},_is_number:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},on_mouse_move:function(t){if(this.drag.start_drag){var i=n.getRelativeEventPosition(t,e.$task_data),r=this.drag.start_drag.start_x,o=this.drag.start_drag.start_y;(Date.now()-this.drag.timestamp>50||this._is_number(r)&&this._is_number(o)&&this._mouse_position_change({x:r,y:o},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 o=e.getTask(i),s=e.mixin({},o),l=e.mixin({},o);this._handlers[n].apply(this,[l,t,r]),e.mixin(o,l,!0),e.callEvent("onTaskDrag",[o.id,n,l,s,a]),e.mixin(o,l,!0),e.refreshTask(i)},_update_on_move:function(i){var a=this.drag,o=t.$getConfig();if(a.mode){var s=n.getRelativeEventPosition(i,t.$task_data);if(a.pos&&a.pos.x==s.x)return;a.pos=s;var l=e.dateFromPos(s.x);if(!l||isNaN(l.getTime()))return;var c=s.x-a.start_x,u=e.getTask(a.id);if(this._handlers[a.mode]){if(a.mode===o.drag_mode.move){var d={};if(this._isMultiselect()&&e.getSelectedTasks().indexOf(a.id)>=0&&(d=this.dragMultiple),e.isSummaryTask(u)&&e.config.drag_project){var h={};h[a.id]=r.copy(a),d=r.mixin(h,this.dragMultiple)}var f=this._find_max_shift(d,c);for(var _ in void 0!==f&&(c=f),this._update_item_on_move(c,a.id,a.mode,a,i),d){var g=d[_];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(),o=e.locate(i),s=null;if(e.isTaskExists(o)&&(s=e.getTask(o)),!e.isReadonly(s)&&!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(o=e.locate(r),s=e.copy(e.getTask(o)||{}),e.isReadonly(s))return this.clear_drag_state(),!1;if(e.isSummaryTask(s)&&!a.drag_project&&c.mode!=a.drag_mode.progress)return void this.clear_drag_state();c.id=o;var u=n.getRelativeEventPosition(i,e.$task_data);c.start_x=u.x,c.start_y=u.y,c.obj=s,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,o=e.getScale().step;function s(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",o=r.time_step),n.mode==r.drag_mode.resize?n.left?(i.start_date=e.roundDate({date:i.start_date,unit:a,step:o}),s(i)):(i.end_date=e.roundDate({date:i.end_date,unit:a,step:o}),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:o}),s(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 o=t;e._init_task_timing(a),this.clear_drag_state(),e.updateTask(a.id),this._fireEvent("after_finish",n.mode,[o,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),o=this.dragMultiple;if(n.mode===r.drag_mode.move&&(e.isSummaryTask(a)&&r.drag_project||this._isMultiselect()))for(var s in o)this._finalize_mouse_up(o[s].id,r,o[s],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);if(e.isReadonly(s))return void this.clear_drag_state();if(this._isMultiselect()){var l=e.getSelectedTasks();l.indexOf(n.id)>=0&&o.forEach(l,e.bind(function(t){var i=e.getTask(t);e.isSummaryTask(i)&&e.config.drag_project&&n.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(i.id),this.dragMultiple[t]=e.mixin({id:i.id,obj:e.copy(i)},this.drag)},this))}e.isSummaryTask(s)&&e.config.drag_project&&n.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(s.id),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()},_isMultiselect:function(){return e.config.drag_multiple&&!!(e.getSelectedTasks&&e.getSelectedTasks().length>0)},_addSubtasksToDragMultiple:function(t){e.eachTask(function(t){this.dragMultiple[t.id]=e.mixin({id:t.id,obj:e.copy(t)},this.drag)},t,this)}}}(e,i),e._tasks_dnd=t,t.init(i)},destructor:function(){t&&(t.destructor(),t=null)}}}}},function(t,e,i){var n=i(0),r=i(105),a=i(104),o=i(1),s=function(t){var e=t.$services;return{onCreated:function(e){var o=e.$config;o.bind=n.defined(o.bind)?o.bind:"task",o.bindLinks=n.defined(o.bindLinks)?o.bindLinks:"link",e._linksDnD=a.createLinkDND(),e._tasksDnD=r.createTaskDND(),e._tasksDnD.extend(e),this._mouseDelegates=i(12)(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),e._tasksDnD&&e._tasksDnD.destructor()},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=o.getRelativeEventPosition(e,t.$task_data),r=t.dateFromPos(n.x),a=Math.floor(t.columnIndexByDate(r)),s=t.getScale().trace_x[a];t.callEvent("onScaleClick",[e,s])},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&&o.getClassName(n.parentNode)&&(a=o.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=s},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,o=i.x,s=r.y-10,l=e.$getConfig();si.y+c-l.row_height&&(s=i.y+c-l.row_height),i.x=o,i.y=s,i}(t,i);e.marker.style.left=a.x+9+"px",e.marker.style.top=a.y+"px";var o=e.markerLine;o||((o=document.createElement("div")).className="gantt_drag_marker gantt_grid_dnd_marker",o.innerHTML="
",o.style.pointerEvents="none",document.body.appendChild(o),e.markerLine=o),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,o,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"),o=15,s=0;if(a&&(o=a.offsetWidth),t.targetId!==i.$getRootId()){var l=e.getItemTop(t.targetId),c=e.getItemHeight(t.targetId);if(s=i.exists(t.targetId)?i.calculateItemLevel(i.getItem(t.targetId)):0,t.prevSibling)n.y=l;else if(t.nextSibling){var u=0;i.eachItem(function(t){-1!==i.getIndexById(t.id)&&u++},t.targetId),n.y=l+c+u*c}else n.y=l+c,s+=1}return n.x=40+s*o,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,o,i)}}},function(t,e,i){var n=i(10);t.exports=function(t,e,i,r,a){var o;if(e!==a.$getRootId())o=i<.25?n.prevSiblingTarget(t,e,a):!(i>.6)||a.hasChild(e)&&a.getItem(e).$open?n.firstChildTarget(t,e,a):n.nextSiblingTarget(t,e,a);else{var s=a.$getRootId();o=a.hasChild(s)&&r>=0?n.lastChildTarget(t,s,a):n.firstChildTarget(t,s,a)}return o}},function(t,e,i){var n=i(10);function r(t,e,i,r,a){for(var o=e;r.exists(o);){var s=r.calculateItemLevel(r.getItem(o));if((s===i||s===i-1)&&r.getBranchIndex(o)>-1)break;o=a?r.getPrev(o):r.getNext(o)}return r.exists(o)?r.calculateItemLevel(r.getItem(o))===i?a?n.nextSiblingTarget(t,o,r):n.prevSiblingTarget(t,o,r):n.firstChildTarget(t,o,r):null}function a(t,e,i,n){return r(t,e,i,n,!0)}function o(t,e,i,n){return r(t,e,i,n,!1)}t.exports=function(t,e,i,r,s,l){var c;if(e!==s.$getRootId())i<.5?s.calculateItemLevel(s.getItem(e))===l?c=s.getPrevSibling(e)?n.nextSiblingTarget(t,s.getPrevSibling(e),s):n.prevSiblingTarget(t,e,s):(c=a(t,e,l,s))&&(c=o(t,e,l,s)):s.calculateItemLevel(s.getItem(e))===l?c=n.nextSiblingTarget(t,e,s):(c=o(t,e,l,s))&&(c=a(t,e,l,s));else{var u=s.$getRootId(),d=s.getChildren(u);c=n.createDropTargetObject(),c=d.length&&r>=0?a(t,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}(s),l,s):o(t,u,l,s)}return c}},function(t,e,i){var n=i(1),r=i(10),a=i(109),o=i(108),s=i(107);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,r){var a=c(r);if(!a)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),n.closest(r.target,".gantt_grid_editor_placeholder"))return!1;var o=a.getAttribute(e.$config.item_attribute),s=e.$config.rowStore.getItem(o);return!t.isReadonly(s)&&(l.config.initial_open_state=s.$open,!!t.callEvent("onRowDragStart",[o,r.target||r.srcElement,r])&&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 o=e.$config.rowStore,s=o.getItem(l.config.id);l.config.level=o.calculateItemLevel(s),l.config.drop_target=r.createDropTargetObject({targetParent:o.getParent(s.id),targetIndex:o.getBranchIndex(s.id),targetId:s.id,nextSibling:!0}),s.$open=!1,s.$transparent=!0,this.refreshData()},t)),l.attachEvent("onDragMove",t.bind(function(i,n){var a=u(n);return a&&!1!==t.callEvent("onBeforeRowDragMove",[l.config.id,a.targetParent,a.targetIndex])||(a=r.createDropTargetObject(l.config.drop_target)),s.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);s.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 u(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,s=e.$config.rowStore,c=!e.$getConfig().order_branch_free,u=n.getRelativeEventPosition(t,e.$grid_data).y;return i!==s.$getRootId()&&(r=(u-e.getItemTop(i))/e.getItemHeight()),c?a(l.config.id,i,r,u,s,l.config.level):o(l.config.id,i,r,u,s)}}}},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,s){var l=a(s);if(!l)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),n.closest(s.target,".gantt_grid_editor_placeholder"))return!1;var c=l.getAttribute(e.$config.item_attribute),u=o().getItem(c);return!t.isReadonly(u)&&(r.config.initial_open_state=u.$open,!!t.callEvent("onRowDragStart",[c,s.target||s.srcElement,s])&&void 0)},t)),r.attachEvent("onAfterDragStart",t.bind(function(t,i){var n=a(i);r.config.marker.innerHTML=n.outerHTML;var s=r.config.marker.firstChild;s&&(s.style.position="static"),r.config.id=n.getAttribute(e.$config.item_attribute);var l=o(),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=o().getItems(),n=0,r=i.length;ni.y+c-l.row_height&&(s=i.y+c-l.row_height),i.x=a,i.y=s,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=o();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),s=e.$getConfig(),l=o();n.marker.style.left=a.x+10+"px",n.marker.style.top=a.y+"px";var c=l.getItem(r.config.id),u=r._getTargetY(i),d=r._getTaskByY(u,l.getIndexById(c.id));function h(t,e){return!l.isChildOf(f.id,e.id)&&(t.$level==e.$level||s.order_branch_free)}if(l.exists(d)||(d=r.lastTaskOfLevel(s.order_branch_free?c.$level:0))==r.config.id&&(d=null),l.exists(d)){var f=l.getItem(d);if(l.getIndexById(f.id)*s.row_height+s.row_height/2=0;)v=l.getIdByIndex(_-y),m=l.getItem(v),y++;if(c.id==f.id)return;h(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&&h(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=o(),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]),this.refreshData()},t))}function a(t){return n.locateAttribute(t,e.$config.item_attribute)}function o(){return t.getDatastore(e.$config.bind)}}}},function(t,e,i){var n=i(0),r=i(111),a=i(110),o=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(12)(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 o=this.getTask(n);a.scroll_on_click&&!e._is_icon_open_click(i)&&this.showDate(o.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 o=t.$getConfig();if("add"!=a){if(o.sort){for(var s,l=a,c=0;c",f=""):(h=g.template?g.template(e):e[g.name],n.isDate(h)&&(h=s.date_grid(h,e,g.name)),null!==h&&void 0!==h||(h=""),f=h,h="
"+h+"
");var p="gantt_cell"+(_?" gantt_last_cell":""),v=[];if(g.tree){for(var m=0;m"+v.join("")+"",c.push(d)}if(p=t.getGlobalTaskIndex(e.id)%2==0?"":" odd",p+=e.$transparent?" gantt_transparent":"",p+=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&&(p+=" "+k)}l.isSelected(e.id)&&(p+=" gantt_selected");var w=document.createElement("div");w.className="gantt_row"+p+" gantt_row_"+t.getTaskType(e.type);var x=i.getItemHeight();return w.style.height=x+"px",w.style.lineHeight=x+"px",o.smart_rendering&&(w.style.position="absolute",w.style.left="0px",w.style.top=i.getItemTop(e.id)+"px"),i.$config.item_attribute&&w.setAttribute(i.$config.item_attribute,e.id),t._waiAria.taskRowAttr(e,w),w.innerHTML=c.join(""),w},update:null,getRectangle:r}}},function(t,e,i){var n=i(11);t.exports=function(t,e,i){if(!i.isTaskExists(t.source))return null;if(!i.isTaskExists(t.target))return null;var r=n(i.getTask(t.source),e,i),a=n(i.getTask(t.target),e,i);if(!r||!a)return null;var o=Math.min(r.left,a.left)-100,s=Math.max(r.left+r.width,a.left+a.width)+100,l=Math.min(r.top,a.top)-100;return{top:l,height:Math.max(r.top+r.height,a.top+a.height)+100-l,left:o,width:s-o}}},function(t,e,i){var n=i(114);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,o=r.e_y-r.y,s=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,u=this.get_line_type(i,n.$getConfig()),d=r.e_x>r.x;if(u.from_start&&u.to_start)this.point_to(l.left,c),d?(this.point_to(l.down,o),this.point_to(l.right,s)):(this.point_to(l.right,s),this.point_to(l.down,o)),this.point_to(l.right,c);else if(!u.from_start&&u.to_start)if(d=r.e_x>r.x+2*c,this.point_to(l.right,c),d)s-=c,this.point_to(l.down,o),this.point_to(l.right,s);else{s-=2*c;var h=o>0?1:-1;this.point_to(l.down,h*(a.row_height/2)),this.point_to(l.right,s),this.point_to(l.down,h*(Math.abs(o)-a.row_height/2)),this.point_to(l.right,c)}else u.from_start||u.to_start?u.from_start&&!u.to_start&&(d=r.e_x>r.x-2*c,this.point_to(l.left,c),d?(s+=2*c,h=o>0?1:-1,this.point_to(l.down,h*(a.row_height/2)),this.point_to(l.right,s),this.point_to(l.down,h*(Math.abs(o)-a.row_height/2)),this.point_to(l.left,c)):(s+=c,this.point_to(l.down,o),this.point_to(l.right,s))):(this.point_to(l.right,c),d?(this.point_to(l.right,s),this.point_to(l.down,o)):(this.point_to(l.down,o),this.point_to(l.right,s)),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 n=i.$getConfig(),a=this.get_line_type(e,n),o=a.from_start,s=a.to_start,l=t.getTask(e.source),c=t.getTask(e.target),u=r(l,i),d=r(c,i);return{x:o?u.left:u.left+u.width,e_x:s?d.left:d.left+d.width,y:u.top,e_y:d.top}}};function r(e,i){var n=i.$getConfig(),r=i.getItemPosition(e);if(t.getTaskType(e.type)==n.types.milestone){var a=t.getTaskHeight(),o=Math.sqrt(2*a*a);r.left-=o/2,r.width=o}return r}return{render:function(n,r){var a=r.$getConfig(),o=i.get_endpoint(n,r),s=o.e_y-o.y;if(!(o.e_x-o.x||s))return null;var l=i.get_points(n,r),c=e.get_lines(l,r),u=document.createElement("div"),d="gantt_task_link";n.color&&(d+=" gantt_link_inline_color");var h=t.templates.link_class?t.templates.link_class(n):"";h&&(d+=" "+h),a.highlight_critical_path&&t.isCriticalLink&&t.isCriticalLink(n)&&(d+=" gantt_critical_link"),u.className=d,r.$config.link_attribute&&u.setAttribute(r.$config.link_attribute,n.id);for(var f=0;fi){r=a;break}}return{start:n,end:r}}t.exports=function(t){var e={},i={};function o(t,i){return!(!e[t.id][i]||!e[t.id][i].parentNode)}function s(t,i){e[t]&&e[t][i]&&e[t][i].parentNode&&e[t][i].parentNode.removeChild(e[t][i])}function l(t){var e,i=t.$getTemplates();return void 0!==i.task_cell_class?(e=i.task_cell_class,(console.warn||console.log)("gantt.templates.task_cell_class template is deprecated and will be removed soon. Please use gantt.templates.timeline_cell_class instead.")):e=i.timeline_cell_class,e}function c(n,a,o,s,l,c,u){var d=n.width[a],h="";if(function(e,i,n){var a=i.width[e];if(a<=0)return!1;if(!t.config.smart_rendering||r(t))return!0;var o=i.left[e]-a,s=i.left[e]+a;return o<=n.x_end&&s>=n.x}(a,n,s)){var f=c(o,n.trace_x[a]);if(u.static_background&&(!u.static_background_cells||!f))return null;if(e[o.id][a])return i[o.id][a]=a,e[o.id][a];var _=document.createElement("div");return _.style.width=d+"px",h="gantt_task_cell"+(a==l-1?" gantt_last_cell":""),f&&(h+=" "+f),_.className=h,_.style.position="absolute",_.style.left=n.left[a]+"px",e[o.id][a]=_,i[o.id][a]=a,_}return null}return{render:function(n,o,s){var u=o.$getConfig(),d=o.$getTemplates(),h=o.getScale(),f=h.count;if(u.static_background&&!u.static_background_cells)return null;var _,g=document.createElement("div"),p=l(o);if(_=s&&u.smart_rendering&&!r(t)?a(h,s.x,s.x_end):{start:0,end:f-1},u.show_task_cells){e[n.id]={},i[n.id]={};for(var v=_.start;v<=_.end;v++){var m=c(h,v,n,s,f,p,u);m&&g.appendChild(m)}}var y=t.getGlobalTaskIndex(n.id)%2!=0,b=d.task_row_class(n.start_date,n.end_date,n),k="gantt_task_row"+(y?" odd":"")+(b?" "+b:"");return o.$config.rowStore.isSelected(n.id)&&(k+=" gantt_selected"),g.className=k,u.smart_rendering?(g.style.position="absolute",g.style.top=o.getItemTop(n.id)+"px",g.style.width="100%"):g.style.position="relative",g.style.height=u.row_height+"px",o.$config.item_attribute&&g.setAttribute(o.$config.item_attribute,n.id),g},update:function(t,n,r,u){var d=r.$getConfig(),h=r.getScale(),f=h.count,_=l(r);if(d.show_task_cells){e[t.id]||(e[t.id]={}),i[t.id]||(i[t.id]={});var g=a(h,u.x,u.x_end);for(var p in i[t.id]){var v=i[t.id][p];(Number(v)g.end)&&s(t.id,v)}i[t.id]={};for(var m=g.start;m<=g.end;m++){var y=c(h,m,t,u,f,_,d);!y&&o(t,m)?s(t.id,m):y&&!y.parentNode&&n.appendChild(y)}}},getRectangle:n}}},function(t,e,i){var n=i(11),r=i(28);t.exports=function(t){var e=r(t);return{render:function(i,n){if(t.isSplitTask(i)&&(t.config.open_split_tasks&&!i.$open||!t.config.open_split_tasks)){for(var r=document.createElement("div"),a=t.getTaskPosition(i),o=t.getChildren(i.id),s=0;s";n.innerHTML=r},set_value:function(t,e,i,n){this.get_input(n).value=a(i.editor).format(t)},get_value:function(t,e,i){return a(e.editor).parse(this.get_input(i).value||"")}},!0),r}},function(t,e,i){t.exports=function(t){var e=i(6)(t),n=i(0);function r(){return e.apply(this,arguments)||this}function a(e){return e.formatter||t.ext.formatters.linkFormatter()}function o(t,e){for(var i=(t||"").split(e.delimiter||","),n=0;n";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 o(this.get_input(i).value||"",e.editor)},save:function(e,i,n){var r=c(t.getTask(e),this.get_value(e,i,n),i.editor);(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 a=this.get_value(i,n,r),l=o(s(e,n.editor,t),n.editor);return a.join()!==l.join()}},!0),r}},function(t,e,i){t.exports=function(t){var e=i(6)(t),n=i(0),r="%Y-%m-%d",a=null,o=null;function s(){return e.apply(this,arguments)||this}return i(3)(s,e),n.mixin(s.prototype,{show:function(e,i,n,s){a||(a=t.date.date_to_str(r)),o||(o=t.date.str_to_date(r));var l=null,c=null;l="function"==typeof n.min?n.min(e,i):n.min,c="function"==typeof n.max?n.max(e,i):n.max;var u="
";s.innerHTML=u},set_value:function(t,e,i,n){t&&t.getFullYear?this.get_input(n).value=a(t):this.get_input(n).value=t},is_valid:function(t,e,i,n){return!(!t||isNaN(t.getTime()))},get_value:function(t,e,i){var n;try{n=o(this.get_input(i).value||"")}catch(t){n=null}return n}},!0),s}},function(t,e,i){t.exports=function(t){var e=i(6)(t),n=i(0);function r(){return e.apply(this,arguments)||this}return i(3)(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(6)(t),n=i(0);function r(){return e.apply(this,arguments)||this}return i(3)(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(6)(t),n=i(0);function r(){return e.apply(this,arguments)||this}return i(3)(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,o=n.id,s=i.getState();if(i.isVisible()&&s.id==o&&s.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 o=t.locateCell(r.target),s=!!o&&t.getEditorConfig(o.columnName),l=t.getState(),c=n.constants.KEY_CODES,u=r.keyCode,d=!1;switch(u){case c.ENTER:t.isVisible()?(t.save(),r.preventDefault(),d=!0):s&&!(r.ctrlKey||r.metaKey||r.shiftKey)&&(i.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.ESC:t.isVisible()&&(t.hide(),r.preventDefault(),d=!0);break;case c.UP:case c.DOWN:break;case c.LEFT:case c.RIGHT:(s&&t.isVisible()||"date"===l.editorType)&&(d=!0);break;case c.SPACE:t.isVisible()&&(d=!0),s&&!t.isVisible()&&(i.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.DELETE:s&&!t.isVisible()?(i.startEdit(o.id,o.columnName),d=!0):s&&t.isVisible()&&(d=!0);break;case c.TAB:if(t.isVisible()){r.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);var h=t.getState();h.id&&a.focus({type:"taskCell",id:h.id,column:h.columnName}),r.preventDefault(),d=!0}break;default:if(t.isVisible())d=!0;else if(u>=48&&u<=57||u>95&&u<112||u>=64&&u<=91||u>185&&u<193||u>218&&u<223){var f=e.modifiers,_=f.alt||f.ctrl||f.meta||f.shift;f.alt||_&&a.getCommandHandler(e,"taskCell")||s&&!t.isVisible()&&(i.startEdit(o.id,o.columnName),d=!0)}}return!d})},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.isVisible()&&t.isChanged()?t.save():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||(t.hide(),!1)})},onShow:function(t,e,i){var n=i.$gantt;n.ext&&n.ext.keyboardNavigation&&n.ext.keyboardNavigation.attachEvent("onKeyDown",function(e,i){var r=n.constants.KEY_CODES,a=!1;switch(i.keyCode){case r.SPACE:t.isVisible()&&(a=!0)}return!a});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.UP:case i.DOWN:t.isVisible()&&(t.hide(),r=!1);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(127),r=i(126);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(128),r=i(125),a=i(124),o=i(123),s=i(122),l=i(121),c=i(120),u=i(0),d=i(1),h=i(4),f=i(119);function _(t){t.config.editor_types={text:new(r(t)),number:new(a(t)),select:new(o(t)),date:new(s(t)),predecessor:new(l(t)),duration:new(c(t))}}t.exports=function(t){var e=n(t),i={};h(i);var r={init:_,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(),o=0,s=0,l=0;l0?t.getNext:t.getPrev,n=(i=t.bind(i,t))(this._itemId);t.isTaskExists(n)&&t.isReadonly(t.getTask(n));)n=i(n);return n},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(){o.forEach(function(t){s.detachEvent(t)}),s=null,this.hide(),this.detachAllEvents()}};return u.mixin(l,e),u.mixin(l,i),l}};return u.mixin(r,e),u.mixin(r,i),r}},function(t,e){t.exports=function(t,e){return{init:function(){},doOnRender:function(){}}}},function(t,e){t.exports={create:function(){return{render:function(){},destroy:function(){}}}}},function(t,e,i){var n=i(3),r=i(1),a=i(0),o=i(8),s=function(t){"use strict";var e=["altKey","shiftKey","metaKey"];function i(e,i,n,r){var o=t.apply(this,arguments)||this;this.$config=a.mixin(i,{scroll:"x"}),o._scrollHorizontalHandler=a.bind(o._scrollHorizontalHandler,o),o._scrollVerticalHandler=a.bind(o._scrollVerticalHandler,o),o._outerScrollVerticalHandler=a.bind(o._outerScrollVerticalHandler,o),o._outerScrollHorizontalHandler=a.bind(o._outerScrollHorizontalHandler,o),o._mouseWheelHandler=a.bind(o._mouseWheelHandler,o),this.$config.hidden=!0;var s=r.config.scroll_size;return r.env.isIE&&(s+=1),this._isHorizontal()?(o.$config.height=s,o.$parent.$config.height=s):(o.$config.width=s,o.$parent.$config.width=s),this.$config.scrollPosition=0,o.$name="scroller",o}return n(i,t),i.prototype.init=function(t){t.innerHTML=this.$toHTML(),this.$view=t.firstChild,this.$view||this.init(),this._isVertical()?this._initVertical():this._initHorizontal(),this._initMouseWheel(),this._initLinkedViews()},i.prototype.$toHTML=function(){return"
"},i.prototype._getRootParent=function(){for(var t=this.$parent;t&&t.$parent;)t=t.$parent;if(t)return t},i.prototype._eachView=function(){var t=[];return function t(e,i){if(i.push(e),e.$cells)for(var n=0;nd[s]&&d[o]>e&&u>d[s]-l+2&&(e=u+(n?0:2),i=d[s]);else{var h=Math.max(d[o]-u,0);(u+=h)>Math.max(d[s]-h,0)&&u>e&&(e=u,i=d[s])}}return{outerScroll:i,innerScroll:e}},i.prototype.scroll=function(t){this._isHorizontal()?this.scrollHorizontally(t):this.scrollVertically(t)},i.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}},i.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)},i.prototype.isVisible=function(){return!(!this.$parent||!this.$parent.$view.parentNode)},i.prototype.shouldShow=function(){var t=this._getScrollSize();return!(!t.innerScroll&&this.$parent&&this.$parent.$view.parentNode)&&!(!t.innerScroll||this.$parent&&this.$parent.$view.parentNode)},i.prototype.shouldHide=function(){return!(this._getScrollSize().innerScroll||!this.$parent||!this.$parent.$view.parentNode)},i.prototype.toggleVisibility=function(){this.shouldHide()?this.hide():this.shouldShow()&&this.show()},i.prototype._getScaleOffset=function(t){var e=0;return!t||"timeline"!=t.$config.view&&"grid"!=t.$config.view||(e=t.$content.$getConfig().scale_height),e},i.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;n=0&&(!t[l]||t.deltaX||t.wheelDeltaX||(a=2*s,s=0)),a&&Math.abs(a)>Math.abs(s)){if(this._isVertical())return;if(n.x)return!0;if(!this.$scroll_hor||!this.$scroll_hor.offsetWidth)return!0;var c=a/-40,u=this._oldLeft,d=u+30*c;if(this.scrollHorizontally(d),this.$scroll_hor.scrollLeft=d,u==this.$scroll_hor.scrollLeft)return!0;this._oldLeft=this.$scroll_hor.scrollLeft}else{if(this._isHorizontal())return;if(n.y)return!0;if(!this.$scroll_ver||!this.$scroll_ver.offsetHeight)return!0;c=s/-40;void 0===s&&(c=t.detail);var h=this._oldTop,f=this.$scroll_ver.scrollTop+30*c;if(this.scrollVertically(f),this.$scroll_ver.scrollTop=f,h==this.$scroll_ver.scrollTop)return!0;this._oldTop=this.$scroll_ver.scrollTop}return t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,!1}},i}(i(7));t.exports=s},function(t,e){t.exports=null},function(t,e,i){var n=i(3),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 o=r.copy(i);if(delete o.config,delete o.templates,this.$content=this.$factory.createView(i.view,this,o,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();if("number"==typeof t){var n=t+i.horizontal;this.$config.width=n}if("number"==typeof e){var r=e+i.vertical;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(7));t.exports=a},function(t,e,i){var n=i(3),r=i(31),a=i(7),o=function(t){"use strict";function e(e,i,n){for(var r=t.apply(this,arguments)||this,a=0;at.x_end||e.left+e.widtht.y_end||e.top+e.height-1&&o.click?o.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 s(t){s.cover||(s.cover=document.createElement("div"),s.cover.onkeydown=o,s.cover.className="dhx_modal_cover",document.body.appendChild(s.cover)),s.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+""),h+='
'+(r.content?"":r.text)+'
',o&&(h+=l(c(r.ok,t.locale.labels.message_ok,"OK"),"ok",!0)),s&&(h+=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=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},i(145),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,i(16))},function(t,e,i){(function(e,i,n){t.exports=function(){var t,r,a;return function t(e,i,n){function r(o,s){if(!i[o]){if(!e[o]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[o]={exports:{}};e[o][0].call(u.exports,function(t){var i=e[o][1][t];return r(i||t)},u,u.exports,t,e,i,n)}return i[o].exports}for(var a="function"==typeof _dereq_&&_dereq_,o=0;o0;)f(t)}function f(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var i=t.shift(),n=t.shift();e.call(i,n)}}l.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},l.prototype.hasCustomScheduler=function(){return this._customScheduler},l.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},l.prototype.disableTrampolineIfNecessary=function(){s.hasDevTools&&(this._trampolineEnabled=!1)},l.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},l.prototype.fatalError=function(t,i){i?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},l.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.hasDevTools?(l.prototype.invokeLater=function(t,e,i){this._trampolineEnabled?c.call(this,t,e,i):this._schedule(function(){setTimeout(function(){t.call(e,i)},100)})},l.prototype.invoke=function(t,e,i){this._trampolineEnabled?u.call(this,t,e,i):this._schedule(function(){t.call(e,i)})},l.prototype.settlePromises=function(t){this._trampolineEnabled?d.call(this,t):this._schedule(function(){t._settlePromises()})}):(l.prototype.invokeLater=c,l.prototype.invoke=u,l.prototype.settlePromises=d),l.prototype._drainQueues=function(){h(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,h(this._lateQueue)},l.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},l.prototype._reset=function(){this._isTickUsed=!1},i.exports=l,i.exports.firstLineError=r},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,i){"use strict";e.exports=function(t,e,i,n){var r=!1,a=function(t,e){this._reject(e)},o=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(a,a,null,this,t)},s=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},l=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(a){r||(r=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=i(a),u=new t(e);u._propagateFrom(this,1);var d=this._target();if(u._setBoundTo(c),c instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:d,bindingPromise:c};d._then(e,o,void 0,u,h),c._then(s,l,void 0,u,h),u._setOnCancel(c)}else u._resolveCallback(d);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,i){return t.resolve(i).bind(e)}}},{}],4:[function(t,e,i){"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var r=t("./promise")();r.noConflict=function(){try{Promise===r&&(Promise=n)}catch(t){}return r},e.exports=r},{"./promise":22}],5:[function(t,e,i){"use strict";var n=Object.create;if(n){var r=n(null),a=n(null);r[" size"]=a[" size"]=0}e.exports=function(e){var i=t("./util"),n=i.canEvaluate;function r(t){var n=this.pop(),r=function(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var a="Object "+i.classString(t)+" has no method '"+i.toString(n)+"'";throw new e.TypeError(a)}return r}(t,n);return r.apply(t,this)}function a(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}i.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,i="number"==typeof t;if(i)e=o;else if(n){var r=(void 0)(t);e=null!==r?r:a}else e=a;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,i){"use strict";e.exports=function(e,i,n,r){var a=t("./util"),o=a.tryCatch,s=a.errorObj,l=e._async;e.prototype.break=e.prototype.cancel=function(){if(!r.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var i=t._cancellationParent;if(null==i||!i._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=i}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(a.isArray(t))for(var i=0;i=0)return i[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,i.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=i.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var i=t.prototype._pushContext,a=t.prototype._popContext,o=t._peekContext,s=t.prototype._peekContext,l=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=i,t.prototype._popContext=a,t._peekContext=o,t.prototype._peekContext=s,t.prototype._promiseCreated=l,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},{}],9:[function(t,i,n){"use strict";i.exports=function(i,n){var r,a,o,s=i._getDomain,l=i._async,c=t("./errors").Warning,u=t("./util"),d=t("./es5"),h=u.canAttachTrace,f=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,_=/\((?:timers\.js):\d+:\d+\)/,g=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,p=null,v=null,m=!1,y=!(0==u.env("BLUEBIRD_DEBUG")),b=!(0==u.env("BLUEBIRD_WARNINGS")||!y&&!u.env("BLUEBIRD_WARNINGS")),k=!(0==u.env("BLUEBIRD_LONG_STACK_TRACES")||!y&&!u.env("BLUEBIRD_LONG_STACK_TRACES")),w=0!=u.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(b||!!u.env("BLUEBIRD_W_FORGOTTEN_RETURN"));i.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},i.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},i.prototype._notifyUnhandledRejectionIsHandled=function(){U("rejectionHandled",r,void 0,this)},i.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},i.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},i.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),U("unhandledRejection",a,t,this)}},i.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},i.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},i.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},i.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},i.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},i.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},i.prototype._warn=function(t,e,i){return F(t,e,i||this)},i.onPossiblyUnhandledRejection=function(t){var e=s();a="function"==typeof t?null===e?t:u.domainBind(e,t):void 0},i.onUnhandledRejectionHandled=function(t){var e=s();r="function"==typeof t?null===e?t:u.domainBind(e,t):void 0};var x=function(){};i.longStackTraces=function(){if(l.haveItemsQueued()&&!Z.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Z.longStackTraces&&q()){var t=i.prototype._captureStackTrace,e=i.prototype._attachExtraTrace,r=i.prototype._dereferenceTrace;Z.longStackTraces=!0,x=function(){if(l.haveItemsQueued()&&!Z.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");i.prototype._captureStackTrace=t,i.prototype._attachExtraTrace=e,i.prototype._dereferenceTrace=r,n.deactivateLongStackTraces(),l.enableTrampoline(),Z.longStackTraces=!1},i.prototype._captureStackTrace=R,i.prototype._attachExtraTrace=H,i.prototype._dereferenceTrace=z,n.activateLongStackTraces(),l.disableTrampolineIfNecessary()}},i.hasLongStackTraces=function(){return Z.longStackTraces&&q()};var $=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return u.global.dispatchEvent(t),function(t,e){var i={detail:e,cancelable:!0};d.defineProperty(i,"promise",{value:e.promise}),d.defineProperty(i,"reason",{value:e.reason});var n=new CustomEvent(t.toLowerCase(),i);return!u.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return u.global.dispatchEvent(t),function(t,e){var i=new Event(t.toLowerCase(),{cancelable:!0});return i.detail=e,d.defineProperty(i,"promise",{value:e.promise}),d.defineProperty(i,"reason",{value:e.reason}),!u.global.dispatchEvent(i)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),u.global.dispatchEvent(t),function(t,e){var i=document.createEvent("CustomEvent");return i.initCustomEvent(t.toLowerCase(),!1,!0,e),!u.global.dispatchEvent(i)}}catch(t){}return function(){return!1}}(),S=u.isNode?function(){return e.emit.apply(e,arguments)}:u.global?function(t){var e="on"+t.toLowerCase(),i=u.global[e];return!!i&&(i.apply(u.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function T(t,e){return{promise:e}}var C={promiseCreated:T,promiseFulfilled:T,promiseRejected:T,promiseResolved:T,promiseCancelled:T,promiseChained:function(t,e,i){return{promise:e,child:i}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,i){return{reason:e,promise:i}},rejectionHandled:T},E=function(t){var e=!1;try{e=S.apply(null,arguments)}catch(t){l.throwLater(t),e=!0}var i=!1;try{i=$(t,C[t].apply(null,arguments))}catch(t){l.throwLater(t),i=!0}return i||e};function D(){return!1}function I(t,e,i){var n=this;try{t(e,i,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+u.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function A(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?u.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function P(){return this._onCancelField}function L(t){this._onCancelField=t}function M(){this._cancellationParent=void 0,this._onCancelField=void 0}function O(t,e){if(0!=(1&e)){this._cancellationParent=t;var i=t._branchesRemainingToCancel;void 0===i&&(i=0),t._branchesRemainingToCancel=i+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}i.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?i.longStackTraces():!t.longStackTraces&&i.hasLongStackTraces()&&x()),"warnings"in t){var e=t.warnings;Z.warnings=!!e,w=Z.warnings,u.isObject(e)&&"wForgottenReturn"in e&&(w=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!Z.cancellation){if(l.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");i.prototype._clearCancellationData=M,i.prototype._propagateFrom=O,i.prototype._onCancel=P,i.prototype._setOnCancel=L,i.prototype._attachCancellationCallback=A,i.prototype._execute=I,N=O,Z.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!Z.monitoring?(Z.monitoring=!0,i.prototype._fireEvent=E):!t.monitoring&&Z.monitoring&&(Z.monitoring=!1,i.prototype._fireEvent=D)),i},i.prototype._fireEvent=D,i.prototype._execute=function(t,e,i){try{t(e,i)}catch(t){return t}},i.prototype._onCancel=function(){},i.prototype._setOnCancel=function(t){},i.prototype._attachCancellationCallback=function(t){},i.prototype._captureStackTrace=function(){},i.prototype._attachExtraTrace=function(){},i.prototype._dereferenceTrace=function(){},i.prototype._clearCancellationData=function(){},i.prototype._propagateFrom=function(t,e){};var N=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function j(){var t=this._boundTo;return void 0!==t&&t instanceof i?t.isFulfilled()?t.value():void 0:t}function R(){this._trace=new J(this._peekContext())}function H(t,e){if(h(t)){var i=this._trace;if(void 0!==i&&e&&(i=i._parent),void 0!==i)i.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=V(t);u.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),u.notEnumerableProp(t,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function F(t,e,n){if(Z.warnings){var r,a=new c(t);if(e)n._attachExtraTrace(a);else if(Z.longStackTraces&&(r=i._peekContext()))r.attachExtraTrace(a);else{var o=V(a);a.stack=o.message+"\n"+o.stack.join("\n")}E("warning",a)||W(a,"",!0)}}function B(t){for(var e=[],i=0;i0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),i=0;i0&&"SyntaxError"!=t.name&&(e=e.slice(i)),e}(t):[" (No stack trace)"],{message:i,stack:"SyntaxError"==t.name?e:B(e)}}function W(t,e,i){if("undefined"!=typeof console){var n;if(u.isObject(t)){var r=t.stack;n=e+v(r,t)}else n=e+String(t);"function"==typeof o?o(n,i):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function U(t,e,i,n){var r=!1;try{"function"==typeof e&&(r=!0,"rejectionHandled"===t?e(n):e(i,n))}catch(t){l.throwLater(t)}"unhandledRejection"===t?E(t,i,n)||r||W(i,"Unhandled rejection "):E(t,n)}function G(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{if(e=t&&"function"==typeof t.toString?t.toString():u.toString(t),/\[object [a-zA-Z0-9$_]+\]/.test(e))try{var i=JSON.stringify(t);e=i}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){return t.length<41?t:t.substr(0,38)+"..."}(e)+">, no stack trace)"}function q(){return"function"==typeof Q}var Y=function(){return!1},X=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function K(t){var e=t.match(X);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function J(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);Q(this,J),e>32&&this.uncycle()}u.inherits(J,Error),n.CapturedTrace=J,J.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],i={},n=0,r=this;void 0!==r;++n)e.push(r),r=r._parent;for(var n=(t=this._length=n)-1;n>=0;--n){var a=e[n].stack;void 0===i[a]&&(i[a]=n)}for(var n=0;n0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var l=n>0?e[n-1]:this;s=0;--u)e[u]._length=c,c++;return}}}},J.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=V(t),i=e.message,n=[e.stack],r=this;void 0!==r;)n.push(B(r.stack.split("\n"))),r=r._parent;!function(t){for(var e=t[0],i=1;i=0;--s)if(n[s]===a){o=s;break}for(var s=o;s>=0;--s){var l=n[s];if(e[r]!==l)break;e.pop(),r--}e=n}}(n),function(t){for(var e=0;e=0)return p=/@/,v=e,m=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return"stack"in r||!n||"number"!=typeof Error.stackTraceLimit?(v=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?G(e):e.toString()},null):(p=t,v=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(o=function(t){console.warn(t)},u.isNode&&e.stderr.isTTY?o=function(t,e){var i=e?"":"";console.warn(i+t+"\n")}:u.isNode||"string"!=typeof(new Error).stack||(o=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var Z={warnings:b,longStackTraces:!1,cancellation:!1,monitoring:!1};return k&&i.longStackTraces(),{longStackTraces:function(){return Z.longStackTraces},warnings:function(){return Z.warnings},cancellation:function(){return Z.cancellation},monitoring:function(){return Z.monitoring},propagateFromFunction:function(){return N},boundValueFunction:function(){return j},checkForgottenReturns:function(t,e,i,n,r){if(void 0===t&&null!==e&&w){if(void 0!==r&&r._returnedNonUndefined())return;if(0==(65535&n._bitField))return;i&&(i+=" ");var a="",o="";if(e._trace){for(var s=e._trace.stack.split("\n"),l=B(s),c=l.length-1;c>=0;--c){var u=l[c];if(!_.test(u)){var d=u.match(g);d&&(a="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(l.length>0)for(var h=l[0],c=0;c0&&(o="\n"+s[c-1]);break}}var f="a promise was created in a "+i+"handler "+a+"but was not returned from it, see http://goo.gl/rRqMUw"+o;n._warn(f,!0,e)}},setBounds:function(t,e){if(q()){for(var i,n,r=t.stack.split("\n"),a=e.stack.split("\n"),o=-1,s=-1,l=0;l=s||(Y=function(t){if(f.test(t))return!0;var e=K(t);return!!(e&&e.fileName===i&&o<=e.line&&e.line<=s)})}},warn:F,deprecated:function(t,e){var i=t+" is deprecated and will be removed in a future version.";return e&&(i+=" Use "+e+" instead."),F(i)},CapturedTrace:J,fireDomEvent:$,fireGlobalEvent:S}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,i){"use strict";e.exports=function(t){function e(){return this.value}function i(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(i){return i instanceof t&&i.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:i},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(i,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,i,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(i){if(arguments.length<=1)return i instanceof t&&i.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:i},void 0);var n=arguments[1];return n instanceof t&&n.suppressUnhandledRejections(),this.caught(i,function(){return n})}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t,e){var i=t.reduce,n=t.all;function r(){return n(this)}t.prototype.each=function(t){return i(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,n){return i(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return i(t,n,e,e)}}},{}],12:[function(t,e,i){"use strict";var n,r,a=t("./es5"),o=a.freeze,s=t("./util"),l=s.inherits,c=s.notEnumerableProp;function u(t,e){function i(n){if(!(this instanceof i))return new i(n);c(this,"message","string"==typeof n?n:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(i,Error),i}var d=u("Warning","warning"),h=u("CancellationError","cancellation error"),f=u("TimeoutError","timeout error"),_=u("AggregateError","aggregate error");try{n=TypeError,r=RangeError}catch(t){n=u("TypeError","type error"),r=u("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),p=0;p1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function d(){return f.call(this,this.promise._target()._settledValue())}function h(t){if(!u(this,t))return o.e=t,o}function f(t){var r=this.promise,s=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?s.call(r._boundValue()):s.call(r._boundValue(),t);if(l===n)return l;if(void 0!==l){r._setReturnedNonUndefined();var f=i(l,r);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new a("late cancellation observer");return r._attachExtraTrace(_),o.e=_,o}f.isPending()&&f._attachCancellationCallback(new c(this))}return f._then(d,h,void 0,this,void 0)}}}return r.isRejected()?(u(this),o.e=t,o):(u(this),t)}return l.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){u(this.finallyHandler)},e.prototype._passThrough=function(t,e,i,n){return"function"!=typeof t?this.then():this._then(i,n,void 0,new l(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,f,f)},e.prototype.tap=function(t){return this._passThrough(t,1,f)},e.prototype.tapCatch=function(t){var i=arguments.length;if(1===i)return this._passThrough(t,1,void 0,f);var n,a=new Array(i-1),o=0;for(n=0;n0&&"function"==typeof arguments[e]&&(t=arguments[e]);var n=[].slice.call(arguments);t&&n.pop();var r=new i(n).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,i){"use strict";e.exports=function(e,i,n,r,a,o){var s=e._getDomain,l=t("./util"),c=l.tryCatch,u=l.errorObj,d=e._async;function h(t,e,i,n){this.constructor$(t),this._promise._captureStackTrace();var r=s();this._callback=null===r?e:l.domainBind(r,e),this._preservedValues=n===a?new Array(this.length()):null,this._limit=i,this._inFlight=0,this._queue=[],d.invoke(this._asyncInit,this,void 0)}function f(t,i,r,a){if("function"!=typeof i)return n("expecting a function but got "+l.classString(i));var o=0;if(void 0!==r){if("object"!=typeof r||null===r)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(r)));if("number"!=typeof r.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(r.concurrency)));o=r.concurrency}return o="number"==typeof o&&isFinite(o)&&o>=1?o:0,new h(t,i,o,a).promise()}l.inherits(h,i),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(t,i){var n=this._values,a=this.length(),s=this._preservedValues,l=this._limit;if(i<0){if(n[i=-1*i-1]=t,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return n[i]=t,this._queue.push(i),!1;null!==s&&(s[i]=t);var d=this._promise,h=this._callback,f=d._boundValue();d._pushContext();var _=c(h).call(f,t,i,a),g=d._popContext();if(o.checkForgottenReturns(_,g,null!==s?"Promise.filter":"Promise.map",d),_===u)return this._reject(_.e),!0;var p=r(_,this._promise);if(p instanceof e){var v=(p=p._target())._bitField;if(0==(50397184&v))return l>=1&&this._inFlight++,n[i]=p,p._proxy(this,-1*(i+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(p._reason()),!0):(this._cancel(),!0);_=p._value()}n[i]=_}var m=++this._totalResolved;return m>=a&&(null!==s?this._filter(n,s):this._resolve(n),!0)},h.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,i=this._values;t.length>0&&this._inFlight1){a.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],u=arguments[2];n=o.isArray(c)?s(t).apply(u,c):s(t).call(u,c)}else n=s(t)();var d=l._popContext();return a.checkForgottenReturns(n,d,"Promise.try",l),l._resolveFromSyncValue(n),l},e.prototype._resolveFromSyncValue=function(t){t===o.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,i){"use strict";var n=t("./util"),r=n.maybeWrapAsError,a=t("./errors"),o=a.OperationalError,s=t("./es5"),l=/^(?:name|message|stack|cause)$/;function c(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var i=s.keys(t),r=0;r1){var i,n=new Array(e-1),r=0;for(i=0;i0&&"function"!=typeof t&&"function"!=typeof e){var i=".then() only accepts functions but was passed: "+c.classString(t);arguments.length>1&&(i+=", "+c.classString(e)),this._warn(i)}return this._then(t,e,void 0,void 0,void 0)},D.prototype.done=function(t,e){var i=this._then(t,e,void 0,void 0,void 0);i._setIsFinal()},D.prototype.spread=function(t){return"function"!=typeof t?a("expecting a function but got "+c.classString(t)):this.all()._then(t,void 0,void 0,v,void 0)},D.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},D.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new b(this).promise()},D.prototype.error=function(t){return this.caught(c.originatesFromRejection,t)},D.getNewLibraryCopy=i.exports,D.is=function(t){return t instanceof D},D.fromNode=D.fromCallback=function(t){var e=new D(p);e._captureStackTrace();var i=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=E(t)(T(e,i));return n===C&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},D.all=function(t){return new b(t).promise()},D.cast=function(t){var e=y(t);return e instanceof D||((e=new D(p))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},D.resolve=D.fulfilled=D.cast,D.reject=D.rejected=function(t){var e=new D(p);return e._captureStackTrace(),e._rejectCallback(t,!0),e},D.setScheduler=function(t){if("function"!=typeof t)throw new _("expecting a function but got "+c.classString(t));return h.setScheduler(t)},D.prototype._then=function(t,e,i,n,r){var a=void 0!==r,o=a?r:new D(p),l=this._target(),u=l._bitField;a||(o._propagateFrom(this,3),o._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,o));var d=s();if(0!=(50397184&u)){var f,_,v=l._settlePromiseCtx;0!=(33554432&u)?(_=l._rejectionHandler0,f=t):0!=(16777216&u)?(_=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(v=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),f=e),h.invoke(v,l,{handler:null===d?f:"function"==typeof f&&c.domainBind(d,f),promise:o,receiver:n,value:_})}else l._addCallbacks(t,e,o,n,d);return o},D.prototype._length=function(){return 65535&this._bitField},D.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},D.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},D.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},D.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},D.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},D.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},D.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},D.prototype._isFinal=function(){return(4194304&this._bitField)>0},D.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},D.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},D.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},D.prototype._setAsyncGuaranteed=function(){h.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},D.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==l)return void 0===e&&this._isBound()?this._boundValue():e},D.prototype._promiseAt=function(t){return this[4*t-4+2]},D.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},D.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},D.prototype._boundValue=function(){},D.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,i=t._rejectionHandler0,n=t._promise0,r=t._receiverAt(0);void 0===r&&(r=l),this._addCallbacks(e,i,n,r,null)},D.prototype._migrateCallbackAt=function(t,e){var i=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),r=t._promiseAt(e),a=t._receiverAt(e);void 0===a&&(a=l),this._addCallbacks(i,n,r,a,null)},D.prototype._addCallbacks=function(t,e,i,n,r){var a=this._length();if(a>=65531&&(a=0,this._setLength(0)),0===a)this._promise0=i,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===r?t:c.domainBind(r,t)),"function"==typeof e&&(this._rejectionHandler0=null===r?e:c.domainBind(r,e));else{var o=4*a-4;this[o+2]=i,this[o+3]=n,"function"==typeof t&&(this[o+0]=null===r?t:c.domainBind(r,t)),"function"==typeof e&&(this[o+1]=null===r?e:c.domainBind(r,e))}return this._setLength(a+1),a},D.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},D.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var i=y(t,this);if(!(i instanceof D))return this._fulfill(t);e&&this._propagateFrom(i,2);var r=i._target();if(r!==this){var a=r._bitField;if(0==(50397184&a)){var o=this._length();o>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(t===this){var i=n();return this._attachExtraTrace(i),this._reject(i)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():h.settlePromises(this),this._dereferenceTrace())}},D.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return h.fatalError(t,c.isNode);(65535&e)>0?h.settlePromises(this):this._ensurePossibleRejectionHandled()}},D.prototype._fulfillPromises=function(t,e){for(var i=1;i0){if(0!=(16842752&t)){var i=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,i,t),this._rejectPromises(e,i)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},D.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},D.defer=D.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new D(p);return{promise:t,resolve:I,reject:A}},c.notEnumerableProp(D,"_makeSelfResolutionError",n),t("./method")(D,p,y,a,x),t("./bind")(D,p,y,x),t("./cancel")(D,b,a,x),t("./direct_resolve")(D),t("./synchronous_inspection")(D),t("./join")(D,b,y,p,h,s),D.Promise=D,D.version="3.5.4",t("./map.js")(D,b,a,y,p,x),t("./call_get.js")(D),t("./using.js")(D,a,y,w,p,x),t("./timers.js")(D,p,x),t("./generators.js")(D,a,p,y,o,x),t("./nodeify.js")(D),t("./promisify.js")(D,p),t("./props.js")(D,b,y,a),t("./race.js")(D,p,y,a),t("./reduce.js")(D,b,a,y,p,x),t("./settle.js")(D,b,x),t("./some.js")(D,b,a),t("./filter.js")(D,p),t("./each.js")(D,p),t("./any.js")(D),c.toFastProperties(D),c.toFastProperties(D.prototype),P({a:1}),P({b:2}),P({c:3}),P(1),P(function(){}),P(void 0),P(!1),P(new D(p)),x.setBounds(d.firstLineError,c.lastLineError),D}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,i){"use strict";e.exports=function(e,i,n,r,a){var o=t("./util");function s(t){var n=this._promise=new e(i);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return o.isArray,o.inherits(s,a),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(i,a){var s=n(this._values,this._promise);if(s instanceof e){var l=(s=s._target())._bitField;if(this._values=s,0==(50397184&l))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,a);if(0==(33554432&l))return 0!=(16777216&l)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=o.asArray(s)))0!==s.length?this._iterate(s):-5===a?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(a));else{var c=r("expecting an array or an iterable object but got "+o.classString(s)).reason();this._promise._rejectCallback(c,!1)}},s.prototype._iterate=function(t){var i=this.getActualLength(t.length);this._length=i,this._values=this.shouldCopyValues()?new Array(i):this._values;for(var r=this._promise,a=!1,o=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var i=0;i=this._length){var n;if(this._isMap)n=function(t){for(var e=new a,i=t.length/2|0,n=0;n>1},e.prototype.props=function(){return d(this)},e.props=function(t){return d(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,i){"use strict";function n(t){this._capacity=t,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(t){return this._capacity=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var i=new r;return i._bitField=33554432,i._settledValueField=t,this._promiseResolved(e,i)},o.prototype._promiseRejected=function(t,e){var i=new r;return i._bitField=16777216,i._settledValueField=t,this._promiseResolved(e,i)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,i){"use strict";e.exports=function(e,i,n){var r=t("./util"),a=t("./errors").RangeError,o=t("./errors").AggregateError,s=r.isArray,l={};function c(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var i=new c(t),r=i.promise();return i.setHowMany(e),i.init(),r}r.inherits(c,i),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(t){this._howMany=t},c.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new o,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(t){this._values.push(t)},c.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return u(t,e)},e.prototype.some=function(t){return u(this,t)},e._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(t,e,i){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var i=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},a=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},o=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return o.call(this._target())},t.prototype.isRejected=function(){return a.call(this._target())},t.prototype.isFulfilled=function(){return r.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return i.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,i){"use strict";e.exports=function(e,i){var n=t("./util"),r=n.errorObj,a=n.isObject,o={}.hasOwnProperty;return function(t,s){if(a(t)){if(t instanceof e)return t;var l=function(t){try{return function(t){return t.then}(t)}catch(t){return r.e=t,r}}(t);if(l===r){s&&s._pushContext();var c=e.reject(l.e);return s&&s._popContext(),c}if("function"==typeof l){if(function(t){try{return o.call(t,"_promise0")}catch(t){return!1}}(t)){var c=new e(i);return t._then(c._fulfill,c._reject,void 0,c,null),c}return function(t,a,o){var s=new e(i),l=s;o&&o._pushContext(),s._captureStackTrace(),o&&o._popContext();var c=!0,u=n.tryCatch(a).call(t,function(t){s&&(s._resolveCallback(t),s=null)},function(t){s&&(s._rejectCallback(t,c,!0),s=null)});return c=!1,s&&u===r&&(s._rejectCallback(u.e,!0,!0),s=null),l}(t,l,s)}}return t}}},{"./util":36}],34:[function(t,e,i){"use strict";e.exports=function(e,i,n){var r=t("./util"),a=e.TimeoutError;function o(t){this.handle=t}o.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,r){var a,l;return void 0!==r?(a=e.resolve(r)._then(s,null,null,t,void 0),n.cancellation()&&r instanceof e&&a._setOnCancel(r)):(a=new e(i),l=setTimeout(function(){a._fulfill()},+t),n.cancellation()&&a._setOnCancel(new o(l)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};function c(t){return clearTimeout(this.handle),t}function u(t){throw clearTimeout(this.handle),t}e.prototype.delay=function(t){return l(t,this)},e.prototype.timeout=function(t,e){var i,s;t=+t;var l=new o(setTimeout(function(){i.isPending()&&function(t,e,i){var n;n="string"!=typeof e?e instanceof Error?e:new a("operation timed out"):new a(e),r.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=i&&i.cancel()}(i,e,s)},t));return n.cancellation()?(s=this.then(),(i=s._then(c,u,void 0,l,void 0))._setOnCancel(l)):i=this._then(c,u,void 0,l,void 0),i}}},{"./util":36}],35:[function(t,e,i){"use strict";e.exports=function(e,i,n,r,a,o){var s=t("./util"),l=t("./errors").TypeError,c=t("./util").inherits,u=s.errorObj,d=s.tryCatch,h={};function f(t){setTimeout(function(){throw t},0)}function _(t,i){var r=0,o=t.length,s=new e(a);return function a(){if(r>=o)return s._fulfill();var l=function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(t[r++]);if(l instanceof e&&l._isDisposable()){try{l=n(l._getDisposer().tryDispose(i),t.promise)}catch(t){return f(t)}if(l instanceof e)return l._then(a,f,null,null,null)}a()}(),s}function g(t,e,i){this._data=t,this._promise=e,this._context=i}function p(t,e,i){this.constructor$(t,e,i)}function v(t){return g.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}g.prototype.data=function(){return this._data},g.prototype.promise=function(){return this._promise},g.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},g.prototype.tryDispose=function(t){var e=this.resource(),i=this._context;void 0!==i&&i._pushContext();var n=e!==h?this.doDispose(e,t):null;return void 0!==i&&i._popContext(),this._promise._unsetDisposable(),this._data=null,n},g.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},c(p,g),p.prototype.doDispose=function(t,e){var i=this.data();return i.call(t,t,e)},m.prototype._resultCancelled=function(){for(var t=this.length,i=0;i0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,r());throw new l}}},{"./errors":12,"./util":36}],36:[function(t,n,r){"use strict";var a=t("./es5"),o="undefined"==typeof navigator,s={e:{}},l,c="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:void 0!==this?this:null;function u(){try{var t=l;return l=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function d(t){return l=t,u}var h=function(t,e){var i={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)i.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function f(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function _(t){return"function"==typeof t||"object"==typeof t&&null!==t}function g(t){return f(t)?new Error(C(t)):t}function p(t,e){var i,n=t.length,r=new Array(n+1);for(i=0;i1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),r=k.test(t+"")&&a.names(t).length>0;if(i||n||r)return!0}return!1}catch(t){return!1}}function x(t){function e(){}e.prototype=t;var i=new e;function n(){return typeof i.foo}return n(),n(),t}var $=/^[a-z$_][a-z$_0-9]*$/i;function S(t){return $.test(t)}function T(t,e,i){for(var n=new Array(t),r=0;r10||t[0]>0}(),B.isNode&&B.toFastProperties(e);try{throw new Error}catch(t){B.lastLineError=t}n.exports=B},{"./es5":13}]},{},[4])(4)}(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,i(33),i(16),i(146).setImmediate)},function(t,e,i){t.exports=i(147)},function(t,e,i){var n=i(0);t.exports=function(){var t={};return{getState:function(e){if(e)return t[e].method();var i={};for(var r in t)t[r].internal||n.mixin(i,t[r].method(),!0);return i},registerProvider:function(e,i,n){t[e]={method:i,internal:n}},unregisterProvider:function(e){delete t[e]}}}},function(t,e){t.exports=function(t){var e={};function i(i,n,r){r=r||i;var a=t.config,o=t.templates;t.config[i]&&e[r]!=a[i]&&(n&&o[r]||(o[r]=t.date.date_to_str(a[i]),e[r]=a[i]))}return{initTemplates:function(){var e=t.locale.labels;e.gantt_save_btn=e.icon_save,e.gantt_cancel_btn=e.icon_cancel,e.gantt_delete_btn=e.icon_delete;var n=t.date,r=n.date_to_str,a=t.config,o=r(a.xml_date||a.date_format,a.server_utc),s=n.str_to_date(a.xml_date||a.date_format,a.server_utc);i("date_scale",!0,void 0,t.config,t.templates),i("date_grid",!0,"grid_date_format",t.config,t.templates),i("task_date",!0,void 0,t.config,t.templates),t.mixin(t.templates,{xml_format:o,format_date:o,xml_date:s,parse_date:s,progress_text:function(t,e,i){return""},grid_header_class:function(t,e){return""},task_text:function(t,e,i){return i.text},task_class:function(t,e,i){return""},task_end_date:function(e){return t.templates.task_date(e)},grid_row_class:function(t,e,i){return""},task_row_class:function(t,e,i){return""},timeline_cell_class:function(t,e){return""},scale_cell_class:function(t){return""},scale_row_class:function(t){return""},grid_indent:function(t){return"
"},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,n){return i&&t.isUnscheduledTask(i)&&t.config.show_unscheduled?t.templates.task_unscheduled_time(i):t.templates.grid_date_format(e,n)},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_end_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,o=""+e.text+" "+(i?a.link_start:a.link_end)+"
";return n&&(o+=" "+(n=t.getTask(n)).text+" "+(r?a.link_start:a.link_end)+"
"),o},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(34);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 o=this.getInputMethods();this._drag_start_timer=null,t.attachEvent("onGanttScroll",r.bind(function(t,e){this.clearDragTimer()},this));for(var s=0;sthis.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,o=a.cloneNode(!0);this.config.original_target=e(r),this.config.original_target.target=o,this.config.backup_element=a,a.parentNode.appendChild(o),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)return!1;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,!1;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&&(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]),!0)},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 o="set[0],set[1],set[2],set[3],set[4],set[5]";i&&(o=" Date.UTC("+o+")");var s=new Function("date","locale","var set=[0,0,1,0,0,0]; "+n+" return new Date("+o+");");return function(e){return s(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&&("function"!=typeof i&&("string"==typeof i?"parse_date"===i?(i=t.templates.parse_date,t.defined(t.templates.xml_date)&&t.templates.parse_date!==t.templates.xml_date&&(i=t.templates.xml_date)):i=t.defined(t.templates[i])?t.templates[i]:t.date.str_to_date(i):i=t.templates.xml_date!==t.templates.parse_date?t.templates.xml_date:t.templates.parse_date),e=e?i(e):null),e}};return e}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("string"==typeof t||"number"==typeof t)return t;var e="";for(var i in t){var n="";t.hasOwnProperty(i)&&(n=i+"="+(n="string"==typeof t[i]?encodeURIComponent(t[i]):"number"==typeof t[i]?t[i]:encodeURIComponent(JSON.stringify(t[i]))),e.length&&(n="&"+n),e+=n)}return e}},function(t,e,i){var n=i(8),r=i(153).default;function a(t,e){var i={method:t};if(0===e.length)throw new Error("Arguments list of query is wrong.");if(1===e.length)return"string"==typeof e[0]?(i.url=e[0],i.async=!0):(i.url=e[0].url,i.async=e[0].async||!0,i.callback=e[0].callback,i.headers=e[0].headers),e[0].data?"string"!=typeof e[0].data?i.data=r(e[0].data):i.data=e[0].data:i.data="",i;switch(i.url=e[0],t){case"GET":case"DELETE":i.callback=e[1],i.headers=e[2];break;case"POST":case"PUT":e[1]?"string"!=typeof e[1]?i.data=r(e[1]):i.data=e[1]:i.data="",i.callback=e[2],i.headers=e[3]}return i}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){return this._call(t.method||"GET",t.url,t.data||"",t.async||!0,t.callback,t.headers)},get:function(t,e,i){var n=a("GET",arguments);return this.query(n)},getSync:function(t,e){var i=a("GET",arguments);return i.async=!1,this.query(i)},put:function(t,e,i,n){var r=a("PUT",arguments);return this.query(r)},del:function(t,e,i){var n=a("DELETE",arguments);return this.query(n)},post:function(t,e,i,n){1==arguments.length?e="":2!=arguments.length||"function"!=typeof e&&"function"!=typeof window[e]||(e,e="");var r=a("POST",arguments);return this.query(r)},postSync:function(t,e,i){e=null===e?"":String(e);var n=a("POST",arguments);return n.async=!1,this.query(n)},_call:function(e,i,r,a,o,s){return new t.Promise(function(l,c){var u=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&&(u.onreadystatechange=function(){if(4==u.readyState||d&&3==u.readyState){if((200!=u.status||""===u.responseText)&&!t.callEvent("onAjaxError",[u]))return;window.setTimeout(function(){"function"==typeof o&&o.apply(window,[{xmlDoc:u,filePath:i}]),l(u),"function"==typeof o&&(o=null,u=null)},0)}}),"GET"!=e||this.cache||(i+=(i.indexOf("?")>=0?"&":"?")+"dhxr"+(new Date).getTime()+"=1"),u.open(e,i,a),s)for(var h in s)u.setRequestHeader(h,s[h]);else"POST"==e.toUpperCase()||"PUT"==e||"DELETE"==e?u.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):"GET"==e&&(r=null);if(u.setRequestHeader("X-Requested-With","XMLHttpRequest"),u.send(r),!a)return{xmlDoc:u,filePath:i}})},urlSeparator:function(t){return-1!=t.indexOf("?")?"&":"?"}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),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,static_background_cells:!0,branch_loading:!1,branch_loading_property:"$has_child",show_loading:!1,show_chart:!0,show_grid:!0,min_duration:36e5,date_format:"%d-%m-%Y %H:%i",xml_date:void 0,start_on_monday:!0,server_utc:!1,show_progress:!0,fit_tasks:!1,select_task:!0,scroll_on_click:!0,smart_rendering:!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}],scale_offset_minimal:!0,inherit_scale_class:!1,scales:[{unit:"day",step:1,date:"%d %M"}],time_step:60,duration_step:1,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_tasks_outside_timescale:!1,show_unscheduled:!0,readonly_property:"readonly",editable_property:"editable",calendar_property:"calendar_id",resource_calendars:{},inherit_calendar:!1,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,horizontal_scroll_key:"shiftKey",drag_timeline:{useKey:void 0,ignore:".gantt_task_line, .gantt_task_link"},drag_multiple:!0}}},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},dropService:function(e){t[e]&&delete t[e]},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(18),t.exports=function(){var t=new function(){this.constants=i(158),this.version="6.3.5",this.license="gpl",this.templates={},this.ext={},this.keys={edit_save:this.constants.KEY_CODES.ENTER,edit_cancel:this.constants.KEY_CODES.ESC}};i(157)(t),t.$services=t.$inject(i(156)),t.config=t.$inject(i(155)),t.ajax=i(154)(t),t.date=i(152)(t);var e=i(151)(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(150)(t);t.$services.setService("templateLoader",function(){return n}),i(4)(t);var r=new(i(149));r.registerProvider("global",function(){var e={min_date:t._min_date,max_date:t._max_date,selected_task:null};return t.$data&&t.$data.tasksStore&&(e.selected_task=t.$data.tasksStore.getSelectedId()),e}),t.getState=r.getState,t.$services.setService("state",function(){return r});var a=i(0);a.mixin(t,a),t.Promise=i(148),t.env=i(8);var o=i(1);t.utils={dom:{getNodePosition:o.getNodePosition,getRelativeEventPosition:o.getRelativeEventPosition,isChildOf:o.isChildOf,hasClass:o.hasClass,closest:o.closest}};var s=i(19)();t.event=s.attach,t.eventRemove=s.detach,t._eventRemoveAll=s.detachAll,t._createDomEventScope=s.extend,a.mixin(t,i(144)(t));var l=i(143).init(t);t.$ui=l.factory,t.$ui.layers=l.render,t.$mouseEvents=l.mouseEvents,t.$services.setService("mouseEvents",function(){return t.$mouseEvents}),t.mixin(t,l.layersApi),i(102)(t),t.$services.setService("layers",function(){return l.layersService});var c=i(101);t.mixin(t,c()),i(100)(t);var u=i(93);return t.dataProcessor=u.DEPRECATED_api,t.createDataProcessor=u.createDataProcessor,i(88)(t),i(76)(t),i(75)(t),i(74)(t),i(73)(t),i(72)(t),i(71)(t),i(62)(t),i(61).default(t),i(60)(t),i(51)(t),i(50)(t),i(49)(t),i(48)(t),i(47)(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(36)(t),i(35).default(t),t}},function(t,e){t.exports=function(t){}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(160),r=i(159),a=window.gantt=r();e.gantt=a,n(a),e.default=a}])}); //# sourceMappingURL=dhtmlxgantt.js.map