9 lines
128 KiB
JavaScript
9 lines
128 KiB
JavaScript
/*!
|
|
* Project: angular-gantt v2.0.0-rc.1 - Gantt chart component for AngularJS
|
|
* Authors: Rémi Alvergnat <toilal.dev@gmail.com> (https://www.pragmasphere.com), Marco Schweighauser
|
|
* License: MIT
|
|
* Homepage: https://www.angular-gantt.com
|
|
* Github: https://github.com/angular-gantt/angular-gantt.git
|
|
*/
|
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("angular"),require("moment")):"function"==typeof define&&define.amd?define("angular-gantt-core",["angular","moment"],e):"object"==typeof exports?exports["angular-gantt-core"]=e(require("angular"),require("moment")):t["angular-gantt-core"]=e(t.angular,t.moment)}(this,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=6)}([function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var i=n(126),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}()},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){t.exports={default:n(133),__esModule:!0}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(130),a=i(r),o=n(129),s=i(o),l="function"==typeof s.default&&"symbol"==typeof a.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===l(a.default)?function(t){return void 0===t?"undefined":l(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":l(t)}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),a=i(r),o=n(64),s=i(o),l=n(83),u=i(l),d=n(89),c=i(d),f=n(90),h=i(f),v=n(91),g=i(v),m=n(92),p=i(m),y=n(84),w=i(y),k=n(87),b=i(k),M=n(85),_=i(M),C=n(86),$=i(C),T=n(88),x=i(T),O=n(93),F=i(O),S=n(94),j=i(S),R=n(95),P=i(R),G=n(96),D=i(G),B=n(97),W=i(B),E=n(98),I=i(E),H=n(99),A=i(H),L=n(100),V=i(L),z=n(101),U=i(z),N=n(102),q=i(N),Y=n(103),K=i(Y),Q=n(104),X=i(Q),J=n(105),Z=i(J),tt=n(106),et=i(tt),nt=n(107),it=i(nt),rt=n(108),at=i(rt),ot=n(109),st=i(ot),lt=n(110),ut=i(lt),dt=n(111),ct=i(dt),ft=n(112),ht=i(ft),vt=n(113),gt=i(vt),mt=n(114),pt=i(mt),yt=n(119),wt=i(yt),kt=n(68),bt=i(kt),Mt=n(37),_t=i(Mt),Ct=n(38),$t=i(Ct),Tt=n(39),xt=i(Tt),Ot=n(47),Ft=i(Ot),St=n(45),jt=i(St),Rt=n(72),Pt=i(Rt),Gt=n(74),Dt=i(Gt),Bt=n(71),Wt=i(Bt),Et=n(73),It=i(Et),Ht=n(46),At=i(Ht),Lt=n(75),Vt=i(Lt),zt=n(48),Ut=i(zt),Nt=n(43),qt=i(Nt),Yt=n(70),Kt=i(Yt),Qt=n(69),Xt=i(Qt),Jt=n(44),Zt=i(Jt),te=n(23),ee=i(te),ne=n(65),ie=i(ne),re=n(41),ae=i(re),oe=n(42),se=i(oe),le=n(76),ue=i(le),de=n(49),ce=i(de),fe=n(40),he=i(fe),ve=n(79),ge=i(ve),me=n(115),pe=i(me),ye=n(123),we=i(ye),ke=n(116),be=i(ke),Me=n(118),_e=i(Me),Ce=n(80),$e=i(Ce),Te=n(77),xe=i(Te),Oe=n(78),Fe=i(Oe),Se=n(120),je=i(Se),Re=n(67),Pe=i(Re),Ge=n(66),De=i(Ge),Be=n(117),We=i(Be),Ee=n(121),Ie=i(Ee),He=n(122),Ae=i(He),Le=n(81),Ve=i(Le),ze=n(82),Ue=i(ze);n(124),n(63);a.default.module("gantt",[]).directive("gantt",s.default).directive("ganttResizer",u.default).directive("ganttContainerWidthListener",h.default).directive("ganttContainerHeightListener",c.default).directive("ganttElementWidthListener",p.default).directive("ganttElementHeightListener",g.default).directive("ganttHorizontalScrollReceiver",w.default).directive("ganttScrollable",b.default).directive("ganttScrollManager",_.default).directive("ganttScrollSender",$.default).directive("ganttVerticalScrollReceiver",x.default).directive("ganttBindCompileHtml",wt.default).directive("ganttBody",F.default).directive("ganttBodyBackground",j.default).directive("ganttBodyColumns",P.default).directive("ganttBodyForeground",D.default).directive("ganttBodyRows",W.default).directive("ganttColumn",I.default).directive("ganttColumnHeader",A.default).directive("ganttHeader",V.default).directive("ganttHeaderColumns",U.default).directive("ganttRow",q.default).directive("ganttRowBackground",K.default).directive("ganttRowLabel",X.default).directive("ganttScrollableHeader",Z.default).directive("ganttSide",et.default).directive("ganttSideBackground",it.default).directive("ganttSideContent",at.default).directive("ganttTask",st.default).directive("ganttTaskBackground",ut.default).directive("ganttTaskContent",ct.default).directive("ganttTaskForeground",ht.default).directive("ganttTimeFrame",gt.default).directive("ganttTimespan",pt.default).factory("GanttDirectiveBuilder",be.default).factory("Gantt",bt.default).factory("GanttApi",_t.default).factory("GanttOptions",$t.default).factory("GanttCalendar",xt.default).factory("GanttScroll",Ft.default).factory("GanttBody",jt.default).factory("GanttBodyColumns",Pt.default).factory("GanttBodyRows",Dt.default).factory("GanttBodyBackground",Wt.default).factory("GanttBodyForeground",It.default).factory("GanttHeader",At.default).factory("GanttHeaderColumns",Vt.default).factory("GanttSide",Ut.default).factory("GanttObjectModel",qt.default).factory("GanttTask",Kt.default).factory("GanttRow",Xt.default).factory("GanttRowsManager",Zt.default).factory("GanttColumn",ee.default).factory("GanttColumnHeader",ae.default).factory("GanttColumnBuilder",ie.default).factory("GanttColumnsManager",se.default).factory("GanttTimespan",ue.default).factory("GanttTimespansManager",ce.default).factory("GanttCurrentDateManager",he.default).factory("GanttHierarchy",ge.default).factory("ganttDebounce",pe.default).factory("GanttSmartEvent",we.default).service("ganttEnableNgAnimate",_e.default).service("ganttUtils",$e.default).service("ganttArrays",xe.default).service("ganttBinarySearch",Fe.default).service("ganttLayout",je.default).service("GanttHeadersGenerator",Pe.default).service("GanttColumnGenerator",De.default).service("ganttDom",We.default).service("ganttMouseButton",Ie.default).service("ganttMouseOffset",Ae.default).filter("ganttColumnLimit",Ve.default).filter("ganttTaskLimit",Ue.default),e.default="gantt"},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var i=n(32)("wks"),r=n(22),a=n(8).Symbol,o="function"==typeof a;(t.exports=function(t){return i[t]||(i[t]=o&&a[t]||(o?a:r)("Symbol."+t))}).store=i},function(t,e,n){t.exports=!n(17)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(14),r=n(52),a=n(34),o=Object.defineProperty;e.f=n(10)?Object.defineProperty:function(t,e,n){if(i(t),e=a(e,!0),i(n),r)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(146),r=n(25);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(18);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(8),r=n(7),a=n(50),o=n(16),s=function(t,e,n){var l,u,d,c=t&s.F,f=t&s.G,h=t&s.S,v=t&s.P,g=t&s.B,m=t&s.W,p=f?r:r[e]||(r[e]={}),y=p.prototype,w=f?i:h?i[e]:(i[e]||{}).prototype;f&&(n=e);for(l in n)(u=!c&&w&&void 0!==w[l])&&l in p||(d=u?w[l]:n[l],p[l]=f&&"function"!=typeof w[l]?n[l]:g&&u?a(d,i):m&&w[l]==d?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(d):v&&"function"==typeof d?a(Function.call,d):d,v&&((p.virtual||(p.virtual={}))[l]=d,t&s.R&&y&&!y[l]&&o(y,l,d)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var i=n(12),r=n(21);t.exports=n(10)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e,n){var i=n(58),r=n(26);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttColumn=void 0;var r=n(4),a=i(r),o=n(0),s=i(o),l=n(1),u=i(l);e.default=function(){"ngInject";return f};var d=n(3),c=i(d),f=e.GanttColumn=function(){function t(e,n,i,r,a,o,l){(0,s.default)(this,t),this.timeFrames=[],this.visibleTimeFrames=[],this.daysTimeFrames={},this.currentDate=!1,this.cropped=!1,this.date=e,this.endDate=n,this.left=i,this.width=r,this.calendar=a,this.duration=this.endDate.diff(this.date,"milliseconds"),this.timeFramesWorkingMode=o,this.timeFramesNonWorkingMode=l,this.timeFrames=[],this.visibleTimeFrames=[],this.daysTimeFrames={},this.originalSize={left:this.left,width:this.width},this.updateTimeFrames()}return(0,u.default)(t,[{key:"getDateKey",value:function(t){return t.year()+"-"+t.month()+"-"+t.date()}},{key:"updateView",value:function(){this.$element&&(this.currentDate?this.$element.addClass("gantt-foreground-col-current-date"):this.$element.removeClass("gantt-foreground-col-current-date"),this.$element.css({left:this.left+"px",width:this.width+"px"}),this.timeFrames.forEach(function(t){return t.updateView()}))}},{key:"updateTimeFrames",value:function(){if(void 0!==this.calendar&&("hidden"!==this.timeFramesNonWorkingMode||"hidden"!==this.timeFramesWorkingMode)){for(var t=this.date,e=(0,c.default)(t).startOf("day"),n=e.add(1,"day"),i=void 0;t<this.endDate;){var r=this.calendar.getTimeFrames(t),o=c.default.min(n,this.endDate);r=this.calendar.solve(r,t,o);var s=[];for(i=0;i<r.length;i++){var l=r[i],u=l.start;void 0===u&&(u=t);var d=l.end;void 0===d&&(d=o),u<this.date&&(u=this.date),d>this.endDate&&(d=this.endDate),l=l.clone(),l.start=(0,c.default)(u),l.end=(0,c.default)(d),s.push(l)}this.timeFrames=this.timeFrames.concat(s);var f=this.getDateKey(t);this.daysTimeFrames[f]=s,t=o,e=(0,c.default)(t).startOf("day"),n=e.add(1,"day")}for(i=0;i<this.timeFrames.length;i++){var h=this.timeFrames[i],v=h.start.diff(this.date,"milliseconds"),g=v/this.duration*this.width,m=h.end.diff(h.start,"milliseconds"),p=m/this.duration*this.width,y=!1;h.working&&"visible"!==this.timeFramesWorkingMode?y=!0:h.working||"visible"===this.timeFramesNonWorkingMode||(y=!0),y||this.visibleTimeFrames.push(h),h.hidden=y,h.left=g,h.width=p,h.originalSize={left:h.left,width:h.width}}if("cropped"===this.timeFramesNonWorkingMode||"cropped"===this.timeFramesWorkingMode){var w=0,k=!0,b=!1,M=void 0;try{for(var _,C=(0,a.default)(this.timeFrames);!(k=(_=C.next()).done);k=!0){var $=_.value;(!$.working&&"cropped"!==this.timeFramesNonWorkingMode||$.working&&"cropped"!==this.timeFramesWorkingMode)&&(w+=$.width)}}catch(t){b=!0,M=t}finally{try{!k&&C.return&&C.return()}finally{if(b)throw M}}if(w!==this.width){var T=this.width/w,x=0,O=0,F=!0,S=!0,j=!1,R=void 0;try{for(var P,G=(0,a.default)(this.timeFrames);!(S=(P=G.next()).done);S=!0){var D=P.value;!D.working&&"cropped"!==this.timeFramesNonWorkingMode||D.working&&"cropped"!==this.timeFramesWorkingMode?(D.left=(D.left-x)*T,D.width=D.width*T,D.originalSize.left=(D.originalSize.left-O)*T,D.originalSize.width=D.originalSize.width*T,D.cropped=!1,F=!1):(x+=D.width,O+=D.originalSize.width,D.left=void 0,D.width=0,D.originalSize={left:void 0,width:0},D.cropped=!0)}}catch(t){j=!0,R=t}finally{try{!S&&G.return&&G.return()}finally{if(j)throw R}}this.cropped=F}else this.cropped=!1}}}},{key:"clone",value:function(){return new t((0,c.default)(this.date),(0,c.default)(this.endDate),this.left,this.width,this.calendar)}},{key:"containsDate",value:function(t){return t>this.date&&t<=this.endDate}},{key:"equals",value:function(t){return this.date===t.date}},{key:"roundTo",value:function(t,e,n,i){"day"===e&&(e="date"),n=n||1;var r=t.get(e);switch(i){case"up":r=Math.ceil(r/n);break;case"down":r=Math.floor(r/n);break;default:r=Math.round(r/n)}var a=["millisecond","second","minute","hour","date","month","year"];t.set(e,r*n);for(var o=a.indexOf(e),s=0;s<o;s++)t.set(a[s],0);return t}},{key:"getMagnetDate",value:function(t,e,n,i){if(e>0&&void 0!==n){var r=t;if(t=(0,c.default)(t),"column"===n){t=this.getPositionByDate(t)<this.width/2?(0,c.default)(this.date):(0,c.default)(this.endDate)}else t=this.roundTo(t,n,e),t<this.date?t=(0,c.default)(this.date):t>this.endDate&&(t=(0,c.default)(this.endDate));if(i)for(var a=Math.abs(r.diff(t,"milliseconds")),o=void 0,s=0;s<this.timeFrames.length;s++){var l=this.timeFrames[s];if(l.magnet){var u=this.timeFrames[s-1],d=this.timeFrames[s+1],f=void 0;void 0!==u&&u.working===l.working||(f=Math.abs(r.diff(l.start,"milliseconds")))<a&&(void 0===o||f<o)&&(o=f,t=l.start),void 0!==d&&d.working===l.working||(f=Math.abs(r.diff(l.end,"milliseconds")))<a&&(void 0===o||f<o)&&(o=f,t=l.end)}}}return t}},{key:"getDateByPositionUsingTimeFrames",value:function(t){var e=!0,n=!1,i=void 0;try{for(var r,o=(0,a.default)(this.timeFrames);!(e=(r=o.next()).done);e=!0){var s=r.value;if(!s.cropped&&t>=s.left&&t<=s.left+s.width){var l=s.getDuration()/s.width*(t-s.left);return(0,c.default)(s.start).add(l,"milliseconds")}}}catch(t){n=!0,i=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw i}}}},{key:"getDateByPosition",value:function(t,e,n,i){var r=void 0;if(t<0&&(t=0),t>this.width&&(t=this.width),"cropped"!==this.timeFramesNonWorkingMode&&"cropped"!==this.timeFramesWorkingMode||(r=this.getDateByPositionUsingTimeFrames(t)),void 0===r){var a=this.duration/this.width*t;r=(0,c.default)(this.date).add(a,"milliseconds")}return r=this.getMagnetDate(r,e,n,i)}},{key:"getDayTimeFrame",value:function(t){var e=this.daysTimeFrames[this.getDateKey(t)];return void 0===e?[]:e}},{key:"getPositionByDate",value:function(t){var e=t;if("cropped"===this.timeFramesNonWorkingMode||"cropped"===this.timeFramesWorkingMode)for(var n=this.getDayTimeFrame(e),i=0;i<n.length;i++){var r=n[i];if(e>=r.start&&e<=r.end){if(!r.cropped){var a=e.diff(r.start,"milliseconds"),o=a/r.getDuration()*r.width;return this.left+r.left+o}e=n.length>i+1?n[i+1].start:r.end}}var s=e.diff(this.date,"milliseconds"),l=s/this.duration*this.width;return l<0&&(l=0),l>this.width&&(l=this.width),this.left+l}}]),t}()},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=!0},function(t,e,n){var i=n(14),r=n(152),a=n(26),o=n(31)("IE_PROTO"),s=function(){},l=function(){var t,e=n(51)("iframe"),i=a.length;for(e.style.display="none",n(145).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;i--;)delete l.prototype[a[i]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=i(t),n=new s,s.prototype=null,n[o]=t):n=l(),void 0===e?n:r(n,e)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(12).f,r=n(11),a=n(9)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,a)&&i(t,a,{configurable:!0,value:e})}},function(t,e,n){var i=n(32)("keys"),r=n(22);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(8),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(18);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var i=n(8),r=n(7),a=n(27),o=n(36),s=n(12).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=a?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:o.f(t)})}},function(t,e,n){e.f=n(9)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttApi=void 0;var r=n(4),a=i(r),o=n(0),s=i(o),l=n(1),u=i(l);e.default=["$q","$rootScope","ganttUtils",function(t,e,n){"ngInject";return d.$q=t,d.$rootScope=e,d.ganttUtils=n,d}];var d=e.GanttApi=function(){function t(e){(0,s.default)(this,t),this.gantt=e,this.listeners=[],this.apiId=t.ganttUtils.newId()}return(0,u.default)(t,[{key:"registerEventWithAngular",value:function(e,n,i,r){return t.$rootScope.$on(e,function(){var t=Array.prototype.slice.call(arguments);t.splice(0,1),n.apply(r||i.api,t)})}},{key:"suppressEvents",value:function(t,e){var n=this,i=Array.isArray(t)?t:[t],r=[];i.forEach(function(t){r=n.listeners.filter(function(e){return t===e.handler})}),r.forEach(function(t){return t.dereg()}),e(),r.forEach(function(t){t.dereg=n.registerEventWithAngular(t.eventId,t.handler,n.gantt,t._this)})}},{key:"registerEvent",value:function(e,n){var i=this;this[e]||(this[e]={});var r=this[e];r.on||(r.on={},r.raise={});var a="event:gantt:"+this.apiId+":"+e+":"+n;r.raise[n]=function(){t.$rootScope.$emit.apply(t.$rootScope,[a].concat(Array.prototype.slice.call(arguments)))},r.on[n]=function(t,e,n){var r=i.registerEventWithAngular(a,e,i.gantt,n),o={handler:e,dereg:r,eventId:a,scope:t,_this:n};i.listeners.push(o);var s=function(){o.dereg();var t=i.listeners.indexOf(o);i.listeners.splice(t,1)};return t.$on("$destroy",function(){s()}),s}}},{key:"registerEventsFromObject",value:function(t){var e=this,n=[];for(var i in t){var r=t[i],o={name:i,events:[]};for(var s in r)o.events.push(s);n.push(o)}var l=!0,u=!1,d=void 0;try{for(var c,f=(0,a.default)(n);!(l=(c=f.next()).done);l=!0){var h=c.value;!function(t){t.events.forEach(function(n){e.registerEvent(t.name,n)})}(h)}}catch(t){u=!0,d=t}finally{try{!l&&f.return&&f.return()}finally{if(u)throw d}}}},{key:"registerMethod",value:function(e,n,i,r){this[e]||(this[e]={}),this[e][n]=t.ganttUtils.createBoundedWrapper(r||this.gantt,i)}},{key:"registerMethodsFromObject",value:function(t,e){var n=[];for(var i in t){var r=t[i],o={name:i,methods:[]};for(var s in r){var l=r[s];o.methods.push({name:s,fn:l})}n.push(o)}var u=!0,d=!1,c=void 0;try{for(var f,h=(0,a.default)(n);!(u=(f=h.next()).done);u=!0){var v=f.value,g=!0,m=!1,p=void 0;try{for(var y,w=(0,a.default)(v.methods);!(g=(y=w.next()).done);g=!0){var k=y.value;this.registerMethod(v.name,k.name,k.fn,e)}}catch(t){m=!0,p=t}finally{try{!g&&w.return&&w.return()}finally{if(m)throw p}}}}catch(t){d=!0,c=t}finally{try{!u&&h.return&&h.return()}finally{if(d)throw c}}}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttOptions=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=function(){"ngInject";return l};var l=e.GanttOptions=function(){function t(e,n){(0,a.default)(this,t),this.defaultValues=n,this.values=e}return(0,s.default)(t,[{key:"defaultValue",value:function(t){var e=this.defaultValues[t];return"function"==typeof e&&(e=e()),e}},{key:"sanitize",value:function(t,e){if(!e){var n=this.defaultValue(t);if(void 0!==n)return void 0!==e&&"boolean"==typeof n?e:n}return e}},{key:"value",value:function(t){return this.sanitize(t,this.values[t])}},{key:"set",value:function(t,e){this.values[t]=e}},{key:"initialize",value:function(){for(var t in this.values)this.values.hasOwnProperty(t)&&(this.values[t]=this.value(t));return this.values}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttCalendar=e.DateFrame=e.TimeFrameMapping=e.TimeFrame=void 0;var r=n(4),a=i(r),o=n(0),s=i(o),l=n(1),u=i(l);e.default=["$filter",function(t){"ngInject";return g.$filter=t,g}];var d=n(3),c=i(d),f=e.TimeFrame=function(){function t(e){(0,s.default)(this,t),void 0===e&&(e={}),this.start=e.start,this.end=e.end,this.working=e.working,this.magnet=void 0===e.magnet||e.magnet,this.default=e.default,this.color=e.color,this.classes=e.classes,this.internal=e.internal}return(0,u.default)(t,[{key:"updateView",value:function(){if(this.$element){var t={};void 0!==this.left?t.left=this.left+"px":t.left="",void 0!==this.width?t.width=this.width+"px":t.width="",void 0!==this.color?t["background-color"]=this.color:t["background-color"]="",this.$element.css(t);var e=["gantt-timeframe"+(this.working?"":"-non")+"-working"];this.classes&&(e=e.concat(this.classes));for(var n=0,i=e.length;n<i;n++)this.$element.toggleClass(e[n],!0)}}},{key:"getDuration",value:function(){if(void 0!==this.end&&void 0!==this.start)return this.end.diff(this.start,"milliseconds")}},{key:"clone",value:function(){return new t(this)}}]),t}(),h=e.TimeFrameMapping=function(){function t(e){(0,s.default)(this,t),this.func=e}return(0,u.default)(t,[{key:"getTimeFrames",value:function(t){var e=this.func(t);return e instanceof Array||(e=[e]),e}},{key:"clone",value:function(){return new t(this.func)}}]),t}(),v=e.DateFrame=function(){function t(e){(0,s.default)(this,t),this.evaluator=e.evaluator,e.date?(this.start=(0,c.default)(e.date).startOf("day"),this.end=(0,c.default)(e.date).endOf("day")):(this.start=e.start,this.end=e.end),e.targets instanceof Array?this.targets=e.targets:this.targets=[e.targets],this.default=e.default}return(0,u.default)(t,[{key:"dateMatch",value:function(t){return this.evaluator?this.evaluator(t):!(!this.start||!this.end)&&(t>=this.start&&t<=this.end)}},{key:"clone",value:function(){return new t(this)}}]),t}(),g=e.GanttCalendar=function(){function t(){(0,s.default)(this,t),this.timeFrames={},this.timeFrameMappings={},this.dateFrames={}}return(0,u.default)(t,[{key:"clear",value:function(){this.timeFrames={},this.timeFrameMappings={},this.dateFrames={}}},{key:"registerTimeFrames",value:function(t){for(var e in t){var n=t[e];this.timeFrames[e]=new f(n)}}},{key:"removeTimeFrames",value:function(t){for(var e in t)delete this.timeFrames[e]}},{key:"clearTimeFrames",value:function(){this.timeFrames={}}},{key:"registerTimeFrameMappings",value:function(t){for(var e in t){var n=t[e];this.timeFrameMappings[e]=new h(n)}}},{key:"removeTimeFrameMappings",value:function(t){for(var e in t)delete this.timeFrameMappings[e]}},{key:"clearTimeFrameMappings",value:function(){this.timeFrameMappings={}}},{key:"registerDateFrames",value:function(t){for(var e in t){var n=t[e];this.dateFrames[e]=new v(n)}}},{key:"removeDateFrames",value:function(t){for(var e in t)delete this.dateFrames[e]}},{key:"clearDateFrames",value:function(){this.dateFrames={}}},{key:"filterDateFrames",value:function(t,e){var n=[];for(var i in t){var r=t[i];r.dateMatch(e)&&n.push(r)}if(0===n.length)for(var a in t){var o=t[a];o.default&&n.push(o)}return n}},{key:"getTimeFrames",value:function(t){var e=[],n=this.filterDateFrames(this.dateFrames,t),i=!0,r=!1,o=void 0;try{for(var s,l=(0,a.default)(n);!(i=(s=l.next()).done);i=!0){var u=s.value;if(void 0!==u){var d=u.targets,f=!0,h=!1,v=void 0;try{for(var g,m=(0,a.default)(d);!(f=(g=m.next()).done);f=!0){var p=g.value,y=this.timeFrameMappings[p];if(void 0!==y){var w=y.getTimeFrames(t),k=!0,b=!1,M=void 0;try{for(var _,C=(0,a.default)(w);!(k=(_=C.next()).done);k=!0){var $=_.value,T=this.timeFrames[$];e.push(T)}}catch(t){b=!0,M=t}finally{try{!k&&C.return&&C.return()}finally{if(b)throw M}}}else{var x=this.timeFrames[p];void 0!==x&&e.push(x)}}}catch(t){h=!0,v=t}finally{try{!f&&m.return&&m.return()}finally{if(h)throw v}}}}}catch(t){r=!0,o=t}finally{try{!i&&l.return&&l.return()}finally{if(r)throw o}}var O=t.year(),F=t.month(),S=t.date(),j=[];if(0===e.length)for(var R in this.timeFrames){var P=this.timeFrames[R];P.default&&e.push(P)}for(var G in e){var D=e[G],B=D.clone();void 0!==B.start&&(B.start.year(O),B.start.month(F),B.start.date(S)),void 0!==B.end&&(B.end.year(O),B.end.month(F),B.end.date(S),(0,c.default)(B.end).startOf("day")===B.end&&B.end.add(1,"day")),j.push(B)}return j}},{key:"solve",value:function(e,n,i){var r=void 0,o=void 0,s=void 0,l=void 0,u=!0,d=!1,h=void 0;try{for(var v,g=(0,a.default)(e);!(u=(v=g.next()).done);u=!0){var m=v.value;(void 0===s||s>m.start)&&(s=m.start),(void 0===l||l<m.end)&&(l=m.end),void 0===r&&m.color&&(r=m.color),void 0!==m.classes&&(void 0===o&&(o=[]),o=o.concat(m.classes))}}catch(t){d=!0,h=t}finally{try{!u&&g.return&&g.return()}finally{if(d)throw h}}void 0===n&&(n=s),void 0===i&&(i=l);var p=[new f({start:n,end:i,internal:!0})];e=t.$filter("filter")(e,function(t){return(void 0===t.start||t.start<i)&&(void 0===t.end||t.end>n)});var y=!0,w=!1,k=void 0;try{for(var b,M=(0,a.default)(e);!(y=(b=M.next()).done);y=!0){var _=b.value;_.start||(_.start=n),_.end||(_.end=i)}}catch(t){w=!0,k=t}finally{try{!y&&M.return&&M.return()}finally{if(w)throw k}}var C=t.$filter("orderBy")(e,function(t){return-t.getDuration()}),$=void 0,T=!0,x=!1,O=void 0;try{for(var F,S=(0,a.default)(C);!(T=(F=S.next()).done);T=!0){var j=F.value,R=p.slice();$=0;var P=!1,G=!1,D=!0,B=!1,W=void 0;try{for(var E,I=(0,a.default)(p);!(D=(E=I.next()).done);D=!0){var H=E.value;if(!G){if(j.end||j.start)if(j.end>H.start&&j.start<H.end){var A=H.clone();H.end=(0,c.default)(j.start),A.start=(0,c.default)(j.end),R.splice($+1,0,j.clone(),A),G=!0,P=!1}else!P&&j.start<H.end?(H.end=(0,c.default)(j.start),R.splice($+1,0,j.clone()),P=!0):P&&j.end>H.start&&(H.start=(0,c.default)(j.end),P=!1,G=!0);else R.splice($,0,j),G=!0,P=!1;$++}}}catch(t){B=!0,W=t}finally{try{!D&&I.return&&I.return()}finally{if(B)throw W}}p=R}}catch(t){x=!0,O=t}finally{try{!T&&S.return&&S.return()}finally{if(x)throw O}}return p=t.$filter("filter")(p,function(t){return!t.internal&&(void 0===t.start||t.start<i)&&(void 0===t.end||t.end>n)})}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttCurrentDateManager=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=function(){"ngInject";return d};var l=n(3),u=i(l),d=e.GanttCurrentDateManager=function(){function t(e){var n=this;(0,a.default)(this,t),this.gantt=e,this.date=void 0,this.position=void 0,this.currentDateColumn=void 0,this.gantt.$scope.simplifyMoment=function(t){return u.default.isMoment(t)?t.unix():t},this.gantt.$scope.$watchGroup(["currentDate","simplifyMoment(currentDateValue)"],function(t,e){t!==e&&n.setCurrentDate(n.gantt.options.value("currentDateValue"))})}return(0,s.default)(t,[{key:"setCurrentDate",value:function(t){this.date=t;var e=this.currentDateColumn,n=void 0;void 0!==this.date&&"column"===this.gantt.options.value("currentDate")&&(n=this.gantt.columnsManager.getColumnByDate(this.date,!0)),this.currentDateColumn=n,e!==n&&(void 0!==e&&(e.currentDate=!1,e.updateView()),void 0!==n&&(n.currentDate=!0,n.updateView())),this.position=this.gantt.getPositionByDate(this.date,!0)}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttColumnHeader=void 0;var r=n(127),a=i(r),o=n(0),s=i(o),l=n(132),u=i(l),d=n(131),c=i(d);e.default=function(){"ngInject";return h};var f=n(23),h=e.GanttColumnHeader=function(t){function e(t,n,i,r,o,l,d){(0,s.default)(this,e);var c=(0,u.default)(this,(e.__proto__||(0,a.default)(e)).call(this,t,n,r,o));return c.name=d,c.unit=i,c.label="function"==typeof l?l(c):t.format(l),c}return(0,c.default)(e,t),e}(f.GanttColumn)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttColumnsManager=void 0;var r=n(4),a=i(r),o=n(0),s=i(o),l=n(1),u=i(l);e.default=["GanttColumnGenerator","GanttColumnBuilder","GanttHeadersGenerator","$filter","ganttLayout","ganttBinarySearch",function(t,e,n,i,r,a){"ngInject";return f.GanttColumnGenerator=t,f.GanttHeadersGenerator=n,f.ganttBinarySearch=a,f.GanttColumnBuilder=e,f.ganttLayout=r,f.$filter=i,f}];var d=n(3),c=i(d),f=e.GanttColumnsManager=function(){function t(e){var n=this;(0,s.default)(this,t),this.defaultHeadersFormats={year:"YYYY",quarter:"[Q]Q YYYY",month:"MMMM YYYY",week:"w",day:"D",hour:"H",minute:"H:mm",second:"H:mm:ss",millisecond:"H:mm:ss:SSS"},this.defaultDayHeadersFormats={day:"LL",hour:"H",minute:"H:mm",second:"H:mm:ss",millisecond:"H:mm:ss:SSS"},this.defaultYearHeadersFormats={year:"YYYY",quarter:"[Q]Q",month:"MMMM"},this.gantt=e,this.from=void 0,this.to=void 0,this.columns=[],this.visibleColumns=[],this.previousColumns=[],this.nextColumns=[],this.headers=[],this.visibleHeaders=[],this.scrollAnchor=void 0,this.columnBuilder=new t.GanttColumnBuilder(this),this.gantt.$scope.$watchGroup(["viewScale","columnWidth","timeFramesWorkingMode","timeFramesNonWorkingMode","fromDate","toDate","autoExpand","taskOutOfRange"],function(t,e){t!==e&&n.gantt.rendered&&n.generateColumns()}),this.gantt.$scope.$watchCollection("headers",function(t,e){t!==e&&n.gantt.rendered&&n.generateColumns()}),this.gantt.$scope.$watchCollection("headersFormats",function(t,e){t!==e&&n.gantt.rendered&&n.generateColumns()}),this.gantt.$scope.$watchGroup(["ganttElementWidth","showSide","sideWidth","maxHeight","daily"],function(t,e){t!==e&&n.gantt.rendered&&n.updateColumnsMeta()}),this.gantt.api.data.on.load(this.gantt.$scope,function(){(void 0===n.from||void 0===n.to||n.from>n.gantt.rowsManager.getDefaultFrom()||n.to<n.gantt.rowsManager.getDefaultTo())&&n.gantt.rendered&&n.generateColumns(),n.gantt.rowsManager.sortRows()}),this.gantt.api.data.on.remove(this.gantt.$scope,function(){n.gantt.rowsManager.sortRows()}),this.gantt.api.registerMethod("columns","clear",this.clearColumns,this),this.gantt.api.registerMethod("columns","generate",this.generateColumns,this),this.gantt.api.registerMethod("columns","refresh",this.updateColumnsMeta,this),this.gantt.api.registerMethod("columns","getColumnsWidth",this.getColumnsWidth,this),this.gantt.api.registerMethod("columns","getColumnsWidthToFit",this.getColumnsWidthToFit,this),this.gantt.api.registerMethod("columns","getDateRange",this.getDateRange,this),this.gantt.api.registerEvent("columns","clear"),this.gantt.api.registerEvent("columns","generate"),this.gantt.api.registerEvent("columns","refresh")}return(0,u.default)(t,[{key:"setScrollAnchor",value:function(){if(this.gantt.scroll.$element&&this.columns.length>0){var t=this.gantt.scroll.$element[0],e=t.scrollLeft+t.offsetWidth/2;this.scrollAnchor=this.gantt.getDateByPosition(e)}}},{key:"scrollToScrollAnchor",value:function(){var t=this;this.columns.length>0&&void 0!==this.scrollAnchor&&this.gantt.$scope.$$postDigest(function(){t.gantt.api.scroll.toDate(t.scrollAnchor)})}},{key:"clearColumns",value:function(){this.setScrollAnchor(),this.from=void 0,this.to=void 0,this.columns=[],this.visibleColumns=[],this.previousColumns=[],this.nextColumns=[],this.headers=[],this.visibleHeaders=[],this.gantt.api.columns.raise.clear()}},{key:"generateColumns",value:function(e,n){return e||(e=this.gantt.options.value("fromDate")),n||(n=this.gantt.options.value("toDate")),!((!e||c.default.isMoment(e)&&!e.isValid())&&!(e=this.gantt.rowsManager.getDefaultFrom()))&&(!((!n||c.default.isMoment(n)&&!n.isValid())&&!(n=this.gantt.rowsManager.getDefaultTo()))&&(void 0===e||c.default.isMoment(e)||(e=(0,c.default)(e)),void 0===n||c.default.isMoment(n)||(n=(0,c.default)(n)),"expand"===this.gantt.options.value("taskOutOfRange")&&(e=this.gantt.rowsManager.getExpandedFrom(e),n=this.gantt.rowsManager.getExpandedTo(n)),this.setScrollAnchor(),this.from=e,this.to=n,this.previousColumns=[],this.nextColumns=[],this.columns=t.GanttColumnGenerator.generate(this.columnBuilder,this.from,this.to,this.gantt.options.value("viewScale"),this.getColumnsWidth()),this.headers=t.GanttHeadersGenerator.generate(this),this.updateColumnsMeta(),this.scrollToScrollAnchor(),void this.gantt.api.columns.raise.generate(this.columns,this.headers)))}},{key:"updateColumnsMeta",value:function(){this.gantt.isRefreshingColumns=!0;var t=this.getLastColumn();this.gantt.originalWidth=void 0!==t?t.originalSize.left+t.originalSize.width:0;var e=this.updateColumnsWidths(this.columns,this.headers,this.previousColumns,this.nextColumns);this.gantt.width=void 0!==t?t.left+t.width:0;var n=this.gantt.options.value("showSide"),i=this.gantt.side.isShown(),r=n!==i;r&&!n&&this.gantt.side.show(!1),this.gantt.rowsManager.updateTasksPosAndSize(),this.gantt.timespansManager.updateTimespansPosAndSize(),this.updateVisibleColumns(e),this.gantt.rowsManager.updateVisibleObjects();var a=this.gantt.options.value("currentDateValue");this.gantt.currentDateManager.setCurrentDate(a),r&&n&&this.gantt.side.show(!0),this.gantt.isRefreshingColumns=!1,this.gantt.api.columns.raise.refresh(this.columns,this.headers)}},{key:"getLastColumn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.columns;return t&&(e=this.nextColumns),e&&e.length>0?e[e.length-1]:void 0}},{key:"getFirstColumn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.columns;return t&&(e=this.previousColumns),e&&e.length>0?e[0]:void 0}},{key:"getColumnByDate",value:function(e,n){n||this.expandExtendedColumnsForDate(e);var i=this.previousColumns.concat(this.columns,this.nextColumns),r=t.ganttBinarySearch.get(i,e,function(t){return t.date},!0);return void 0===r[0]?r[1]:r[0]}},{key:"getColumnByPosition",value:function(e,n){n||this.expandExtendedColumnsForPosition(e);var i=this.previousColumns.concat(this.columns,this.nextColumns),r=t.ganttBinarySearch.get(i,e,function(t){return t.left},!0);return void 0===r[0]?r[1]:r[0]}},{key:"updateColumnsWidths",value:function(e,n,i,r){var o=this.gantt.options.value("columnWidth"),s=this.gantt.options.value("expandToFit"),l=this.gantt.options.value("shrinkToFit");if(void 0===o||s||l){var u=this.gantt.getBodyAvailableWidth(),d=this.gantt.columnsManager.getLastColumn(!1);if(void 0!==d){var c=d.originalSize.left+d.originalSize.width;if(s&&c<u||l&&c>u||void 0===o){var f=u/c;t.ganttLayout.setColumnsWidthFactor(e,f);var h=!0,v=!1,g=void 0;try{for(var m,p=(0,a.default)(n);!(h=(m=p.next()).done);h=!0){var y=m.value;t.ganttLayout.setColumnsWidthFactor(y,f)}}catch(t){v=!0,g=t}finally{try{!h&&p.return&&p.return()}finally{if(v)throw g}}return i.splice(0,this.previousColumns.length),r.splice(0,this.nextColumns.length),!0}}}return!1}},{key:"getColumnsWidth",value:function(){var t=this.gantt.options.value("columnWidth");return void 0===t&&(t=!this.gantt.width||this.gantt.width<=0?20:this.gantt.width/this.columns.length),t}},{key:"getColumnsWidthToFit",value:function(){return this.gantt.getBodyAvailableWidth()/this.columns.length}},{key:"expandExtendedColumnsForPosition",value:function(e){var n=void 0;if(e<0){var i=this.getFirstColumn(),r=i.date,a=this.getFirstColumn(!0);return(!a||a.left>e)&&(n=this.gantt.options.value("viewScale"),this.previousColumns=t.GanttColumnGenerator.generate(this.columnBuilder,r,void 0,n,this.getColumnsWidth(),-e,0,!0)),!0}if(e>this.gantt.width){var o=this.getLastColumn(),s=o.getDateByPosition(o.width),l=this.getLastColumn(!0);return(!l||l.left+l.width<e)&&(n=this.gantt.options.value("viewScale"),this.nextColumns=t.GanttColumnGenerator.generate(this.columnBuilder,s,void 0,n,this.getColumnsWidth(),e-this.gantt.width,this.gantt.width,!1)),!0}return!1}},{key:"expandExtendedColumnsForDate",value:function(e){var n=this.getFirstColumn(),i=void 0;n&&(i=n.date);var r=this.getLastColumn(),a=void 0;r&&(a=r.endDate);var o=void 0;if(i&&e<i){var s=this.getFirstColumn(!0);return(!s||s.date>e)&&(o=this.gantt.options.value("viewScale"),this.previousColumns=t.GanttColumnGenerator.generate(this.columnBuilder,i,e,o,this.getColumnsWidth(),void 0,0,!0)),!0}if(a&&e>=a){var l=this.getLastColumn(!0);return(!l||l.date<a)&&(o=this.gantt.options.value("viewScale"),this.nextColumns=t.GanttColumnGenerator.generate(this.columnBuilder,a,e,o,this.getColumnsWidth(),void 0,this.gantt.width,!1)),!0}return!1}},{key:"getActiveHeadersCount",value:function(){return this.headers.length}},{key:"updateVisibleColumns",value:function(e){var n=this.gantt.options.value("columnLimitThreshold"),i=void 0;if(void 0===n||n>0&&this.columns.length>=n)for(this.visibleColumns=t.$filter("ganttColumnLimit")(this.columns,this.gantt),this.visibleHeaders=[],i=0;i<this.headers.length;i++)this.visibleHeaders.push.apply(this.visibleHeaders,t.$filter("ganttColumnLimit")(this.headers[i],this.gantt));else this.visibleColumns=this.columns,this.visibleHeaders=this.headers;if(e){for(i=0;i<this.visibleColumns.length;i++)this.visibleColumns[i].updateView();for(i=0;i<this.visibleHeaders.length;i++){var r=this.visibleHeaders[i],o=!0,s=!1,l=void 0;try{for(var u,d=(0,a.default)(r);!(o=(u=d.next()).done);o=!0){u.value.updateView()}}catch(t){s=!0,l=t}finally{try{!o&&d.return&&d.return()}finally{if(s)throw l}}}}var c=this.gantt.options.value("currentDateValue");this.gantt.currentDateManager.setCurrentDate(c)}},{key:"getHeaderFormat",value:function(t){var e=void 0,n=this.gantt.options.value("headersFormats");if(void 0!==n&&(e=n[t]),void 0===e){var i=this.gantt.options.value("viewScale");i=i.trim(),"s"===i.charAt(i.length-1)&&(i=i.substring(0,i.length-1));var r=void 0,a=void 0;i&&(a=i.split(" ")),r=a&&a.length>1?a[a.length-1]:i,["millisecond","second","minute","hour"].indexOf(r)>-1?e=this.defaultDayHeadersFormats[t]:["month","quarter","year"].indexOf(r)>-1&&(e=this.defaultYearHeadersFormats[t]),void 0===e&&(e=this.defaultHeadersFormats[t])}return e}},{key:"getHeaderScale",value:function(t){var e=void 0,n=this.gantt.options.value("headersScales");return void 0!==n&&(e=n[t]),void 0===e&&(e=t),-1===["millisecond","second","minute","hour","day","week","month","quarter","year"].indexOf(e)&&(e="day"),e}},{key:"getDateRange",value:function(t){var e=void 0,n=void 0;return t?this.visibleColumns&&this.visibleColumns.length>0&&(e=this.visibleColumns[0],n=this.visibleColumns[this.visibleColumns.length-1]):(e=this.getFirstColumn(),n=this.getLastColumn()),e&&n?[e.date,n.endDate]:void 0}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttObjectModel=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=["ganttUtils",function(t){"ngInject";return d.ganttUtils=t,d}];var l=n(3),u=i(l),d=e.GanttObjectModel=function(){function t(e){(0,a.default)(this,t),this.api=e,this.api.registerEvent("tasks","clean"),this.api.registerEvent("rows","clean"),this.api.registerEvent("timespans","clean")}return(0,s.default)(t,[{key:"cleanTask",value:function(e){void 0===e.id&&(e.id=t.ganttUtils.randomUuid()),void 0===e.from||u.default.isMoment(e.from)||(e.from=(0,u.default)(e.from)),void 0===e.to||u.default.isMoment(e.to)||(e.to=(0,u.default)(e.to)),this.api.tasks.raise.clean(e)}},{key:"cleanRow",value:function(e){void 0===e.id&&(e.id=t.ganttUtils.randomUuid()),void 0===e.from||u.default.isMoment(e.from)||(e.from=(0,u.default)(e.from)),void 0===e.to||u.default.isMoment(e.to)||(e.to=(0,u.default)(e.to)),this.api.rows.raise.clean(e)}},{key:"cleanTimespan",value:function(e){void 0===e.id&&(e.id=t.ganttUtils.randomUuid()),void 0===e.from||u.default.isMoment(e.from)||(e.from=(0,u.default)(e.from)),void 0===e.to||u.default.isMoment(e.to)||(e.to=(0,u.default)(e.to)),this.api.timespans.raise.clean(e)}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttRowsManager=void 0;var r=n(5),a=i(r),o=n(4),s=i(o),l=n(0),u=i(l),d=n(1),c=i(d);e.default=["GanttRow","ganttArrays","$filter","$timeout",function(t,e,n,i){"ngInject";return m.GanttRow=t,m.$filter=n,m.$timeout=i,m.ganttArrays=e,m}];var f=n(2),h=i(f),v=n(3),g=i(v),m=e.GanttRowsManager=function(){function t(e){var n=this;(0,u.default)(this,t),this.rowsMap={},this.rows=[],this.sortedRows=[],this.filteredRows=[],this.customFilteredRows=[],this.visibleRows=[],this.rowsTaskWatchers=[],this.customRowSorters=[],this.customRowFilters=[],this.gantt=e,this._defaultFilterImpl=function(e,n,i){return t.$filter("filter")(e,n,i)},this.filterImpl=this._defaultFilterImpl,this.customRowSorters=[],this.customRowFilters=[],this.gantt.$scope.$watchGroup(["filterTask","filterTaskComparator"],function(t,e){t!==e&&n.updateVisibleTasks()}),this.gantt.$scope.$watchGroup(["filterRow","filterRowComparator"],function(t,e){t!==e&&n.updateVisibleRows()}),this.gantt.$scope.$watch("sortMode",function(t,e){t!==e&&n.sortRows()});var i=this.gantt.scroll.isVScrollbarVisible();this.gantt.$scope.$watchGroup(["maxHeight","gantt.rowsManager.visibleRows.length"],function(e,r){e!==r&&t.$timeout(function(){var t=n.gantt.scroll.isVScrollbarVisible();t!==i&&(i=t,n.gantt.columnsManager.updateColumnsMeta())})}),this.gantt.api.registerMethod("rows","sort",t.prototype.sortRows,this),this.gantt.api.registerMethod("rows","applySort",t.prototype.applySort,this),this.gantt.api.registerMethod("rows","refresh",t.prototype.updateVisibleObjects,this),this.gantt.api.registerMethod("rows","removeRowSorter",t.prototype.removeCustomRowSorter,this),this.gantt.api.registerMethod("rows","addRowSorter",t.prototype.addCustomRowSorter,this),this.gantt.api.registerMethod("rows","removeRowFilter",t.prototype.removeCustomRowFilter,this),this.gantt.api.registerMethod("rows","addRowFilter",t.prototype.addCustomRowFilter,this),this.gantt.api.registerMethod("rows","setFilterImpl",t.prototype.setFilterImpl,this),this.gantt.api.registerEvent("tasks","add"),this.gantt.api.registerEvent("tasks","change"),this.gantt.api.registerEvent("tasks","viewChange"),this.gantt.api.registerEvent("tasks","beforeRowChange"),this.gantt.api.registerEvent("tasks","beforeViewRowChange"),this.gantt.api.registerEvent("tasks","rowChange"),this.gantt.api.registerEvent("tasks","viewRowChange"),this.gantt.api.registerEvent("tasks","remove"),this.gantt.api.registerEvent("tasks","filter"),this.gantt.api.registerEvent("tasks","displayed"),this.gantt.api.registerEvent("rows","add"),this.gantt.api.registerEvent("rows","change"),this.gantt.api.registerEvent("rows","remove"),this.gantt.api.registerEvent("rows","move"),this.gantt.api.registerEvent("rows","displayed"),this.gantt.api.registerEvent("rows","filter"),this.updateVisibleObjects()}return(0,c.default)(t,[{key:"resetNonModelLists",value:function(){this.rows=[],this.sortedRows=[],this.filteredRows=[],this.customFilteredRows=[],this.visibleRows=[]}},{key:"addRow",value:function(e,n){var i=void 0,r=void 0,a=void 0,o=!1;if(this.gantt.objectModel.cleanRow(e),e.id in this.rowsMap){if(i=this.rowsMap[e.id],n&&(this.rows.push(i),this.sortedRows.push(i),this.filteredRows.push(i),this.customFilteredRows.push(i),this.visibleRows.push(i)),i.model===e)return;var s=t.ganttArrays.getRemovedIds(e.tasks,i.model.tasks);for(r=0,a=s.length;r<a;r++){var l=s[r];i.removeTask(l)}i.model=e,o=!0}else i=new t.GanttRow(this,e),this.rowsMap[e.id]=i,this.rows.push(i),this.sortedRows.push(i),this.filteredRows.push(i),this.customFilteredRows.push(i),this.visibleRows.push(i);if(void 0!==e.tasks&&e.tasks.length>0){for(r=0,a=e.tasks.length;r<a;r++){var u=e.tasks[r];i.addTask(u)}i.updateVisibleTasks()}if(o?this.gantt.api.rows.raise.change(i):this.gantt.api.rows.raise.add(i),!o){var d=this.gantt.$scope.$watchCollection(function(){return e.tasks},function(e,n){if(e!==n){var r=void 0,a=void 0,o=t.ganttArrays.getRemovedIds(e,n);for(r=0,a=o.length;r<a;r++){var s=o[r];i.removeTask(s)}if(void 0!==e){for(r=0,a=e.length;r<a;r++){var l=e[r];i.addTask(l)}i.updateVisibleTasks()}}});this.rowsTaskWatchers.push(d)}return o}},{key:"removeRow",value:function(e){if(e in this.rowsMap){delete this.rowsMap[e];var n=void 0,i=t.ganttArrays.indexOfId(this.rows,e,["model","id"]);if(i>-1){n=this.rows.splice(i,1)[0];var r=this.rowsTaskWatchers.splice(i,1)[0];r&&r()}return t.ganttArrays.removeId(this.sortedRows,e,["model","id"]),t.ganttArrays.removeId(this.filteredRows,e,["model","id"]),t.ganttArrays.removeId(this.customFilteredRows,e,["model","id"]),t.ganttArrays.removeId(this.visibleRows,e,["model","id"]),this.gantt.api.rows.raise.remove(n),n}}},{key:"removeAll",value:function(){this.rowsMap={},this.rows=[],this.sortedRows=[],this.filteredRows=[],this.customFilteredRows=[],this.visibleRows=[];var t=!0,e=!1,n=void 0;try{for(var i,r=(0,s.default)(this.rowsTaskWatchers);!(t=(i=r.next()).done);t=!0){(0,i.value)()}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}this.rowsTaskWatchers=[]}},{key:"sortRows",value:function(){var e=this.gantt.options.value("sortMode");if(void 0!==e){var n=!1;("string"==typeof e||e instanceof String)&&"-"===e.charAt(0)&&(n=!0,e=e.substr(1));var i=t.$filter("orderBy");this.sortedRows=i(this.rows,e,n)}else this.sortedRows=this.rows.slice();this.sortedRows=this.applyCustomRowSorters(this.sortedRows),this.updateVisibleRows()}},{key:"removeCustomRowSorter",value:function(t){var e=this.customRowSorters.indexOf(t);e>-1&&this.customRowSorters.splice(e,1)}},{key:"addCustomRowSorter",value:function(t){this.customRowSorters.push(t)}},{key:"applyCustomRowSorters",value:function(t){var e=t,n=!0,i=!1,r=void 0;try{for(var a,o=(0,s.default)(this.customRowSorters);!(n=(a=o.next()).done);n=!0){e=(0,a.value)(e)}}catch(t){i=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw r}}return e}},{key:"applySort",value:function(){var t=this.gantt.$scope.data;t.splice(0,t.length);var e=[],n=!0,i=!1,r=void 0;try{for(var a,o=(0,s.default)(this.sortedRows);!(n=(a=o.next()).done);n=!0){var l=a.value;t.push(l.model),e.push(l)}}catch(t){i=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw r}}this.rows=e}},{key:"moveRow",value:function(e,n){void 0!==this.gantt.options.value("sortMode")&&(this.applySort(),this.gantt.options.set("sortMode",void 0));var i=this.rows.indexOf(n),r=this.rows.indexOf(e);i>-1&&r>-1&&i!==r&&(t.ganttArrays.moveToIndex(this.rows,r,i),t.ganttArrays.moveToIndex(this.rowsTaskWatchers,r,i),t.ganttArrays.moveToIndex(this.gantt.$scope.data,r,i),this.gantt.api.rows.raise.change(e),this.gantt.api.rows.raise.move(e,r,i),this.updateVisibleObjects(),this.sortRows())}},{key:"updateVisibleObjects",value:function(){this.updateVisibleRows(),this.updateVisibleTasks()}},{key:"updateVisibleRows",value:function(){var t=this.filteredRows,e=this.gantt.options.value("filterRow");if(e){"object"===(void 0===e?"undefined":(0,a.default)(e))&&(e={model:e});var n=this.gantt.options.value("filterRowComparator");if("function"==typeof n){var i=this.gantt;n=function(t,e){return i.options.value("filterRowComparator")(t,e)}}this.filteredRows=this.filterImpl(this.sortedRows,e,n)}else this.filteredRows=this.sortedRows.slice(0);var r=!h.default.equals(t,this.filteredRows);this.customFilteredRows=this.applyCustomRowFilters(this.filteredRows),this.visibleRows=this.customFilteredRows,this.gantt.api.rows.raise.displayed(this.sortedRows,this.filteredRows,this.visibleRows),r&&this.gantt.api.rows.raise.filter(this.sortedRows,this.filteredRows)}},{key:"removeCustomRowFilter",value:function(t){var e=this.customRowFilters.indexOf(t);e>-1&&this.customRowFilters.splice(e,1)}},{key:"addCustomRowFilter",value:function(t){this.customRowFilters.push(t)}},{key:"applyCustomRowFilters",value:function(t){var e=t,n=!0,i=!1,r=void 0;try{for(var a,o=(0,s.default)(this.customRowFilters);!(n=(a=o.next()).done);n=!0){e=(0,a.value)(e)}}catch(t){i=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw r}}return e}},{key:"setFilterImpl",value:function(t){this.filterImpl=t||this._defaultFilterImpl}},{key:"updateVisibleTasks",value:function(){var t=[],e=[],n=[],i=[],r=!0,a=!1,o=void 0;try{for(var l,u=(0,s.default)(this.rows);!(r=(l=u.next()).done);r=!0){var d=l.value;t=t.concat(d.filteredTasks),d.updateVisibleTasks(),e=e.concat(d.filteredTasks),i=i.concat(d.visibleTasks),n=n.concat(d.tasks)}}catch(t){a=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(a)throw o}}this.gantt.api.tasks.raise.displayed(n,e,i),!h.default.equals(t,e)&&this.gantt.api.tasks.raise.filter(n,e,i)}},{key:"updateTasksPosAndSize",value:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=(0,s.default)(this.rows);!(t=(i=r.next()).done);t=!0){i.value.updateTasksPosAndSize()}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}},{key:"getExpandedFrom",value:function(t){t=t?(0,g.default)(t):t;var e=t,n=!0,i=!1,r=void 0;try{for(var a,o=(0,s.default)(this.rows);!(n=(a=o.next()).done);n=!0){var l=a.value;(void 0===e||e>l.from)&&(e=l.from)}}catch(t){i=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw r}}return e&&(!t||e<t)?e:t}},{key:"getExpandedTo",value:function(t){t=t?(0,g.default)(t):t;var e=t,n=!0,i=!1,r=void 0;try{for(var a,o=(0,s.default)(this.rows);!(n=(a=o.next()).done);n=!0){var l=a.value;(void 0===e||e<l.to)&&(e=l.to)}}catch(t){i=!0,r=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw r}}var u=this.gantt.options.value("toDate");return e&&(!u||e>u)?e:t}},{key:"getDefaultFrom",value:function(){var t=void 0,e=!0,n=!1,i=void 0;try{for(var r,a=(0,s.default)(this.rows);!(e=(r=a.next()).done);e=!0){var o=r.value;(void 0===t||o.from<t)&&(t=o.from)}}catch(t){n=!0,i=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw i}}return t}},{key:"getDefaultTo",value:function(){var t=void 0,e=!0,n=!1,i=void 0;try{for(var r,a=(0,s.default)(this.rows);!(e=(r=a.next()).done);e=!0){var o=r.value;(void 0===t||o.to>t)&&(t=o.to)}}catch(t){n=!0,i=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw i}}return t}}]),t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GanttBody=void 0;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=["GanttBodyColumns","GanttBodyRows","GanttBodyBackground","GanttBodyForeground",function(t,e,n,i){"ngInject";return a.GanttBodyColumns=t,a.GanttBodyRows=e,a.GanttBodyBackground=n,a.GanttBodyForeground=i,a}];var a=e.GanttBody=function t(e){(0,r.default)(this,t),this.gantt=e,this.background=new t.GanttBodyBackground(this),this.foreground=new t.GanttBodyForeground(this),this.columns=new t.GanttBodyColumns(this),this.rows=new t.GanttBodyRows(this)}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttHeader=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=["GanttHeaderColumns",function(t){"ngInject";return l.GanttHeaderColumns=t,l}];var l=e.GanttHeader=function(){function t(e){(0,a.default)(this,t),this.gantt=e,this.columns=new t.GanttHeaderColumns(this.gantt)}return(0,s.default)(t,[{key:"getHeight",value:function(){return this.$element[0].offsetHeight}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttScroll=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=function(){"ngInject";return l};var l=e.GanttScroll=function(){function t(e){(0,a.default)(this,t),this.gantt=e,this.gantt.api.registerEvent("scroll","scroll"),this.gantt.api.registerMethod("scroll","to",this.scrollTo,this),this.gantt.api.registerMethod("scroll","toDate",this.scrollToDate,this),this.gantt.api.registerMethod("scroll","left",this.scrollToLeft,this),this.gantt.api.registerMethod("scroll","right",this.scrollToRight,this),this.gantt.api.registerMethod("scroll","setWidth",this.setWidth,this)}return(0,s.default)(t,[{key:"getScrollLeft",value:function(){return void 0===this.$element?void 0:(void 0===this.cachedScrollLeft&&(this.cachedScrollLeft=this.$element[0].scrollLeft),this.cachedScrollLeft)}},{key:"getScrollWidth",value:function(){return void 0===this.$element?void 0:this.$element[0].scrollWidth}},{key:"getWidth",value:function(){return void 0===this.$element?void 0:this.$element[0].offsetWidth}},{key:"setWidth",value:function(t){this.$element[0]}},{key:"getBordersWidth",value:function(){if(void 0!==this.$element){if(this.$element[0].clientWidth)return this.$element[0].offsetWidth-this.$element[0].clientWidth;var t=window.getComputedStyle(this.$element[0]).getPropertyValue("border-left-width")?window.getComputedStyle(this.$element[0]).getPropertyValue("border-left-width").match(/\d+/)[0]:"0",e=window.getComputedStyle(this.$element[0]).getPropertyValue("border-right-width")?window.getComputedStyle(this.$element[0]).getPropertyValue("border-right-width").match(/\d+/)[0]:"0";return parseInt(t,10)+parseInt(e,10)}}},{key:"getBordersHeight",value:function(){return void 0===this.$element?void 0:this.$element[0].offsetHeight-this.$element[0].clientHeight}},{key:"isVScrollbarVisible",value:function(){if(void 0!==this.$element)return this.$element[0].scrollHeight>this.$element[0].offsetHeight}},{key:"isHScrollbarVisible",value:function(){if(void 0!==this.$element)return this.$element[0].scrollWidth>this.$element[0].offsetWidth}},{key:"scrollTo",value:function(t){this.$element[0].scrollLeft=t,this.$element.triggerHandler("scroll")}},{key:"scrollToLeft",value:function(t){this.$element[0].scrollLeft-=t,this.$element.triggerHandler("scroll")}},{key:"scrollToRight",value:function(t){this.$element[0].scrollLeft+=t,this.$element.triggerHandler("scroll")}},{key:"scrollToDate",value:function(t){var e=this.gantt.getPositionByDate(t);void 0!==e&&(this.$element[0].scrollLeft=e-this.$element[0].offsetWidth/2)}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttSide=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=function(){"ngInject";return l};var l=e.GanttSide=function(){function t(e){(0,a.default)(this,t),this.gantt=e}return(0,s.default)(t,[{key:"getWidth",value:function(){if(this.gantt.options.value("showSide")){var t=this.gantt.options.value("sideWidth");if(void 0===t&&void 0!==this.$element&&void 0!==this.$element.css("width")&&this.$element.css("width",""),void 0!==this.$element&&(t=this.$element[0].offsetWidth),void 0!==t)return t}return 0}},{key:"show",value:function(t){void 0!==this.$element&&this.$element.toggleClass("ng-hide",!t)}},{key:"isShown",value:function(){if(void 0!==this.$element)return!this.$element.hasClass("ng-hide")}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttTimespansManager=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=["GanttTimespan",function(t){"ngInject";return l.GanttTimespan=t,l}];var l=e.GanttTimespansManager=function(){function t(e){var n=this;(0,a.default)(this,t),this.timespansMap={},this.timespans=[],this.gantt=e,this.gantt.$scope.$watchCollection("timespans",function(t){n.clearTimespans(),n.loadTimespans(t)}),this.gantt.api.registerMethod("timespans","load",this.loadTimespans,this),this.gantt.api.registerMethod("timespans","remove",this.removeTimespans,this),this.gantt.api.registerMethod("timespans","clear",this.clearTimespans,this),this.gantt.api.registerEvent("timespans","add"),this.gantt.api.registerEvent("timespans","remove"),this.gantt.api.registerEvent("timespans","change")}return(0,s.default)(t,[{key:"loadTimespans",value:function(t){Array.isArray(t)||(t=void 0!==t?[t]:[]),this.gantt.$scope.timespans=t;for(var e=0,n=t.length;e<n;e++){var i=t[e];this.gantt.objectModel.cleanTimespan(i),this.loadTimespan(i)}}},{key:"loadTimespan",value:function(e){var n=void 0,i=!1;return e.id in this.timespansMap?(n=this.timespansMap[e.id],n.model=e,i=!0,this.gantt.api.timespans.raise.change(n)):(n=new t.GanttTimespan(this.gantt,e),this.timespansMap[e.id]=n,this.timespans.push(n),this.gantt.api.timespans.raise.add(n)),n.updatePosAndSize(),i}},{key:"removeTimespans",value:function(t){Array.isArray(t)||(t=[t]);for(var e=0,n=t.length;e<n;e++){var i=t[e];this.removeTimespan(i.id)}}},{key:"removeTimespan",value:function(t){if(t in this.timespansMap){delete this.timespansMap[t];for(var e=void 0,n=void 0,i=this.timespans.length-1;i>=0;i--)if(n=this.timespans[i],n.model.id===t){e=n,this.timespans.splice(i,1);break}return this.gantt.api.timespans.raise.remove(e),e}}},{key:"clearTimespans",value:function(){this.timespansMap={},this.timespans=[]}},{key:"updateTimespansPosAndSize",value:function(){for(var t=0,e=this.timespans.length;t<e;t++)this.timespans[t].updatePosAndSize()}}]),t}()},function(t,e,n){var i=n(140);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(18),r=n(8).document,a=i(r)&&i(r.createElement);t.exports=function(t){return a?r.createElement(t):{}}},function(t,e,n){t.exports=!n(10)&&!n(17)(function(){return 7!=Object.defineProperty(n(51)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var i=n(27),r=n(15),a=n(59),o=n(16),s=n(11),l=n(19),u=n(148),d=n(30),c=n(57),f=n(9)("iterator"),h=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,e,n,g,m,p,y){u(n,e,g);var w,k,b,M=function(t){if(!h&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",C="values"==m,$=!1,T=t.prototype,x=T[f]||T["@@iterator"]||m&&T[m],O=x||M(m),F=m?C?M("entries"):O:void 0,S="Array"==e?T.entries||x:x;if(S&&(b=c(S.call(new t)))!==Object.prototype&&(d(b,_,!0),i||s(b,f)||o(b,f,v)),C&&x&&"values"!==x.name&&($=!0,O=function(){return x.call(this)}),i&&!y||!h&&!$&&T[f]||o(T,f,O),l[e]=O,l[_]=v,m)if(w={values:C?O:M("values"),keys:p?O:M("keys"),entries:F},y)for(k in w)k in T||a(T,k,w[k]);else r(r.P+r.F*(h||$),e,w);return w}},function(t,e,n){var i=n(29),r=n(21),a=n(13),o=n(34),s=n(11),l=n(52),u=Object.getOwnPropertyDescriptor;e.f=n(10)?u:function(t,e){if(t=a(t),e=o(e,!0),l)try{return u(t,e)}catch(t){}if(s(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e,n){var i=n(58),r=n(26).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(11),r=n(60),a=n(31)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){var i=n(11),r=n(13),a=n(142)(!1),o=n(31)("IE_PROTO");t.exports=function(t,e){var n,s=r(t),l=0,u=[];for(n in s)n!=o&&i(s,n)&&u.push(n);for(;e.length>l;)i(s,n=e[l++])&&(~a(u,n)||u.push(n));return u}},function(t,e,n){t.exports=n(16)},function(t,e,n){var i=n(25);t.exports=function(t){return Object(i(t))}},function(t,e,n){"use strict";var i=n(156)(!0);n(53)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){n(161);for(var i=n(8),r=n(16),a=n(19),o=n(9)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var u=s[l],d=i[u],c=d&&d.prototype;c&&!c[o]&&r(c,o,u),a[u]=a.Array}},function(t,e){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["Gantt","ganttEnableNgAnimate","$timeout","$templateCache",function(t,e,n,i){"ngInject";return{restrict:"A",transclude:!0,templateUrl:function(t,e){var n=void 0;return n=void 0===e.templateUrl?"template/gantt.tmpl.html":e.templateUrl,void 0!==e.template&&i.put(n,e.template),n},scope:{sortMode:"=?",filterTask:"=?",filterTaskComparator:"=?",filterRow:"=?",filterRowComparator:"=?",viewScale:"=?",columnWidth:"=?",expandToFit:"=?",shrinkToFit:"=?",showSide:"=?",allowSideResizing:"=?",fromDate:"=?",toDate:"=?",currentDateValue:"=?",currentDate:"=?",daily:"=?",autoExpand:"=?",taskOutOfRange:"=?",taskContent:"=?",rowContent:"=?",maxHeight:"=?",sideWidth:"=?",headers:"=?",headersFormats:"=?",headersScales:"=?",timeFrames:"=?",dateFrames:"=?",timeFramesWorkingMode:"=?",timeFramesNonWorkingMode:"=?",timespans:"=?",columnMagnet:"=?",shiftColumnMagnet:"=?",timeFramesMagnet:"=?",data:"=?",api:"=?",options:"=?"},controller:["$scope","$element",function(n,i){for(var r in n.options)n[r]=n.options[r];e(i,!1),n.gantt=new t(n,i),this.gantt=n.gantt}],link:function(t,e){t.gantt.api.directives.raise.new("gantt",t,e),t.$on("$destroy",function(){t.gantt.api.directives.raise.destroy("gantt",t,e)}),n(function(){t.gantt.initialized()})}}}]},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttColumnBuilder=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=["GanttColumn",function(t){"ngInject";return u.GanttColumn=t,u}];var l=n(23),u=e.GanttColumnBuilder=function(){function t(e){(0,a.default)(this,t),this.columnsManager=e}return(0,s.default)(t,[{key:"newColumn",value:function(t,e,n,i){var r=this.columnsManager.gantt.calendar,a=this.columnsManager.gantt.options.value("timeFramesWorkingMode"),o=this.columnsManager.gantt.options.value("timeFramesNonWorkingMode");return new l.GanttColumn(t,e,n,i,r,a,o)}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=i(r),o=n(1),s=i(o),l=n(3),u=i(l),d=function(){function t(){(0,a.default)(this,t)}return(0,s.default)(t,[{key:"isToDateToExclude",value:function(t,e,n){return(0,u.default)(t).add(e,n).startOf(n)===t}},{key:"getFirstValue",value:function(t){if(["hour","minute","second","millisecond"].indexOf(t)>=0)return 0}},{key:"ensureNoUnitOverflow",value:function(t,e,n){var i=e.get(t),r=n.get(t),a=this.getFirstValue(t);void 0!==a&&r!==a&&r<i&&n.set(t,a)}},{key:"generate",value:function(t,e,n,i,r,a,o,s){if(!n&&!a)throw new Error("to or maximumWidth must be defined");i=i.trim(),"s"===i.charAt(i.length-1)&&(i=i.substring(0,i.length-1));var l=void 0,d=void 0,c=void 0;i&&(c=i.split(" ")),c&&c.length>1?(l=parseFloat(c[0]),d=c[c.length-1]):(l=1,d=i);var f=!1;e=(0,u.default)(e).startOf(d),n&&(f=this.isToDateToExclude(n,l,d),n=(0,u.default)(n).startOf(d));var h=0,v=(0,u.default)(e).startOf(d);s&&(v.subtract(l,d),h-=r);for(var g=[];;){if(a&&Math.abs(h)>a+r)break;var m=(0,u.default)(v),p=(0,u.default)(m).add(l,d);this.ensureNoUnitOverflow(d,m,p);var y=t.newColumn(m,p,o?h+o:h,r);if(y.cropped||(g.push(y),s?h-=r:h+=r),n)if(s){if(f&&v<n||!f&&v<=n)break}else if(f&&v>n||!f&&v>=n)break;s?(v.subtract(l,d),this.ensureNoUnitOverflow(d,v,m)):(v.add(l,d),this.ensureNoUnitOverflow(d,m,v))}return s&&(this.isToDateToExclude(e,l,d)&&g.shift(),g.reverse()),g}}]),t}();e.default=d},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),a=i(r),o=n(0),s=i(o),l=n(1),u=i(l),d=n(3),c=i(d),f=n(41),h=function(){function t(){(0,s.default)(this,t)}return(0,u.default)(t,[{key:"generateHeaders",value:function(t,e){var n=[],i=void 0,r=t.getHeaderScale(e),a=void 0,o=void 0,s=void 0;if(r&&(s=r.split(" ")),s&&s.length>1?(a=parseFloat(s[0]),o=s[s.length-1]):(a=1,o=r),t.columns.length>0)for(var l=t.columns[0],u=(0,c.default)(l.date).startOf(o),d=(0,c.default)(t.columns[t.columns.length-1].endDate);;){var h=l.getPositionByDate(u),v=c.default.min((0,c.default)(u).add(a,o),d),g=t.getColumnByDate(v),m=g.getPositionByDate(v),p=m-h;if(p>0){var y=t.getHeaderFormat(e);i=new f.GanttColumnHeader(u,v,o,h,p,y,e),n.push(i)}if(v.isSame(d)||v.isAfter(d))break;l=g,u=v}return n}},{key:"generate",value:function(t){var e=[];if(void 0===t.gantt.options.value("headers")){var n=t.gantt.options.value("viewScale");n=n.trim(),"s"===n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));var i=void 0,r=void 0;n&&(r=n.split(" ")),i=r&&r.length>1?r[r.length-1]:n,["quarter","month"].indexOf(i)>-1&&e.push("year"),["day","week"].indexOf(i)>-1&&e.push("month"),["day"].indexOf(i)>-1&&e.push("week"),["hour"].indexOf(i)>-1&&e.push("day"),["minute","second","millisecond"].indexOf(i)>-1&&e.push("hour"),["second","millisecond"].indexOf(i)>-1&&e.push("minute"),["millisecond"].indexOf(i)>-1&&e.push("second"),e.push(n)}else e=t.gantt.options.value("headers");var o=[],s=!0,l=!1,u=void 0;try{for(var d,c=(0,a.default)(e);!(s=(d=c.next()).done);s=!0){var f=d.value;o.push(this.generateHeaders(t,f))}}catch(t){l=!0,u=t}finally{try{!s&&c.return&&c.return()}finally{if(l)throw u}}return o}}]),t}();e.default=h},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Gantt=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=["GanttApi","GanttOptions","GanttCalendar","GanttScroll","GanttBody","GanttHeader","GanttSide","GanttObjectModel","GanttRowsManager","GanttColumnsManager","GanttTimespansManager","GanttCurrentDateManager","ganttArrays","$document","$timeout",function(t,e,n,i,r,a,o,s,l,u,d,c,f,h,v){"ngInject";return C.ganttArrays=f,C.$document=h,C.$timeout=v,C}];var l=n(2),u=i(l),d=n(3),c=i(d),f=n(37),h=n(38),v=n(39),g=n(40),m=n(43),p=n(44),y=n(42),w=n(49),k=n(47),b=n(45),M=n(46),_=n(48),C=e.Gantt=function(){function t(e,n){var i=this;(0,a.default)(this,t),this.rendered=!1,this.isRefreshingColumns=!1,this.$scope=e,this.$element=n,this.options=new h.GanttOptions(e,{api:function(){},data:[],timespans:[],viewScale:"day",columnMagnet:"15 minutes",timeFramesMagnet:!0,showSide:!0,allowSideResizing:!0,currentDate:"line",currentDateValue:c.default,autoExpand:"none",taskOutOfRange:"truncate",taskContent:"{{task.model.name}}",rowContent:"{{row.model.name}}",maxHeight:0,timeFrames:[],dateFrames:[],timeFramesWorkingMode:"hidden",timeFramesNonWorkingMode:"visible",taskLimitThreshold:100,columnLimitThreshold:500}),this.api=new f.GanttApi(this),this.api.registerEvent("core","ready"),this.api.registerEvent("core","rendered"),this.api.registerEvent("directives","controller"),this.api.registerEvent("directives","preLink"),this.api.registerEvent("directives","postLink"),this.api.registerEvent("directives","new"),this.api.registerEvent("directives","destroy"),this.api.registerEvent("data","change"),this.api.registerEvent("data","load"),this.api.registerEvent("data","remove"),this.api.registerEvent("data","clear"),this.api.registerMethod("core","getDateByPosition",this.getDateByPosition,this),this.api.registerMethod("core","getPositionByDate",this.getPositionByDate,this),this.api.registerMethod("data","load",this.loadData,this),this.api.registerMethod("data","remove",this.removeData,this),this.api.registerMethod("data","clear",this.clearData,this),this.api.registerMethod("data","get",this.getData,this),this.calendar=new v.GanttCalendar,this.calendar.registerTimeFrames(this.options.value("timeFrames")),this.calendar.registerDateFrames(this.options.value("dateFrames")),this.api.registerMethod("timeframes","registerTimeFrames",this.calendar.registerTimeFrames,this.calendar),this.api.registerMethod("timeframes","clearTimeframes",this.calendar.clearTimeFrames,this.calendar),this.api.registerMethod("timeframes","registerDateFrames",this.calendar.registerDateFrames,this.calendar),this.api.registerMethod("timeframes","clearDateFrames",this.calendar.clearDateFrames,this.calendar),this.api.registerMethod("timeframes","registerTimeFrameMappings",this.calendar.registerTimeFrameMappings,this.calendar),this.api.registerMethod("timeframes","clearTimeFrameMappings",this.calendar.clearTimeFrameMappings,this.calendar),e.$watchGroup(["timeFrames","dateFrames"],function(t,e){if(t!==e){var n=t[0],r=t[1],a=e[0],o=e[1],s=!1;u.default.equals(n,a)||(i.calendar.clearTimeFrames(),i.calendar.registerTimeFrames(n),s=!0),u.default.equals(r,o)||(i.calendar.clearDateFrames(),i.calendar.registerDateFrames(r),s=!0),s&&i.columnsManager.generateColumns()}}),e.$watch("columnMagnet",function(){var t=void 0,e=i.options.value("columnMagnet");e&&(t=e.trim().split(" ")),t&&t.length>1?(i.columnMagnetValue=parseFloat(t[0]),i.columnMagnetUnit=c.default.normalizeUnits(t[t.length-1])):(i.columnMagnetValue=1,i.columnMagnetUnit=c.default.normalizeUnits(e))}),e.$watchGroup(["shiftColumnMagnet","viewScale"],function(){var t=void 0,e=i.options.value("shiftColumnMagnet");e&&(t=e.trim().split(" ")),void 0!==t&&t.length>1?(i.shiftColumnMagnetValue=parseFloat(t[0]),i.shiftColumnMagnetUnit=c.default.normalizeUnits(t[t.length-1])):(i.shiftColumnMagnetValue=1,i.shiftColumnMagnetUnit=c.default.normalizeUnits(e))}),t.$document.on("keyup keydown",this.keyHandler),e.$on("$destroy",function(){t.$document.off("keyup keydown",i.keyHandler)}),this.scroll=new k.GanttScroll(this),this.body=new b.GanttBody(this),this.header=new M.GanttHeader(this),this.side=new _.GanttSide(this),this.objectModel=new m.GanttObjectModel(this.api),this.rowsManager=new p.GanttRowsManager(this),this.columnsManager=new y.GanttColumnsManager(this),this.timespansManager=new w.GanttTimespansManager(this),this.currentDateManager=new g.GanttCurrentDateManager(this),this.originalWidth=0,this.width=0,"function"==typeof this.$scope.api&&this.$scope.api(this.api);var r=function(t,e){if(void 0===e||t.length!==e.length)return!0;for(var n=0,i=t.length;n<i;n++)if(t[n].id!==e[n].id)return!0;return!1};e.$watchCollection("data",function(e,n){if(void 0!==n){var a=t.ganttArrays.getRemovedIds(e,n);if(a.length===n.length)i.rowsManager.removeAll(),i.api.data.raise.clear();else{for(var o=0,s=a.length;o<s;o++){var l=a[o];i.rowsManager.removeRow(l)}for(var u=[],d=0,c=n.length;d<c;d++)a.indexOf(n[d].id)>-1&&u.push(n[d]);i.api.data.raise.remove(u)}}if(void 0!==e){var f=r(e,n);f&&i.rowsManager.resetNonModelLists();for(var h=0,v=e.length;h<v;h++){var g=e[h];i.rowsManager.addRow(g,f)}i.api.data.raise.change(e,n),i.api.data.raise.load(e)}})}return(0,s.default)(t,[{key:"keyHandler",value:function(t){return this.shiftKey=t.shiftKey,!0}},{key:"getMagnetValueAndUnit",value:function(){if(this.shiftKey){if(void 0!==this.shiftColumnMagnetValue&&void 0!==this.shiftColumnMagnetUnit)return[this.shiftColumnMagnetValue,this.shiftColumnMagnetUnit];var t=this.options.value("viewScale");t=t.trim();var e=void 0,n=void 0,i=void 0;return t&&(i=t.split(" ")),i&&i.length>1?(e=parseFloat(i[0]),n=c.default.normalizeUnits(i[i.length-1])):(e=1,n=c.default.normalizeUnits(t)),[.25*e,n]}return[this.columnMagnetValue,this.columnMagnetUnit]}},{key:"getMagnetDate",value:function(t,e){if(void 0!==t){c.default.isMoment(c.default)||(t=(0,c.default)(t));var n=this.columnsManager.getColumnByDate(t,e),i=this.getMagnetValueAndUnit(),r=i[0],a=i[1];return n.getMagnetDate(t,r,a,this.options.value("timeFramesMagnet"))}}},{key:"getDateByPosition",value:function(t,e,n){var i=this.columnsManager.getColumnByPosition(t,n);if(void 0!==i){var r=void 0,a=void 0;if(e){var o=this.getMagnetValueAndUnit();r=o[0],a=o[1]}return i.getDateByPosition(t-i.left,r,a,this.options.value("timeFramesMagnet"))}}},{key:"getBodyAvailableWidth",value:function(){var t=this.getWidth()-this.side.getWidth(),e=this.scroll.getBordersWidth(),n=t-(void 0!==e?this.scroll.getBordersWidth():0);return n-=1}},{key:"getPositionByDate",value:function(t,e){if(void 0!==t){c.default.isMoment(c.default)||(t=(0,c.default)(t));var n=this.columnsManager.getColumnByDate(t,e);return void 0!==n?n.getPositionByDate(t):void 0}}},{key:"loadData",value:function(e){if(Array.isArray(e)||(e=void 0!==e?[e]:[]),void 0===this.$scope.data)this.$scope.data=e;else for(var n=0,i=e.length;n<i;n++){var r=e[n],a=t.ganttArrays.indexOfId(this.$scope.data,r.id);a>-1?this.$scope.data[a]=r:this.$scope.data.push(r)}var o=this.side.getWidth();o>0&&this.options.set("sideWidth",o)}},{key:"getData",value:function(){return this.$scope.data}},{key:"removeData",value:function(e){if(Array.isArray(e)||(e=void 0!==e?[e]:[]),void 0!==this.$scope.data)for(var n=0,i=e.length;n<i;n++){var r=e[n],a=t.ganttArrays.indexOfId(this.$scope.data,r.id);if(a>-1)if(void 0===r.tasks||0===r.tasks.length)this.$scope.data.splice(a,1);else for(var o=this.$scope.data[a],s=0,l=r.tasks.length;s<l;s++){var u=r.tasks[s],d=t.ganttArrays.indexOfId(o.tasks,u.id);d>-1&&o.tasks.splice(d,1)}}}},{key:"clearData",value:function(){this.$scope.data=void 0}},{key:"getWidth",value:function(){return this.$scope.ganttElementWidth}},{key:"getHeight",value:function(){return this.$scope.ganttElementHeight}},{key:"getContainerWidth",value:function(){return this.$scope.ganttContainerWidth}},{key:"getContainerHeight",value:function(){return this.$scope.ganttContainerHeight}},{key:"initialized",value:function(){var e=this;this.api.core.raise.ready(this.api),this.rendered=!0,this.columnsManager.generateColumns(),t.$timeout(function(){var t=e.side.getWidth();t>0&&e.options.set("sideWidth",t),e.api.core.raise.rendered(e.api)})}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttRow=e.GanttRowModel=void 0;var r=n(4),a=i(r),o=n(5),s=i(o),l=n(1),u=i(l),d=n(0),c=i(d);e.default=["GanttTask","$filter",function(t,e){"ngInject";return m.GanttTask=t,m.$filter=e,m}];var f=n(3),h=i(f),v=n(2),g=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(v),m=(e.GanttRowModel=function t(){(0,c.default)(this,t)},e.GanttRow=function(){function t(e,n){(0,c.default)(this,t),this.rowsManager=e,this.model=n,this.from=void 0,this.to=void 0,this.tasksMap={},this.tasks=[],this.filteredTasks=[],this.visibleTasks=[]}return(0,u.default)(t,[{key:"addTaskImpl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.tasksMap[t.model.id]=t,this.tasks.push(t),e||(void 0===this.model.tasks&&(this.model.tasks=[]),-1===this.model.tasks.indexOf(t.model)&&this.model.tasks.push(t.model))}},{key:"addTask",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,r=!1;if(this.rowsManager.gantt.objectModel.cleanTask(e),e.id in this.tasksMap){if(i=this.tasksMap[e.id],i.model===e)return i;i.model=e,r=!0}else i=new t.GanttTask(this,e),this.addTaskImpl(i,n);return this.sortTasks(),this.setFromToByTask(i),n||(r?this.rowsManager.gantt.api.tasks.raise.change(i):this.rowsManager.gantt.api.tasks.raise.add(i)),i}},{key:"moveTaskToRow",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.rowsManager.gantt.api.tasks.raise.beforeViewRowChange(t,this),e||this.rowsManager.gantt.api.tasks.raise.beforeRowChange(t,this);var n=t.row;n.removeTask(t.model.id,e,!0),t.row=this,this.addTaskImpl(t,e),this.sortTasks(),this.setFromToByTask(t),t.updatePosAndSize(),this.updateVisibleTasks(),n.$scope.$digest(),t.row.$scope.$digest(),this.rowsManager.gantt.api.tasks.raise.viewRowChange(t,n),e||this.rowsManager.gantt.api.tasks.raise.rowChange(t,n)}},{key:"updateVisibleTasks",value:function(){var e=this.rowsManager.gantt.options.value("filterTask");if(e){"object"===(void 0===e?"undefined":(0,s.default)(e))&&(e={model:e});var n=this.rowsManager.gantt.options.value("filterTaskComparator");"function"==typeof n&&(n=function(t,e){return n(t.model,e.model)}),this.filteredTasks=t.$filter("filter")(this.tasks,e,n)}else this.filteredTasks=this.tasks.slice(0);var i=this.rowsManager.gantt.options.value("taskLimitThreshold");void 0===i||i>0&&this.filteredTasks.length>=i?this.visibleTasks=t.$filter("ganttTaskLimit")(this.filteredTasks,this.rowsManager.gantt):this.visibleTasks=this.filteredTasks}},{key:"updateTasksPosAndSize",value:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=(0,a.default)(this.tasks);!(t=(i=r.next()).done);t=!0){i.value.updatePosAndSize()}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}},{key:"removeTask",value:function(t,e,n){if(t in this.tasksMap){var i=this.tasksMap[t],r=void 0,a=void 0;for(a=this.tasks.length-1;a>=0;a--)if(r=this.tasks[a],r.model.id===t){this.tasks.splice(a,1),(this.from&&this.from.isSame((0,h.default)(r.model.from))||this.to&&this.to.isSame((0,h.default)(r.model.to)))&&this.setFromTo();break}for(a=this.filteredTasks.length-1;a>=0;a--)if(r=this.filteredTasks[a],r.model.id===t){this.filteredTasks.splice(a,1);break}for(a=this.visibleTasks.length-1;a>=0;a--)if(r=this.visibleTasks[a],r.model.id===t){this.visibleTasks.splice(a,1);break}if(!e){if(delete this.tasksMap[t],void 0!==this.model.tasks){var o=this.model.tasks.indexOf(i.model);o>-1&&this.model.tasks.splice(o,1)}n||this.rowsManager.gantt.api.tasks.raise.remove(i)}return i}}},{key:"removeAllTasks",value:function(){this.from=void 0,this.to=void 0,this.tasksMap={},this.tasks=[],this.filteredTasks=[],this.visibleTasks=[]}},{key:"setFromTo",value:function(){this.from=void 0,this.to=void 0;var t=!0,e=!1,n=void 0;try{for(var i,r=(0,a.default)(this.tasks);!(t=(i=r.next()).done);t=!0){var o=i.value;this.setFromToByTask(o)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}},{key:"setFromToByTask",value:function(t){this.setFromToByValues(t.model.from,t.model.to)}},{key:"setFromToByValues",value:function(t,e){void 0!==t&&(void 0===this.from?this.from=(0,h.default)(t):t<this.from&&(this.from=(0,h.default)(t))),void 0!==e&&(void 0===this.to?this.to=(0,h.default)(e):e>this.to&&(this.to=(0,h.default)(e)))}},{key:"sortTasks",value:function(){this.tasks.sort(function(t,e){return t.left-e.left})}},{key:"clone",value:function(){var e=new t(this.rowsManager,g.copy(this.model)),n=!0,i=!1,r=void 0;try{for(var o,s=(0,a.default)(this.tasks);!(n=(o=s.next()).done);n=!0){var l=o.value;e.addTask(l.model)}}catch(t){i=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw r}}return e}}]),t}())},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttTask=e.GanttTaskModel=void 0;var r=n(1),a=i(r),o=n(0),s=i(o);e.default=function(){"ngInject";return f};var l=n(2),u=i(l),d=n(3),c=i(d),f=(e.GanttTaskModel=function t(){(0,s.default)(this,t)},e.GanttTask=function(){function t(e,n){(0,s.default)(this,t),this.rowsManager=e.rowsManager,this.row=e,this.model=n,this.truncatedLeft=!1,this.truncatedRight=!1}return(0,a.default)(t,[{key:"isMilestone",value:function(){return!this.model.to||this.model.to.isSame(this.model.from)}},{key:"isOutOfRange",value:function(){var t=this.rowsManager.gantt.columnsManager.getFirstColumn(),e=this.rowsManager.gantt.columnsManager.getLastColumn();return void 0===t||this.model.to<t.date||void 0===e||this.model.from>e.endDate}},{key:"updatePosAndSize",value:function(){var t=this.left,e=this.width,n=this.truncatedRight,i=this.truncatedLeft;!this.isMoving&&this.isOutOfRange()?(this.modelLeft=void 0,this.modelWidth=void 0):(this.modelLeft=this.rowsManager.gantt.getPositionByDate(this.model.from),this.modelWidth=this.rowsManager.gantt.getPositionByDate(this.model.to)-this.modelLeft);var r=this.rowsManager.gantt.columnsManager.getLastColumn(),a=r?r.left+r.width:0,o=this.modelLeft,s=this.modelWidth;this.rowsManager.gantt.options.value("daily")&&(o=this.rowsManager.gantt.getPositionByDate((0,c.default)(this.model.from).startOf("day")),s=this.rowsManager.gantt.getPositionByDate((0,c.default)(this.model.to).endOf("day"))-o);var l=-s;o<l&&(o=l),o>a&&(o=a),void 0===o||void 0===s?(this.left=void 0,this.width=void 0):(this.left=o,this.width=s,o<0?(this.truncatedLeft=!0,this.truncatedLeftOffset=-o,this.truncatedRight=!1,this.truncatedRightOffset=void 0):s+o>this.rowsManager.gantt.width?(this.truncatedRight=!0,this.truncatedRightOffset=s+o-this.rowsManager.gantt.width,this.truncatedLeft=!1,this.truncatedLeftOffset=void 0):(this.truncatedLeft=!1,this.truncatedLeftOffset=void 0,this.truncatedRight=!1,this.truncatedRightOffset=s+o-this.rowsManager.gantt.width),this.width<0&&(this.left=this.left+this.width,this.width=-this.width)),this.updateView(),this.rowsManager.gantt.isRefreshingColumns||t===this.left&&e===this.width&&n===this.truncatedRight&&i===this.truncatedLeft||this.rowsManager.gantt.api.tasks.raise.viewChange(this)}},{key:"updateView",value:function(){if(this.$element)if(void 0===this.left||void 0===this.width)this.$element.css("display","none");else{if(this.$element.css({left:this.left+"px",width:this.width+"px",display:""}),this.model.priority>0){var t=this.model.priority,e=this.$element.children();this.$element.css("z-index",t);for(var n=0;n<e.length;n++)u.default.element(e[n]).css("z-index",t)}this.$element.toggleClass("gantt-task-milestone",this.isMilestone())}}},{key:"getBackgroundElement",value:function(){if(void 0===this.$element);else{var t=this.$element[0].querySelector(".gantt-task-background");if(void 0!==t)return u.default.element(t)}}},{key:"getContentElement",value:function(){if(void 0===this.$element);else{var t=this.$element[0].querySelector(".gantt-task-content");if(void 0!==t)return u.default.element(t)}}},{key:"getForegroundElement",value:function(){if(void 0!==this.$element){var t=this.$element[0].querySelector(".gantt-task-foreground");return void 0!==t?u.default.element(t):t}}},{key:"setFrom",value:function(t,e){this.model.from=this.rowsManager.gantt.getDateByPosition(t,e),this.row.setFromTo(),this.updatePosAndSize()}},{key:"setTo",value:function(t,e){this.model.to=this.rowsManager.gantt.getDateByPosition(t,e),this.row.setFromTo(),this.updatePosAndSize()}},{key:"moveTo",value:function(t,e){var n=void 0,i=void 0;t>this.modelLeft?(this.model.to=this.rowsManager.gantt.getDateByPosition(t+this.modelWidth,e),n=this.rowsManager.gantt.getPositionByDate(this.model.to),i=n-this.modelWidth,this.model.from=this.rowsManager.gantt.getDateByPosition(i,!1)):(this.model.from=this.rowsManager.gantt.getDateByPosition(t,e),i=this.rowsManager.gantt.getPositionByDate(this.model.from),n=i+this.modelWidth,this.model.to=this.rowsManager.gantt.getDateByPosition(n,!1)),this.row.setFromTo(),this.updatePosAndSize()}},{key:"clone",value:function(){return new t(this.row,u.default.copy(this.model))}}]),t}())},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GanttBodyBackground=void 0;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(){"ngInject";return a};var a=e.GanttBodyBackground=function t(e){(0,r.default)(this,t),this.body=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GanttBodyColumns=void 0;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(){"ngInject";return a};var a=e.GanttBodyColumns=function t(e){(0,r.default)(this,t),this.body=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GanttBodyForeground=void 0;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(){"ngInject";return a};var a=e.GanttBodyForeground=function t(e){(0,r.default)(this,t),this.body=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GanttBodyRows=void 0;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(){"ngInject";return a};var a=e.GanttBodyRows=function t(e){(0,r.default)(this,t),this.body=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GanttHeaderColumns=void 0;var i=n(0),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(){"ngInject";return a};var a=e.GanttHeaderColumns=function t(e){(0,r.default)(this,t),this.$element=e}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Timespan=e.TimespanModel=void 0;var r=n(1),a=i(r),o=n(0),s=i(o);e.default=function(){"ngInject";return d};var l=n(2),u=i(l),d=(e.TimespanModel=function t(){(0,s.default)(this,t)},e.Timespan=function(){function t(e,n){(0,s.default)(this,t),this.gantt=e,this.model=n}return(0,a.default)(t,[{key:"updatePosAndSize",value:function(){this.modelLeft=this.gantt.getPositionByDate(this.model.from),this.modelWidth=this.gantt.getPositionByDate(this.model.to)-this.modelLeft;var t=this.gantt.columnsManager.getLastColumn(),e=t?t.left+t.width:0,n=this.modelLeft,i=this.modelWidth,r=-i;n<r&&(n=r),n>e&&(n=e),void 0===n||void 0===i?(this.left=void 0,this.width=void 0):(this.left=n,this.width=i,n<0?(this.truncatedLeft=!0,this.truncatedLeftOffset=-n,this.truncatedRight=!1,this.truncatedRightOffset=void 0):i+n>this.gantt.width?(this.truncatedRight=!0,this.truncatedRightOffset=i+n-this.gantt.width,this.truncatedLeft=!1,this.truncatedLeftOffset=void 0):(this.truncatedLeft=!1,this.truncatedLeftOffset=void 0,this.truncatedRight=!1,this.truncatedRightOffset=i+n-this.gantt.width),this.width<0&&(this.left=this.left+this.width,this.width=-this.width)),this.updateView()}},{key:"updateView",value:function(){this.$element&&(void 0===this.left||void 0===this.width?this.$element.css("display","none"):(this.$element.css("display",""),this.$element.css("left",this.left+"px"),this.$element.css("width",this.width+"px")))}},{key:"setFrom",value:function(t){this.from=this.gantt.getDateByPosition(t),this.updatePosAndSize()}},{key:"setTo",value:function(t){this.to=this.gantt.getDateByPosition(t),this.updatePosAndSize()}},{key:"moveTo",value:function(t){this.from=this.gantt.getDateByPosition(t),this.to=this.gantt.getDateByPosition(t+this.width),this.updatePosAndSize()}},{key:"clone",value:function(){return new t(this.gantt,u.default.copy(this.model))}}]),t}())},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=i(r),o=n(1),s=i(o),l=function(){function t(){(0,a.default)(this,t)}return(0,s.default)(t,[{key:"moveToIndex",value:function(t,e,n){if(n>=t.length)for(var i=n-t.length;1+i--;)t.push(void 0);return t.splice(n,0,t.splice(e,1)[0]),t}},{key:"getRemovedIds",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id",i=void 0,r=void 0,a=[];if(void 0!==e)for(i=0,r=e.length;i<r;i++)a.push(e[i][n]);if(void 0!==t)for(i=0,r=t.length;i<r;i++){var o=t[i];if(void 0!==o[n]){var s=a.indexOf(o[n]);s>-1&&a.splice(s,1)}}return a}},{key:"indexOfId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id",i=void 0;if(n instanceof Array){for(i=t.length-1;i>=0;i--){for(var r=t[i],a=0,o=n.length;a<o;a++)r=r[n[a]];if(r===e)return i}return-1}for(i=t.length-1;i>=0;i--)if(t[i][n]===e)return i;return-1}},{key:"removeId",value:function(t,e,n){var i=this.indexOfId(t,e,n);if(i>-1)return t.splice(i,1)[0]}},{key:"remove",value:function(t,e){var n=t.indexOf(e);return n>-1&&(t.splice(n,1),!0)}}]),t}();e.default=l},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=i(r),o=n(1),s=i(o),l=function(){function t(){(0,a.default)(this,t)}return(0,s.default)(t,[{key:"getIndicesOnly",value:function(t,e,n,i){for(var r=-1,a=t.length;a-r>1;){var o=Math.floor((r+a)/2);(i?n(t[o])<e:n(t[o])<=e)?r=o:a=o}return i||void 0===t[r]||n(t[r])!==e||(a=r),[r,a]}},{key:"get",value:function(t,e,n,i){var r=this.getIndicesOnly(t,e,n,i);return[t[r[0]],t[r[1]]]}}]),t}();e.default=l},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(){"ngInject";return c}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttHierarchy=void 0;var a=n(4),o=i(a),s=n(0),l=i(s),u=n(1),d=i(u);e.default=r;var c=e.GanttHierarchy=function(){function t(){(0,l.default)(this,t),this.nameToRow={},this.idToRow={},this.nameToChildren={},this.idToChildren={},this.nameToParent={},this.idToParent={}}return(0,d.default)(t,[{key:"registerChildRow",value:function(t,e){if(void 0!==e){var n=this.nameToChildren[t.model.name];void 0===n&&(n=[],this.nameToChildren[t.model.name]=n),n.push(e);var i=this.idToChildren[t.model.id];void 0===i&&(i=[],this.idToChildren[t.model.id]=i),i.push(e),this.nameToParent[e.model.name]=t,this.idToParent[e.model.id]=t}}},{key:"refresh",value:function(t){this.nameToRow={},this.idToRow={},this.nameToChildren={},this.idToChildren={},this.nameToParent={},this.idToParent={};for(var e=void 0,n=0;n<t.length;n++)e=t[n],this.nameToRow[e.model.name]=e,this.idToRow[e.model.id]=e;for(var i=0;i<t.length;i++){if(e=t[i],void 0!==e.model.parent){var r=this.nameToRow[e.model.parent];void 0===r&&(r=this.idToRow[e.model.parent]),void 0!==r&&this.registerChildRow(r,e)}if(void 0!==e.model.children){var a=e.model.children,s=!0,l=!1,u=void 0;try{for(var d,c=(0,o.default)(a);!(s=(d=c.next()).done);s=!0){var f=d.value,h=this.nameToRow[f];void 0===h&&(h=this.idToRow[f]),void 0!==h&&this.registerChildRow(e,h)}}catch(t){l=!0,u=t}finally{try{!s&&c.return&&c.return()}finally{if(l)throw u}}}}for(var v=[],g=0;g<t.length;g++)e=t[g],void 0===this.parent(e)&&v.push(e);return v}},{key:"children",value:function(t){return this.idToChildren[t.model.id]}},{key:"descendants",value:function(t){var e=[],n=this.children(t);if(e.push.apply(e,n),void 0!==n){var i=!0,r=!1,a=void 0;try{for(var s,l=(0,o.default)(n);!(i=(s=l.next()).done);i=!0){var u=s.value,d=this.descendants(u);e.push.apply(e,d)}}catch(t){r=!0,a=t}finally{try{!i&&l.return&&l.return()}finally{if(r)throw a}}}return e}},{key:"parent",value:function(t){return this.idToParent[t.model.id]}},{key:"ancestors",value:function(t){for(var e=[],n=this.parent(t);void 0!==n;)e.push(n),n=this.parent(n);return e}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=i(r),o=n(1),s=i(o),l=n(2),u=i(l),d=function(){function t(){(0,a.default)(this,t),this.seedId=(new Date).getTime()}return(0,s.default)(t,[{key:"createBoundedWrapper",value:function(t,e){return function(){return e.apply(t,arguments)}}},{key:"firstProperty",value:function(t,e,n){for(var i=0,r=t.length;i<r;i++){var a=t[i];if(void 0!==a&&e in a&&void 0!==a[e])return a[e]}return n}},{key:"angularIndexOf",value:function(t,e){for(var n=0;n<t.length;n++)if(u.default.equals(t[n],e))return n;return-1}},{key:"random4",value:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}},{key:"randomUuid",value:function(){return this.random4()+this.random4()+"-"+this.random4()+"-"+this.random4()+"-"+this.random4()+"-"+this.random4()+this.random4()+this.random4()}},{key:"newId",value:function(){return this.seedId+=1}}]),t}();e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["ganttBinarySearch",function(t){"ngInject";var e=function(t){return t.left};return function(n,i){var r=i.scroll.getScrollLeft(),a=i.getWidth()-i.side.getWidth();if(a>0){var o=t.getIndicesOnly(n,r,e)[0],s=t.getIndicesOnly(n,r+a,e)[1];return n.slice(o,s)}return n.slice()}}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return function(t,e){var n=e.columnsManager.getFirstColumn(),i=e.columnsManager.getLastColumn();if(void 0!==n&&void 0!==i){for(var r=n.date,a=i.endDate,o=[],s=e.scroll.getScrollLeft(),l=e.getWidth()-e.side.getWidth(),u=0,d=t.length;u<d;u++){var c=t[u];c.active?o.push(c):c.model.to>=r&&c.model.from<=a&&(void 0===c.left&&c.updatePosAndSize(),(!l||c.left>=s&&c.left<=s+l||c.left+c.width>=s&&c.left+c.width<=s+l||c.left<s&&c.left+c.width>s+l)&&o.push(c))}return o}return t.splice(0)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["$document","$parse","$timeout","ganttMouseOffset",function(t,e,n,i){"ngInject";return{restrict:"A",require:"^gantt",scope:{targetElement:"=ganttResizer",enabled:"@?ganttResizerEnabled"},link:function(r,a,o,s){function l(){return s.gantt.options.value(o.resizerWidth)}function u(t){t!==l()&&(s.gantt.options.set(o.resizerWidth,t),void 0!==g&&v[g].raise.resize(t),n(function(){s.gantt.columnsManager.updateColumnsMeta()}))}function d(t){t.preventDefault(),u(void 0)}function c(t){r.$evalAsync(function(){var e=i.getOffsetForElement(r.targetElement[0],t),n=s.gantt.getWidth()-s.gantt.scroll.getBordersWidth();u(Math.min(Math.max(e.x,0),n))})}function f(){void 0!==g&&v[g].raise.resizeEnd(l()),t.unbind("mousemove",c),t.unbind("mouseup",f)}function h(e){e.preventDefault(),void 0!==g&&v[g].raise.resizeBegin(l()),t.on("mousemove",c),t.on("mouseup",f)}var v=s.gantt.api,g=o.ganttResizerEventTopic;void 0===r.enabled&&(r.enabled=!0),o.$observe("ganttResizerEnabled",function(t){r.enabled=e(t)()}),r.$watch("enabled",function(t){void 0===t&&(t=!0),a.toggleClass("gantt-resizer-enabled",t),t?(a.on("dblclick",d),a.on("mousedown",h)):(a.off("dblclick",d),a.off("mousedown",h))}),r.$watch(function(){return l()},function(t,e){t!==e&&(r.targetElement.css("width",t+"px"),r.targetElement[0].offsetWidth>0&&u(r.targetElement[0].offsetWidth))}),g&&(v.registerEvent(g,"resize"),v.registerEvent(g,"resizeBegin"),v.registerEvent(g,"resizeEnd"),v.registerMethod(g,"setWidth",u,this),v.registerMethod(g,"getWidth",l,this))}}}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",require:"^ganttScrollManager",link:function(t,e,n,i){i.registerHorizontalReceiver(e)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",scope:{},controller:["$scope",function(t){t.horizontal=[],t.vertical=[],this.registerVerticalReceiver=function(e){e.css("position","relative"),t.vertical.push(e[0])},this.registerHorizontalReceiver=function(e){e.css("position","relative"),t.horizontal.push(e[0])},this.getHorizontalRecievers=function(){return t.horizontal},this.getVerticalRecievers=function(){return t.vertical}}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",require:["^gantt","^ganttScrollManager"],link:function(t,e,n,i){var r=e[0],a=function(){var t=void 0,e=void 0,n=i[1].getVerticalRecievers();for(t=0,e=n.length;t<e;t++){var a=n[t];a.parentNode.scrollTop!==r.scrollTop&&(a.parentNode.scrollTop=r.scrollTop)}var o=i[1].getHorizontalRecievers();for(t=0,e=o.length;t<e;t++){var s=o[t];s.parentNode.scrollLeft!==r.scrollLeft&&(s.parentNode.scrollLeft=r.scrollLeft)}};e.bind("scroll",a),t.$watch(function(){return i[0].gantt.width},function(t,e){if(t!==e)for(var n=i[1].getHorizontalRecievers(),r=0,a=n.length;r<a;r++){var o=n[r];o.style.width=t+"px"}})}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder","$timeout","ganttDebounce",function(t,e,n){"ngInject";var i=new t("ganttScrollable");return i.controller=function(t,i){t.gantt.scroll.$element=i;var a=void 0,o=void 0,s=function(e,n,i){var a=t.gantt.options.value("autoExpand");if("both"===a||!0===a||a===i){var o=void 0,s=void 0,l=t.gantt.options.value("viewScale");l=l.trim(),"s"===l.charAt(l.length-1)&&(l=l.substring(0,l.length-1));var u=void 0,d=void 0,c=void 0;l&&(c=l.split(" ")),c&&c.length>1?(u=parseFloat(c[0]),d=c[c.length-1]):(u=1,d=l),"left"===i?(o=(0,r.default)(n).add(-5*u,d),t.fromDate=o):(s=(0,r.default)(n).add(5*u,d),t.toDate=s),t.gantt.api.scroll.raise.scroll(e.scrollLeft,n,i)}};i.bind("scroll",n(function(){var n=i[0],r=n.scrollLeft,l=void 0,u=void 0;t.gantt.scroll.cachedScrollLeft=r,t.gantt.columnsManager.updateVisibleColumns(),t.gantt.rowsManager.updateVisibleObjects(),r<a&&0===r?(l="left",u=t.gantt.columnsManager.from):r>a&&n.offsetWidth+r>=n.scrollWidth-1&&(l="right",u=t.gantt.columnsManager.to),a=r,void 0!==u?(o&&e.cancel(o),o=e(function(){s(n,u,l)},300)):t.gantt.api.scroll.raise.scroll(r)},5)),t.getScrollableCss=function(){var e={},n=t.gantt.options.value("maxHeight");n||(n=t.gantt.getContainerHeight()),n>0&&(e["max-height"]=n-t.gantt.header.getHeight()+"px",e["overflow-y"]="auto",t.gantt.scroll.isVScrollbarVisible()&&(e["border-right"]="none"));var i=this.gantt.options.value("columnWidth"),r=0!==t.gantt.width&&t.gantt.width<t.gantt.getWidth()-t.gantt.side.getWidth();return void 0!==i&&r&&(e.width=t.gantt.width+this.gantt.scroll.getBordersWidth()+"px"),e}},i.build()}];var i=n(3),r=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",require:"^ganttScrollManager",link:function(t,e,n,i){i.registerVerticalReceiver(e)}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",controller:["$scope","$element","$attrs",function(t,e,n){var i=n.ganttContainerHeightListener;""===i&&(i="ganttContainerHeight");for(var r=t;0===i.indexOf("$parent.");)i=i.substring("$parent.".length),r=r.$parent;r.$watch(function(){var t=e[0].parentElement?e[0].parentElement.parentElement:void 0;if(t){var n=t.offsetHeight,i=getComputedStyle(t);return n=n-parseInt(i.marginTop,10)-parseInt(i.marginBottom,10)}return 0},function(t){t>0&&(r[i]=t)})}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",controller:["$scope","$element","$attrs",function(t,e,n){var i=n.ganttContainerWidthListener;""===i&&(i="ganttContainerWidth");for(var r=t;0===i.indexOf("$parent.");)i=i.substring("$parent.".length),r=r.$parent;r.$watch(function(){var t=e[0].parentElement?e[0].parentElement.parentElement:void 0;if(t){var n=t.offsetWidth,i=getComputedStyle(t);return n=n-parseInt(i.marginLeft,10)-parseInt(i.marginRight,10)}return 0},function(t){t>0&&(r[i]=t)})}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",controller:["$scope","$element","$attrs",function(t,e,n){var i=n.ganttElementHeightListener;""===i&&(i="ganttElementHeight");for(var r=e[0],a=t;0===i.indexOf("$parent.");)i=i.substring("$parent.".length),a=a.$parent;a.$watch(function(){return r.clientHeight},function(t){t>0&&(a[i]=t)})}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"ngInject";return{restrict:"A",controller:["$scope","$element","$attrs",function(t,e,n){var i=n.ganttElementWidthListener;""===i&&(i="ganttElementWidth");for(var r=e[0],a=t;0===i.indexOf("$parent.");)i=i.substring("$parent.".length),a=a.$parent;a.$watch(function(){return r.clientWidth},function(t){t>0&&(a[i]=t)})}]}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttBody");return e.controller=function(t,e){t.gantt.body.$element=e,t.gantt.body.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttBodyBackground");return e.controller=function(t,e){t.gantt.body.background.$element=e,t.gantt.body.background.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttBodyColumns");return e.controller=function(t,e){t.gantt.body.columns.$element=e,t.gantt.body.background.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttBodyForeground");return e.controller=function(t,e){t.gantt.body.foreground.$element=e,t.gantt.body.foreground.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttBodyRows");return e.controller=function(t,e){t.gantt.body.rows.$element=e,t.gantt.body.rows.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttColumn");return e.controller=function(t,e){t.column.$element=e,t.column.$scope=t,t.column.updateView()},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttColumnHeader");return e.controller=function(t,e){t.column.$element=e,t.column.$scope=t,t.column.updateView()},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttHeader");return e.controller=function(t,e){t.gantt.header.$element=e,t.gantt.header.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttHeaderColumns");return e.controller=function(t,e){t.gantt.header.columns.$element=e,t.gantt.header.columns.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttRow");return e.controller=function(t,e){t.row.$element=e,t.row.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";return new t("ganttRowBackground").build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttRowLabel");return e.restrict="A",e.templateUrl=void 0,e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder","ganttLayout",function(t,e){"ngInject";var n=new t("ganttScrollableHeader");return n.controller=function(t){var n=e.getScrollBarWidth();t.getScrollableHeaderCss=function(){var e={},i=t.gantt.scroll.isVScrollbarVisible(),r=i?n:0,a=this.gantt.options.value("columnWidth"),o=0!==t.gantt.width&&t.gantt.width<t.gantt.getWidth()-t.gantt.side.getWidth();return void 0!==a&&o?e.width=t.gantt.width-r+this.gantt.scroll.getBordersWidth()+"px":i&&(e.width=t.gantt.getWidth()-t.gantt.side.getWidth()-r+"px"),e}},n.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttSide");return e.controller=function(t,e){t.gantt.side.$element=e,t.gantt.side.$scope=t},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder","ganttLayout",function(t,e){"ngInject";var n=new t("ganttSideBackground");return n.controller=function(t){var n=e.getScrollBarHeight();t.getMaxHeightCss=function(){var e={},i=t.maxHeight;i||(i=t.gantt.getContainerHeight());var r=t.gantt.scroll.isHScrollbarVisible()?n:0;return e["max-height"]=i-r-t.gantt.header.getHeight()+"px",e}},n.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";return new t("ganttSideContent").build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttTask");return e.controller=function(t,e){t.task.$element=e,t.task.$scope=t,t.getTaskContent=function(){return void 0!==t.task.model.content?t.task.model.content:t.task.rowsManager.gantt.options.value("taskContent")},t.simplifyMoment=function(t){return r.default.isMoment(t)?t.unix():t},t.$watchGroup(["simplifyMoment(task.model.from)","simplifyMoment(task.model.to)"],function(){t.task.updatePosAndSize()})},e.build()}];var i=n(3),r=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";return new t("ganttTaskBackground").build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";return new t("ganttTaskContent").build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";return new t("ganttTaskForeground").build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttTimeFrame");return e.controller=function(t,e){t.timeFrame.$element=e,t.timeFrame.$scope=t,t.timeFrame.updateView()},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["GanttDirectiveBuilder",function(t){"ngInject";var e=new t("ganttTimespan");return e.controller=function(t,e){t.timespan.$element=e,t.timespan.$scope=t,t.timespan.updateView()},e.build()}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["$timeout",function(t){"ngInject";function e(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0;return function(){var a=this,o=arguments;r++;var s=function(t){return function(){if(t===r)return e.apply(a,o)}}(r);return t(s,n,void 0===i||i)}}return e}]},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttDirectiveBuilder=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=["$templateCache",function(t){"ngInject";return l.$templateCache=t,l}];var l=e.GanttDirectiveBuilder=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"^gantt",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"E";(0,a.default)(this,t),this.directiveName=e,this.templateUrl=void 0===n?"template/"+e+".tmpl.html":n,this.require=void 0===i?"^gantt":i,this.restrict=void 0===r?"E":r,this.scope=!1,this.transclude=!0,this.replace=!0}return(0,s.default)(t,[{key:"build",value:function(){var e=this.directiveName,n=this.templateUrl,i=this.controller,r={restrict:this.restrict,require:this.require,transclude:this.transclude,replace:this.replace,scope:this.scope,templateUrl:function(e,i){return void 0!==i.templateUrl&&(n=i.templateUrl),void 0!==i.template&&t.$templateCache.put(n,i.template),n},compile:function(){return{pre:function(t,n,i,r){t.gantt.api.directives.raise.preLink(e,t,n,i,r)},post:function(t,n,i,r){t.gantt.api.directives.raise.postLink(e,t,n,i,r)}}},controller:["$scope","$element","$attrs",function(t,n,r){"ngInject";var a=this;void 0!==i&&i(t,n,r,a),t.gantt.api.directives.raise.controller(e,t,n,r,a),t.$on("$destroy",function(){t.gantt.api.directives.raise.destroy(e,t,n,r,a)}),t.$applyAsync(function(){t.gantt.api.directives.raise.new(e,t,n,r,a)})}]};return n||(delete r.templateUrl,delete r.replace,delete r.transclude),r}}]),t}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=i(r),o=n(1),s=i(o),l=function(){function t(e){"ngInject";(0,a.default)(this,t),this.$document=e}return t.$inject=["$document"],(0,s.default)(t,[{key:"elementFromPoint",value:function(t,e){return this.$document[0].elementFromPoint(t,e)}},{key:"elementsFromPoint",value:function(t,e,n){for(var i=[],r=[],a=0,o=void 0,s=void 0,l=void 0,u=void 0;(o=this.elementFromPoint(t,e))&&-1===i.indexOf(o)&&null!==o&&(void 0===n||a<n);)i.push(o),r.push({value:o.style.getPropertyValue("visibility"),priority:o.style.getPropertyPriority("visibility")}),o.style.setProperty("visibility","hidden","important"),a++;for(s=0,l=r.length;s<l;s++)u=r[s],i[s].style.setProperty("visibility",u.value?u.value:"",u.priority);return i}},{key:"findElementFromPoint",value:function(t,e,n){for(var i=[],r=[],a=0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0;(o=this.elementFromPoint(t,e))&&-1===i.indexOf(o)&&null!==o;)if(i.push(o),r.push({value:o.style.getPropertyValue("visibility"),priority:o.style.getPropertyPriority("visibility")}),o.style.setProperty("visibility","hidden","important"),a++,n(o)){s=o;break}for(l=0,u=r.length;l<u;l++)d=r[l],i[l].style.setProperty("visibility",d.value?d.value:"",d.priority);return s}},{key:"isElementVisible",value:function(t){return void 0!==t.offsetParent&&null!==t.offsetParent}}]),t}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["$injector",function(t){"ngInject";var e=void 0;try{e=t.get("$animate")}catch(t){}return void 0!==e?function(t,n){r.default.version.major>=1&&r.default.version.minor>=4?e.enabled(t,n):e.enabled(n,t)}:function(){}}];var i=n(2),r=function(t){return t&&t.__esModule?t:{default:t}}(i)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=["$compile",function(t){"ngInject";return{restrict:"A",require:"^gantt",link:function(e,n,i,r){e.scope=r.gantt.$scope.$parent,e.$watch(function(){return e.$eval(i.ganttBindCompileHtml)},function(i){n.html(i),t(n.contents())(e)})}}}]},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(4),a=i(r),o=n(0),s=i(o),l=n(1),u=i(l),d=function(){function t(e){"ngInject";(0,s.default)(this,t),this.$document=e}return t.$inject=["$document"],(0,u.default)(t,[{key:"getScrollBarWidth",value:function(){var t=this.$document[0].createElement("p");t.style.width="100%",t.style.height="200px";var e=this.$document[0].createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),this.$document[0].body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;return n===i&&(i=e.clientWidth),this.$document[0].body.removeChild(e),n-i}},{key:"getScrollBarHeight",value:function(){var t=this.$document[0].createElement("p");t.style.width="200px;",t.style.height="100%";var e=this.$document[0].createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="150px",e.style.height="200px",e.style.overflow="hidden",e.appendChild(t),this.$document[0].body.appendChild(e);var n=t.offsetHeight;e.style.overflow="scroll";var i=t.offsetHeight;return n===i&&(i=e.clientHeight),this.$document[0].body.removeChild(e),n-i}},{key:"setColumnsWidthFactor",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t){var i=!0,r=!1,o=void 0;try{for(var s,l=(0,a.default)(t);!(i=(s=l.next()).done);i=!0){var u=s.value;u.left=e*(u.originalSize.left+n)-n,u.width=e*u.originalSize.width;var d=!0,c=!1,f=void 0;try{for(var h,v=(0,a.default)(u.timeFrames);!(d=(h=v.next()).done);d=!0){var g=h.value;g.left=e*g.originalSize.left,g.width=e*g.originalSize.width}}catch(t){c=!0,f=t}finally{try{!d&&v.return&&v.return()}finally{if(c)throw f}}}}catch(t){r=!0,o=t}finally{try{!i&&l.return&&l.return()}finally{if(r)throw o}}}}}]),t}();e.default=d},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=i(r),o=n(1),s=i(o),l=function(){function t(){(0,a.default)(this,t)}return(0,s.default)(t,[{key:"getButton",value:function(t){return t=t||window.event,t.which?t.which:void 0===t.button?1:t.button<2?1:4===t.button?2:3}}]),t}();e.default=l},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),a=i(r),o=n(1),s=i(o),l=function(){function t(){(0,a.default)(this,t)}return(0,s.default)(t,[{key:"getTouch",value:function(t){return void 0!==t.touches?t.touches[0]:t}},{key:"getOffset",value:function(t){return t.offsetX&&t.offsetY?{x:t.offsetX,y:t.offsetY}:t.layerX&&t.layerY?{x:t.layerX,y:t.layerY}:this.getOffsetForElement(t.target,t)}},{key:"getOffsetForElement",value:function(t,e){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}}]),t}();e.default=l},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.GanttSmartEvent=void 0;var r=n(0),a=i(r),o=n(1),s=i(o);e.default=function(){"ngInject";return l};var l=e.GanttSmartEvent=function(){function t(e,n,i,r){var o=this;(0,a.default)(this,t),this.$element=n,this.event=i,this.fn=r,e.$on("$destroy",function(){o.$element.unbind(o.event,o.fn)})}return(0,s.default)(t,[{key:"bindOnce",value:function(){this.$element.one(this.event,this.fn)}},{key:"bind",value:function(){this.$element.bind(this.event,this.fn)}},{key:"unbind",value:function(){this.$element.unbind(this.event,this.fn)}}]),t}()},function(t,e){var n="template/gantt.tmpl.html";window.angular.module("ng").run(["$templateCache",function(t){t.put(n,'<div class="gantt unselectable" ng-cloak gantt-scroll-manager gantt-container-height-listener=ganttContainerHeight gantt-container-width-listener=ganttContainerWidth gantt-element-height-listener=ganttElementHeight gantt-element-width-listener=ganttElementWidth> <gantt-side> <gantt-side-background> </gantt-side-background> <gantt-side-content> </gantt-side-content> <div gantt-resizer=gantt.side.$element gantt-resizer-event-topic=side gantt-resizer-enabled="{{$parent.gantt.options.value(\'allowSideResizing\')}}" resizer-width=sideWidth class=gantt-resizer> <div ng-show="$parent.gantt.options.value(\'allowSideResizing\')" class=gantt-resizer-display></div> </div> </gantt-side> <gantt-scrollable-header> <gantt-header gantt-element-height-listener=$parent.ganttHeaderHeight> <gantt-header-columns> <div ng-repeat="header in gantt.columnsManager.visibleHeaders track by $index"> <div class=gantt-header-row ng-class="{\'gantt-header-row-last\': $last, \'gantt-header-row-first\': $first}"> <gantt-column-header ng-repeat="column in header"></gantt-column-header> </div> </div> </gantt-header-columns> </gantt-header> </gantt-scrollable-header> <gantt-scrollable> <gantt-body> <gantt-body-background> <gantt-row-background ng-repeat="row in gantt.rowsManager.visibleRows track by row.model.id"></gantt-row-background> </gantt-body-background> <gantt-body-foreground> <div class=gantt-current-date-line ng-show="currentDate === \'line\' && gantt.currentDateManager.position >= 0 && gantt.currentDateManager.position <= gantt.width" ng-style="{\'left\': gantt.currentDateManager.position + \'px\' }"></div> </gantt-body-foreground> <gantt-body-columns> <gantt-column ng-repeat="column in gantt.columnsManager.visibleColumns"> <gantt-time-frame ng-repeat="timeFrame in column.visibleTimeFrames"></gantt-time-frame> </gantt-column> </gantt-body-columns> <div ng-if="gantt.columnsManager.visibleColumns == 0" style=background-color:grey></div> <gantt-body-rows> <gantt-timespan ng-repeat="timespan in gantt.timespansManager.timespans track by timespan.model.id"></gantt-timespan> <gantt-row ng-repeat="row in gantt.rowsManager.visibleRows track by row.model.id"> <gantt-task ng-repeat="task in row.visibleTasks track by task.model.id"> </gantt-task> </gantt-row> </gantt-body-rows> </gantt-body> </gantt-scrollable> <ng-transclude></ng-transclude> <script type=text/ng-template id=template/ganttBody.tmpl.html> <div ng-transclude class="gantt-body" ng-style="{\'width\': gantt.width > 0 ? gantt.width +\'px\' : undefined}"></div> <\/script> <script type=text/ng-template id=template/ganttHeader.tmpl.html> <div ng-transclude class="gantt-header"\n ng-show="gantt.columnsManager.columns.length > 0 && gantt.columnsManager.headers.length > 0"></div> <\/script> <script type=text/ng-template id=template/ganttSide.tmpl.html> <div ng-transclude class="gantt-side" style="width: auto;"></div> <\/script> <script type=text/ng-template id=template/ganttSideContent.tmpl.html> <div class="gantt-side-content" ng-style="getSideCss()">\n </div> <\/script> <script type=text/ng-template id=template/ganttHeaderColumns.tmpl.html> <div ng-transclude class="gantt-header-columns"\n gantt-horizontal-scroll-receiver></div> <\/script> <script type=text/ng-template id=template/ganttColumnHeader.tmpl.html> <div class="gantt-column-header" ng-class="{\'gantt-column-header-last\': $last, \'gantt-column-header-first\': $first}">{{::column.label}}</div> <\/script> <script type=text/ng-template id=template/ganttBodyBackground.tmpl.html> <div ng-transclude class="gantt-body-background"></div> <\/script> <script type=text/ng-template id=template/ganttBodyForeground.tmpl.html> <div ng-transclude class="gantt-body-foreground"></div> <\/script> <script type=text/ng-template id=template/ganttBodyColumns.tmpl.html> <div ng-transclude class="gantt-body-columns"></div> <\/script> <script type=text/ng-template id=template/ganttColumn.tmpl.html> <div ng-transclude class="gantt-column gantt-foreground-col" ng-class="{\'gantt-column-last\': $last, \'gantt-column-first\': $first}"></div> <\/script> <script type=text/ng-template id=template/ganttTimeFrame.tmpl.html> <div class="gantt-timeframe"></div> <\/script> <script type=text/ng-template id=template/ganttScrollable.tmpl.html> <div ng-transclude class="gantt-scrollable" gantt-scroll-sender ng-style="getScrollableCss()"></div> <\/script> <script type=text/ng-template id=template/ganttScrollableHeader.tmpl.html> <div ng-transclude class="gantt-scrollable-header" ng-style="getScrollableHeaderCss()"></div> <\/script> <script type=text/ng-template id=template/ganttBodyRows.tmpl.html> <div ng-transclude class="gantt-body-rows"></div> <\/script> <script type=text/ng-template id=template/ganttTimespan.tmpl.html> <div class="gantt-timespan" ng-class="timespan.model.classes">\n </div> <\/script> <script type=text/ng-template id=template/ganttTask.tmpl.html> <div class="gantt-task" ng-class="task.model.classes">\n <gantt-task-background></gantt-task-background>\n <gantt-task-foreground></gantt-task-foreground>\n <gantt-task-content></gantt-task-content>\n </div> <\/script> <script type=text/ng-template id=template/ganttTaskBackground.tmpl.html> <div class="gantt-task-background" ng-style="{\'background-color\': task.model.color}"></div> <\/script> <script type=text/ng-template id=template/ganttTaskForeground.tmpl.html> <div class="gantt-task-foreground">\n <div ng-if="task.truncatedRight" class="gantt-task-truncated-right" ng-style="{\'padding-right\': task.truncatedRightOffset + \'px\'}">></div>\n <div ng-if="task.truncatedLeft" class="gantt-task-truncated-left" ng-style="{\'padding-left\': task.truncatedLeftOffset + \'px\'}"><</div>\n </div> <\/script> <script type=text/ng-template id=template/ganttTaskContent.tmpl.html> <div class="gantt-task-content" unselectable="on"><span unselectable="on" gantt-bind-compile-html="getTaskContent()"/></div> <\/script> <script type=text/ng-template id=template/ganttRowBackground.tmpl.html> <div class="gantt-row gantt-row-height"\n ng-class="row.model.classes"\n ng-class-odd="\'gantt-row-odd\'"\n ng-class-even="\'gantt-row-even\'"\n ng-style="{\'height\': row.model.height}">\n <div class="gantt-row-background"\n ng-style="{\'background-color\': row.model.color}">\n </div>\n </div> <\/script> <script type=text/ng-template id=template/ganttRow.tmpl.html> <div class="gantt-row gantt-row-height"\n ng-class="row.model.classes"\n ng-class-odd="\'gantt-row-odd\'"\n ng-class-even="\'gantt-row-even\'"\n ng-style="{\'height\': row.model.height}">\n <div ng-transclude class="gantt-row-content"></div>\n </div> <\/script> <script type=text/ng-template id=template/ganttSideBackground.tmpl.html> <div class="gantt-side-background">\n <div class="gantt-side-background-header" ng-style="{height: $parent.ganttHeaderHeight + \'px\'}">\n <div ng-show="$parent.ganttHeaderHeight" class="gantt-header-row gantt-side-header-row"></div>\n </div>\n <div class="gantt-side-background-body" ng-style="getMaxHeightCss()">\n <div gantt-vertical-scroll-receiver>\n <div class="gantt-row gantt-row-height "\n ng-class-odd="\'gantt-row-odd\'"\n ng-class-even="\'gantt-row-even\'"\n ng-class="row.model.classes"\n ng-repeat="row in gantt.rowsManager.visibleRows track by row.model.id"\n ng-style="{\'height\': row.model.height}">\n <div class="gantt-row-label gantt-row-background"\n ng-style="{\'background-color\': row.model.color}">\n </div>\n </div>\n </div>\n </div>\n </div> <\/script> </div> ')}]),t.exports=n},function(t,e,n){t.exports={default:n(134),__esModule:!0}},function(t,e,n){t.exports={default:n(135),__esModule:!0}},function(t,e,n){t.exports={default:n(136),__esModule:!0}},function(t,e,n){t.exports={default:n(137),__esModule:!0}},function(t,e,n){t.exports={default:n(138),__esModule:!0}},function(t,e,n){t.exports={default:n(139),__esModule:!0}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(128),a=i(r),o=n(125),s=i(o),l=n(5),u=i(l);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,u.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(a.default?(0,a.default)(t,e):t.__proto__=e)}},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5),r=function(t){return t&&t.__esModule?t:{default:t}}(i);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,r.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){n(62),n(61),t.exports=n(160)},function(t,e,n){n(162);var i=n(7).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e,n){n(163);var i=n(7).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){n(164),t.exports=n(7).Object.getPrototypeOf},function(t,e,n){n(165),t.exports=n(7).Object.setPrototypeOf},function(t,e,n){n(167),n(166),n(168),n(169),t.exports=n(7).Symbol},function(t,e,n){n(61),n(62),t.exports=n(36).f("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(13),r=n(158),a=n(157);t.exports=function(t){return function(e,n,o){var s,l=i(e),u=r(l.length),d=a(o,u);if(t&&n!=n){for(;u>d;)if((s=l[d++])!=s)return!0}else for(;u>d;d++)if((t||d in l)&&l[d]===n)return t||d||0;return!t&&-1}}},function(t,e,n){var i=n(24),r=n(9)("toStringTag"),a="Arguments"==i(function(){return arguments}()),o=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=o(e=Object(t),r))?n:a?i(e):"Object"==(s=i(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var i=n(20),r=n(56),a=n(29);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var o,s=n(t),l=a.f,u=0;s.length>u;)l.call(t,o=s[u++])&&e.push(o);return e}},function(t,e,n){t.exports=n(8).document&&document.documentElement},function(t,e,n){var i=n(24);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e,n){var i=n(24);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(28),r=n(21),a=n(30),o={};n(16)(o,n(9)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(o,{next:r(1,n)}),a(t,e+" Iterator")}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i=n(20),r=n(13);t.exports=function(t,e){for(var n,a=r(t),o=i(a),s=o.length,l=0;s>l;)if(a[n=o[l++]]===e)return n}},function(t,e,n){var i=n(22)("meta"),r=n(18),a=n(11),o=n(12).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(17)(function(){return l(Object.preventExtensions({}))}),d=function(t){o(t,i,{value:{i:"O"+ ++s,w:{}}})},c=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,i)){if(!l(t))return"F";if(!e)return"E";d(t)}return t[i].i},f=function(t,e){if(!a(t,i)){if(!l(t))return!0;if(!e)return!1;d(t)}return t[i].w},h=function(t){return u&&v.NEED&&l(t)&&!a(t,i)&&d(t),t},v=t.exports={KEY:i,NEED:!1,fastKey:c,getWeak:f,onFreeze:h}},function(t,e,n){var i=n(12),r=n(14),a=n(20);t.exports=n(10)?Object.defineProperties:function(t,e){r(t);for(var n,o=a(e),s=o.length,l=0;s>l;)i.f(t,n=o[l++],e[n]);return t}},function(t,e,n){var i=n(13),r=n(55).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(t){return o.slice()}};t.exports.f=function(t){return o&&"[object Window]"==a.call(t)?s(t):r(i(t))}},function(t,e,n){var i=n(15),r=n(7),a=n(17);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],o={};o[t]=e(n),i(i.S+i.F*a(function(){n(1)}),"Object",o)}},function(t,e,n){var i=n(18),r=n(14),a=function(t,e){if(r(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{i=n(50)(Function.call,n(54).f(Object.prototype,"__proto__").set,2),i(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return a(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:a}},function(t,e,n){var i=n(33),r=n(25);t.exports=function(t){return function(e,n){var a,o,s=String(r(e)),l=i(n),u=s.length;return l<0||l>=u?t?"":void 0:(a=s.charCodeAt(l),a<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?t?s.charAt(l):a:t?s.slice(l,l+2):o-56320+(a-55296<<10)+65536)}}},function(t,e,n){var i=n(33),r=Math.max,a=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):a(t,e)}},function(t,e,n){var i=n(33),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e,n){var i=n(143),r=n(9)("iterator"),a=n(19);t.exports=n(7).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||a[i(t)]}},function(t,e,n){var i=n(14),r=n(159);t.exports=n(7).getIterator=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return i(e.call(t))}},function(t,e,n){"use strict";var i=n(141),r=n(149),a=n(19),o=n(13);t.exports=n(53)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,n):"values"==e?r(0,t[n]):r(0,[n,t[n]])},"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var i=n(15);i(i.S,"Object",{create:n(28)})},function(t,e,n){var i=n(15);i(i.S+i.F*!n(10),"Object",{defineProperty:n(12).f})},function(t,e,n){var i=n(60),r=n(57);n(154)("getPrototypeOf",function(){return function(t){return r(i(t))}})},function(t,e,n){var i=n(15);i(i.S,"Object",{setPrototypeOf:n(155).set})},function(t,e){},function(t,e,n){"use strict";var i=n(8),r=n(11),a=n(10),o=n(15),s=n(59),l=n(151).KEY,u=n(17),d=n(32),c=n(30),f=n(22),h=n(9),v=n(36),g=n(35),m=n(150),p=n(144),y=n(147),w=n(14),k=n(13),b=n(34),M=n(21),_=n(28),C=n(153),$=n(54),T=n(12),x=n(20),O=$.f,F=T.f,S=C.f,j=i.Symbol,R=i.JSON,P=R&&R.stringify,G=h("_hidden"),D=h("toPrimitive"),B={}.propertyIsEnumerable,W=d("symbol-registry"),E=d("symbols"),I=d("op-symbols"),H=Object.prototype,A="function"==typeof j,L=i.QObject,V=!L||!L.prototype||!L.prototype.findChild,z=a&&u(function(){return 7!=_(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=O(H,e);i&&delete H[e],F(t,e,n),i&&t!==H&&F(H,e,i)}:F,U=function(t){var e=E[t]=_(j.prototype);return e._k=t,e},N=A&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},q=function(t,e,n){return t===H&&q(I,e,n),w(t),e=b(e,!0),w(n),r(E,e)?(n.enumerable?(r(t,G)&&t[G][e]&&(t[G][e]=!1),n=_(n,{enumerable:M(0,!1)})):(r(t,G)||F(t,G,M(1,{})),t[G][e]=!0),z(t,e,n)):F(t,e,n)},Y=function(t,e){w(t);for(var n,i=p(e=k(e)),r=0,a=i.length;a>r;)q(t,n=i[r++],e[n]);return t},K=function(t,e){return void 0===e?_(t):Y(_(t),e)},Q=function(t){var e=B.call(this,t=b(t,!0));return!(this===H&&r(E,t)&&!r(I,t))&&(!(e||!r(this,t)||!r(E,t)||r(this,G)&&this[G][t])||e)},X=function(t,e){if(t=k(t),e=b(e,!0),t!==H||!r(E,e)||r(I,e)){var n=O(t,e);return!n||!r(E,e)||r(t,G)&&t[G][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=S(k(t)),i=[],a=0;n.length>a;)r(E,e=n[a++])||e==G||e==l||i.push(e);return i},Z=function(t){for(var e,n=t===H,i=S(n?I:k(t)),a=[],o=0;i.length>o;)!r(E,e=i[o++])||n&&!r(H,e)||a.push(E[e]);return a};A||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(I,n),r(this,G)&&r(this[G],t)&&(this[G][t]=!1),z(this,t,M(1,n))};return a&&V&&z(H,t,{configurable:!0,set:e}),U(t)},s(j.prototype,"toString",function(){return this._k}),$.f=X,T.f=q,n(55).f=C.f=J,n(29).f=Q,n(56).f=Z,a&&!n(27)&&s(H,"propertyIsEnumerable",Q,!0),v.f=function(t){return U(h(t))}),o(o.G+o.W+o.F*!A,{Symbol:j});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)h(tt[et++]);for(var tt=x(h.store),et=0;tt.length>et;)g(tt[et++]);o(o.S+o.F*!A,"Symbol",{for:function(t){return r(W,t+="")?W[t]:W[t]=j(t)},keyFor:function(t){if(N(t))return m(W,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!A,"Object",{create:K,defineProperty:q,defineProperties:Y,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Z}),R&&o(o.S+o.F*(!A||u(function(){var t=j();return"[null]"!=P([t])||"{}"!=P({a:t})||"{}"!=P(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!N(t)){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);return e=i[1],"function"==typeof e&&(n=e),!n&&y(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!N(e))return e}),i[1]=e,P.apply(R,i)}}}),j.prototype[D]||n(16)(j.prototype,D,j.prototype.valueOf),c(j,"Symbol"),c(Math,"Math",!0),c(i.JSON,"JSON",!0)},function(t,e,n){n(35)("asyncIterator")},function(t,e,n){n(35)("observable")}])});
|
|
//# sourceMappingURL=angular-gantt-core.min.js.map
|