/*! FullCalendar Scheduler v5.3.2 Docs & License: https://fullcalendar.io/scheduler (c) 2020 Adam Shaw */ var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n3)for(n=[n],r=3;r=0;i--){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=He(o))}for(i=e.length-1;i>=0;i--){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function Oe(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function We(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Ae(e){for(var t={},n=0,r=e;n1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(s=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=bt(function(e,t){var n={};for(var r in e)(!(r in gt)||gt[r]<=t)&&(n[r]=e[r]);return n}(o,s),i,n),d=c(e),p=c(t),f=function(e,t,n,r){var o=0;for(;o=nt(t)&&(r=ve(r,1))}return e.start&&(n=De(e.start),r&&r<=n&&(r=ve(n,1))),{start:n,end:r}}function an(e){var t=on(e);return Se(t.start,t.end)>1}function sn(e,t,n,r){return"year"===r?Ze(n.diffWholeYears(e,t),"year"):"month"===r?Ze(n.diffWholeMonths(e,t),"month"):Ee(e,t)}function ln(e,t){var n,r,o=[],i=t.start;for(e.sort(un),n=0;ni&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return it.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function hn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&hn(t,r.start)}}function Mn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function kn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var Pn={start:At,end:At,allDay:Boolean};function In(e,t,n){var o=function(e,t){var n=Wt(e,Pn),o=n.refined,i=n.extra,a=o.start?t.createMarkerMeta(o.start):null,s=o.end?t.createMarkerMeta(o.end):null,l=o.allDay;null==l&&(l=a&&a.isTimeUnspecified&&(!s||s.isTimeUnspecified));return r({range:{start:a?a.marker:null,end:s?s.marker:null},allDay:l},i)}(e,t),i=o.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return o}function Nn(e,t){return dn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function _n(e,t,n){return r(r({},Hn(e,t,n)),{timeZone:t.timeZone})}function Hn(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function On(e,t,n){var r=en({editable:!1},n),o=nn(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:En(o,t),instance:Ne(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function Wn(e,t,n){n.emitter.trigger("select",r(r({},An(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function An(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.dateSpanTransforms;a=0;r--){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:Q(),sourceDefId:s.sourceDefId,meta:s.meta,ui:qt(i,t),extendedProps:a}}return null}function Gn(e){return r(r(r({},Gt),Fn),e.pluginHooks.eventSourceRefiners)}function qn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Yn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r=1?Math.min(o,i):o}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=me(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",st(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?ke(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?ke(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-xe(Me(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Me(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?xe(Me(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Me(e))*60):new Date(e.valueOf()-(t||0))},e}(),rr=[],or={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function ir(e){for(var t=e.length>0?e[0].code:"en",n=rr.concat(e),r={en:or},o=0,i=n;o0;o--){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||or;return sr(e,n,r)}(e,t):sr(e.code,[e.code],e)}function sr(e,t,n){var r=He([or,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function lr(e){var t=ar(e.locale||"en",ir([]).map);return new nr(r(r({timeZone:kt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var ur,cr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function dr(e,t){return Lt(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return r(r({},cr),e)}))}(e),null,t)}function pr(e,t){return e.left>=t.left&&e.left=t.top&&e.top
",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),ur}var Sr={defs:{},instances:{}},Er=function(){function e(){this.getKeysForEventDefs=ct(this._getKeysForEventDefs),this.splitDateSelection=ct(this._splitDateSpan),this.splitEventStore=ct(this._splitEventStore),this.splitIndividualUi=ct(this._splitIndividualUi),this.splitEventDrag=ct(this._splitInteraction),this.splitEventResize=ct(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=We(n,(function(e,n){return t.eventUiBuilders[n]||ct(Cr)})),n){var d=n[c],p=a[c]||Sr,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:o[c]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],d.ui,i[c]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);nn:!!t&&e>=t.end)}}function Dr(e,t){var n=["fc-day","fc-day-"+he[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function Rr(e,t){var n=["fc-slot","fc-slot-"+he[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n}function wr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:it(e),type:t})}var Tr,xr=null;function Mr(){return null===xr&&(xr=function(){var e=document.createElement("div");G(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="
",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return U(e),t}()),xr}function kr(){return Tr||(Tr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=Pr(e);return document.body.removeChild(e),t}()),Tr}function Pr(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function Ir(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=Pr(e),l=s.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:s.x-i-a,scrollbarLeft:0,scrollbarRight:0};return Mr()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function Nr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():_r(e),o=Ir(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function _r(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function Hr(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function Or(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var Wr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=c.end?new Date(c.end.valueOf()-1):u),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),d.showNonCurrentDates||(s=cn(s,o.range)),s=cn(s=this.adjustActiveRange(s),r),l=pn(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=ot(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Ze({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(Qe(o)<0&&(a=De(a),a=n.add(a,o)),Qe(i)>1&&(s=ve(s=De(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,u=s.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&nt(c)e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,n)}function Lo(e,t,n,r){var o={};for(var i in e){var a=e[i];t[i]?o[i]=Uo(a,n,r):o[i]=a}return o}function Uo(e,t,n){var o=n.options,i=n.calendarApi,a=n.pluginHooks.eventSourceDefs[e.sourceDefId],s=Q();return a.fetch({eventSource:e,range:t,context:n},(function(r){var a=r.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,r.xhr)||a),e.success&&(a=e.success.call(i,a,r.xhr)||a),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:a})}),(function(r){console.warn(r.message,r),o.eventSourceFailure&&o.eventSourceFailure.call(i,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:s})}function Bo(e,t){return Oe(e,(function(e){return zo(e,t)}))}function zo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Vo(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Fo(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function jo(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Go(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function qo(e,t,n,r,o){var i=[];return{headerToolbar:e.headerToolbar?Yo(e.headerToolbar,e,t,n,r,o,i):null,footerToolbar:e.footerToolbar?Yo(e.footerToolbar,e,t,n,r,o,i):null,viewsWithButtons:i}}function Yo(e,t,n,r,o,i,a){return We(e,(function(e){return function(e,t,n,r,o,i,a){var s="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,p=void 0,f=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(p=r.getCustomButtonIconClass(t))||(p=r.getIconClass(e,s))||(f=t.text)):(n=o[e])?(a.push(e),d=function(){i.changeView(e)},(f=n.buttonTextOverride)||(p=r.getIconClass(e,s))||(f=n.buttonTextDefault)):i[e]&&(d=function(){i[e]()},(f=u[e])||(p=r.getIconClass(e,s))||(f=c[e])),{buttonName:e,buttonClick:d,buttonIcon:p,buttonText:f}}))}))}(e,t,n,r,o,i,a)}))}function Zo(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Xo(t)}(t,n):i=Xo(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function Xo(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ko(e,t){for(var n=Le(t.getCurrentData().eventSources),r=[],o=0,i=e;o1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var ri=function(){function e(e){var t=this;this.computeOptionsData=ct(this._computeOptionsData),this.computeCurrentViewData=ct(this._computeCurrentViewData),this.organizeRawLocales=ct(ir),this.buildLocale=ct(ar),this.buildPluginHooks=vo(),this.buildDateEnv=ct(oi),this.buildTheme=ct(ii),this.parseToolbars=ct(qo),this.buildViewSpecs=ct(Po),this.buildDateProfileGenerator=dt(ai),this.buildViewApi=ct(si),this.buildViewUiProps=dt(ci),this.buildEventUiBySource=ct(li,Ue),this.buildEventUiBases=ct(ui),this.parseContextBusinessHours=dt(di),this.buildTitle=ct(ni),this.emitter=new Wr,this.actionRunner=new ti(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},o=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=o.calendarOptions.initialView||o.pluginHooks.initialView,a=this.computeCurrentViewData(i,o,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(a.options);var s,l,u,c=(s=o.calendarOptions,l=o.dateEnv,null!=(u=s.initialDate)?l.createMarker(u):qn(s.now,l)),d=a.dateProfileGenerator.build(c);hn(d.activeRange,c)||(c=d.currentRange.start);for(var p={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,h=o.pluginHooks.contextInit;f1){var m=a&&n.getClass("buttonGroup")||"";return Fr.apply(void 0,o(["div",{className:m}],i))}return i[0]},t}(Qr),wi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,no(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",Fr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Qr),Ti=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=yn(t);if(i&&r.isValidSegDownEl(e.target)){var a=B(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new Zn(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=X(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(gi),xi=function(e){function t(t){var n,r,o,i,a,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){yn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,r=".fc-event",o=s.handleSegEnter,i=s.handleSegLeave,X(n,"mouseover",r,(function(e,t){if(t!==a){a=t,o(e,t);var n=function(e){a=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=yn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new Zn(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(gi),Mi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ct(Jr),t.buildViewPropTransformers=ct(Pi),t.buildToolbarProps=ct(ki),t.handleNavLinkClick=Z("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Gr(),t.footerRef=Gr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=vi(e,n),o=[Ti,xi].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,yi[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var _i="fc-col-header-cell",Hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,o=e.theme,i=e.viewApi,a=this.props,s=a.date,l=a.dateProfile,u=br(s,a.todayRange,null,l),c=[_i].concat(Dr(u,o)),d=t.format(s,a.dayHeaderFormat),p=n.navLinks&&!u.isDisabled&&a.colCnt>1?{"data-navlink":wr(s),tabIndex:0}:{},f=r(r(r({date:t.toDate(s),view:i},a.extraHookProps),{text:d}),u);return Fr(So,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:Wi,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,o){return Fr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:it(s),colSpan:a.colSpan},a.extraDataAttrs),Fr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Fr("a",r({ref:n,className:["fc-col-header-cell-cushion",a.isSticky?"fc-sticky":""].join(" ")},p),o)))}))},t}(Qr),Oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,o=t.theme,i=t.viewApi,a=t.options,s=ve(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[_i].concat(Dr(l,o),e.extraClassNames||[]),c=n.format(s,e.dayHeaderFormat),d=r(r(r(r({date:s},l),{view:i}),e.extraHookProps),{text:c});return Fr(So,{hookProps:d,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Wi,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(t,n,o,i){return Fr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Fr("div",{className:"fc-scrollgrid-sync-inner"},Fr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(Qr);function Wi(e){return e.text}var Ai=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=qn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=me(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,Ze(1,e.unit)),i=o.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:Li(r)},nextState:{nowDate:o,todayRange:Li(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Kr,t}(Vr);function Li(e){var t=De(e);return{start:t,end:ve(t,1)}}var Ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ct(Bi),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return Fr(Ai,{unit:"day"},(function(e,t){return Fr("tr",null,i&&i(),n.map((function(e){return o?Fr(Hi,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):Fr(Oi,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(Qr);function Bi(e,t,n){return e||Ni(t,n)}var zi=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),Vi=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;nt)return!0}return!1},t.prototype.needsYScrolling=function(){if(Gi.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;rt)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return Gi.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Gi.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Qr),Yi=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):0==--o[n]&&(delete i[n],delete t.callbackMap[n],a=!0),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Fe(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Le(this.currentMap)},e}();function Zi(e){for(var t=0,n=0,r=V(e,".fc-scrollgrid-shrink");n0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Ia()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"top",distance:c}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),u<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new Pa(!1):new ka(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,re(document.body),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new wa(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new xa,r.autoScroller=new Na,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(Si),Ha=function(){function e(e){this.origRect=_r(e),this.scrollCaches=Hr(e).map((function(e){return new ka(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&c=0&&do.layer)&&(g.rect.left+=l,g.rect.right+=l,g.rect.top+=u,g.rect.bottom+=u,o=g)}}}return o},e}();function Wa(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Nn(e.dateSpan,t.dateSpan)}function Aa(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.datePointTransforms;ao.start)return c.endDelta=u,c;return null}(s,e,o.subjectEl.classList.contains("fc-event-resizer-start"),l.range,i.pluginHooks.eventResizeJoinTransforms)),u&&(c=Un(a,i.getCurrentData().eventUiBases,u,i),p.mutatedEvents=c,n.component.isInteractionValid(p)||(d=!0,u=null,c=null,p.mutatedEvents=null)),c?i.dispatch({type:"SET_EVENT_RESIZE",state:p}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),d?ee():te(),t||(u&&Wa(s,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,o=n.eventRange.def,i=n.eventRange.instance,a=new Zn(t,o,i),s=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:a,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Zn(t,l.defs[o.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:a,event:u,relatedEvents:Kn(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:s})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Ze(0),endDelta:n.validMutation.endDelta||Ze(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var o=t.component,i=n.dragging=new _a(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=o.context.options.dragScroll;var a=n.hitDragging=new Oa(n.dragging,mi(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return B(e.subjectEl,".fc-event")},t}(gi);var Va=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!B(r,n),t.matchesEvent=!!B(r,Ba.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}o.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new wa(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Fa={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},ja=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,o){var i=n.hitDragging.dragging,a=null,s=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(a=e.component.context,n.canDropElOnCalendar(o.subjectEl,a)&&(s=function(e,t,n){for(var o=r({},t.leftoverProps),i=0,a=n.pluginHooks.externalDefTransforms;ia.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var o=u[r],i=0;i=o[i].top;)i++;o.splice(i,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var M in i)i[M]||(d[M.split(":")[0]]=!0);return{segsByFirstCol:u.map(cs),segsByEachCol:u.map((function(t,n){var o=function(e){for(var t=[],n=0,r=e;nc;)h(s[l].pop(),s[l].length,!1)}}}}var ps=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Yi,t.frameElRefs=new Yi,t.fgElRefs=new Yi,t.segHarnessRefs=new Yi,t.rootElRef=Gr(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,o=t.cells.length,i=Ja(t.businessHourSegs,o),a=Ja(t.bgEventSegs,o),s=Ja(this.getHighlightSegs(),o),l=Ja(this.getMirrorSegs(),o),u=us(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,o,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,p=u.segsByEachCol,f=u.segIsHidden,h=u.segTops,g=u.segMarginTops,v=u.moreCnts,m=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Fr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var o=e.renderFgSegs(d[r],f,h,g,y,t.todayRange),u=e.renderFgSegs(l[r],{},h,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Fr(es,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:v[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:f,moreMarginTop:m[r],segsByEachCol:p[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Fr(qr,null,Fr(qr,null,o),Fr(qr,null,u)),bgContent:Fr(qr,null,e.renderFillSegs(s[r],"highlight"),e.renderFillSegs(i[r],"non-business"),e.renderFillSegs(a[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!Ue(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,o,i,a,s,l,u){var c=this.context,d=this.props.eventSelection,p=this.state.framePositions,f=1===this.props.cells.length,h=[];if(p)for(var g=0,v=e;g1,showWeekNumbers:t.showWeekNumbers,todayRange:v,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:l[a],eventSelection:t.eventSelection,bgEventSegs:u[a].filter(ms),fgEventSegs:c[a],dateSelectionSegs:d[a],eventDrag:p[a],eventResize:f[a],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:h,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&a&&a.currentFgEventSegs===t.fgEventSegs&&Fr(hs,{date:a.date,dateProfile:n,segs:a.allSegs,alignmentEl:a.dayEl,topAlignmentEl:1===s?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:v}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Ar(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Ar(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,o=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=o)return{row:i,col:o,dateSpan:{range:this.getCellRange(i,o),allDay:!0},dayEl:this.getCellEl(i,o),relativeRect:{left:n.lefts[o],right:n.rights[o],top:r.tops[i],bottom:r.bottoms[i]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:ve(n,1)}},t}(ho);function vs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ms(e){return e.eventRange.def.allDay}var ys=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new Ss,t.tableRef=Gr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Fr(gs,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ho),Ss=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Fi),Es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ct(Cs),t.headerRef=Gr(),t.tableRef=Gr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&Fr(Ui,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return Fr(ys,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(Xa);function Cs(e,t){var n=new zi(e.renderRange,t);return new Vi(n,/year|month|week/.test(e.currentRangeUnit))}var bs=go({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:Es,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=ge(o,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=ge(l,6-Math.ceil(ye(s,l))));return{start:s,end:l}},t}(No)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Ds=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?vn(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(Er),Rs=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(hn(t.currentRange,e)){var n=De(e),r=e.valueOf()-n.valueOf();if(r>=nt(t.slotMinTime)&&r=0;t--)if(n=Ze(ws[t]),null!==(r=rt(n,e))&&r>1)return n;return e}(r),u=[];nt(a)i.top&&o.top0?" fc-timegrid-event-harness-inset":""),key:s,style:r({visibility:t[s]?"hidden":""},u)},Fr(Gs,r({seg:e,isDragging:n,isResizing:o,isDateSelecting:i,isSelected:s===l.eventSelection,isCondensed:e.bottom-e.top0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Fr(So,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:cl,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Fr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Fr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,o=n.theme,i=n.options,a=function(e){var t,n,r=[];for(t=0;t0?e="positive":(t.scrollLeft=1,e=t.scrollLeft>0?"reverse":"negative");return U(t),e}())}var Tl=/Edge/.test(navigator.userAgent),xl=function(){function e(e,t){var n=this;this.scrollEl=e,this.isRtl=t,this.usingRelative=null,this.updateSize=function(){var e=n.scrollEl,t=V(e,".fc-sticky"),r=n.queryElGeoms(t),o=e.clientWidth,i=e.clientHeight;n.usingRelative?function(e,t,n,r,o){e.forEach((function(e,i){var a,s,l=t[i],u=l.naturalBound,c=l.parentBound,d=c.right-c.left,p=c.bottom-c.bottom;d>r||p>o?(a=n[i].left-u.left,s=n[i].top-u.top):(a="",s=""),G(e,{position:"relative",left:a,right:-a,top:s})}))}(t,r,n.computeElDestinations(r,o),o,i):function(e,t,n){e.forEach((function(e,r){var o,i=t[r],a=i.textAlign,s=i.elWidth,l=i.parentBound,u=l.right-l.left;G(e,{left:o="center"===a&&u>n?(n-s)/2:"",right:o,top:0})}))}(t,r,o)},this.usingRelative=!function(){var e=document.createElement("div");e.className="fc-sticky",document.body.appendChild(e);var t=window.getComputedStyle(e).position;return U(e),-1!==t.indexOf("sticky")?t:null}()||Tl&&t,this.usingRelative&&(this.listener=new bl(e),this.listener.emitter.on("scrollEnd",this.updateSize))}return e.prototype.destroy=function(){this.listener&&this.listener.destroy()},e.prototype.queryElGeoms=function(e){for(var t=this.scrollEl,n=this.isRtl,r=function(e){var t=e.getBoundingClientRect(),n=Ir(e);return{left:t.left+n.borderLeft+n.scrollbarLeft-Dl(e),top:t.top+n.borderTop-e.scrollTop}}(t),o=[],i=0,a=e;i .fc-scroller"),t=e.map((function(e){var t=window.getComputedStyle(e);return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,overflowX:t.overflowX,overflowY:t.overflowY,marginBottom:t.marginBottom}})),n=0,r=Fl;nEi.MAX_TIMELINE_SLOTS&&(console.warn("slotLabelInterval results in too many cells"),e.labelInterval=null)}if(e.slotDuration){n.countDurationsBetween(r.start,r.end,e.slotDuration)>Ei.MAX_TIMELINE_SLOTS&&(console.warn("slotDuration results in too many cells"),e.slotDuration=null)}if(e.labelInterval&&e.slotDuration){var o=rt(e.labelInterval,e.slotDuration);(null===o||o<1)&&(console.warn("slotLabelInterval must be a multiple of slotDuration"),e.slotDuration=null)}}(o,e,t),eu(o,e,t),function(e,t,n){var r=t.currentRange,o=e.slotDuration;if(!o){for(var i=eu(e,t,n),a=0,s=Kl;a1&&u<=6){o=l;break}}if(o)n.countDurationsBetween(r.start,r.end,o)>200&&(o=null);o||(o=i),e.slotDuration=o}}(o,e,t);var i=n.slotLabelFormat,a=Array.isArray(i)?i:null!=i?[i]:function(e,t,n,r){var o,i,a=e.labelInterval,s=ot(a).unit,l=r.weekNumbers,u=o=i=null;"week"!==s||l||(s="day");switch(s){case"year":u={year:"numeric"};break;case"month":tu("years",t,n)>1&&(u={year:"numeric"}),o={month:"short"};break;case"week":tu("years",t,n)>1&&(u={year:"numeric"}),o={week:"narrow"};break;case"day":tu("years",t,n)>1?u={year:"numeric",month:"long"}:tu("months",t,n)>1&&(u={month:"long"}),l&&(o={week:"short"}),i={weekday:"narrow",day:"numeric"};break;case"hour":l&&(u={week:"short"}),tu("days",t,n)>1&&(o={weekday:"short",day:"numeric",month:"numeric",omitCommas:!0}),i={hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"};break;case"minute":et(a)/60>=6?(u={hour:"numeric",meridiem:"short"},o=function(e){return":"+ce(e.date.minute,2)}):u={hour:"numeric",minute:"numeric",meridiem:"short"};break;case"second":tt(a)/60>=6?(u={hour:"numeric",minute:"2-digit",meridiem:"lowercase"},o=function(e){return":"+ce(e.date.second,2)}):u={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"};break;case"millisecond":u={hour:"numeric",minute:"2-digit",second:"2-digit",meridiem:"lowercase"},o=function(e){return"."+ce(e.millisecond,3)}}return[].concat(u||[],o||[],i||[])}(o,e,t,n);o.headerFormats=a.map((function(e){return xt(e)})),o.isTimeScale=Boolean(o.slotDuration.milliseconds);var s=null;if(!o.isTimeScale){var l=ot(o.slotDuration).unit;/year|month|week/.test(l)&&(s=l)}o.largeUnit=s,o.emphasizeWeeks=1===Ke(o.slotDuration)&&tu("weeks",e,t)>=2&&!n.businessHours;var u,c,d=n.snapDuration;d&&(u=Ze(d),c=rt(o.slotDuration,u)),null==c&&(u=o.slotDuration,c=1),o.snapDuration=u,o.snapsPerSlot=c;var p=nt(e.slotMaxTime)-nt(e.slotMinTime),f=$l(e.renderRange.start,o,t),h=$l(e.renderRange.end,o,t);o.isTimeScale&&(f=t.add(f,e.slotMinTime),h=t.add(ve(h,-1),e.slotMaxTime)),o.timeWindowMs=p,o.normalizedRange={start:f,end:h};for(var g=[],v=f;v1&&!g,m=null,y=s[d]||(g?a:null);if(v){var S=t.format(u,p);h&&h.text===S?h.colspan+=1:m=nu(u,S,y)}else if(!h||pe(t.countDurationsBetween(e.normalizedRange.start,u,e.labelInterval))){S=t.format(u,p);m=nu(u,S,y)}else h.colspan+=1;m&&(m.weekStart=c,f.push(m))}return o}(o,t),o.slotsPerLabel=rt(o.labelInterval,o.slotDuration),o}function $l(e,t,n){var r=e;return t.isTimeScale||(r=De(r),t.largeUnit&&(r=n.startOf(r,t.largeUnit))),r}function Ql(e,t,n,r){if(r.isHiddenDay(e))return!1;if(t.isTimeScale){var o=De(e),i=e.valueOf()-o.valueOf()-nt(n.slotMinTime);return(i=(i%864e5+864e5)%864e5)=18)break}e.labelInterval=o}return o}function tu(e,t,n){var r=t.currentRange,o=null;return"years"===e?o=n.diffWholeYears(r.start,r.end):"months"===e||"weeks"===e?o=n.diffWholeMonths(r.start,r.end):"days"===e&&(o=be(r.start,r.end)),o||0}function nu(e,t,n){return{date:e,text:t,rowUnit:n,colspan:1,isWeekStart:!1}}var ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=dt(au),t.normalizeClassNames=Ro(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.options,o=e.cell,i=e.dateProfile,a=e.tDateProfile,s=br(o.date,e.todayRange,e.nowDate,i),l=["fc-timeline-slot","fc-timeline-slot-label"].concat("time"===o.rowUnit?Rr(s,t.theme):Dr(s,t.theme));o.isWeekStart&&l.push("fc-timeline-slot-em");var u=r.navLinks&&o.rowUnit&&"time"!==o.rowUnit?wr(o.date,o.rowUnit):null,c=this.refineHookProps({level:e.rowLevel,dateMarker:o.date,text:o.text,dateEnv:t.dateEnv,viewApi:t.viewApi}),d=this.normalizeClassNames(r.slotLabelClassNames,c);return Fr(Do,{hookProps:c,didMount:r.slotLabelDidMount,willUnmount:r.slotLabelWillUnmount},(function(t){return Fr("th",{ref:t,className:l.concat(d).join(" "),"data-date":n.formatIso(o.date,{omitTime:!a.isTimeScale,omitTimeZoneOffset:!0}),colSpan:o.colspan},Fr("div",{className:"fc-timeline-slot-frame",style:{height:e.rowInnerHeight}},Fr(ou,{hookProps:c,isSticky:e.isSticky,navLinkData:u})))}))},t}(Qr),ou=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Fr(Co,{hookProps:e.hookProps,content:t.options.slotLabelContent,defaultContent:iu},(function(t,o){return Fr("a",r({ref:t,className:"fc-timeline-slot-cushion fc-scrollgrid-sync-inner"+(e.isSticky?" fc-sticky":"")},n),o)}))},t}(Qr);function iu(e){return e.text}function au(e){return{level:e.level,date:e.dateEnv.toDate(e.dateMarker),view:e.viewApi,text:e.text}}var su=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dateProfile,n=e.tDateProfile,r=e.rowInnerHeights,o=e.todayRange,i=e.nowDate,a=n.cellRows;return Fr(qr,null,a.map((function(e,s){var l=s===a.length-1,u=n.isTimeScale&&l;return Fr("tr",{key:s,className:["fc-timeline-header-row",u?"fc-timeline-header-row-chrono":""].join(" ")},e.map((function(e){return Fr(ru,{key:e.date.toISOString(),cell:e,rowLevel:s,dateProfile:t,tDateProfile:n,todayRange:o,nowDate:i,rowInnerHeight:r&&r[s],isSticky:!l})})))})))},t}(Qr),lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Gr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=ot(t.tDateProfile.slotDuration).unit,o=t.slatCoords&&t.slatCoords.dateProfile===t.dateProfile?t.slatCoords:null;return Fr(Ai,{unit:r},(function(r,i){return Fr("div",{className:"fc-timeline-header",ref:e.rootElRef},Fr("table",{className:"fc-scrollgrid-sync-table",style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Fr("tbody",null,Fr(su,{dateProfile:t.dateProfile,tDateProfile:t.tDateProfile,nowDate:r,todayRange:i,rowInnerHeights:t.rowInnerHeights}))),n.options.nowIndicator&&Fr("div",{className:"fc-timeline-now-indicator-container"},o&&o.isDateInRange(r)&&Fr(da,{isAxis:!0,date:r},(function(e,t,n,i){return Fr("div",{ref:e,className:["fc-timeline-now-indicator-arrow"].concat(t).join(" "),style:{left:o.dateToCoord(r)}},i)}))))}))},t.prototype.componentDidMount=function(){this.updateSize()},t.prototype.componentDidUpdate=function(){this.updateSize()},t.prototype.updateSize=function(){this.props.onMaxCushionWidth&&this.props.onMaxCushionWidth(this.computeMaxCushionWidth())},t.prototype.computeMaxCushionWidth=function(){return Math.max.apply(Math,V(this.rootElRef.current,".fc-timeline-header-row:last-child .fc-timeline-slot-cushion").map((function(e){return e.getBoundingClientRect().width})))},t}(Qr),uu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,o=t.options,i=t.theme,a=e.date,s=e.tDateProfile,l=e.isEm,u=br(e.date,e.todayRange,e.nowDate,e.dateProfile),c=["fc-timeline-slot","fc-timeline-slot-lane"],d={"data-date":n.formatIso(a,{omitTimeZoneOffset:!0,omitTime:!s.isTimeScale})},p=r(r({date:n.toDate(e.date)},u),{view:t.viewApi});return l&&c.push("fc-timeline-slot-em"),s.isTimeScale&&c.push(pe(n.countDurationsBetween(s.normalizedRange.start,e.date,s.labelInterval))?"fc-timeline-slot-major":"fc-timeline-slot-minor"),c.push.apply(c,e.isDay?Dr(u,i):Rr(u,i)),Fr(So,{hookProps:p,classNames:o.slotLaneClassNames,content:o.slotLaneContent,didMount:o.slotLaneDidMount,willUnmount:o.slotLaneWillUnmount,elRef:e.elRef},(function(e,t,n,o){return Fr("td",r({ref:e,className:c.concat(t).join(" ")},d),Fr("div",{ref:n},o))}))},t}(Qr),cu=function(){function e(e,t,n,r,o,i){this.slatRootEl=e,this.dateProfile=n,this.tDateProfile=r,this.dateEnv=o,this.isRtl=i,this.outerCoordCache=new Ar(e,t,!0,!1),this.innerCoordCache=new Ar(e,F(t,"div"),!0,!1)}return e.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)}},e.prototype.isDateInRange=function(e){return hn(this.dateProfile.currentRange,e)},e.prototype.dateToCoord=function(e){var t=this.tDateProfile,n=this.computeDateSnapCoverage(e)/t.snapsPerSlot,r=Math.floor(n),o=n-(r=Math.min(r,t.slotCnt-1)),i=this.innerCoordCache,a=this.outerCoordCache;return this.isRtl?a.rights[r]-i.getWidth(r)*o-a.originClientRect.width:a.lefts[r]+i.getWidth(r)*o},e.prototype.computeDateSnapCoverage=function(e){return du(e,this.tDateProfile,this.dateEnv)},e.prototype.computeDurationLeft=function(e){var t=this.dateProfile,n=this.tDateProfile,r=this.dateEnv,o=this.isRtl,i=0;if(t){var a=r.add(t.activeRange.start,e);n.isTimeScale||(a=De(a)),i=this.dateToCoord(a),!o&&i&&(i+=1)}return i},e}();function du(e,t,n){var r=n.countDurationsBetween(t.normalizedRange.start,e,t.snapDuration);if(r<0)return 0;if(r>=t.snapDiffToIndex.length)return t.snapCnt;var o=Math.floor(r),i=t.snapDiffToIndex[o];return pe(i)?i+=r-o:i=Math.ceil(i),i}var pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Gr(),t.cellElRefs=new Yi,t.handleScrollRequest=function(e){var n=t.props.onScrollLeftRequest,r=t.coords;if(n&&r){if(e.time)n(r.computeDurationLeft(e.time));return!0}},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Fr("div",{className:"fc-timeline-slots",ref:this.rootElRef},Fr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,Fr(fu,{cellElRefs:this.cellElRefs,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange})))},t.prototype.componentDidMount=function(){this.updateSizing(),this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.updateSizing(),this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach(),this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props,n=this.context;null!==t.clientWidth&&this.scrollResponder&&(this.rootElRef.current.offsetWidth&&(this.coords=new cu(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.tDateProfile.slotDates.map((function(t){var n=t.toISOString();return e[n]}))),t.dateProfile,t.tDateProfile,n.dateEnv,n.isRtl),t.onCoords&&t.onCoords(this.coords),this.scrollResponder.update(!1)))},t.prototype.positionToHit=function(e){var t=this.coords.outerCoordCache,n=this.context,r=n.dateEnv,o=n.isRtl,i=this.props.tDateProfile,a=t.leftToIndex(e);if(null!=a){var s=t.getWidth(a),l=o?(t.rights[a]-e)/s:(e-t.lefts[a])/s,u=Math.floor(l*i.snapsPerSlot),c=r.add(i.slotDates[a],$e(i.snapDuration,u));return{dateSpan:{range:{start:c,end:r.add(c,i.snapDuration)},allDay:!this.props.tDateProfile.isTimeScale},dayEl:this.cellElRefs.currentMap[a],left:t.lefts[a],right:t.rights[a]}}return null},t}(Qr),fu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.tDateProfile,n=e.cellElRefs,r=t.slotDates,o=t.isWeekStarts,i=!t.isTimeScale&&!t.largeUnit;return Fr("tbody",null,Fr("tr",null,r.map((function(r,a){var s=r.toISOString();return Fr(uu,{key:s,elRef:n.createRef(s),date:r,dateProfile:e.dateProfile,tDateProfile:t,nowDate:e.nowDate,todayRange:e.todayRange,isEm:o[a],isDay:i})}))))},t}(Qr);var hu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=[].concat(e.eventResizeSegs,e.dateSelectionSegs);return e.timelineCoords&&Fr("div",{className:"fc-timeline-bg"},this.renderSegs(e.businessHourSegs||[],e.timelineCoords,"non-business"),this.renderSegs(e.bgEventSegs||[],e.timelineCoords,"bg-event"),this.renderSegs(t,e.timelineCoords,"highlight"))},t.prototype.renderSegs=function(e,t,n){var o=this.props,i=o.todayRange,a=o.nowDate,s=e.map((function(e){var o=t.rangeToCoords(e);return Fr("div",{key:kn(e.eventRange),className:"fc-timeline-bg-harness",style:{left:o.left,right:-o.right}},"bg-event"===n?Fr(ma,r({seg:e},xn(e,i,a))):va(n))}));return Fr(qr,null,s)},t}(Qr),gu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t,n,r,o){var i=function(e,t,n){if(!t.isTimeScale&&(e=on(e),t.largeUnit)){var r=e;((e={start:n.startOf(e.start,t.largeUnit),end:n.startOf(e.end,t.largeUnit)}).end.valueOf()!==r.end.valueOf()||e.end<=e.start)&&(e={start:e.start,end:n.add(e.end,t.slotDuration)})}return e}(e,r,o),a=[];if(du(i.start,r,o)i.left&&r.lefta&&o=s[h].top;)h++;s.splice(h,0,{key:d,dims:p,top:f}),l=Math.max(l,f+p.height)}}for(var m={},y=0,S=s;y=0;n--){var r=t[n].parseMeta(e);if(r)return{meta:r,sourceDefId:n}}}(r);if(o)return{_raw:e,sourceId:Q(),sourceDefId:o.sourceDefId,meta:o.meta,publicId:r.id||"",isFetching:!1,latestFetchId:"",fetchRange:null}}return null}function Au(e,t,n){var o=n.options,i=n.dateProfile;if(!e||!t)return Lu(o.initialResources||o.resources,i.activeRange,o.refetchResourcesOnNavigate,n);switch(t.type){case"RESET_RESOURCE_SOURCE":return Lu(t.resourceSourceInput,i.activeRange,o.refetchResourcesOnNavigate,n);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return function(e,t,n,r){return!n||function(e){return Boolean(_u(e.sourceDefId).ignoreRange)}(e)||e.fetchRange&&dn(e.fetchRange,t)?e:Uu(e,t,r)}(e,i.activeRange,o.refetchResourcesOnNavigate,n);case"RECEIVE_RESOURCES":case"RECEIVE_RESOURCE_ERROR":return function(e,t,n){if(t===e.latestFetchId)return r(r({},e),{isFetching:!1,fetchRange:n});return e}(e,t.fetchId,t.fetchRange);case"REFETCH_RESOURCES":return Uu(e,i.activeRange,n);default:return e}}function Lu(e,t,n,r){if(e){var o=Wu(e);return o=Uu(o,n?t:null,r)}return null}function Uu(e,t,n){var o=_u(e.sourceDefId),i=Q();return o.fetch({resourceSource:e,range:t,context:n},(function(e){n.dispatch({type:"RECEIVE_RESOURCES",fetchId:i,fetchRange:t,rawResources:e.rawResources})}),(function(e){n.dispatch({type:"RECEIVE_RESOURCE_ERROR",fetchId:i,fetchRange:t,error:e})})),r(r({},e),{isFetching:!0,latestFetchId:i})}var Bu={id:String,parentId:String,children:At,title:String,businessHours:At,extendedProps:At,eventEditable:Boolean,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventConstraint:At,eventOverlap:Boolean,eventAllow:At,eventClassNames:jt,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String};function zu(e,t,n,o){void 0===t&&(t="");var i=Wt(e,Bu),a=i.refined,s=i.extra,l={id:a.id||"_fc:"+Q(),parentId:a.parentId||t,title:a.title||"",businessHours:a.businessHours?dr(a.businessHours,o):null,ui:qt({editable:a.eventEditable,startEditable:a.eventStartEditable,durationEditable:a.eventDurationEditable,constraint:a.eventConstraint,overlap:a.eventOverlap,allow:a.eventAllow,classNames:a.eventClassNames,backgroundColor:a.eventBackgroundColor,borderColor:a.eventBorderColor,textColor:a.eventTextColor,color:a.eventColor},o),extendedProps:r(r({},s),a.extendedProps)};if(Object.freeze(l.ui.classNames),Object.freeze(l.extendedProps),n[l.id]);else if(n[l.id]=l,a.children)for(var u=0,c=a.children;u0)break}t.splice(r,0,e)}function gc(e){var t=r(r(r({},e.extendedProps),e.ui),e);return delete t.ui,delete t.extendedProps,t}function vc(e,t){return e.spec===t.spec&&e.value===t.value}var mc=go({deps:[El],reducers:[function(e,t,n){var o=Au(e&&e.resourceSource,t,n);return{resourceSource:o,resourceStore:Fu(e&&e.resourceStore,t,o,n),resourceEntityExpansions:function(e,t){var n;if(!e||!t)return{};switch(t.type){case"SET_RESOURCE_ENTITY_EXPANDED":return r(r({},e),((n={})[t.id]=t.isExpanded,n));default:return e}}(e&&e.resourceEntityExpansions,t),loadingLevel:n.loadingLevel+(o&&o.isFetching?1:0)}}],eventRefiners:ju,eventDefMemberAdders:[function(e){return{resourceIds:(t=e.resourceIds,(t||[]).map((function(e){return String(e)}))).concat(e.resourceId?[e.resourceId]:[]),resourceEditable:e.resourceEditable};var t}],isDraggableTransformers:[function(e,t,n,r){if(!e){var o=r.getCurrentData();if(o.viewSpecs[o.currentViewType].optionDefaults.needsResourceData&&wu(t,r))return!0}return e}],eventDragMutationMassagers:[function(e,t,n){var r=t.dateSpan.resourceId,o=n.dateSpan.resourceId;r&&o&&r!==o&&(e.resourceMutation={matchResourceId:r,setResourceId:o})}],eventDefMutationAppliers:[function(e,t,n){var r=t.resourceMutation;if(r&&wu(e,n)){var o=e.resourceIds.indexOf(r.matchResourceId);if(-1!==o){var i=e.resourceIds.slice();i.splice(o,1),-1===i.indexOf(r.setResourceId)&&i.push(r.setResourceId),e.resourceIds=i}}}],dateSelectionTransformers:[function(e,t){var n=e.dateSpan.resourceId,r=t.dateSpan.resourceId;if(n&&r)return(!1!==e.component.allowAcrossResources||n===r)&&{resourceId:n}}],datePointTransforms:[function(e,t){return e.resourceId?{resource:t.calendarApi.getResourceById(e.resourceId)}:{}}],dateSpanTransforms:[function(e,t){return e.resourceId?{resource:t.calendarApi.getResourceById(e.resourceId)}:{}}],viewPropsTransformers:[Tu,Mu],isPropsValid:function(e,t){var n=(new qu).splitProps(r(r({},e),{resourceStore:t.getCurrentData().resourceStore}));for(var o in n){var i=n[o];if(o&&n[""]&&(i=r(r({},i),{eventStore:Vt(n[""].eventStore,i.eventStore),eventUiBases:r(r({},n[""].eventUiBases),i.eventUiBases)})),!lo(i,t,{resourceId:o},Yu.bind(null,o)))return!1}return!0},externalDefTransforms:[function(e){return e.resourceId?{resourceId:e.resourceId}:{}}],eventResizeJoinTransforms:[function(e,t){if(!1===e.component.allowAcrossResources&&e.dateSpan.resourceId!==t.dateSpan.resourceId)return!1}],eventDropTransformers:[function(e,t){var n=e.resourceMutation;if(n){var r=t.calendarApi;return{oldResource:r.getResourceById(n.matchResourceId),newResource:r.getResourceById(n.setResourceId)}}return{oldResource:null,newResource:null}}],optionChangeHandlers:Xu,optionRefiners:Ju,listenerRefiners:$u,propSetHandlers:{resourceStore:function(e,t){var n=t.emitter;n.hasHandlers("resourcesSet")&&n.trigger("resourcesSet",function(e,t){var n=[];for(var r in e)n.push(new Gu(t,e[r]));return n}(e,t))}}}),yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowAcrossResources=!1,t.splitter=new lc,t.slicers={},t.joiner=new Sc,t.tableRef=Gr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,o=t.resourceDayTableModel,i=t.nextDayThreshold,a=t.dateProfile,s=this.splitter.splitProps(t);this.slicers=We(s,(function(t,n){return e.slicers[n]||new Ss}));var l=We(this.slicers,(function(e,t){return e.sliceProps(s[t],a,i,n,o.dayTableModel)}));return this.allowAcrossResources=1===o.dayTableModel.colCnt,Fr(gs,r({forPrint:t.forPrint,ref:this.tableRef,elRef:this.handleRootEl},this.joiner.joinProps(l,o),{cells:o.cells,dateProfile:a,colGroupNode:t.colGroupNode,tableMinWidth:t.tableMinWidth,renderRowIntro:t.renderRowIntro,dayMaxEvents:t.dayMaxEvents,dayMaxEventRows:t.dayMaxEventRows,showWeekNumbers:t.showWeekNumbers,expandRows:t.expandRows,headerAlignElRef:t.headerAlignElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:{range:n.dateSpan.range,allDay:n.dateSpan.allDay,resourceId:this.props.resourceDayTableModel.cells[n.row][n.col].resource.id},dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ho),Sc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.transformSeg=function(e,t,n){return t.computeColRanges(e.firstCol,e.lastCol,n).map((function(t){return r(r(r({},e),t),{isStart:e.isStart&&t.isStart,isEnd:e.isEnd&&t.isEnd})}))},t}(cc),Ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.flattenResources=ct(dc),t.buildResourceDayTableModel=ct(Cc),t.headerRef=Gr(),t.tableRef=Gr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=n.options,o=r.resourceOrder||Ku,i=this.flattenResources(t.resourceStore,o),a=this.buildResourceDayTableModel(t.dateProfile,n.dateProfileGenerator,i,r.datesAboveResources,n),s=r.dayHeaders&&Fr(tc,{ref:this.headerRef,resources:i,dateProfile:t.dateProfile,dates:a.dayTableModel.headerDates,datesRepDistinctDays:!0}),l=function(n){return Fr(yc,{ref:e.tableRef,dateProfile:t.dateProfile,resourceDayTableModel:a,businessHours:t.businessHours,eventStore:t.eventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,nextDayThreshold:r.nextDayThreshold,tableMinWidth:n.tableMinWidth,colGroupNode:n.tableColGroupNode,dayMaxEvents:r.dayMaxEvents,dayMaxEventRows:r.dayMaxEventRows,showWeekNumbers:r.weekNumbers,expandRows:!t.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:n.clientWidth,clientHeight:n.clientHeight,forPrint:t.forPrint})};return r.dayMinWidth?this.renderHScrollLayout(s,l,a.colCnt,r.dayMinWidth):this.renderSimpleLayout(s,l)},t}(Xa);function Cc(e,t,n,r,o){var i=Cs(e,t);return r?new ac(i,n,o):new ic(i,n,o)}var bc=go({deps:[El,mc,bs],initialView:"resourceDayGridDay",views:{resourceDayGrid:{type:"dayGrid",component:Ec,needsResourceData:!0},resourceDayGridDay:{type:"resourceDayGrid",duration:{days:1}},resourceDayGridWeek:{type:"resourceDayGrid",duration:{weeks:1}},resourceDayGridMonth:{type:"resourceDayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),Dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowAcrossResources=!1,t.buildDayRanges=ct($s),t.splitter=new lc,t.slicers={},t.joiner=new Rc,t.timeColsRef=Gr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,o=n.dateEnv,i=n.options,a=t.dateProfile,s=t.resourceDayTableModel,l=this.dayRanges=this.buildDayRanges(s.dayTableModel,a,o),u=this.splitter.splitProps(t);this.slicers=We(u,(function(t,n){return e.slicers[n]||new Qs}));var c=We(this.slicers,(function(e,t){return e.sliceProps(u[t],a,null,n,l)}));return this.allowAcrossResources=1===l.length,Fr(Ai,{unit:i.nowIndicator?"minute":"day"},(function(n,o){return Fr(Xs,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.joiner.joinProps(c,s),{dateProfile:a,axis:t.axis,slotDuration:t.slotDuration,slatMetas:t.slatMetas,cells:s.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:n,nowIndicatorSegs:i.nowIndicator&&e.buildNowIndicatorSegs(n),todayRange:o,onScrollTopRequest:t.onScrollTopRequest,forPrint:t.forPrint,onSlatCoords:t.onSlatCoords}))}))},t.prototype.buildNowIndicatorSegs=function(e){var t=this.slicers[""].sliceNowDate(e,this.context,this.dayRanges);return this.joiner.expandSegs(this.props.resourceDayTableModel,t)},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:{range:n.dateSpan.range,allDay:n.dateSpan.allDay,resourceId:this.props.resourceDayTableModel.cells[0][n.col].resource.id},dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ho),Rc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.transformSeg=function(e,t,n){return[r(r({},e),{col:t.computeCol(e.col,n)})]},t}(cc),wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.flattenResources=ct(dc),t.buildResourceTimeColsModel=ct(Tc),t.buildSlatMetas=ct(Is),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,o=n.options,i=n.dateEnv,a=t.dateProfile,s=this.allDaySplitter.splitProps(t),l=o.resourceOrder||Ku,u=this.flattenResources(t.resourceStore,l),c=this.buildResourceTimeColsModel(a,n.dateProfileGenerator,u,o.datesAboveResources,n),d=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,o.slotLabelInterval,o.slotDuration,i),p=o.dayMinWidth,f=!p,h=p,g=o.dayHeaders&&Fr(tc,{resources:u,dates:c.dayTableModel.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:f?this.renderHeadAxis:null}),v=!1!==o.allDaySlot&&function(n){return Fr(yc,r({},s.allDay,{dateProfile:a,resourceDayTableModel:c,nextDayThreshold:o.nextDayThreshold,tableMinWidth:n.tableMinWidth,colGroupNode:n.tableColGroupNode,renderRowIntro:f?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:n.clientWidth,clientHeight:n.clientHeight,forPrint:t.forPrint},e.getAllDayMaxEventProps()))},m=function(n){return Fr(Dc,r({},s.timed,{dateProfile:a,axis:f,slotDuration:o.slotDuration,slatMetas:d,resourceDayTableModel:c,tableColGroupNode:n.tableColGroupNode,tableMinWidth:n.tableMinWidth,clientWidth:n.clientWidth,clientHeight:n.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:n.expandRows,forPrint:t.forPrint,onScrollTopRequest:e.handleScrollTopRequest}))};return h?this.renderHScrollLayout(g,v,m,c.colCnt,p,d,this.state.slatCoords):this.renderSimpleLayout(g,v,m)},t}(_s);function Tc(e,t,n,r,o){var i=tl(e,t);return r?new ac(i,n,o):new ic(i,n,o)}var xc=go({deps:[El,mc,nl],initialView:"resourceTimeGridDay",views:{resourceTimeGrid:{type:"timeGrid",component:wc,needsResourceData:!0},resourceTimeGridDay:{type:"resourceTimeGrid",duration:{days:1}},resourceTimeGridWeek:{type:"resourceTimeGrid",duration:{weeks:1}}}});function Mc(e){for(var t=e.depth,n=e.hasChildren,r=e.isExpanded,i=e.onExpanderClick,a=[],s=0;s1?Fr(_c,{key:a,colSpec:i,fieldValue:l,rowSpan:s}):Fr(kc,{key:a,colSpec:i,resource:t,fieldValue:l,depth:r,hasChildren:e.hasChildren,isExpanded:e.isExpanded,innerHeight:e.innerHeight})}})))},t}(Qr);Oc.addPropsEquality({rowSpans:ut});var Wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerInnerRef=Gr(),t.onExpanderClick=function(){var e=t.props;t.context.dispatch({type:"SET_RESOURCE_ENTITY_EXPANDED",id:e.id,isExpanded:!e.isExpanded})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r={groupValue:t.group.value,view:n.viewApi},o=t.group.spec;return Fr("tr",null,Fr(So,{hookProps:r,classNames:o.labelClassNames,content:o.labelContent,defaultContent:Ac,didMount:o.labelDidMount,willUnmount:o.labelWillUnmount},(function(r,o,i,a){return Fr("td",{className:["fc-datagrid-cell","fc-resource-group",n.theme.getClass("tableCellShaded")].concat(o).join(" "),colSpan:t.spreadsheetColCnt,ref:r},Fr("div",{className:"fc-datagrid-cell-frame",style:{height:t.innerHeight}},Fr("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner",ref:e.innerInnerRef},Fr(Mc,{depth:0,hasChildren:!0,isExpanded:t.isExpanded,onExpanderClick:e.onExpanderClick}),Fr("span",{className:"fc-datagrid-cell-main",ref:i},a))))})))},t}(Qr);function Ac(e){return e.groupValue||Fr(qr,null," ")}Wc.addPropsEquality({group:vc});var Lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.resizerElRefs=new Yi(t._handleColResizerEl.bind(t)),t.colDraggings={},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.colSpecs,r=t.superHeaderRendering,o=t.rowInnerHeights,i={view:this.context.viewApi},a=[];if(o=o.slice(),r){var s=o.shift();a.push(Fr("tr",{key:"row-super"},Fr(So,{hookProps:i,classNames:r.headerClassNames,content:r.headerContent,didMount:r.headerDidMount,willUnmount:r.headerWillUnmount},(function(e,t,r,o){return Fr("th",{colSpan:n.length,className:["fc-datagrid-cell","fc-datagrid-cell-super"].concat(t).join(" "),ref:e},Fr("div",{className:"fc-datagrid-cell-frame",style:{height:s}},Fr("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))))}var l=o.shift();return a.push(Fr("tr",{key:"row"},n.map((function(t,r){var o=r===n.length-1;return Fr(So,{key:r,hookProps:i,classNames:t.headerClassNames,content:t.headerContent,didMount:t.headerDidMount,willUnmount:t.headerWillUnmount},(function(n,i,a,s){return Fr("th",{ref:n,className:["fc-datagrid-cell"].concat(i).join(" ")},Fr("div",{className:"fc-datagrid-cell-frame",style:{height:l}},Fr("div",{className:"fc-datagrid-cell-cushion fc-scrollgrid-sync-inner"},t.isMain&&Fr("span",{className:"fc-datagrid-expander fc-datagrid-expander-placeholder"},Fr("span",{className:"fc-icon"})),Fr("span",{className:"fc-datagrid-cell-main",ref:a},s)),!o&&Fr("div",{className:"fc-datagrid-cell-resizer",ref:e.resizerElRefs.createRef(r)})))}))})))),Fr(qr,null,a)},t.prototype._handleColResizerEl=function(e,t){var n,r=this.colDraggings;e?(n=this.initColResizing(e,parseInt(t,10)))&&(r[t]=n):(n=r[t])&&(n.destroy(),delete r[t])},t.prototype.initColResizing=function(e,t){var n=this.context,r=n.pluginHooks,o=n.isRtl,i=this.props.onColWidthChange,a=r.elementDraggingImpl;if(a){var s,l,u=new a(e);return u.emitter.on("dragstart",(function(){var n=V(B(e,"tr"),"th");l=n.map((function(e){return B(e,"th").getBoundingClientRect().width})),s=l[t]})),u.emitter.on("dragmove",(function(e){l[t]=Math.max(s+e.deltaX*(o?-1:1),20),i&&i(l.slice())})),u.setAutoScrollEnabled(!1),u}},t}(Qr),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=dt(zc),t.normalizeClassNames=Ro(),t.handleHeightChange=function(e,n){t.props.onHeightChange&&t.props.onHeightChange(B(e,"tr"),n)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=n.options,o=this.refineHookProps({resource:t.resource,context:n}),i=this.normalizeClassNames(r.resourceLaneClassNames,o);return Fr("tr",{ref:t.elRef},Fr(Do,{hookProps:o,didMount:r.resourceLaneDidMount,willUnmount:r.resourceLaneWillUnmount},(function(n){return Fr("td",{ref:n,className:["fc-timeline-lane","fc-resource"].concat(i).join(" "),"data-resource-id":t.resource.id},Fr("div",{className:"fc-timeline-lane-frame",style:{height:t.innerHeight}},Fr(Bc,{resource:t.resource}),Fr(Eu,{dateProfile:t.dateProfile,tDateProfile:t.tDateProfile,nowDate:t.nowDate,todayRange:t.todayRange,nextDayThreshold:t.nextDayThreshold,businessHours:t.businessHours,eventStore:t.eventStore,eventUiBases:t.eventUiBases,dateSelection:t.dateSelection,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,timelineCoords:t.timelineCoords,onHeightChange:e.handleHeightChange})))})))},t}(Qr),Bc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n={resource:new Gu(t,e.resource)};return Fr(Co,{hookProps:n,content:t.options.resourceLaneContent},(function(e,t){return t&&Fr("div",{className:"fc-timeline-lane-misc",ref:e},t)}))},t}(Qr);function zc(e){return{resource:new Gu(e.context,e.resource)}}var Vc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.props.renderingHooks,r={groupValue:t.groupValue,view:this.context.viewApi};return Fr("tr",{ref:t.elRef},Fr(So,{hookProps:r,classNames:n.laneClassNames,content:n.laneContent,didMount:n.laneDidMount,willUnmount:n.laneWillUnmount},(function(n,r,o,i){return Fr("td",{className:["fc-timeline-lane","fc-resource-group",e.context.theme.getClass("tableCellShaded")].concat(r).join(" "),ref:n},Fr("div",{style:{height:t.innerHeight},ref:o},i))})))},t}(Qr),Fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Gr(),t.rowElRefs=new Yi,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Fr("table",{ref:this.rootElRef,className:"fc-scrollgrid-sync-table "+t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},Fr(jc,{rowElRefs:this.rowElRefs,rowNodes:e.rowNodes,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange,splitProps:e.splitProps,fallbackBusinessHours:e.fallbackBusinessHours,slatCoords:e.slatCoords,innerHeights:e.innerHeights,onRowHeightChange:e.onRowHeightChange}))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.componentWillUnmount=function(){this.props.onRowCoords&&this.props.onRowCoords(null)},t.prototype.updateCoords=function(){var e,t=this.props;t.onRowCoords&&null!==t.clientWidth&&this.props.onRowCoords(new Ar(this.rootElRef.current,(e=this.rowElRefs.currentMap,t.rowNodes.map((function(t){return e[t.id]}))),!1,!0))},t}(Qr);var jc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.rowElRefs,o=e.innerHeights;return Fr("tbody",null,e.rowNodes.map((function(i,a){if(i.group)return Fr(Vc,{key:i.id,elRef:n.createRef(i.id),groupValue:i.group.value,renderingHooks:i.group.spec,innerHeight:o[a]||""});if(i.resource){var s=i.resource;return Fr(Uc,r({key:i.id,elRef:n.createRef(i.id)},e.splitProps[s.id],{resource:s,dateProfile:e.dateProfile,tDateProfile:e.tDateProfile,nowDate:e.nowDate,todayRange:e.todayRange,nextDayThreshold:t.options.nextDayThreshold,businessHours:s.businessHours||e.fallbackBusinessHours,innerHeight:o[a]||"",timelineCoords:e.slatCoords,onHeightChange:e.onRowHeightChange}))}})))},t}(Qr),Gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeHasResourceBusinessHours=ct(qc),t.resourceSplitter=new qu,t.bgSlicer=new gu,t.slatsRef=Gr(),t.state={slatCoords:null},t.handleEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t.handleRowCoords=function(e){t.rowCoords=e,t.props.onRowCoords&&t.props.onRowCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,o=t.dateProfile,i=t.tDateProfile,a=ot(i.slotDuration).unit,s=this.computeHasResourceBusinessHours(t.rowNodes),l=this.resourceSplitter.splitProps(t),u=l[""],c=this.bgSlicer.sliceProps(u,o,i.isTimeScale?null:t.nextDayThreshold,r,o,r.dateProfileGenerator,i,r.dateEnv),d=n.slatCoords&&n.slatCoords.dateProfile===t.dateProfile?n.slatCoords:null;return Fr("div",{ref:this.handleEl,className:"fc-timeline-body",style:{minWidth:t.tableMinWidth}},Fr(Ai,{unit:a},(function(n,a){return Fr(qr,null,Fr(pu,{ref:e.slatsRef,dateProfile:o,tDateProfile:i,nowDate:n,todayRange:a,clientWidth:t.clientWidth,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,onCoords:e.handleSlatCoords,onScrollLeftRequest:t.onScrollLeftRequest}),Fr(hu,{businessHourSegs:s?null:c.businessHourSegs,bgEventSegs:c.bgEventSegs,timelineCoords:d,eventResizeSegs:c.eventResize?c.eventResize.segs:[],dateSelectionSegs:c.dateSelectionSegs,nowDate:n,todayRange:a}),Fr(Fc,{rowNodes:t.rowNodes,dateProfile:o,tDateProfile:t.tDateProfile,nowDate:n,todayRange:a,splitProps:l,fallbackBusinessHours:s?t.businessHours:null,clientWidth:t.clientWidth,minHeight:t.expandRows?t.clientHeight:"",tableMinWidth:t.tableMinWidth,innerHeights:t.rowInnerHeights,slatCoords:d,onRowCoords:e.handleRowCoords,onRowHeightChange:t.onRowHeightChange}),r.options.nowIndicator&&d&&d.isDateInRange(n)&&Fr("div",{className:"fc-timeline-now-indicator-container"},Fr(da,{isAxis:!1,date:n},(function(e,t,r,o){return Fr("div",{ref:e,className:["fc-timeline-now-indicator-line"].concat(t).join(" "),style:{left:d.dateToCoord(n)}},o)}))))})))},t.prototype.queryHit=function(e,t){var n=this.rowCoords,r=n.topToIndex(t);if(null!=r){var o=this.props.rowNodes[r].resource;if(o){var i=this.slatsRef.current.positionToHit(e);if(i)return{component:this,dateSpan:{range:i.dateSpan.range,allDay:i.dateSpan.allDay,resourceId:o.id},rect:{left:i.left,right:i.right,top:n.tops[r],bottom:n.bottoms[r]},dayEl:i.dayEl,layer:0}}}},t}(ho);function qc(e){for(var t=0,n=e;t0){i.rowId=s.id,i.fromBottom=l;break}}return i}},t}(Qr);function Xc(e){for(var t={},n=0;n