/*! * FullCalendar Scheduler v1.8.1 * Docs & License: https://fullcalendar.io/scheduler/ * (c) 2017 Adam Shaw */ !function(e){"function"==typeof define&&define.amd?define(["jquery","moment","fullcalendar"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment"),require("fullcalendar")):e(jQuery,moment)}(function(e,t){var r=e.fullCalendar;if(r.schedulerVersion="1.8.1",11!==r.internalApiVersion)return void r.warn("v"+r.schedulerVersion+" of FullCalendar Scheduler is incompatible with v"+r.version+" of the core.\nPlease see http://fullcalendar.io/support/ for more information.");var o,n,s,i,l,u,a,c,h,p,d,f,g,y,v,m,R,w,S,b,E,C,H,T,I,D,_,x,z,B,F,M,L,P,W,k,G,A,U,V,q,O,N,j,Y,J,X,Q,$,K,Z,ee,te,re,oe,ne,se,ie,le,ue,ae,ce,he,pe,de,fe,ge,ye,ve,me,Re,we,Se,be,Ee,Ce,He,Te,Ie,De,_e,xe,ze,Be,Fe,Me,Le,Pe=r.Calendar,We=r.Class,ke=r.View,Ge=r.debounce,Ae=r.isInt,Ue=r.removeExact,Ve=r.getScrollbarWidths,qe=r.DragListener,Oe=r.htmlEscape,Ne=r.computeGreatestUnit,je=r.proxy,Ye=r.capitaliseFirstLetter,Je=(r.applyAll,r.EmitterMixin),Xe=r.ListenerMixin,Qe=r.durationHasTime,$e=r.divideRangeByDuration,Ke=r.divideDurationByDuration,Ze=r.multiplyDuration,et=r.parseFieldSpecs,tt=r.compareByFieldSpecs,rt=r.flexibleCompare,ot=r.intersectRects,nt=r.CoordCache,st=r.getContentRect,it=r.getOuterRect,lt=r.Promise,ut=(r.TaskQueue,r.UnzonedRange),at=r.ComponentFootprint,ct=r.EventDef,ht=r.EventSource,pt=r.EventFootprint,dt=r.EventDefMutation,ft=r.cssToStr,gt=r.DateComponent,yt=r.InteractiveDateComponent,vt=r.EventRenderer,mt=r.BusinessHourRenderer,Rt=r.FillRenderer,wt=r.HelperRenderer,St=r.StandardInteractionsMixin,bt=r.DateSelecting,Et=(r.EventPointing,r.EventDragging),Ct=r.EventResizing,Ht=r.ExternalDropping,Tt=r.BusinessHourGenerator,It=(r.EventInstanceGroup,function(e,t){function r(){this.constructor=e}for(var o in t)Dt.call(t,o)&&(e[o]=t[o]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e}),Dt={}.hasOwnProperty,_t=[].indexOf||function(e){for(var t=0,r=this.length;t td").filter(function(e,t){return t.rowSpan<=1})},m=function(t){function o(){o.__super__.constructor.apply(this,arguments),this.requestMovingEnd=Ge(this.reportMovingEnd,500)}var n,s;return It(o,t),o.mixin(Je),o.mixin(Xe),o.prototype.canvas=null,o.prototype.isScrolling=!1,o.prototype.isTouching=!1,o.prototype.isTouchedEver=!1,o.prototype.isMoving=!1,o.prototype.isTouchScrollEnabled=!0,o.prototype.preventTouchScrollHandler=null,o.prototype.render=function(){return o.__super__.render.apply(this,arguments),this.canvas&&(this.canvas.render(),this.canvas.el.appendTo(this.scrollEl)),this.bindHandlers()},o.prototype.destroy=function(){return o.__super__.destroy.apply(this,arguments),this.unbindHandlers()},o.prototype.disableTouchScroll=function(){return this.isTouchScrollEnabled=!1,this.bindPreventTouchScroll()},o.prototype.enableTouchScroll=function(){if(this.isTouchScrollEnabled=!0,!this.isTouching)return this.unbindPreventTouchScroll()},o.prototype.bindPreventTouchScroll=function(){if(!this.preventTouchScrollHandler)return this.scrollEl.on("touchmove",this.preventTouchScrollHandler=r.preventDefault)},o.prototype.unbindPreventTouchScroll=function(){if(this.preventTouchScrollHandler)return this.scrollEl.off("touchmove",this.preventTouchScrollHandler),this.preventTouchScrollHandler=null},o.prototype.bindHandlers=function(){return this.listenTo(this.scrollEl,{scroll:this.reportScroll,touchstart:this.reportTouchStart,touchend:this.reportTouchEnd})},o.prototype.unbindHandlers=function(){return this.stopListeningTo(this.scrollEl)},o.prototype.reportScroll=function(){return this.isScrolling||this.reportScrollStart(),this.trigger("scroll"),this.isMoving=!0,this.requestMovingEnd()},o.prototype.reportScrollStart=function(){if(!this.isScrolling)return this.isScrolling=!0,this.trigger("scrollStart",this.isTouching)},o.prototype.requestMovingEnd=null,o.prototype.reportMovingEnd=function(){if(this.isMoving=!1,!this.isTouching)return this.reportScrollEnd()},o.prototype.reportScrollEnd=function(){if(this.isScrolling)return this.trigger("scrollEnd"),this.isScrolling=!1},o.prototype.reportTouchStart=function(){return this.isTouching=!0,this.isTouchedEver=!0},o.prototype.reportTouchEnd=function(){if(this.isTouching&&(this.isTouching=!1,this.isTouchScrollEnabled&&this.unbindPreventTouchScroll(),!this.isMoving))return this.reportScrollEnd()},o.prototype.getScrollLeft=function(){var e,t,r;if(e=this.scrollEl.css("direction"),t=this.scrollEl[0],r=t.scrollLeft,"rtl"===e)switch(s){case"positive":r=r+t.clientWidth-t.scrollWidth;break;case"reverse":r=-r}return r},o.prototype.setScrollLeft=function(e){var t,r;if(t=this.scrollEl.css("direction"),r=this.scrollEl[0],"rtl"===t)switch(s){case"positive":e=e-r.clientWidth+r.scrollWidth;break;case"reverse":e=-e}return r.scrollLeft=e},o.prototype.getScrollFromLeft=function(){var e,t,r;if(e=this.scrollEl.css("direction"),t=this.scrollEl[0],r=t.scrollLeft,"rtl"===e)switch(s){case"negative":r=r-t.clientWidth+t.scrollWidth;break;case"reverse":r=-r-t.clientWidth+t.scrollWidth}return r},o.prototype.getNativeScrollLeft=function(){return this.scrollEl[0].scrollLeft},o.prototype.setNativeScrollLeft=function(e){return this.scrollEl[0].scrollLeft=e},s=null,n=function(){var t,r,o;return t=e('
A
').appendTo("body"),r=t[0],o=r.scrollLeft>0?"positive":(r.scrollLeft=1,t.scrollLeft>0?"reverse":"negative"),t.remove(),o},e(function(){return s=n()}),o}(r.Scroller),f=function(t){function r(){r.__super__.constructor.apply(this,arguments),"clipped-scroll"===this.overflowX&&(this.overflowX="scroll",this.isHScrollbarsClipped=!0),"clipped-scroll"===this.overflowY&&(this.overflowY="scroll",this.isVScrollbarsClipped=!0)}return It(r,t),r.prototype.isHScrollbarsClipped=!1,r.prototype.isVScrollbarsClipped=!1,r.prototype.renderEl=function(){var t;return t=r.__super__.renderEl.apply(this,arguments),e('
').append(t)},r.prototype.updateSize=function(){var e,t,r;return t=this.scrollEl,r=Ve(t),e={marginLeft:0,marginRight:0,marginTop:0,marginBottom:0},this.isHScrollbarsClipped&&(e.marginTop=-r.top,e.marginBottom=-r.bottom),this.isVScrollbarsClipped&&(e.marginLeft=-r.left,e.marginRight=-r.right),t.css(e),t.toggleClass("fc-no-scrollbars",(this.isHScrollbarsClipped||"hidden"===this.overflowX)&&(this.isVScrollbarsClipped||"hidden"===this.overflowY)&&!(r.top||r.bottom||r.left||r.right))},r.prototype.getScrollbarWidths=function(){var e;return e=Ve(this.scrollEl),this.isHScrollbarsClipped&&(e.top=0,e.bottom=0),this.isVScrollbarsClipped&&(e.left=0,e.right=0),e},r}(m),re=function(){function t(){this.gutters={}}return t.prototype.el=null,t.prototype.contentEl=null,t.prototype.bgEl=null,t.prototype.gutters=null,t.prototype.width=null,t.prototype.minWidth=null,t.prototype.render=function(){return this.el=e('
'),this.contentEl=this.el.find(".fc-content"),this.bgEl=this.el.find(".fc-bg")},t.prototype.setGutters=function(t){return t?e.extend(this.gutters,t):this.gutters={},this.updateSize()},t.prototype.setWidth=function(e){return this.width=e,this.updateSize()},t.prototype.setMinWidth=function(e){return this.minWidth=e,this.updateSize()},t.prototype.clearWidth=function(){return this.width=null,this.minWidth=null,this.updateSize()},t.prototype.updateSize=function(){var e;return e=this.gutters,this.el.toggleClass("fc-gutter-left",Boolean(e.left)).toggleClass("fc-gutter-right",Boolean(e.right)).toggleClass("fc-gutter-top",Boolean(e.top)).toggleClass("fc-gutter-bottom",Boolean(e.bottom)).css({paddingLeft:e.left||"",paddingRight:e.right||"",paddingTop:e.top||"",paddingBottom:e.bottom||"",width:null!=this.width?this.width+(e.left||0)+(e.right||0):"",minWidth:null!=this.minWidth?this.minWidth+(e.left||0)+(e.right||0):""}),this.bgEl.css({left:e.left||"",right:e.right||"",top:e.top||"",bottom:e.bottom||""})},t}(),te=function(){function e(e,t){var r,o,n,s;for(this.axis=e,this.scrollers=t,n=this.scrollers,r=0,o=n.length;r=s&&(r="center"===this.el.css("text-align"),o=!0),t.isVFollowing&&Se(e)-Se(i)>=s&&(n=!0),this.isHFollowing=o,this.isVFollowing=n,this.isCentered=r},e.prototype.updatePosition=function(){return this.computePosition(),this.assignPosition()},e.prototype.resetPosition=function(){return this.el.css({top:"",left:""})},e.prototype.computePosition=function(){var e,t,r,o,n,s,i,l;return i=this.follower.viewportRect,r=this.parentRect,e=this.containerRect,l=ot(i,r),o=null,t=!1,l&&(o=me(this.naturalRect),s=ot(o,r),(this.isCentered&&!ze(i,r)||s&&!ze(i,s))&&(t=!0,this.isHFollowing&&(this.isCentered?(n=be(o),o.left=(l.left+l.right)/2-n/2,o.right=o.left+n):Ce(o,i)||(t=!1),Ce(o,e)&&(t=!1)),this.isVFollowing&&(Le(o,i)||(t=!1),Le(o,e)&&(t=!1)),ze(i,o)||(t=!1))),this.rect=o,this.doAbsolute=t},e.prototype.assignPosition=function(){var e,t;if(this.isEnabled)return this.rect?this.doAbsolute&&!this.follower.isForcedRelative?(this.absolutize(),this.absoluteEl.css({top:this.rect.top-this.follower.viewportRect.top+this.follower.scrollbarWidths.top,left:this.rect.left-this.follower.viewportRect.left+this.follower.scrollbarWidths.left,width:this.isBlock?this.naturalWidth:""})):(t=this.rect.top-this.naturalRect.top,e=this.rect.left-this.naturalRect.left,this.unabsolutize(),this.el.toggleClass("fc-following",Boolean(t||e)).css({top:t,left:e})):this.unabsolutize()},e.prototype.absolutize=function(){if(!this.isAbsolute)return this.absoluteEl||(this.absoluteEl=this.buildAbsoluteEl()),this.absoluteEl.appendTo(this.follower.scroller.el),this.el.css("visibility","hidden"),this.isAbsolute=!0},e.prototype.unabsolutize=function(){if(this.isAbsolute)return this.absoluteEl.detach(),this.el.css("visibility",""),this.isAbsolute=!1},e.prototype.buildAbsoluteEl=function(){var e;return e=this.el.clone().addClass("fc-following"),e.css({position:"absolute","z-index":1e3,"font-weight":this.el.css("font-weight"),"font-size":this.el.css("font-size"),"font-family":this.el.css("font-family"),"text-decoration":this.el.css("text-decoration"),color:this.el.css("color"),"padding-top":this.el.css("padding-top"),"padding-bottom":this.el.css("padding-bottom"),"padding-left":this.el.css("padding-left"),"padding-right":this.el.css("padding-right")}),this.follower.allowPointerEvents||e.css("pointer-events","none"),e},e}(),me=function(e){return{left:e.left,right:e.right,top:e.top,bottom:e.bottom}},be=function(e){return e.right-e.left},Se=function(e){return e.bottom-e.top},ze=function(e,t){return Be(e,t)&&Fe(e,t)},Be=function(e,t){return t.left>=e.left&&t.right<=e.right},Fe=function(e,t){return t.top>=e.top&&t.bottom<=e.bottom},Ce=function(e,t){return e.leftt.right&&(e.left=t.right-be(e),e.right=t.right,!0)},Le=function(e,t){return e.topt.bottom&&(e.top=t.bottom-Se(e),e.bottom=t.bottom,!0)},Ie=function(e,t){return{left:Math.min(e.left,t.left),right:Math.max(e.right,t.right),top:Math.min(e.top,t.top),bottom:Math.max(e.bottom,t.bottom)}},ee.uid=0,R=ct.prototype.applyMiscProps,w=ct.prototype.clone,S=ct.prototype.toLegacy,ct.defineStandardProps({resourceEditable:!0}),ct.prototype.resourceIds=null,ct.prototype.resourceEditable=null,ct.prototype.applyMiscProps=function(t){return t=e.extend({},t),this.resourceIds=W.extractIds(t,this.source.calendar),delete t.resourceId,delete t.resourceIds,R.apply(this,arguments)},ct.prototype.hasResourceId=function(e){return _t.call(this.resourceIds,e)>=0},ct.prototype.removeResourceId=function(e){return Ue(this.resourceIds,e)},ct.prototype.addResourceId=function(e){if(!this.hasResourceId(e))return this.resourceIds.push(e)},ct.prototype.getResourceIds=function(){return this.resourceIds?this.resourceIds.slice():[]},ct.prototype.clone=function(){var e;return e=w.apply(this,arguments),e.resourceIds=this.getResourceIds(),e},ct.prototype.toLegacy=function(){var e,t;return e=S.apply(this,arguments),t=this.getResourceIds(),e.resourceId=1===t.length?t[0]:null,e.resourceIds=t.length>1?t:null,null!=this.resourceEditable&&(e.resourceEditable=this.resourceEditable),e},De=dt.prototype.mutateSingle,dt.prototype.oldResourceId=null,dt.prototype.newResourceId=null,dt.prototype.mutateSingle=function(e){var t,r;return r=De.apply(this,arguments),t=null,this.oldResourceId&&e.hasResourceId(this.oldResourceId)&&(t=e.getResourceIds(),e.removeResourceId(this.oldResourceId),e.addResourceId(this.newResourceId)),function(o){return function(){if(r(),t)return e.resourceIds=t}}(this)},ht.prototype.standardPropMap.resourceEditable=!0,W=function(){function e(){}return e}(),W.extractIds=function(e,t){var r,o,n,s,i,l;if(i=t.opt("eventResourceField")||"resourceId",l=[],e.resourceIds)for(s=e.resourceIds,r=0,o=s.length;r1?this.datesAboveResources?this.renderHeadDateAndResourceHtml():this.renderHeadResourceAndDateHtml():this.renderHeadResourceHtml()},renderHeadResourceHtml:function(){var e,t,r,o,n;for(n=[],r=this.flattenedResources,e=0,t=r.length;e "),this.wrapTr(n,"renderHeadIntroHtml")},renderHeadResourceAndDateHtml:function(){var e,t,r,o,n,s,i,l,u,a;for(a=[],t=[],i=this.flattenedResources,o=0,s=i.length;o "),t.length||t.push(" "),this.wrapTr(a,"renderHeadIntroHtml")+this.wrapTr(t,"renderHeadIntroHtml")},renderHeadDateAndResourceHtml:function(){var e,t,r,o,n,s,i,l,u,a;for(t=[],a=[],r=o=0,i=this.daysPerRow;o "),a.length||a.push(" "),this.wrapTr(t,"renderHeadIntroHtml")+this.wrapTr(a,"renderHeadIntroHtml")},renderHeadResourceCellHtml:function(e,t,r){return'1?' colspan="'+r+'"':"")+">"+Oe(this.view.getResourceText(e))+""},renderHeadResourceDateCellHtml:function(e,t,r){return this.renderHeadDateCellHtml(e,r,'data-resource-id="'+t.id+'"')},processHeadResourceEls:function(t){return t.find(".fc-resource-cell").each(function(t){return function(r,o){var n;return n=t.datesAboveResources?t.getColResource(r):t.flattenedResources[t.isRTL?t.flattenedResources.length-1-r:r],t.publiclyTrigger("resourceRender",{context:n,args:[n,e(o),e(),t.view]})}}(this))},renderBgCellsHtml:function(e){var t,r,o,n,s,i;for(o=[],t=n=0,s=this.colCnt;n "),o.join("")},renderResourceBgCellHtml:function(e,t){return this.renderBgCellHtml(e,'data-resource-id="'+t.id+'"')},wrapTr:function(e,t){return this.isRTL?(e.reverse(),""+e.join("")+this[t]()+""):""+this[t]()+e.join("")+""},renderBusinessHours:function(e){var t,r,o,n,s,i,l,u,a,c,h,p;for(n=this.hasAllDayBusinessHours,p=this.dateProfile.activeUnzonedRange,t=[],a=this.flattenedResources,s=0,l=a.length;s=0)))&&h.apply(this,arguments)},Pe.prototype.buildCurrentBusinessFootprints=function(e){var t,r,o,s,i,l,u,a,c,h,p,d,f,g,y,v,m;for(l=this.resourceManager.getFlatResources(),t=!1,a=0,p=l.length;a
'+(l?''+Oe(l)+"":"")+''+(o.title?Oe(o.title):" ")+'
'+(i?'
':"")+(s?'
':"")+""},t}(vt),ve=function(e){var t,r,o,n;for(o=0,t=0,r=e.length;tt.left},le=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return It(r,t),r.prototype.attachSegEls=function(t,r){var o,n,s,i,l,u;if(r.length){for(o="businessHours"===t?"bgevent":t.toLowerCase(),n=e('
').appendTo(this.component.bgSegContainerEl),i=0,l=r.length;i').appendTo(this.component.innerEl),s.push(n[0]),l=0,a=t.length;l').appendTo(this.timeBodyScroller.canvas.bgEl),this.segContainerEl=e('
').appendTo(this.timeBodyScroller.canvas.contentEl),this.bgSegContainerEl=this.timeBodyScroller.canvas.bgEl,this.timeBodyBoundCache=new nt({els:this.timeBodyScroller.canvas.el,isHorizontal:!0,isVertical:!0}),this.timeScrollJoiner=new te("horizontal",[this.timeHeadScroller,this.timeBodyScroller]),this.headDateFollower=new Z(this.timeHeadScroller,(!0)),this.eventTitleFollower=new Z(this.timeBodyScroller),this.eventTitleFollower.minTravel=50,this.isRTL?this.eventTitleFollower.containOnNaturalRight=!0:this.eventTitleFollower.containOnNaturalLeft=!0,n.__super__.renderSkeleton.apply(this,arguments)},n.prototype.renderSkeletonHtml=function(){var e;return e=this.calendar.theme,'
'},n.prototype.unrenderSkeleton=function(){return this.handleTimeBodyScrolled(0),n.__super__.unrenderSkeleton.apply(this,arguments)},n.prototype.renderDates=function(e){var t,r,o,n,s,i,l;for(this.initScaleProps(),this.timeWindowMs=e.maxTime-e.minTime,this.normalizedUnzonedStart=this.normalizeGridDate(e.renderUnzonedRange.getStart()),this.normalizedUnzonedEnd=this.normalizeGridDate(e.renderUnzonedRange.getEnd()),this.isTimeScale&&(this.normalizedUnzonedStart.add(e.minTime),this.normalizedUnzonedEnd.subtract(1,"day").add(e.maxTime)),this.normalizedUnzonedRange=new ut(this.normalizedUnzonedStart,this.normalizedUnzonedEnd),l=[],t=this.normalizedUnzonedStart.clone(),this.calendar.localizeMoment(t);t div"),isHorizontal:!0,offsetParent:this.timeBodyScroller.canvas.el}),s=this.slotDates,r=o=0,n=s.length;o1&&Bthis.slotDuration,h=1===this.slotDuration.as("days"),l='',l+="",y=0,S=W.length;y";for(l+="",l+="",u=T=0,b=t.length;T",I=0,E=F.length;I1?' colspan="'+e.colspan+'"':"")+'>
'+e.spanHtml+"
";l+=""}for(l+="
",L='',L+="",_=0,C=P.length;_";for(L+="",L+="",u=z=0,H=P.length;z
'},n.prototype.renderBusinessHours=function(e){if(!this.largeUnit)return n.__super__.renderBusinessHours.apply(this,arguments)},n.prototype.getNowIndicatorUnit=function(){if(this.isTimeScale)return Ne(this.slotDuration)},n.prototype.renderNowIndicator=function(t){var r,o,n;return n=[],t=this.normalizeGridDate(t),this.normalizedUnzonedRange.containsDate(t)&&(r=this.dateToCoord(t),o=this.isRTL?{right:-r}:{left:r},n.push(e("
").css(o).appendTo(this.timeHeadScroller.canvas.el)[0]),n.push(e("
").css(o).appendTo(this.timeBodyScroller.canvas.el)[0])),this.nowIndicatorEls=e(n)},n.prototype.unrenderNowIndicator=function(){if(this.nowIndicatorEls)return this.nowIndicatorEls.remove(),this.nowIndicatorEls=null},n.prototype.updateSize=function(e,t,r){var o,n,s,i,l,u,a;if(n=t?"auto":e-this.headHeight()-this.queryMiscHeight(),this.timeBodyScroller.setHeight(n),l=this.timeHeadColEls,l?(a=Math.round(this.slotWidth||(this.slotWidth=this.computeSlotWidth())),i=a*this.slotDates.length,s="",u=a,o=this.timeBodyScroller.getClientWidth(),o>i&&(s=o,i="",u=Math.floor(o/this.slotDates.length))):(i="",s=""),this.timeHeadScroller.canvas.setWidth(i),this.timeHeadScroller.canvas.setMinWidth(s),this.timeBodyScroller.canvas.setWidth(i),this.timeBodyScroller.canvas.setMinWidth(s),l&&this.timeHeadColEls.slice(0,-1).add(this.slatColEls.slice(0,-1)).css("width",u),this.timeHeadScroller.updateSize(),this.timeBodyScroller.updateSize(),this.timeScrollJoiner.update(),l&&(this.buildCoords(),this.updateSegPositions(),this.updateNowIndicator()),this.headDateFollower&&this.headDateFollower.update(),this.eventTitleFollower)return this.eventTitleFollower.update()},n.prototype.queryMiscHeight=function(){return this.el.outerHeight()-this.timeHeadScroller.el.outerHeight()-this.timeBodyScroller.el.outerHeight()},n.prototype.computeSlotWidth=function(){var t,r,o,n,s,i;return o=0,r=this.timeHeadEl.find("tr:last-child th .fc-cell-text"),r.each(function(t,r){var n;return n=e(r).outerWidth(),o=Math.max(o,n)}),t=o+1,i=Ke(this.labelInterval,this.slotDuration),s=Math.ceil(t/i),n=this.timeHeadColEls.eq(0).css("min-width"),n&&(n=parseInt(n,10),n&&(s=Math.max(s,n))),s},n.prototype.buildCoords=function(){return this.timeBodyBoundCache.build(),this.slatCoordCache.build(),this.slatInnerCoordCache.build()},n.prototype.computeDateSnapCoverage=function(e){var t,r,o;return r=$e(this.normalizedUnzonedStart,e,this.snapDuration),r<0?0:r>=this.snapDiffToIndex.length?this.snapCnt:(o=Math.floor(r),t=this.snapDiffToIndex[o],Ae(t)?t+=r-o:t=Math.ceil(t),t)},n.prototype.dateToCoord=function(e){var t,r,o,n,s;return s=this.computeDateSnapCoverage(e),o=s/this.snapsPerSlot,n=Math.floor(o),n=Math.min(n,this.slotCnt-1),r=o-n,t=this.slatInnerCoordCache,this.isRTL?t.getRightPosition(n)-t.getWidth(n)*r-this.timeBodyBoundCache.getWidth(0):t.getLeftPosition(n)+t.getWidth(n)*r},n.prototype.rangeToCoords=function(e){return this.isRTL?{right:this.dateToCoord(e.start),left:this.dateToCoord(e.end)}:{left:this.dateToCoord(e.start),right:this.dateToCoord(e.end)}},n.prototype.headHeight=function(){var e;return e=this.timeHeadScroller.canvas.contentEl.find("table"),e.height.apply(e,arguments)},n.prototype.updateSegPositions=function(){var e,t,r,o,n;for(n=[].concat(this.getEventSegs(),this.getBusinessHourSegs()),t=0,r=n.length;t=2&&!this.opt("businessHours"),this.snapDuration=(r=this.opt("snapDuration"))?t.duration(r):this.slotDuration,this.snapsPerSlot=Ke(this.slotDuration,this.snapDuration)},ae.prototype.queryDurationOption=function(e){var r,o;if(o=this.opt(e),null!=o&&(r=t.duration(o),+r))return r},ae.prototype.validateLabelAndSlot=function(){var e,t,o,n;if(e=this.dateProfile.currentUnzonedRange,this.labelInterval&&(t=$e(e.getStart(),e.getEnd(),this.labelInterval),t>F&&(r.warn("slotLabelInterval results in too many cells"),this.labelInterval=null)),this.slotDuration&&(o=$e(e.getStart(),e.getEnd(),this.slotDuration), o>F&&(r.warn("slotDuration results in too many cells"),this.slotDuration=null)),this.labelInterval&&this.slotDuration&&(n=Ke(this.labelInterval,this.slotDuration),!Ae(n)||n<1))return r.warn("slotLabelInterval must be a multiple of slotDuration"),this.slotDuration=null},ae.prototype.computeFallbackDuration=function(){var e,r,o,n,s;if(e=null,this.labelInterval||this.slotDuration)for(s=this.ensureLabelInterval(),o=K.length-1;o>=0&&(r=K[o],e=t.duration(r),n=Ke(e,s),!(n>=M));o+=-1);else e=t.duration(g);return e},ae.prototype.ensureLabelInterval=function(){var e,r,o,n,s,i,l,u,a,c;if(e=this.dateProfile.currentUnzonedRange,i=this.labelInterval,!i){if(this.slotDuration){for(o=0,l=K.length;o=M));n++);this.labelInterval=i}return i},ae.prototype.ensureSlotDuration=function(){var e,r,o,n,s,i,l,u,a;if(e=this.dateProfile.currentUnzonedRange,l=this.slotDuration,!l){for(n=this.ensureLabelInterval(),o=0,s=K.length;o1&&u<=B){l=a;break}l&&(i=$e(e.getStart(),e.getEnd(),l),i>z&&(l=null)),l||(l=n),this.slotDuration=l}return l},ae.prototype.computeHeaderFormats=function(){var e,t,r,o,n,s;switch(o=this.labelInterval,n=Ne(o),s=this.opt("weekNumbers"),e=t=r=null,"week"!==n||s||(n="day"),n){case"year":e="YYYY";break;case"month":this.currentRangeAs("years")>1&&(e="YYYY"),t="MMM";break;case"week":this.currentRangeAs("years")>1&&(e="YYYY"),t=this.opt("shortWeekFormat");break;case"day":this.currentRangeAs("years")>1?e=this.opt("monthYearFormat"):this.currentRangeAs("months")>1&&(e="MMMM"),s&&(t=this.opt("weekFormat")),r="dd D";break;case"hour":s&&(e=this.opt("weekFormat")),this.currentRangeAs("days")>1&&(t=this.opt("dayOfMonthFormat")),r=this.opt("smallTimeFormat");break;case"minute":o.asMinutes()/60>=B?(e=this.opt("hourFormat"),t="[:]mm"):e=this.opt("mediumTimeFormat");break;case"second":o.asSeconds()/60>=B?(e="LT",t="[:]ss"):e="LTS";break;case"millisecond":e="LTS",t="[.]SSS"}return[].concat(e||[],t||[],r||[])},r.views.timeline={"class":ae,defaults:{eventResizableFromStart:!0}},r.views.timelineDay={type:"timeline",duration:{days:1}},r.views.timelineWeek={type:"timeline",duration:{weeks:1}},r.views.timelineMonth={type:"timeline",duration:{months:1}},r.views.timelineYear={type:"timeline",duration:{years:1}},$=function(t){function r(t){this.view=t,r.__super__.constructor.apply(this,arguments),this.isExpanded=this.view.opt("resourcesInitiallyExpanded"),this.children=[],this.trHash={},this.trs=e()}return It(r,t),r.prototype.view=null,r.prototype.parent=null,r.prototype.prevSibling=null,r.prototype.children=null,r.prototype.depth=0,r.prototype.hasOwnRow=!1,r.prototype.trHash=null,r.prototype.trs=null,r.prototype.isExpanded=!1,r.prototype.addChild=function(e,t){var r;return e.removeFromParentAndDom(),r=this.children,null!=t?r.splice(t,0,e):(t=r.length,r.push(e)),e.prevSibling=t>0?r[t-1]:null,t"),this.trHash[p]=c,h.push(c[0]),l="render"+Ye(p)+"Skeleton",this[l]&&this[l](c),n?n.trHash[p].after(c):a.prepend(c);this.trs=e(h).on("click",".fc-expander",je(this,"toggleExpanded")),this.set("isInDom",!0),this.thisRowShown()}for(i=this.children,u=[],r=0,o=i.length;r div:not(.fc-cell-content):first"),t=Math.max(o.height(),t)}}(this)),t},r.prototype.setTrInnerHeight=function(t){return e.each(this.trHash,function(e){return function(e,r){return we(r).find("> div:not(.fc-cell-content):first").height(t)}}(this))},r.prototype.descendantAdded=function(e){return this.get("isInDom")&&this.hasOwnRow&&1===this.children.length&&this.indicateExpandingEnabled(),(this.parent||this.view).descendantAdded(e)},r.prototype.descendantRemoved=function(e){return this.get("isInDom")&&this.hasOwnRow&&0===this.children.length&&this.indicateExpandingDisabled(),(this.parent||this.view).descendantRemoved(e)},r.prototype.thisRowShown=function(){return(this.parent||this.view).descendantShown(this)},r.prototype.thisRowHidden=function(){return(this.parent||this.view).descendantHidden(this)},r.prototype.descendantShown=function(e){return(this.parent||this.view).descendantShown(e)},r.prototype.descendantHidden=function(e){return(this.parent||this.view).descendantHidden(e)},r}(gt),Q=function(t){function r(e,t,o){this.groupSpec=t,this.groupValue=o,r.__super__.constructor.apply(this,arguments)}return It(r,t),r.prototype.groupSpec=null,r.prototype.groupValue=null,r.prototype.descendantRemoved=function(e){if(r.__super__.descendantRemoved.apply(this,arguments),!this.children.length)return this.removeFromParentAndDom()},r.prototype.renderGroupContentEl=function(){var t,r;return t=e('
').append(this.renderGroupTextEl()),r=this.groupSpec.render,"function"==typeof r&&(t=r(t,this.groupValue)||t),t},r.prototype.renderGroupTextEl=function(){var t,r;return r=this.groupValue||"",t=this.groupSpec.text,"function"==typeof t&&(r=t(r)||r),e('').text(r)},r}($),D=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return It(r,t),r.prototype.hasOwnRow=!0,r.prototype.renderSkeleton=function(){return r.__super__.renderSkeleton.apply(this,arguments),this.updateExpandingEnabled()},r.prototype.renderSpreadsheetSkeleton=function(t){var r;return r=this.renderGroupContentEl(),r.prepend(''),e('
')},r}(Q),he=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return It(r,t),r.prototype.rowspan=0,r.prototype.leadingTr=null,r.prototype.groupTd=null,r.prototype.renderRowspan=function(){var t,r;return r=this.view.calendar.theme,this.rowspan?(this.groupTd||(this.groupTd=e(''),this.segContainerEl=e.find(".fc-event-container"),this.innerEl=this.bgSegContainerEl=e.find("td > div")},t.prototype.rangeToCoords=function(e){return this.view.rangeToCoords(e)},t.prototype.componentFootprintToSegs=function(e){return this.view.componentFootprintToSegs(e)},t}($),N=function(t){function r(e,t){this.resource=t,r.__super__.constructor.apply(this,arguments),this.eventRenderer.designatedResource=this.resource}return It(r,t),r.prototype.resource=null,r.prototype.eventsPayload=null,r.prototype.businessHourGenerator=null,r.prototype.renderSkeleton=function(){return r.__super__.renderSkeleton.apply(this,arguments),this.updateExpandingEnabled(),this.eventsPayload&&T.prototype.executeEventRender.call(this,this.eventsPayload),this.businessHourGenerator&&T.prototype.renderBusinessHours.call(this,this.businessHourGenerator),this.view.publiclyTrigger("resourceRender",{context:this.resource,args:[this.resource,this.getTr("spreadsheet").find("> td"),this.getTr("event").find("> td"),this.view]})},r.prototype.removeElement=function(){if(r.__super__.removeElement.apply(this,arguments),this.eventsPayload&&T.prototype.executeEventUnrender.call(this,this.eventsPayload),this.businessHourGenerator)return T.prototype.unrenderBusinessHours.call(this,this.businessHourGenerator)},r.prototype.renderEventSkeleton=function(e){return r.__super__.renderEventSkeleton.apply(this,arguments),e.attr("data-resource-id",this.resource.id)},r.prototype.executeEventRender=function(e){if(this.eventsPayload=e,this.get("isInDom"))return r.__super__.executeEventRender.call(this,this.eventsPayload)},r.prototype.executeEventUnrender=function(){return r.__super__.executeEventUnrender.apply(this,arguments),this.eventsPayload=null},r.prototype.renderBusinessHours=function(e){if(this.businessHourGenerator=e,this.get("isInDom"))return r.__super__.renderBusinessHours.call(this,this.businessHourGenerator)},r.prototype.unrenderBusinessHours=function(){return r.__super__.unrenderBusinessHours.apply(this,arguments),this.businessHourGenerator=null},r.prototype.renderSpreadsheetSkeleton=function(t){var r,o,n,s,i,l,u,a,c,h;for(h=this.view.calendar.theme,u=this.resource,l=this.view.colSpecs,s=0,i=l.length;s'+(r.isMain?this.renderGutterHtml():"")+''+(c?Oe(c):" ")+""),"function"==typeof r.render&&(o=r.render(u,o,n)||o),a=e('
').attr("colspan",this.view.colSpecs.length).append(e("
").append(r)).appendTo(t)},r.prototype.renderEventSkeleton=function(e){return e.append('
').append(this.renderGroupContentEl())),this.groupTd.attr("rowspan",this.rowspan),t=this.getLeadingRow().getTr("spreadsheet"),t!==this.leadingTr?(t&&t.prepend(this.groupTd),this.leadingTr=t):void 0):(this.groupTd&&(this.groupTd.remove(),this.groupTd=null),this.leadingTr=null)},r.prototype.descendantShown=function(e){return this.rowspan+=1,this.renderRowspan(),r.__super__.descendantShown.apply(this,arguments)},r.prototype.descendantHidden=function(e){return this.rowspan-=1,this.renderRowspan(),r.__super__.descendantHidden.apply(this,arguments)},r}(Q),T=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return It(t,e),t.prototype.fillRendererClass=le,t.prototype.eventRendererClass=se,t.prototype.helperRendererClass=ue,t.prototype.businessHourRendererClass=mt,t.prototype.hasOwnRow=!0,t.prototype.segContainerEl=null,t.prototype.segContainerHeight=null,t.prototype.innerEl=null,t.prototype.bgSegContainerEl=null,t.prototype.renderEventSkeleton=function(e){var t;return t=this.view.calendar.theme,e.html('
').append(o),r.isMain&&a.wrapInner("
"),t.append(a));return t.attr("data-resource-id",u.id)},r.prototype.renderGutterHtml=function(){var e,t,r,o;for(e="",t=r=0,o=this.depth;r';return e+=''},r}(T),o=30,oe=function(){function t(e){var t;this.view=e,this.isRTL=this.view.opt("isRTL"),this.givenColWidths=this.colWidths=function(){var e,r,o,n;for(o=this.view.colSpecs,n=[],e=0,r=o.length;e '+this.colGroupHtml+"
"),this.tbodyEl=this.bodyScroller.canvas.contentEl.find("tbody"),this.el.append(this.bodyScroller.el),this.scrollJoiner=new te("horizontal",[this.headScroller,this.bodyScroller]),this.headTable=this.headEl.find("table"),this.headColEls=this.headEl.find("col"),this.headCellEls=this.headScroller.canvas.contentEl.find("tr:last-child th"),this.bodyColEls=this.el.find("col"),this.bodyTable=this.el.find("table"),this.colMinWidths=this.computeColMinWidths(),this.applyColWidths(),this.initColResizing()},t.prototype.renderHeadHtml=function(){var e,t,r,o,n,s,i,l,u,a,c,h;for(h=this.view.calendar.theme,t=this.view.colSpecs,r='',e="",i=0,u=t.length;i':"";for(e+="",this.colGroupHtml=e,r+=e,r+="",this.view.superHeaderText&&(r+='"),r+="",s=!0,o=l=0,a=t.length;l
'+(c.isMain?'':"")+''+Oe(c.labelText||"")+"
"+(n?"":'
')+"
";return r+="
",r+="
'+Oe(this.view.superHeaderText)+"
"},t.prototype.givenColWidths=null,t.prototype.colWidths=null,t.prototype.colMinWidths=null,t.prototype.tableWidth=null,t.prototype.tableMinWidth=null,t.prototype.initColResizing=function(){return this.headEl.find("th .fc-col-resizer").each(function(t){return function(r,o){return o=e(o),o.on("mousedown",function(e){return t.colResizeMousedown(r,e,o)})}}(this))},t.prototype.colResizeMousedown=function(e,t,r){var n,s,i,l;return n=this.colWidths=this.queryColWidths(),n.pop(),n.push(null),l=n[e],i=Math.min(this.colMinWidths[e],o),s=new qe({dragStart:function(e){return function(){return r.addClass("fc-active")}}(this),drag:function(t){return function(r,o){var s;return s=l+(t.isRTL?-r:r),s=Math.max(s,i),n[e]=s,t.applyColWidths()}}(this),dragEnd:function(e){return function(){return r.removeClass("fc-active")}}(this)}),s.startInteraction(t)},t.prototype.applyColWidths=function(){var e,t,r,o,n,s,i,l,u,a,c,h,p,d,f,g,y;for(r=this.colMinWidths,n=this.colWidths,e=!0,t=!1,y=0,a=0,p=n.length;a
').appendTo(this.timeBodyScroller.canvas.contentEl),this.timeBodyTbodyEl=o.find("tbody"),this.tbodyHash={spreadsheet:this.spreadsheet.tbodyEl,event:this.timeBodyTbodyEl},this.resourceScrollJoiner=new te("vertical",[this.spreadsheet.bodyScroller,this.timeBodyScroller]),this.initDividerMoving()},r.prototype.renderSkeletonHtml=function(){var e;return e=this.calendar.theme,'
'},r.prototype.initDividerMoving=function(){var e;return this.dividerEls=this.el.find(".fc-divider"),this.dividerWidth=null!=(e=this.opt("resourceAreaWidth"))?e:this.spreadsheet.tableWidth,null!=this.dividerWidth&&this.positionDivider(this.dividerWidth),this.dividerEls.on("mousedown",function(e){return function(t){return e.dividerMousedown(t)}}(this))},r.prototype.dividerMousedown=function(e){var t,r,o,n,s;return r=this.opt("isRTL"),n=30,o=this.el.width()-30,s=this.getNaturalDividerWidth(),t=new qe({dragStart:function(e){return function(){return e.dividerEls.addClass("fc-active")}}(this),drag:function(e){return function(t,i){var l;return l=r?s-t:s+t,l=Math.max(l,n),l=Math.min(l,o),e.dividerWidth=l,e.positionDivider(l),e.calendar.updateViewSize()}}(this),dragEnd:function(e){return function(){return e.dividerEls.removeClass("fc-active")}}(this)}),t.startInteraction(e)},r.prototype.getNaturalDividerWidth=function(){return this.el.find(".fc-resource-area").width()},r.prototype.positionDivider=function(e){return this.el.find(".fc-resource-area").css("width",e)},r.prototype.updateSize=function(e,t,o){var n,s;return this.rowsNeedingHeightSync?(this.syncRowHeights(this.rowsNeedingHeightSync),this.rowsNeedingHeightSync=null):this.syncRowHeights(),s=this.syncHeadHeights(),n=t?"auto":e-s-this.queryMiscHeight(),this.timeBodyScroller.setHeight(n),this.spreadsheet.bodyScroller.setHeight(n),this.spreadsheet.updateSize(),r.__super__.updateSize.apply(this,arguments),this.resourceScrollJoiner.update()},r.prototype.queryMiscHeight=function(){return this.el.outerHeight()-Math.max(this.spreadsheet.headScroller.el.outerHeight(),this.timeHeadScroller.el.outerHeight())-Math.max(this.spreadsheet.bodyScroller.el.outerHeight(),this.timeBodyScroller.el.outerHeight())},r.prototype.syncHeadHeights=function(){var e;return this.spreadsheet.headHeight("auto"),this.headHeight("auto"),e=Math.max(this.spreadsheet.headHeight(),this.headHeight()),this.spreadsheet.headHeight(e),this.headHeight(e),e},r.prototype.queryResourceScroll=function(){var e,t,r,o,n,s,i,l;for(i={},l=this.timeBodyScroller.scrollEl.offset().top,n=this.getVisibleRows(),r=0,o=n.length;rl)){i.resourceId=s.resource.id,i.bottom=t-l;break}return i},r.prototype.applyResourceScroll=function(e){var t,r,o,n,s;if(e.resourceId&&(n=this.getResourceRow(e.resourceId),n&&(t=n.getTr("event"))))return o=this.timeBodyScroller.canvas.el.offset().top,r=t.offset().top+t.outerHeight(),s=r-e.bottom-o,this.timeBodyScroller.setScrollTop(s),this.spreadsheet.bodyScroller.setScrollTop(s)},r.prototype.scrollToResource=function(e){var t,r,o,n;if(o=this.getResourceRow(e.id),o&&(t=o.getTr("event")))return r=this.timeBodyScroller.canvas.el.offset().top,n=t.offset().top-r,this.timeBodyScroller.setScrollTop(n),this.spreadsheet.bodyScroller.setScrollTop(n)},r.prototype.prepareHits=function(){var e,t;return r.__super__.prepareHits.apply(this,arguments),this.eventRows=this.getEventRows(),this.shownEventRows=function(){var t,r,o,n;for(o=this.eventRows,n=[],t=0,r=o.length;t0)return o;return null},r.prototype.compareResources=function(e,t){return tt(e,t,this.orderSpecs)},r.prototype.ensureResourceGroup=function(e,t,r){var o,n,s,i,l,u,a,c,h,p,d;if(s=(e.resource||{})[r.field],n=null,r.order)for(h=t.children,i=l=0,a=h.length;l0)break}else for(p=t.children,i=u=0,c=p.length;u1))return this.syncRowHeights(e,!0)},r.prototype.getVisibleRows=function(){var e,t,r,o,n;for(r=this.rowHierarchy.getRows(),o=[],e=0,t=r.length;eMore Info',t)},Te=function(o){var n,s,i,l;return e.inArray(o,L)!==-1||(s=(o||"").match(/^(\d+)\-fcs\-(\d+)$/),!!(s&&10===s[1].length&&(i=t.utc(1e3*parseInt(s[2])),l=t.utc(r.mockSchedulerReleaseDate||P),l.isValid()&&(n=l.clone().subtract(ce),i.isAfter(n)))))},He=function(e){return Boolean(e.match(/\w+\:\/\/fullcalendar\.io\/|\/demos\/[\w-]+\.html$/))},xe=function(t,r){return r.append(e('
').html(t))},Re=function(e){return e.find(".fc-license-message").length>=1}});