/*! FullCalendar Resources Common Plugin v4.1.0 Docs & License: https://fullcalendar.io/scheduler (c) 2019 Adam Shaw */ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@fullcalendar/core")):"function"==typeof define&&define.amd?define(["exports","@fullcalendar/core"],r):(e=e||self,r(e.FullCalendarResourceCommon={},e.FullCalendar))}(this,function(e,r){"use strict";function t(e,r){function t(){this.constructor=e}oe(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}function n(e,t,n,i){if(t){var a=o(n.instances,i),c=s(a,n.defs);return se(c,u(c,e)),r.filterHash(e,function(e,r){return c[r]})}return e}function o(e,t){return r.filterHash(e,function(e){return r.rangesIntersect(e.range,t)})}function s(e,r){var t={};for(var n in e)for(var o=e[n],s=0,u=r[o.defId].resourceIds;s=0;t--){var n=ce[t],o=n.parseMeta(e);if(o){var s=h("object"==typeof e&&e?e:{},o,t);return s._raw=r.freezeRaw(e),s}}return null}function h(e,t,n){var o=r.refineProps(e,ae);return o.sourceId=String(le++),o.sourceDefId=n,o.meta=t,o.publicId=o.id,o.isFetching=!1,o.latestFetchId="",o.fetchRange=null,delete o.id,o}function v(e,r,t,n){switch(r.type){case"INIT":return g(n.opt("resources"),n);case"RESET_RESOURCE_SOURCE":return g(r.resourceSourceInput,n,!0);case"PREV":case"NEXT":case"SET_DATE":case"SET_VIEW_TYPE":return R(e,t.activeRange,n);case"RECEIVE_RESOURCES":case"RECEIVE_RESOURCE_ERROR":return E(e,r.fetchId,r.fetchRange);case"REFETCH_RESOURCES":return y(e,t.activeRange,n);default:return e}}function g(e,r,t){if(e){var n=p(e);return!t&&r.opt("refetchResourcesOnNavigate")||(n=y(n,null,r)),n}return null}function R(e,t,n){return!n.opt("refetchResourcesOnNavigate")||f(e)||e.fetchRange&&r.rangesEqual(e.fetchRange,t)?e:y(e,t,n)}function y(e,r,t){var n=d(e.sourceDefId),o=String(de++);return n.fetch({resourceSource:e,calendar:t,range:r},function(e){t.afterSizingTriggers._resourcesRendered=[null],t.dispatch({type:"RECEIVE_RESOURCES",fetchId:o,fetchRange:r,rawResources:e.rawResources})},function(e){t.dispatch({type:"RECEIVE_RESOURCE_ERROR",fetchId:o,fetchRange:r,error:e})}),se({},e,{isFetching:!0,latestFetchId:o})}function E(e,r,t){return r===e.latestFetchId?se({},e,{isFetching:!1,fetchRange:t}):e}function m(e,t,n,o){void 0===t&&(t="");var s={},u=r.refineProps(e,fe,{},s),i={},a=r.processScopedUiProps("event",s,o,i);if(u.id||(u.id=pe+he++),u.parentId||(u.parentId=t),u.businessHours=u.businessHours?r.parseBusinessHours(u.businessHours,o):null,u.ui=a,u.extendedProps=se({},i,u.extendedProps),Object.freeze(a.classNames),Object.freeze(u.extendedProps),n[u.id]);else if(n[u.id]=u,u.children){for(var c=0,l=u.children;cPlease use a valid license key. More Info')}function K(e){if(Se.indexOf(e)!==-1)return!0;var t=(e||"").match(/^(\d+)\-fcs\-(\d+)$/);if(t&&10===t[1].length){var n=new Date(1e3*parseInt(t[2],10)),o=new Date(r.config.mockSchedulerReleaseDate||ye);if(r.isValidDate(o)){var s=r.addDays(o,-Ee);if(s0)break}t.splice(o,0,e)}function te(e){var r=se({},e.extendedProps,e.ui,e);return delete r.ui,delete r.extendedProps,r}function ne(e,r){return e.spec===r.spec&&e.value===r.value}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var oe=function(e,r){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])})(e,r)},se=function(){return se=Object.assign||function(e){for(var r,t=1,n=arguments.length;t
')),o.thead=o.el.querySelector("thead"),o}return t(n,e),n.prototype.destroy=function(){r.removeElement(this.el)},n.prototype.render=function(e){var t;this.dateFormat=r.createFormatter(this.opt("columnHeaderFormat")||r.computeFallbackHeaderFormat(e.datesRepDistinctDays,e.dates.length)),t=1===e.dates.length?this.renderResourceRow(e.resources):this.datesAboveResources?this.renderDayAndResourceRows(e.dates,e.resources):this.renderResourceAndDayRows(e.resources,e.dates),this.thead.innerHTML=t,this.processResourceEls(e.resources)},n.prototype.renderResourceRow=function(e){var r=this,t=e.map(function(e){return r.renderResourceCell(e,1)});return this.buildTr(t)},n.prototype.renderDayAndResourceRows=function(e,r){for(var t=[],n=[],o=0,s=e;o1?' colspan="'+t+'"':"")+">"+r.htmlEscape(this.resourceTextFunc(e))+""},n.prototype.renderDateCell=function(e,t,n){var o=this.props;return r.renderDateCell(e,o.dateProfile,o.datesRepDistinctDays,o.dates.length*o.resources.length,this.dateFormat,this.context,t,n?'data-resource-id="'+n.id+'"':"")},n.prototype.buildTr=function(e){return e.length||(e=[" "]),this.props.renderIntroHtml&&(e=[this.props.renderIntroHtml()].concat(e)),this.isRtl&&e.reverse(),""+e.join("")+""},n.prototype.processResourceEls=function(e){var t=this,n=this.view;r.findElements(this.thead,".fc-resource-cell").forEach(function(r,o){o%=e.length,t.isRtl&&(o=e.length-1-o);var s=e[o];n.publiclyTrigger("resourceRender",[{resource:new ge(t.calendar,s),el:r,view:n}])})},n}(r.Component),_e=function(){function e(e,r){this.dayTable=e,this.resources=r,this.resourceIndex=new Oe(r),this.rowCnt=e.rowCnt,this.colCnt=e.colCnt*r.length,this.cells=this.buildCells()}return e.prototype.buildCells=function(){for(var e=this,r=e.rowCnt,t=e.dayTable,n=e.resources,o=[],s=0;s