elements work best with integers. round up to ensure contents fits\n}\nfunction getSectionHasLiquidHeight(props, sectionConfig) {\n return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well)\n}\nfunction getAllowYScrolling(props, sectionConfig) {\n return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars\n getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars\n}\n// TODO: ONLY use `arg`. force out internal function to use same API\nfunction renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) {\n var expandRows = arg.expandRows;\n var content = typeof chunkConfig.content === 'function' ?\n chunkConfig.content(arg) :\n createElement('table', {\n role: 'presentation',\n className: [\n chunkConfig.tableClassName,\n sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : '',\n ].join(' '),\n style: {\n minWidth: arg.tableMinWidth,\n width: arg.clientWidth,\n height: expandRows ? arg.clientHeight : '', // css `height` on a
serves as a min-height\n },\n }, arg.tableColGroupNode, createElement(isHeader ? 'thead' : 'tbody', {\n role: 'presentation',\n }, typeof chunkConfig.rowContent === 'function'\n ? chunkConfig.rowContent(arg)\n : chunkConfig.rowContent));\n return content;\n}\nfunction isColPropsEqual(cols0, cols1) {\n return isArraysEqual(cols0, cols1, isPropsEqual);\n}\nfunction renderMicroColGroup(cols, shrinkWidth) {\n var colNodes = [];\n /*\n for ColProps with spans, it would have been great to make a single
\n HOWEVER, Chrome was getting messing up distributing the width to
/
elements with colspans.\n SOLUTION: making individual
elements makes Chrome behave.\n */\n for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {\n var colProps = cols_1[_i];\n var span = colProps.span || 1;\n for (var i = 0; i < span; i += 1) {\n colNodes.push(createElement(\"col\", { style: {\n width: colProps.width === 'shrink' ? sanitizeShrinkWidth(shrinkWidth) : (colProps.width || ''),\n minWidth: colProps.minWidth || '',\n } }));\n }\n }\n return createElement.apply(void 0, __spreadArray(['colgroup', {}], colNodes));\n}\nfunction sanitizeShrinkWidth(shrinkWidth) {\n /* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth\n 4 accounts for 2 2-pixel borders. TODO: better solution? */\n return shrinkWidth == null ? 4 : shrinkWidth;\n}\nfunction hasShrinkWidth(cols) {\n for (var _i = 0, cols_2 = cols; _i < cols_2.length; _i++) {\n var col = cols_2[_i];\n if (col.width === 'shrink') {\n return true;\n }\n }\n return false;\n}\nfunction getScrollGridClassNames(liquid, context) {\n var classNames = [\n 'fc-scrollgrid',\n context.theme.getClass('table'),\n ];\n if (liquid) {\n classNames.push('fc-scrollgrid-liquid');\n }\n return classNames;\n}\nfunction getSectionClassNames(sectionConfig, wholeTableVGrow) {\n var classNames = [\n 'fc-scrollgrid-section',\n \"fc-scrollgrid-section-\" + sectionConfig.type,\n sectionConfig.className, // used?\n ];\n if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) {\n classNames.push('fc-scrollgrid-section-liquid');\n }\n if (sectionConfig.isSticky) {\n classNames.push('fc-scrollgrid-section-sticky');\n }\n return classNames;\n}\nfunction renderScrollShim(arg) {\n return (createElement(\"div\", { className: \"fc-scrollgrid-sticky-shim\", style: {\n width: arg.clientWidth,\n minWidth: arg.tableMinWidth,\n } }));\n}\nfunction getStickyHeaderDates(options) {\n var stickyHeaderDates = options.stickyHeaderDates;\n if (stickyHeaderDates == null || stickyHeaderDates === 'auto') {\n stickyHeaderDates = options.height === 'auto' || options.viewHeight === 'auto';\n }\n return stickyHeaderDates;\n}\nfunction getStickyFooterScrollbar(options) {\n var stickyFooterScrollbar = options.stickyFooterScrollbar;\n if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') {\n stickyFooterScrollbar = options.height === 'auto' || options.viewHeight === 'auto';\n }\n return stickyFooterScrollbar;\n}\n\nvar SimpleScrollGrid = /** @class */ (function (_super) {\n __extends(SimpleScrollGrid, _super);\n function SimpleScrollGrid() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.processCols = memoize(function (a) { return a; }, isColPropsEqual); // so we get same `cols` props every time\n // yucky to memoize VNodes, but much more efficient for consumers\n _this.renderMicroColGroup = memoize(renderMicroColGroup);\n _this.scrollerRefs = new RefMap();\n _this.scrollerElRefs = new RefMap(_this._handleScrollerEl.bind(_this));\n _this.state = {\n shrinkWidth: null,\n forceYScrollbars: false,\n scrollerClientWidths: {},\n scrollerClientHeights: {},\n };\n // TODO: can do a really simple print-view. dont need to join rows\n _this.handleSizing = function () {\n _this.safeSetState(__assign({ shrinkWidth: _this.computeShrinkWidth() }, _this.computeScrollerDims()));\n };\n return _this;\n }\n SimpleScrollGrid.prototype.render = function () {\n var _a = this, props = _a.props, state = _a.state, context = _a.context;\n var sectionConfigs = props.sections || [];\n var cols = this.processCols(props.cols);\n var microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth);\n var classNames = getScrollGridClassNames(props.liquid, context);\n if (props.collapsibleWidth) {\n classNames.push('fc-scrollgrid-collapsible');\n }\n // TODO: make DRY\n var configCnt = sectionConfigs.length;\n var configI = 0;\n var currentConfig;\n var headSectionNodes = [];\n var bodySectionNodes = [];\n var footSectionNodes = [];\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {\n headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));\n configI += 1;\n }\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {\n bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false));\n configI += 1;\n }\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {\n footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true));\n configI += 1;\n }\n // firefox bug: when setting height on table and there is a thead or tfoot,\n // the necessary height:100% on the liquid-height body section forces the *whole* table to be taller. (bug #5524)\n // use getCanVGrowWithinCell as a way to detect table-stupid firefox.\n // if so, use a simpler dom structure, jam everything into a lone tbody.\n var isBuggy = !getCanVGrowWithinCell();\n var roleAttrs = { role: 'rowgroup' };\n return createElement('table', {\n role: 'grid',\n className: classNames.join(' '),\n style: { height: props.height },\n }, Boolean(!isBuggy && headSectionNodes.length) && createElement.apply(void 0, __spreadArray(['thead', roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && createElement.apply(void 0, __spreadArray(['tbody', roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && createElement.apply(void 0, __spreadArray(['tfoot', roleAttrs], footSectionNodes)), isBuggy && createElement.apply(void 0, __spreadArray(__spreadArray(__spreadArray(['tbody', roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes)));\n };\n SimpleScrollGrid.prototype.renderSection = function (sectionConfig, microColGroupNode, isHeader) {\n if ('outerContent' in sectionConfig) {\n return (createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));\n }\n return (createElement(\"tr\", { key: sectionConfig.key, role: \"presentation\", className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)));\n };\n SimpleScrollGrid.prototype.renderChunkTd = function (sectionConfig, microColGroupNode, chunkConfig, isHeader) {\n if ('outerContent' in chunkConfig) {\n return chunkConfig.outerContent;\n }\n var props = this.props;\n var _a = this.state, forceYScrollbars = _a.forceYScrollbars, scrollerClientWidths = _a.scrollerClientWidths, scrollerClientHeights = _a.scrollerClientHeights;\n var needsYScrolling = getAllowYScrolling(props, sectionConfig); // TODO: do lazily. do in section config?\n var isLiquid = getSectionHasLiquidHeight(props, sectionConfig);\n // for `!props.liquid` - is WHOLE scrollgrid natural height?\n // TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars\n var overflowY = !props.liquid ? 'visible' :\n forceYScrollbars ? 'scroll' :\n !needsYScrolling ? 'hidden' :\n 'auto';\n var sectionKey = sectionConfig.key;\n var content = renderChunkContent(sectionConfig, chunkConfig, {\n tableColGroupNode: microColGroupNode,\n tableMinWidth: '',\n clientWidth: (!props.collapsibleWidth && scrollerClientWidths[sectionKey] !== undefined) ? scrollerClientWidths[sectionKey] : null,\n clientHeight: scrollerClientHeights[sectionKey] !== undefined ? scrollerClientHeights[sectionKey] : null,\n expandRows: sectionConfig.expandRows,\n syncRowHeights: false,\n rowSyncHeights: [],\n reportRowHeightChange: function () { },\n }, isHeader);\n return createElement(isHeader ? 'th' : 'td', {\n ref: chunkConfig.elRef,\n role: 'presentation',\n }, createElement(\"div\", { className: \"fc-scroller-harness\" + (isLiquid ? ' fc-scroller-harness-liquid' : '') },\n createElement(Scroller, { ref: this.scrollerRefs.createRef(sectionKey), elRef: this.scrollerElRefs.createRef(sectionKey), overflowY: overflowY, overflowX: !props.liquid ? 'visible' : 'hidden' /* natural height? */, maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute // because its within a harness\n : true }, content)));\n };\n SimpleScrollGrid.prototype._handleScrollerEl = function (scrollerEl, key) {\n var section = getSectionByKey(this.props.sections, key);\n if (section) {\n setRef(section.chunk.scrollerElRef, scrollerEl);\n }\n };\n SimpleScrollGrid.prototype.componentDidMount = function () {\n this.handleSizing();\n this.context.addResizeHandler(this.handleSizing);\n };\n SimpleScrollGrid.prototype.componentDidUpdate = function () {\n // TODO: need better solution when state contains non-sizing things\n this.handleSizing();\n };\n SimpleScrollGrid.prototype.componentWillUnmount = function () {\n this.context.removeResizeHandler(this.handleSizing);\n };\n SimpleScrollGrid.prototype.computeShrinkWidth = function () {\n return hasShrinkWidth(this.props.cols)\n ? computeShrinkWidth(this.scrollerElRefs.getAll())\n : 0;\n };\n SimpleScrollGrid.prototype.computeScrollerDims = function () {\n var scrollbarWidth = getScrollbarWidths();\n var _a = this, scrollerRefs = _a.scrollerRefs, scrollerElRefs = _a.scrollerElRefs;\n var forceYScrollbars = false;\n var scrollerClientWidths = {};\n var scrollerClientHeights = {};\n for (var sectionKey in scrollerRefs.currentMap) {\n var scroller = scrollerRefs.currentMap[sectionKey];\n if (scroller && scroller.needsYScrolling()) {\n forceYScrollbars = true;\n break;\n }\n }\n for (var _i = 0, _b = this.props.sections; _i < _b.length; _i++) {\n var section = _b[_i];\n var sectionKey = section.key;\n var scrollerEl = scrollerElRefs.currentMap[sectionKey];\n if (scrollerEl) {\n var harnessEl = scrollerEl.parentNode; // TODO: weird way to get this. need harness b/c doesn't include table borders\n scrollerClientWidths[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars\n ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future\n : 0));\n scrollerClientHeights[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().height);\n }\n }\n return { forceYScrollbars: forceYScrollbars, scrollerClientWidths: scrollerClientWidths, scrollerClientHeights: scrollerClientHeights };\n };\n return SimpleScrollGrid;\n}(BaseComponent));\nSimpleScrollGrid.addStateEquality({\n scrollerClientWidths: isPropsEqual,\n scrollerClientHeights: isPropsEqual,\n});\nfunction getSectionByKey(sections, key) {\n for (var _i = 0, sections_1 = sections; _i < sections_1.length; _i++) {\n var section = sections_1[_i];\n if (section.key === key) {\n return section;\n }\n }\n return null;\n}\n\nvar EventRoot = /** @class */ (function (_super) {\n __extends(EventRoot, _super);\n function EventRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.elRef = createRef();\n return _this;\n }\n EventRoot.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var options = context.options;\n var seg = props.seg;\n var eventRange = seg.eventRange;\n var ui = eventRange.ui;\n var hookProps = {\n event: new EventApi(context, eventRange.def, eventRange.instance),\n view: context.viewApi,\n timeText: props.timeText,\n textColor: ui.textColor,\n backgroundColor: ui.backgroundColor,\n borderColor: ui.borderColor,\n isDraggable: !props.disableDragging && computeSegDraggable(seg, context),\n isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),\n isEndResizable: !props.disableResizing && computeSegEndResizable(seg),\n isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),\n isStart: Boolean(seg.isStart),\n isEnd: Boolean(seg.isEnd),\n isPast: Boolean(props.isPast),\n isFuture: Boolean(props.isFuture),\n isToday: Boolean(props.isToday),\n isSelected: Boolean(props.isSelected),\n isDragging: Boolean(props.isDragging),\n isResizing: Boolean(props.isResizing),\n };\n var standardClassNames = getEventClassNames(hookProps).concat(ui.classNames);\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.eventClassNames, content: options.eventContent, defaultContent: props.defaultContent, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount, elRef: this.elRef }, function (rootElRef, customClassNames, innerElRef, innerContent) { return props.children(rootElRef, standardClassNames.concat(customClassNames), innerElRef, innerContent, hookProps); }));\n };\n EventRoot.prototype.componentDidMount = function () {\n setElSeg(this.elRef.current, this.props.seg);\n };\n /*\n need to re-assign seg to the element if seg changes, even if the element is the same\n */\n EventRoot.prototype.componentDidUpdate = function (prevProps) {\n var seg = this.props.seg;\n if (seg !== prevProps.seg) {\n setElSeg(this.elRef.current, seg);\n }\n };\n return EventRoot;\n}(BaseComponent));\n\n// should not be a purecomponent\nvar StandardEvent = /** @class */ (function (_super) {\n __extends(StandardEvent, _super);\n function StandardEvent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StandardEvent.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var seg = props.seg;\n var timeFormat = context.options.eventTimeFormat || props.defaultTimeFormat;\n var timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);\n return (createElement(EventRoot, { seg: seg, timeText: timeText, disableDragging: props.disableDragging, disableResizing: props.disableResizing, defaultContent: props.defaultContent || renderInnerContent$1, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (createElement(\"a\", __assign({ className: props.extraClassNames.concat(classNames).join(' '), style: {\n borderColor: hookProps.borderColor,\n backgroundColor: hookProps.backgroundColor,\n }, ref: rootElRef }, getSegAnchorAttrs(seg, context)),\n createElement(\"div\", { className: \"fc-event-main\", ref: innerElRef, style: { color: hookProps.textColor } }, innerContent),\n hookProps.isStartResizable &&\n createElement(\"div\", { className: \"fc-event-resizer fc-event-resizer-start\" }),\n hookProps.isEndResizable &&\n createElement(\"div\", { className: \"fc-event-resizer fc-event-resizer-end\" }))); }));\n };\n return StandardEvent;\n}(BaseComponent));\nfunction renderInnerContent$1(innerProps) {\n return (createElement(\"div\", { className: \"fc-event-main-frame\" },\n innerProps.timeText && (createElement(\"div\", { className: \"fc-event-time\" }, innerProps.timeText)),\n createElement(\"div\", { className: \"fc-event-title-container\" },\n createElement(\"div\", { className: \"fc-event-title fc-sticky\" }, innerProps.event.title || createElement(Fragment, null, \"\\u00A0\")))));\n}\n\nvar NowIndicatorRoot = function (props) { return (createElement(ViewContextType.Consumer, null, function (context) {\n var options = context.options;\n var hookProps = {\n isAxis: props.isAxis,\n date: context.dateEnv.toDate(props.date),\n view: context.viewApi,\n };\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.nowIndicatorClassNames, content: options.nowIndicatorContent, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }, props.children));\n})); };\n\nvar DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });\nvar DayCellContent = /** @class */ (function (_super) {\n __extends(DayCellContent, _super);\n function DayCellContent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DayCellContent.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var options = context.options;\n var hookProps = refineDayCellHookProps({\n date: props.date,\n dateProfile: props.dateProfile,\n todayRange: props.todayRange,\n showDayNumber: props.showDayNumber,\n extraProps: props.extraHookProps,\n viewApi: context.viewApi,\n dateEnv: context.dateEnv,\n });\n return (createElement(ContentHook, { hookProps: hookProps, content: options.dayCellContent, defaultContent: props.defaultContent }, props.children));\n };\n return DayCellContent;\n}(BaseComponent));\nfunction refineDayCellHookProps(raw) {\n var date = raw.date, dateEnv = raw.dateEnv;\n var dayMeta = getDateMeta(date, raw.todayRange, null, raw.dateProfile);\n return __assign(__assign(__assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { dayNumberText: raw.showDayNumber ? dateEnv.format(date, DAY_NUM_FORMAT) : '' }), raw.extraProps);\n}\n\nvar DayCellRoot = /** @class */ (function (_super) {\n __extends(DayCellRoot, _super);\n function DayCellRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.refineHookProps = memoizeObjArg(refineDayCellHookProps);\n _this.normalizeClassNames = buildClassNameNormalizer();\n return _this;\n }\n DayCellRoot.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var options = context.options;\n var hookProps = this.refineHookProps({\n date: props.date,\n dateProfile: props.dateProfile,\n todayRange: props.todayRange,\n showDayNumber: props.showDayNumber,\n extraProps: props.extraHookProps,\n viewApi: context.viewApi,\n dateEnv: context.dateEnv,\n });\n var classNames = getDayClassNames(hookProps, context.theme).concat(hookProps.isDisabled\n ? [] // don't use custom classNames if disabled\n : this.normalizeClassNames(options.dayCellClassNames, hookProps));\n var dataAttrs = hookProps.isDisabled ? {} : {\n 'data-date': formatDayString(props.date),\n };\n return (createElement(MountHook, { hookProps: hookProps, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount, elRef: props.elRef }, function (rootElRef) { return props.children(rootElRef, classNames, dataAttrs, hookProps.isDisabled); }));\n };\n return DayCellRoot;\n}(BaseComponent));\n\nfunction renderFill(fillType) {\n return (createElement(\"div\", { className: \"fc-\" + fillType }));\n}\nvar BgEvent = function (props) { return (createElement(EventRoot, { defaultContent: renderInnerContent, seg: props.seg /* uselesss i think */, timeText: \"\", disableDragging: true, disableResizing: true, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (createElement(\"div\", { ref: rootElRef, className: ['fc-bg-event'].concat(classNames).join(' '), style: {\n backgroundColor: hookProps.backgroundColor,\n } }, innerContent)); })); };\nfunction renderInnerContent(props) {\n var title = props.event.title;\n return title && (createElement(\"div\", { className: \"fc-event-title\" }, props.event.title));\n}\n\nvar WeekNumberRoot = function (props) { return (createElement(ViewContextType.Consumer, null, function (context) {\n var dateEnv = context.dateEnv, options = context.options;\n var date = props.date;\n var format = options.weekNumberFormat || props.defaultFormat;\n var num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well?\n var text = dateEnv.format(date, format);\n var hookProps = { num: num, text: text, date: date };\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.weekNumberClassNames, content: options.weekNumberContent, defaultContent: renderInner, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }, props.children));\n})); };\nfunction renderInner(innerProps) {\n return innerProps.text;\n}\n\nvar PADDING_FROM_VIEWPORT = 10;\nvar Popover = /** @class */ (function (_super) {\n __extends(Popover, _super);\n function Popover() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n titleId: getUniqueDomId(),\n };\n _this.handleRootEl = function (el) {\n _this.rootEl = el;\n if (_this.props.elRef) {\n setRef(_this.props.elRef, el);\n }\n };\n // Triggered when the user clicks *anywhere* in the document, for the autoHide feature\n _this.handleDocumentMouseDown = function (ev) {\n // only hide the popover if the click happened outside the popover\n var target = getEventTargetViaRoot(ev);\n if (!_this.rootEl.contains(target)) {\n _this.handleCloseClick();\n }\n };\n _this.handleDocumentKeyDown = function (ev) {\n if (ev.key === 'Escape') {\n _this.handleCloseClick();\n }\n };\n _this.handleCloseClick = function () {\n var onClose = _this.props.onClose;\n if (onClose) {\n onClose();\n }\n };\n return _this;\n }\n Popover.prototype.render = function () {\n var _a = this.context, theme = _a.theme, options = _a.options;\n var _b = this, props = _b.props, state = _b.state;\n var classNames = [\n 'fc-popover',\n theme.getClass('popover'),\n ].concat(props.extraClassNames || []);\n return createPortal(createElement(\"div\", __assign({ id: props.id, className: classNames.join(' '), \"aria-labelledby\": state.titleId }, props.extraAttrs, { ref: this.handleRootEl }),\n createElement(\"div\", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },\n createElement(\"span\", { className: \"fc-popover-title\", id: state.titleId }, props.title),\n createElement(\"span\", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),\n createElement(\"div\", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);\n };\n Popover.prototype.componentDidMount = function () {\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n this.updateSize();\n };\n Popover.prototype.componentWillUnmount = function () {\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n };\n Popover.prototype.updateSize = function () {\n var isRtl = this.context.isRtl;\n var _a = this.props, alignmentEl = _a.alignmentEl, alignGridTop = _a.alignGridTop;\n var rootEl = this.rootEl;\n var alignmentRect = computeClippedClientRect(alignmentEl);\n if (alignmentRect) {\n var popoverDims = rootEl.getBoundingClientRect();\n // position relative to viewport\n var popoverTop = alignGridTop\n ? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top\n : alignmentRect.top;\n var popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;\n // constrain\n popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT);\n popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width);\n popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT);\n var origin_1 = rootEl.offsetParent.getBoundingClientRect();\n applyStyle(rootEl, {\n top: popoverTop - origin_1.top,\n left: popoverLeft - origin_1.left,\n });\n }\n };\n return Popover;\n}(BaseComponent));\n\nvar MorePopover = /** @class */ (function (_super) {\n __extends(MorePopover, _super);\n function MorePopover() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleRootEl = function (rootEl) {\n _this.rootEl = rootEl;\n if (rootEl) {\n _this.context.registerInteractiveComponent(_this, {\n el: rootEl,\n useEventCenter: false,\n });\n }\n else {\n _this.context.unregisterInteractiveComponent(_this);\n }\n };\n return _this;\n }\n MorePopover.prototype.render = function () {\n var _a = this.context, options = _a.options, dateEnv = _a.dateEnv;\n var props = this.props;\n var startDate = props.startDate, todayRange = props.todayRange, dateProfile = props.dateProfile;\n var title = dateEnv.format(startDate, options.dayPopoverFormat);\n return (createElement(DayCellRoot, { date: startDate, dateProfile: dateProfile, todayRange: todayRange, elRef: this.handleRootEl }, function (rootElRef, dayClassNames, dataAttrs) { return (createElement(Popover, { elRef: rootElRef, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(dayClassNames), extraAttrs: dataAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },\n createElement(DayCellContent, { date: startDate, dateProfile: dateProfile, todayRange: todayRange }, function (innerElRef, innerContent) { return (innerContent &&\n createElement(\"div\", { className: \"fc-more-popover-misc\", ref: innerElRef }, innerContent)); }),\n props.children)); }));\n };\n MorePopover.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {\n var _a = this, rootEl = _a.rootEl, props = _a.props;\n if (positionLeft >= 0 && positionLeft < elWidth &&\n positionTop >= 0 && positionTop < elHeight) {\n return {\n dateProfile: props.dateProfile,\n dateSpan: __assign({ allDay: true, range: {\n start: props.startDate,\n end: props.endDate,\n } }, props.extraDateSpan),\n dayEl: rootEl,\n rect: {\n left: 0,\n top: 0,\n right: elWidth,\n bottom: elHeight,\n },\n layer: 1, // important when comparing with hits from other components\n };\n }\n return null;\n };\n return MorePopover;\n}(DateComponent));\n\nvar MoreLinkRoot = /** @class */ (function (_super) {\n __extends(MoreLinkRoot, _super);\n function MoreLinkRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.linkElRef = createRef();\n _this.state = {\n isPopoverOpen: false,\n popoverId: getUniqueDomId(),\n };\n _this.handleClick = function (ev) {\n var _a = _this, props = _a.props, context = _a.context;\n var moreLinkClick = context.options.moreLinkClick;\n var date = computeRange(props).start;\n function buildPublicSeg(seg) {\n var _a = seg.eventRange, def = _a.def, instance = _a.instance, range = _a.range;\n return {\n event: new EventApi(context, def, instance),\n start: context.dateEnv.toDate(range.start),\n end: context.dateEnv.toDate(range.end),\n isStart: seg.isStart,\n isEnd: seg.isEnd,\n };\n }\n if (typeof moreLinkClick === 'function') {\n moreLinkClick = moreLinkClick({\n date: date,\n allDay: Boolean(props.allDayDate),\n allSegs: props.allSegs.map(buildPublicSeg),\n hiddenSegs: props.hiddenSegs.map(buildPublicSeg),\n jsEvent: ev,\n view: context.viewApi,\n });\n }\n if (!moreLinkClick || moreLinkClick === 'popover') {\n _this.setState({ isPopoverOpen: true });\n }\n else if (typeof moreLinkClick === 'string') { // a view name\n context.calendarApi.zoomTo(date, moreLinkClick);\n }\n };\n _this.handlePopoverClose = function () {\n _this.setState({ isPopoverOpen: false });\n };\n return _this;\n }\n MoreLinkRoot.prototype.render = function () {\n var _this = this;\n var _a = this, props = _a.props, state = _a.state;\n return (createElement(ViewContextType.Consumer, null, function (context) {\n var viewApi = context.viewApi, options = context.options, calendarApi = context.calendarApi;\n var moreLinkText = options.moreLinkText;\n var moreCnt = props.moreCnt;\n var range = computeRange(props);\n var text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals\n ? moreLinkText.call(calendarApi, moreCnt)\n : \"+\" + moreCnt + \" \" + moreLinkText;\n var title = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);\n var hookProps = {\n num: moreCnt,\n shortText: \"+\" + moreCnt,\n text: text,\n view: viewApi,\n };\n return (createElement(Fragment, null,\n Boolean(props.moreCnt) && (createElement(RenderHook, { elRef: _this.linkElRef, hookProps: hookProps, classNames: options.moreLinkClassNames, content: options.moreLinkContent, defaultContent: props.defaultContent || renderMoreLinkInner, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return props.children(rootElRef, ['fc-more-link'].concat(customClassNames), innerElRef, innerContent, _this.handleClick, title, state.isPopoverOpen, state.isPopoverOpen ? state.popoverId : ''); })),\n state.isPopoverOpen && (createElement(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: _this.parentEl, alignmentEl: props.alignmentElRef.current, alignGridTop: props.alignGridTop, onClose: _this.handlePopoverClose }, props.popoverContent()))));\n }));\n };\n MoreLinkRoot.prototype.componentDidMount = function () {\n this.updateParentEl();\n };\n MoreLinkRoot.prototype.componentDidUpdate = function () {\n this.updateParentEl();\n };\n MoreLinkRoot.prototype.updateParentEl = function () {\n if (this.linkElRef.current) {\n this.parentEl = elementClosest(this.linkElRef.current, '.fc-view-harness');\n }\n };\n return MoreLinkRoot;\n}(BaseComponent));\nfunction renderMoreLinkInner(props) {\n return props.text;\n}\nfunction computeRange(props) {\n if (props.allDayDate) {\n return {\n start: props.allDayDate,\n end: addDays(props.allDayDate, 1),\n };\n }\n var hiddenSegs = props.hiddenSegs;\n return {\n start: computeEarliestSegStart(hiddenSegs),\n end: computeLatestSegEnd(hiddenSegs),\n };\n}\nfunction computeEarliestSegStart(segs) {\n return segs.reduce(pickEarliestStart).eventRange.range.start;\n}\nfunction pickEarliestStart(seg0, seg1) {\n return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1;\n}\nfunction computeLatestSegEnd(segs) {\n return segs.reduce(pickLatestEnd).eventRange.range.end;\n}\nfunction pickLatestEnd(seg0, seg1) {\n return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1;\n}\n\n// exports\n// --------------------------------------------------------------------------------------------------\nvar version = '5.11.5'; // important to type it, so .d.ts has generic string\n\nexport { BASE_OPTION_DEFAULTS, BASE_OPTION_REFINERS, BaseComponent, BgEvent, CalendarApi, CalendarContent, CalendarDataManager, CalendarDataProvider, CalendarRoot, ContentHook, CustomContentRenderContext, DateComponent, DateEnv, DateProfileGenerator, DayCellContent, DayCellRoot, DayHeader, DaySeriesModel, DayTableModel, DelayedRunner, ElementDragging, ElementScrollController, Emitter, EventApi, EventRoot, EventSourceApi, Interaction, MoreLinkRoot, MountHook, NamedTimeZoneImpl, NowIndicatorRoot, NowTimer, PositionCache, RefMap, RenderHook, ScrollController, ScrollResponder, Scroller, SegHierarchy, SimpleScrollGrid, Slicer, Splitter, StandardEvent, TableDateCell, TableDowCell, Theme, ViewApi, ViewContextType, ViewRoot, WeekNumberRoot, WindowScrollController, addDays, addDurations, addMs, addWeeks, allowContextMenu, allowSelection, applyMutationToEventStore, applyStyle, applyStyleProp, asCleanDays, asRoughMinutes, asRoughMs, asRoughSeconds, binarySearch, buildClassNameNormalizer, buildEntryKey, buildEventApis, buildEventRangeKey, buildHashFromArray, buildIsoString, buildNavLinkAttrs, buildSegCompareObj, buildSegTimeText, collectFromHash, combineEventUis, compareByFieldSpec, compareByFieldSpecs, compareNumbers, compareObjs, computeEarliestSegStart, computeEdges, computeFallbackHeaderFormat, computeHeightAndMargins, computeInnerRect, computeRect, computeSegDraggable, computeSegEndResizable, computeSegStartResizable, computeShrinkWidth, computeSmallestCellWidth, computeVisibleDayRange, config, constrainPoint, createAriaClickAttrs, createDuration, createEmptyEventStore, createEventInstance, createEventUi, createFormatter, createPlugin, diffDates, diffDayAndTime, diffDays, diffPoints, diffWeeks, diffWholeDays, diffWholeWeeks, disableCursor, elementClosest, elementMatches, enableCursor, eventTupleToStore, filterEventStoreDefs, filterHash, findDirectChildren, findElements, flexibleCompare, formatDate, formatDayString, formatIsoTimeString, formatRange, getAllowYScrolling, getCanVGrowWithinCell, getClippingParents, getDateMeta, getDayClassNames, getDefaultEventEnd, getElRoot, getElSeg, getEntrySpanEnd, getEventClassNames, getEventTargetViaRoot, getIsRtlScrollbarOnLeft, getRectCenter, getRelevantEvents, getScrollGridClassNames, getScrollbarWidths, getSectionClassNames, getSectionHasLiquidHeight, getSegAnchorAttrs, getSegMeta, getSlotClassNames, getStickyFooterScrollbar, getStickyHeaderDates, getUnequalProps, getUniqueDomId, globalLocales, globalPlugins, greatestDurationDenominator, groupIntersectingEntries, guid, hasBgRendering, hasShrinkWidth, identity, interactionSettingsStore, interactionSettingsToStore, intersectRanges, intersectRects, intersectSpans, isArraysEqual, isColPropsEqual, isDateSelectionValid, isDateSpansEqual, isInt, isInteractionValid, isMultiDayRange, isPropsEqual, isPropsValid, isValidDate, joinSpans, listenBySelector, mapHash, memoize, memoizeArraylike, memoizeHashlike, memoizeObjArg, mergeEventStores, multiplyDuration, padStart, parseBusinessHours, parseClassNames, parseDragMeta, parseEventDef, parseFieldSpecs, parse as parseMarker, pointInsideRect, preventContextMenu, preventDefault, preventSelection, rangeContainsMarker, rangeContainsRange, rangesEqual, rangesIntersect, refineEventDef, refineProps, removeElement, removeExact, renderChunkContent, renderFill, renderMicroColGroup, renderScrollShim, requestJson, sanitizeShrinkWidth, setElSeg, setRef, sliceEventStore, sliceEvents, sortEventSegs, startOfDay, translateRect, triggerDateSelect, unpromisify, version, whenTransitionDone, wholeDivideDurations };\n//# sourceMappingURL=main.js.map\n","/*!\nFullCalendar v5.11.5\nDocs & License: https://fullcalendar.io/\n(c) 2022 Adam Shaw\n*/\nimport './vdom.js';\nimport { __extends, __assign } from 'tslib';\nimport { flushSync, render, createElement, CalendarRoot, CustomContentRenderContext, CalendarContent, unmountComponentAtNode, DelayedRunner, CalendarDataManager, isArraysEqual, applyStyleProp, CalendarApi } from '@fullcalendar/common';\nexport * from '@fullcalendar/common';\n\nvar Calendar = /** @class */ (function (_super) {\n __extends(Calendar, _super);\n function Calendar(el, optionOverrides) {\n if (optionOverrides === void 0) { optionOverrides = {}; }\n var _this = _super.call(this) || this;\n _this.isRendering = false;\n _this.isRendered = false;\n _this.currentClassNames = [];\n _this.customContentRenderId = 0; // will affect custom generated classNames?\n _this.handleAction = function (action) {\n // actions we know we want to render immediately\n switch (action.type) {\n case 'SET_EVENT_DRAG':\n case 'SET_EVENT_RESIZE':\n _this.renderRunner.tryDrain();\n }\n };\n _this.handleData = function (data) {\n _this.currentData = data;\n _this.renderRunner.request(data.calendarOptions.rerenderDelay);\n };\n _this.handleRenderRequest = function () {\n if (_this.isRendering) {\n _this.isRendered = true;\n var currentData_1 = _this.currentData;\n flushSync(function () {\n render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {\n _this.setClassNames(classNames);\n _this.setHeight(height);\n return (createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId },\n createElement(CalendarContent, __assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));\n }), _this.el);\n });\n }\n else if (_this.isRendered) {\n _this.isRendered = false;\n unmountComponentAtNode(_this.el);\n _this.setClassNames([]);\n _this.setHeight('');\n }\n };\n _this.el = el;\n _this.renderRunner = new DelayedRunner(_this.handleRenderRequest);\n new CalendarDataManager({\n optionOverrides: optionOverrides,\n calendarApi: _this,\n onAction: _this.handleAction,\n onData: _this.handleData,\n });\n return _this;\n }\n Object.defineProperty(Calendar.prototype, \"view\", {\n get: function () { return this.currentData.viewApi; } // for public API\n ,\n enumerable: false,\n configurable: true\n });\n Calendar.prototype.render = function () {\n var wasRendering = this.isRendering;\n if (!wasRendering) {\n this.isRendering = true;\n }\n else {\n this.customContentRenderId += 1;\n }\n this.renderRunner.request();\n if (wasRendering) {\n this.updateSize();\n }\n };\n Calendar.prototype.destroy = function () {\n if (this.isRendering) {\n this.isRendering = false;\n this.renderRunner.request();\n }\n };\n Calendar.prototype.updateSize = function () {\n var _this = this;\n flushSync(function () {\n _super.prototype.updateSize.call(_this);\n });\n };\n Calendar.prototype.batchRendering = function (func) {\n this.renderRunner.pause('batchRendering');\n func();\n this.renderRunner.resume('batchRendering');\n };\n Calendar.prototype.pauseRendering = function () {\n this.renderRunner.pause('pauseRendering');\n };\n Calendar.prototype.resumeRendering = function () {\n this.renderRunner.resume('pauseRendering', true);\n };\n Calendar.prototype.resetOptions = function (optionOverrides, append) {\n this.currentDataManager.resetOptions(optionOverrides, append);\n };\n Calendar.prototype.setClassNames = function (classNames) {\n if (!isArraysEqual(classNames, this.currentClassNames)) {\n var classList = this.el.classList;\n for (var _i = 0, _a = this.currentClassNames; _i < _a.length; _i++) {\n var className = _a[_i];\n classList.remove(className);\n }\n for (var _b = 0, classNames_1 = classNames; _b < classNames_1.length; _b++) {\n var className = classNames_1[_b];\n classList.add(className);\n }\n this.currentClassNames = classNames;\n }\n };\n Calendar.prototype.setHeight = function (height) {\n applyStyleProp(this.el, 'height', height);\n };\n return Calendar;\n}(CalendarApi));\n\nexport { Calendar };\n//# sourceMappingURL=main.js.map\n","/*!\nFullCalendar v5.11.5\nDocs & License: https://fullcalendar.io/\n(c) 2022 Adam Shaw\n*/\nimport './main.css';\n\nimport { createRef, getStickyHeaderDates, createElement, ViewRoot, SimpleScrollGrid, getStickyFooterScrollbar, renderScrollShim, DateComponent, buildNavLinkAttrs, DayCellContent, Fragment, BaseComponent, createFormatter, StandardEvent, buildSegTimeText, EventRoot, getSegAnchorAttrs, memoize, MoreLinkRoot, getSegMeta, createAriaClickAttrs, getUniqueDomId, setRef, DayCellRoot, WeekNumberRoot, buildEntryKey, intersectSpans, SegHierarchy, intersectRanges, addDays, RefMap, sortEventSegs, isPropsEqual, buildEventRangeKey, BgEvent, renderFill, PositionCache, NowTimer, Slicer, DayHeader, DaySeriesModel, DayTableModel, addWeeks, diffWeeks, DateProfileGenerator, createPlugin } from '@fullcalendar/common';\nimport { __extends, __assign, __spreadArray } from 'tslib';\n\n/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.\n----------------------------------------------------------------------------------------------------------------------*/\n// It is a manager for a Table subcomponent, which does most of the heavy lifting.\n// It is responsible for managing width/height.\nvar TableView = /** @class */ (function (_super) {\n __extends(TableView, _super);\n function TableView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.headerElRef = createRef();\n return _this;\n }\n TableView.prototype.renderSimpleLayout = function (headerRowContent, bodyContent) {\n var _a = this, props = _a.props, context = _a.context;\n var sections = [];\n var stickyHeaderDates = getStickyHeaderDates(context.options);\n if (headerRowContent) {\n sections.push({\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunk: {\n elRef: this.headerElRef,\n tableClassName: 'fc-col-header',\n rowContent: headerRowContent,\n },\n });\n }\n sections.push({\n type: 'body',\n key: 'body',\n liquid: true,\n chunk: { content: bodyContent },\n });\n return (createElement(ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, classNames) { return (createElement(\"div\", { ref: rootElRef, className: ['fc-daygrid'].concat(classNames).join(' ') },\n createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [] /* TODO: make optional? */, sections: sections }))); }));\n };\n TableView.prototype.renderHScrollLayout = function (headerRowContent, bodyContent, colCnt, dayMinWidth) {\n var ScrollGrid = this.context.pluginHooks.scrollGridImpl;\n if (!ScrollGrid) {\n throw new Error('No ScrollGrid implementation');\n }\n var _a = this, props = _a.props, context = _a.context;\n var stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options);\n var stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options);\n var sections = [];\n if (headerRowContent) {\n sections.push({\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunks: [{\n key: 'main',\n elRef: this.headerElRef,\n tableClassName: 'fc-col-header',\n rowContent: headerRowContent,\n }],\n });\n }\n sections.push({\n type: 'body',\n key: 'body',\n liquid: true,\n chunks: [{\n key: 'main',\n content: bodyContent,\n }],\n });\n if (stickyFooterScrollbar) {\n sections.push({\n type: 'footer',\n key: 'footer',\n isSticky: true,\n chunks: [{\n key: 'main',\n content: renderScrollShim,\n }],\n });\n }\n return (createElement(ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, classNames) { return (createElement(\"div\", { ref: rootElRef, className: ['fc-daygrid'].concat(classNames).join(' ') },\n createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections }))); }));\n };\n return TableView;\n}(DateComponent));\n\nfunction splitSegsByRow(segs, rowCnt) {\n var byRow = [];\n for (var i = 0; i < rowCnt; i += 1) {\n byRow[i] = [];\n }\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n byRow[seg.row].push(seg);\n }\n return byRow;\n}\nfunction splitSegsByFirstCol(segs, colCnt) {\n var byCol = [];\n for (var i = 0; i < colCnt; i += 1) {\n byCol[i] = [];\n }\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n byCol[seg.firstCol].push(seg);\n }\n return byCol;\n}\nfunction splitInteractionByRow(ui, rowCnt) {\n var byRow = [];\n if (!ui) {\n for (var i = 0; i < rowCnt; i += 1) {\n byRow[i] = null;\n }\n }\n else {\n for (var i = 0; i < rowCnt; i += 1) {\n byRow[i] = {\n affectedInstances: ui.affectedInstances,\n isEvent: ui.isEvent,\n segs: [],\n };\n }\n for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) {\n var seg = _a[_i];\n byRow[seg.row].segs.push(seg);\n }\n }\n return byRow;\n}\n\nvar TableCellTop = /** @class */ (function (_super) {\n __extends(TableCellTop, _super);\n function TableCellTop() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableCellTop.prototype.render = function () {\n var props = this.props;\n var navLinkAttrs = buildNavLinkAttrs(this.context, props.date);\n return (createElement(DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, defaultContent: renderTopInner }, function (innerElRef, innerContent) { return ((innerContent || props.forceDayTop) && (createElement(\"div\", { className: \"fc-daygrid-day-top\", ref: innerElRef },\n createElement(\"a\", __assign({ id: props.dayNumberId, className: \"fc-daygrid-day-number\" }, navLinkAttrs), innerContent || createElement(Fragment, null, \"\\u00A0\"))))); }));\n };\n return TableCellTop;\n}(BaseComponent));\nfunction renderTopInner(props) {\n return props.dayNumberText;\n}\n\nvar DEFAULT_TABLE_EVENT_TIME_FORMAT = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'narrow',\n});\nfunction hasListItemDisplay(seg) {\n var display = seg.eventRange.ui.display;\n return display === 'list-item' || (display === 'auto' &&\n !seg.eventRange.def.allDay &&\n seg.firstCol === seg.lastCol && // can't be multi-day\n seg.isStart && // \"\n seg.isEnd // \"\n );\n}\n\nvar TableBlockEvent = /** @class */ (function (_super) {\n __extends(TableBlockEvent, _super);\n function TableBlockEvent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableBlockEvent.prototype.render = function () {\n var props = this.props;\n return (createElement(StandardEvent, __assign({}, props, { extraClassNames: ['fc-daygrid-event', 'fc-daygrid-block-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.defaultDisplayEventEnd, disableResizing: !props.seg.eventRange.def.allDay })));\n };\n return TableBlockEvent;\n}(BaseComponent));\n\nvar TableListItemEvent = /** @class */ (function (_super) {\n __extends(TableListItemEvent, _super);\n function TableListItemEvent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableListItemEvent.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var timeFormat = context.options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT;\n var timeText = buildSegTimeText(props.seg, timeFormat, context, true, props.defaultDisplayEventEnd);\n return (createElement(EventRoot, { seg: props.seg, timeText: timeText, defaultContent: renderInnerContent, isDragging: props.isDragging, isResizing: false, isDateSelecting: false, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent) { return ( // we don't use styles!\n createElement(\"a\", __assign({ className: ['fc-daygrid-event', 'fc-daygrid-dot-event'].concat(classNames).join(' '), ref: rootElRef }, getSegAnchorAttrs(props.seg, context)), innerContent)); }));\n };\n return TableListItemEvent;\n}(BaseComponent));\nfunction renderInnerContent(innerProps) {\n return (createElement(Fragment, null,\n createElement(\"div\", { className: \"fc-daygrid-event-dot\", style: { borderColor: innerProps.borderColor || innerProps.backgroundColor } }),\n innerProps.timeText && (createElement(\"div\", { className: \"fc-event-time\" }, innerProps.timeText)),\n createElement(\"div\", { className: \"fc-event-title\" }, innerProps.event.title || createElement(Fragment, null, \"\\u00A0\"))));\n}\n\nvar TableCellMoreLink = /** @class */ (function (_super) {\n __extends(TableCellMoreLink, _super);\n function TableCellMoreLink() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.compileSegs = memoize(compileSegs);\n return _this;\n }\n TableCellMoreLink.prototype.render = function () {\n var props = this.props;\n var _a = this.compileSegs(props.singlePlacements), allSegs = _a.allSegs, invisibleSegs = _a.invisibleSegs;\n return (createElement(MoreLinkRoot, { dateProfile: props.dateProfile, todayRange: props.todayRange, allDayDate: props.allDayDate, moreCnt: props.moreCnt, allSegs: allSegs, hiddenSegs: invisibleSegs, alignmentElRef: props.alignmentElRef, alignGridTop: props.alignGridTop, extraDateSpan: props.extraDateSpan, popoverContent: function () {\n var isForcedInvisible = (props.eventDrag ? props.eventDrag.affectedInstances : null) ||\n (props.eventResize ? props.eventResize.affectedInstances : null) ||\n {};\n return (createElement(Fragment, null, allSegs.map(function (seg) {\n var instanceId = seg.eventRange.instance.instanceId;\n return (createElement(\"div\", { className: \"fc-daygrid-event-harness\", key: instanceId, style: {\n visibility: isForcedInvisible[instanceId] ? 'hidden' : '',\n } }, hasListItemDisplay(seg) ? (createElement(TableListItemEvent, __assign({ seg: seg, isDragging: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getSegMeta(seg, props.todayRange)))) : (createElement(TableBlockEvent, __assign({ seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getSegMeta(seg, props.todayRange))))));\n })));\n } }, function (rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { return (createElement(\"a\", __assign({ ref: rootElRef, className: ['fc-daygrid-more-link'].concat(classNames).join(' '), title: title, \"aria-expanded\": isExpanded, \"aria-controls\": popoverId }, createAriaClickAttrs(handleClick)), innerContent)); }));\n };\n return TableCellMoreLink;\n}(BaseComponent));\nfunction compileSegs(singlePlacements) {\n var allSegs = [];\n var invisibleSegs = [];\n for (var _i = 0, singlePlacements_1 = singlePlacements; _i < singlePlacements_1.length; _i++) {\n var placement = singlePlacements_1[_i];\n allSegs.push(placement.seg);\n if (!placement.isVisible) {\n invisibleSegs.push(placement.seg);\n }\n }\n return { allSegs: allSegs, invisibleSegs: invisibleSegs };\n}\n\nvar DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'narrow' });\nvar TableCell = /** @class */ (function (_super) {\n __extends(TableCell, _super);\n function TableCell() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.rootElRef = createRef();\n _this.state = {\n dayNumberId: getUniqueDomId(),\n };\n _this.handleRootEl = function (el) {\n setRef(_this.rootElRef, el);\n setRef(_this.props.elRef, el);\n };\n return _this;\n }\n TableCell.prototype.render = function () {\n var _a = this, context = _a.context, props = _a.props, state = _a.state, rootElRef = _a.rootElRef;\n var date = props.date, dateProfile = props.dateProfile;\n var navLinkAttrs = buildNavLinkAttrs(context, date, 'week');\n return (createElement(DayCellRoot, { date: date, dateProfile: dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, elRef: this.handleRootEl }, function (dayElRef, dayClassNames, rootDataAttrs, isDisabled) { return (createElement(\"td\", __assign({ ref: dayElRef, role: \"gridcell\", className: ['fc-daygrid-day'].concat(dayClassNames, props.extraClassNames || []).join(' ') }, rootDataAttrs, props.extraDataAttrs, (props.showDayNumber ? { 'aria-labelledby': state.dayNumberId } : {})),\n createElement(\"div\", { className: \"fc-daygrid-day-frame fc-scrollgrid-sync-inner\", ref: props.innerElRef /* different from hook system! RENAME */ },\n props.showWeekNumber && (createElement(WeekNumberRoot, { date: date, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function (weekElRef, weekClassNames, innerElRef, innerContent) { return (createElement(\"a\", __assign({ ref: weekElRef, className: ['fc-daygrid-week-number'].concat(weekClassNames).join(' ') }, navLinkAttrs), innerContent)); })),\n !isDisabled && (createElement(TableCellTop, { date: date, dateProfile: dateProfile, showDayNumber: props.showDayNumber, dayNumberId: state.dayNumberId, forceDayTop: props.forceDayTop, todayRange: props.todayRange, extraHookProps: props.extraHookProps })),\n createElement(\"div\", { className: \"fc-daygrid-day-events\", ref: props.fgContentElRef },\n props.fgContent,\n createElement(\"div\", { className: \"fc-daygrid-day-bottom\", style: { marginTop: props.moreMarginTop } },\n createElement(TableCellMoreLink, { allDayDate: date, singlePlacements: props.singlePlacements, moreCnt: props.moreCnt, alignmentElRef: rootElRef, alignGridTop: !props.showDayNumber, extraDateSpan: props.extraDateSpan, dateProfile: props.dateProfile, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange }))),\n createElement(\"div\", { className: \"fc-daygrid-day-bg\" }, props.bgContent)))); }));\n };\n return TableCell;\n}(DateComponent));\n\nfunction computeFgSegPlacement(segs, // assumed already sorted\ndayMaxEvents, dayMaxEventRows, strictOrder, eventInstanceHeights, maxContentHeight, cells) {\n var hierarchy = new DayGridSegHierarchy();\n hierarchy.allowReslicing = true;\n hierarchy.strictOrder = strictOrder;\n if (dayMaxEvents === true || dayMaxEventRows === true) {\n hierarchy.maxCoord = maxContentHeight;\n hierarchy.hiddenConsumes = true;\n }\n else if (typeof dayMaxEvents === 'number') {\n hierarchy.maxStackCnt = dayMaxEvents;\n }\n else if (typeof dayMaxEventRows === 'number') {\n hierarchy.maxStackCnt = dayMaxEventRows;\n hierarchy.hiddenConsumes = true;\n }\n // create segInputs only for segs with known heights\n var segInputs = [];\n var unknownHeightSegs = [];\n for (var i = 0; i < segs.length; i += 1) {\n var seg = segs[i];\n var instanceId = seg.eventRange.instance.instanceId;\n var eventHeight = eventInstanceHeights[instanceId];\n if (eventHeight != null) {\n segInputs.push({\n index: i,\n thickness: eventHeight,\n span: {\n start: seg.firstCol,\n end: seg.lastCol + 1,\n },\n });\n }\n else {\n unknownHeightSegs.push(seg);\n }\n }\n var hiddenEntries = hierarchy.addSegs(segInputs);\n var segRects = hierarchy.toRects();\n var _a = placeRects(segRects, segs, cells), singleColPlacements = _a.singleColPlacements, multiColPlacements = _a.multiColPlacements, leftoverMargins = _a.leftoverMargins;\n var moreCnts = [];\n var moreMarginTops = [];\n // add segs with unknown heights\n for (var _i = 0, unknownHeightSegs_1 = unknownHeightSegs; _i < unknownHeightSegs_1.length; _i++) {\n var seg = unknownHeightSegs_1[_i];\n multiColPlacements[seg.firstCol].push({\n seg: seg,\n isVisible: false,\n isAbsolute: true,\n absoluteTop: 0,\n marginTop: 0,\n });\n for (var col = seg.firstCol; col <= seg.lastCol; col += 1) {\n singleColPlacements[col].push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: false,\n isAbsolute: false,\n absoluteTop: 0,\n marginTop: 0,\n });\n }\n }\n // add the hidden entries\n for (var col = 0; col < cells.length; col += 1) {\n moreCnts.push(0);\n }\n for (var _b = 0, hiddenEntries_1 = hiddenEntries; _b < hiddenEntries_1.length; _b++) {\n var hiddenEntry = hiddenEntries_1[_b];\n var seg = segs[hiddenEntry.index];\n var hiddenSpan = hiddenEntry.span;\n multiColPlacements[hiddenSpan.start].push({\n seg: resliceSeg(seg, hiddenSpan.start, hiddenSpan.end, cells),\n isVisible: false,\n isAbsolute: true,\n absoluteTop: 0,\n marginTop: 0,\n });\n for (var col = hiddenSpan.start; col < hiddenSpan.end; col += 1) {\n moreCnts[col] += 1;\n singleColPlacements[col].push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: false,\n isAbsolute: false,\n absoluteTop: 0,\n marginTop: 0,\n });\n }\n }\n // deal with leftover margins\n for (var col = 0; col < cells.length; col += 1) {\n moreMarginTops.push(leftoverMargins[col]);\n }\n return { singleColPlacements: singleColPlacements, multiColPlacements: multiColPlacements, moreCnts: moreCnts, moreMarginTops: moreMarginTops };\n}\n// rects ordered by top coord, then left\nfunction placeRects(allRects, segs, cells) {\n var rectsByEachCol = groupRectsByEachCol(allRects, cells.length);\n var singleColPlacements = [];\n var multiColPlacements = [];\n var leftoverMargins = [];\n for (var col = 0; col < cells.length; col += 1) {\n var rects = rectsByEachCol[col];\n // compute all static segs in singlePlacements\n var singlePlacements = [];\n var currentHeight = 0;\n var currentMarginTop = 0;\n for (var _i = 0, rects_1 = rects; _i < rects_1.length; _i++) {\n var rect = rects_1[_i];\n var seg = segs[rect.index];\n singlePlacements.push({\n seg: resliceSeg(seg, col, col + 1, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: rect.levelCoord - currentHeight,\n });\n currentHeight = rect.levelCoord + rect.thickness;\n }\n // compute mixed static/absolute segs in multiPlacements\n var multiPlacements = [];\n currentHeight = 0;\n currentMarginTop = 0;\n for (var _a = 0, rects_2 = rects; _a < rects_2.length; _a++) {\n var rect = rects_2[_a];\n var seg = segs[rect.index];\n var isAbsolute = rect.span.end - rect.span.start > 1; // multi-column?\n var isFirstCol = rect.span.start === col;\n currentMarginTop += rect.levelCoord - currentHeight; // amount of space since bottom of previous seg\n currentHeight = rect.levelCoord + rect.thickness; // height will now be bottom of current seg\n if (isAbsolute) {\n currentMarginTop += rect.thickness;\n if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: true,\n absoluteTop: rect.levelCoord,\n marginTop: 0,\n });\n }\n }\n else if (isFirstCol) {\n multiPlacements.push({\n seg: resliceSeg(seg, rect.span.start, rect.span.end, cells),\n isVisible: true,\n isAbsolute: false,\n absoluteTop: rect.levelCoord,\n marginTop: currentMarginTop, // claim the margin\n });\n currentMarginTop = 0;\n }\n }\n singleColPlacements.push(singlePlacements);\n multiColPlacements.push(multiPlacements);\n leftoverMargins.push(currentMarginTop);\n }\n return { singleColPlacements: singleColPlacements, multiColPlacements: multiColPlacements, leftoverMargins: leftoverMargins };\n}\nfunction groupRectsByEachCol(rects, colCnt) {\n var rectsByEachCol = [];\n for (var col = 0; col < colCnt; col += 1) {\n rectsByEachCol.push([]);\n }\n for (var _i = 0, rects_3 = rects; _i < rects_3.length; _i++) {\n var rect = rects_3[_i];\n for (var col = rect.span.start; col < rect.span.end; col += 1) {\n rectsByEachCol[col].push(rect);\n }\n }\n return rectsByEachCol;\n}\nfunction resliceSeg(seg, spanStart, spanEnd, cells) {\n if (seg.firstCol === spanStart && seg.lastCol === spanEnd - 1) {\n return seg;\n }\n var eventRange = seg.eventRange;\n var origRange = eventRange.range;\n var slicedRange = intersectRanges(origRange, {\n start: cells[spanStart].date,\n end: addDays(cells[spanEnd - 1].date, 1),\n });\n return __assign(__assign({}, seg), { firstCol: spanStart, lastCol: spanEnd - 1, eventRange: {\n def: eventRange.def,\n ui: __assign(__assign({}, eventRange.ui), { durationEditable: false }),\n instance: eventRange.instance,\n range: slicedRange,\n }, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf() });\n}\nvar DayGridSegHierarchy = /** @class */ (function (_super) {\n __extends(DayGridSegHierarchy, _super);\n function DayGridSegHierarchy() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // config\n _this.hiddenConsumes = false;\n // allows us to keep hidden entries in the hierarchy so they take up space\n _this.forceHidden = {};\n return _this;\n }\n DayGridSegHierarchy.prototype.addSegs = function (segInputs) {\n var _this = this;\n var hiddenSegs = _super.prototype.addSegs.call(this, segInputs);\n var entriesByLevel = this.entriesByLevel;\n var excludeHidden = function (entry) { return !_this.forceHidden[buildEntryKey(entry)]; };\n // remove the forced-hidden segs\n for (var level = 0; level < entriesByLevel.length; level += 1) {\n entriesByLevel[level] = entriesByLevel[level].filter(excludeHidden);\n }\n return hiddenSegs;\n };\n DayGridSegHierarchy.prototype.handleInvalidInsertion = function (insertion, entry, hiddenEntries) {\n var _a = this, entriesByLevel = _a.entriesByLevel, forceHidden = _a.forceHidden;\n var touchingEntry = insertion.touchingEntry, touchingLevel = insertion.touchingLevel, touchingLateral = insertion.touchingLateral;\n if (this.hiddenConsumes && touchingEntry) {\n var touchingEntryId = buildEntryKey(touchingEntry);\n // if not already hidden\n if (!forceHidden[touchingEntryId]) {\n if (this.allowReslicing) {\n var placeholderEntry = __assign(__assign({}, touchingEntry), { span: intersectSpans(touchingEntry.span, entry.span) });\n var placeholderEntryId = buildEntryKey(placeholderEntry);\n forceHidden[placeholderEntryId] = true;\n entriesByLevel[touchingLevel][touchingLateral] = placeholderEntry; // replace touchingEntry with our placeholder\n this.splitEntry(touchingEntry, entry, hiddenEntries); // split up the touchingEntry, reinsert it\n }\n else {\n forceHidden[touchingEntryId] = true;\n hiddenEntries.push(touchingEntry);\n }\n }\n }\n return _super.prototype.handleInvalidInsertion.call(this, insertion, entry, hiddenEntries);\n };\n return DayGridSegHierarchy;\n}(SegHierarchy));\n\nvar TableRow = /** @class */ (function (_super) {\n __extends(TableRow, _super);\n function TableRow() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cellElRefs = new RefMap(); // the
\n _this.frameElRefs = new RefMap(); // the fc-daygrid-day-frame\n _this.fgElRefs = new RefMap(); // the fc-daygrid-day-events\n _this.segHarnessRefs = new RefMap(); // indexed by \"instanceId:firstCol\"\n _this.rootElRef = createRef();\n _this.state = {\n framePositions: null,\n maxContentHeight: null,\n eventInstanceHeights: {},\n };\n return _this;\n }\n TableRow.prototype.render = function () {\n var _this = this;\n var _a = this, props = _a.props, state = _a.state, context = _a.context;\n var options = context.options;\n var colCnt = props.cells.length;\n var businessHoursByCol = splitSegsByFirstCol(props.businessHourSegs, colCnt);\n var bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt);\n var highlightSegsByCol = splitSegsByFirstCol(this.getHighlightSegs(), colCnt);\n var mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt);\n var _b = computeFgSegPlacement(sortEventSegs(props.fgEventSegs, options.eventOrder), props.dayMaxEvents, props.dayMaxEventRows, options.eventOrderStrict, state.eventInstanceHeights, state.maxContentHeight, props.cells), singleColPlacements = _b.singleColPlacements, multiColPlacements = _b.multiColPlacements, moreCnts = _b.moreCnts, moreMarginTops = _b.moreMarginTops;\n var isForcedInvisible = // TODO: messy way to compute this\n (props.eventDrag && props.eventDrag.affectedInstances) ||\n (props.eventResize && props.eventResize.affectedInstances) ||\n {};\n return (createElement(\"tr\", { ref: this.rootElRef, role: \"row\" },\n props.renderIntro && props.renderIntro(),\n props.cells.map(function (cell, col) {\n var normalFgNodes = _this.renderFgSegs(col, props.forPrint ? singleColPlacements[col] : multiColPlacements[col], props.todayRange, isForcedInvisible);\n var mirrorFgNodes = _this.renderFgSegs(col, buildMirrorPlacements(mirrorSegsByCol[col], multiColPlacements), props.todayRange, {}, Boolean(props.eventDrag), Boolean(props.eventResize), false);\n return (createElement(TableCell, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), innerElRef: _this.frameElRefs.createRef(cell.key) /* FF
problem, but okay to use for left/right. TODO: rename prop */, dateProfile: props.dateProfile, date: cell.date, showDayNumber: props.showDayNumbers, showWeekNumber: props.showWeekNumbers && col === 0, forceDayTop: props.showWeekNumbers /* even displaying weeknum for row, not necessarily day */, todayRange: props.todayRange, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, moreCnt: moreCnts[col], moreMarginTop: moreMarginTops[col], singlePlacements: singleColPlacements[col], fgContentElRef: _this.fgElRefs.createRef(cell.key), fgContent: ( // Fragment scopes the keys\n createElement(Fragment, null,\n createElement(Fragment, null, normalFgNodes),\n createElement(Fragment, null, mirrorFgNodes))), bgContent: ( // Fragment scopes the keys\n createElement(Fragment, null,\n _this.renderFillSegs(highlightSegsByCol[col], 'highlight'),\n _this.renderFillSegs(businessHoursByCol[col], 'non-business'),\n _this.renderFillSegs(bgEventSegsByCol[col], 'bg-event'))) }));\n })));\n };\n TableRow.prototype.componentDidMount = function () {\n this.updateSizing(true);\n };\n TableRow.prototype.componentDidUpdate = function (prevProps, prevState) {\n var currentProps = this.props;\n this.updateSizing(!isPropsEqual(prevProps, currentProps));\n };\n TableRow.prototype.getHighlightSegs = function () {\n var props = this.props;\n if (props.eventDrag && props.eventDrag.segs.length) { // messy check\n return props.eventDrag.segs;\n }\n if (props.eventResize && props.eventResize.segs.length) { // messy check\n return props.eventResize.segs;\n }\n return props.dateSelectionSegs;\n };\n TableRow.prototype.getMirrorSegs = function () {\n var props = this.props;\n if (props.eventResize && props.eventResize.segs.length) { // messy check\n return props.eventResize.segs;\n }\n return [];\n };\n TableRow.prototype.renderFgSegs = function (col, segPlacements, todayRange, isForcedInvisible, isDragging, isResizing, isDateSelecting) {\n var context = this.context;\n var eventSelection = this.props.eventSelection;\n var framePositions = this.state.framePositions;\n var defaultDisplayEventEnd = this.props.cells.length === 1; // colCnt === 1\n var isMirror = isDragging || isResizing || isDateSelecting;\n var nodes = [];\n if (framePositions) {\n for (var _i = 0, segPlacements_1 = segPlacements; _i < segPlacements_1.length; _i++) {\n var placement = segPlacements_1[_i];\n var seg = placement.seg;\n var instanceId = seg.eventRange.instance.instanceId;\n var key = instanceId + ':' + col;\n var isVisible = placement.isVisible && !isForcedInvisible[instanceId];\n var isAbsolute = placement.isAbsolute;\n var left = '';\n var right = '';\n if (isAbsolute) {\n if (context.isRtl) {\n right = 0;\n left = framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol];\n }\n else {\n left = 0;\n right = framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol];\n }\n }\n /*\n known bug: events that are force to be list-item but span multiple days still take up space in later columns\n todo: in print view, for multi-day events, don't display title within non-start/end segs\n */\n nodes.push(createElement(\"div\", { className: 'fc-daygrid-event-harness' + (isAbsolute ? ' fc-daygrid-event-harness-abs' : ''), key: key, ref: isMirror ? null : this.segHarnessRefs.createRef(key), style: {\n visibility: isVisible ? '' : 'hidden',\n marginTop: isAbsolute ? '' : placement.marginTop,\n top: isAbsolute ? placement.absoluteTop : '',\n left: left,\n right: right,\n } }, hasListItemDisplay(seg) ? (createElement(TableListItemEvent, __assign({ seg: seg, isDragging: isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getSegMeta(seg, todayRange)))) : (createElement(TableBlockEvent, __assign({ seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getSegMeta(seg, todayRange))))));\n }\n }\n return nodes;\n };\n TableRow.prototype.renderFillSegs = function (segs, fillType) {\n var isRtl = this.context.isRtl;\n var todayRange = this.props.todayRange;\n var framePositions = this.state.framePositions;\n var nodes = [];\n if (framePositions) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n var leftRightCss = isRtl ? {\n right: 0,\n left: framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol],\n } : {\n left: 0,\n right: framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol],\n };\n nodes.push(createElement(\"div\", { key: buildEventRangeKey(seg.eventRange), className: \"fc-daygrid-bg-harness\", style: leftRightCss }, fillType === 'bg-event' ?\n createElement(BgEvent, __assign({ seg: seg }, getSegMeta(seg, todayRange))) :\n renderFill(fillType)));\n }\n }\n return createElement.apply(void 0, __spreadArray([Fragment, {}], nodes));\n };\n TableRow.prototype.updateSizing = function (isExternalSizingChange) {\n var _a = this, props = _a.props, frameElRefs = _a.frameElRefs;\n if (!props.forPrint &&\n props.clientWidth !== null // positioning ready?\n ) {\n if (isExternalSizingChange) {\n var frameEls = props.cells.map(function (cell) { return frameElRefs.currentMap[cell.key]; });\n if (frameEls.length) {\n var originEl = this.rootElRef.current;\n this.setState({\n framePositions: new PositionCache(originEl, frameEls, true, // isHorizontal\n false),\n });\n }\n }\n var oldInstanceHeights = this.state.eventInstanceHeights;\n var newInstanceHeights = this.queryEventInstanceHeights();\n var limitByContentHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true;\n this.safeSetState({\n // HACK to prevent oscillations of events being shown/hidden from max-event-rows\n // Essentially, once you compute an element's height, never null-out.\n // TODO: always display all events, as visibility:hidden?\n eventInstanceHeights: __assign(__assign({}, oldInstanceHeights), newInstanceHeights),\n maxContentHeight: limitByContentHeight ? this.computeMaxContentHeight() : null,\n });\n }\n };\n TableRow.prototype.queryEventInstanceHeights = function () {\n var segElMap = this.segHarnessRefs.currentMap;\n var eventInstanceHeights = {};\n // get the max height amongst instance segs\n for (var key in segElMap) {\n var height = Math.round(segElMap[key].getBoundingClientRect().height);\n var instanceId = key.split(':')[0]; // deconstruct how renderFgSegs makes the key\n eventInstanceHeights[instanceId] = Math.max(eventInstanceHeights[instanceId] || 0, height);\n }\n return eventInstanceHeights;\n };\n TableRow.prototype.computeMaxContentHeight = function () {\n var firstKey = this.props.cells[0].key;\n var cellEl = this.cellElRefs.currentMap[firstKey];\n var fcContainerEl = this.fgElRefs.currentMap[firstKey];\n return cellEl.getBoundingClientRect().bottom - fcContainerEl.getBoundingClientRect().top;\n };\n TableRow.prototype.getCellEls = function () {\n var elMap = this.cellElRefs.currentMap;\n return this.props.cells.map(function (cell) { return elMap[cell.key]; });\n };\n return TableRow;\n}(DateComponent));\nTableRow.addStateEquality({\n eventInstanceHeights: isPropsEqual,\n});\nfunction buildMirrorPlacements(mirrorSegs, colPlacements) {\n if (!mirrorSegs.length) {\n return [];\n }\n var topsByInstanceId = buildAbsoluteTopHash(colPlacements); // TODO: cache this at first render?\n return mirrorSegs.map(function (seg) { return ({\n seg: seg,\n isVisible: true,\n isAbsolute: true,\n absoluteTop: topsByInstanceId[seg.eventRange.instance.instanceId],\n marginTop: 0,\n }); });\n}\nfunction buildAbsoluteTopHash(colPlacements) {\n var topsByInstanceId = {};\n for (var _i = 0, colPlacements_1 = colPlacements; _i < colPlacements_1.length; _i++) {\n var placements = colPlacements_1[_i];\n for (var _a = 0, placements_1 = placements; _a < placements_1.length; _a++) {\n var placement = placements_1[_a];\n topsByInstanceId[placement.seg.eventRange.instance.instanceId] = placement.absoluteTop;\n }\n }\n return topsByInstanceId;\n}\n\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.splitBusinessHourSegs = memoize(splitSegsByRow);\n _this.splitBgEventSegs = memoize(splitSegsByRow);\n _this.splitFgEventSegs = memoize(splitSegsByRow);\n _this.splitDateSelectionSegs = memoize(splitSegsByRow);\n _this.splitEventDrag = memoize(splitInteractionByRow);\n _this.splitEventResize = memoize(splitInteractionByRow);\n _this.rowRefs = new RefMap();\n _this.handleRootEl = function (rootEl) {\n _this.rootEl = rootEl;\n if (rootEl) {\n _this.context.registerInteractiveComponent(_this, {\n el: rootEl,\n isHitComboAllowed: _this.props.isHitComboAllowed,\n });\n }\n else {\n _this.context.unregisterInteractiveComponent(_this);\n }\n };\n return _this;\n }\n Table.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var dateProfile = props.dateProfile, dayMaxEventRows = props.dayMaxEventRows, dayMaxEvents = props.dayMaxEvents, expandRows = props.expandRows;\n var rowCnt = props.cells.length;\n var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCnt);\n var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt);\n var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt);\n var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCnt);\n var eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt);\n var eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt);\n var limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true;\n // if rows can't expand to fill fixed height, can't do balanced-height event limit\n // TODO: best place to normalize these options?\n if (limitViaBalanced && !expandRows) {\n limitViaBalanced = false;\n dayMaxEventRows = null;\n dayMaxEvents = null;\n }\n var classNames = [\n 'fc-daygrid-body',\n limitViaBalanced ? 'fc-daygrid-body-balanced' : 'fc-daygrid-body-unbalanced',\n expandRows ? '' : 'fc-daygrid-body-natural', // will height of one row depend on the others?\n ];\n return (createElement(\"div\", { className: classNames.join(' '), ref: this.handleRootEl, style: {\n // these props are important to give this wrapper correct dimensions for interactions\n // TODO: if we set it here, can we avoid giving to inner tables?\n width: props.clientWidth,\n minWidth: props.tableMinWidth,\n } },\n createElement(NowTimer, { unit: \"day\" }, function (nowDate, todayRange) { return (createElement(Fragment, null,\n createElement(\"table\", { role: \"presentation\", className: \"fc-scrollgrid-sync-table\", style: {\n width: props.clientWidth,\n minWidth: props.tableMinWidth,\n height: expandRows ? props.clientHeight : '',\n } },\n props.colGroupNode,\n createElement(\"tbody\", { role: \"presentation\" }, props.cells.map(function (cells, row) { return (createElement(TableRow, { ref: _this.rowRefs.createRef(row), key: cells.length\n ? cells[0].date.toISOString() /* best? or put key on cell? or use diff formatter? */\n : row // in case there are no cells (like when resource view is loading)\n , showDayNumbers: rowCnt > 1, showWeekNumbers: props.showWeekNumbers, todayRange: todayRange, dateProfile: dateProfile, cells: cells, renderIntro: props.renderRowIntro, businessHourSegs: businessHourSegsByRow[row], eventSelection: props.eventSelection, bgEventSegs: bgEventSegsByRow[row].filter(isSegAllDay) /* hack */, fgEventSegs: fgEventSegsByRow[row], dateSelectionSegs: dateSelectionSegsByRow[row], eventDrag: eventDragByRow[row], eventResize: eventResizeByRow[row], dayMaxEvents: dayMaxEvents, dayMaxEventRows: dayMaxEventRows, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })); }))))); })));\n };\n // Hit System\n // ----------------------------------------------------------------------------------------------------\n Table.prototype.prepareHits = function () {\n this.rowPositions = new PositionCache(this.rootEl, this.rowRefs.collect().map(function (rowObj) { return rowObj.getCellEls()[0]; }), // first cell el in each row. TODO: not optimal\n false, true);\n this.colPositions = new PositionCache(this.rootEl, this.rowRefs.currentMap[0].getCellEls(), // cell els in first row\n true, // horizontal\n false);\n };\n Table.prototype.queryHit = function (positionLeft, positionTop) {\n var _a = this, colPositions = _a.colPositions, rowPositions = _a.rowPositions;\n var col = colPositions.leftToIndex(positionLeft);\n var row = rowPositions.topToIndex(positionTop);\n if (row != null && col != null) {\n var cell = this.props.cells[row][col];\n return {\n dateProfile: this.props.dateProfile,\n dateSpan: __assign({ range: this.getCellRange(row, col), allDay: true }, cell.extraDateSpan),\n dayEl: this.getCellEl(row, col),\n rect: {\n left: colPositions.lefts[col],\n right: colPositions.rights[col],\n top: rowPositions.tops[row],\n bottom: rowPositions.bottoms[row],\n },\n layer: 0,\n };\n }\n return null;\n };\n Table.prototype.getCellEl = function (row, col) {\n return this.rowRefs.currentMap[row].getCellEls()[col]; // TODO: not optimal\n };\n Table.prototype.getCellRange = function (row, col) {\n var start = this.props.cells[row][col].date;\n var end = addDays(start, 1);\n return { start: start, end: end };\n };\n return Table;\n}(DateComponent));\nfunction isSegAllDay(seg) {\n return seg.eventRange.def.allDay;\n}\n\nvar DayTableSlicer = /** @class */ (function (_super) {\n __extends(DayTableSlicer, _super);\n function DayTableSlicer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.forceDayIfListItem = true;\n return _this;\n }\n DayTableSlicer.prototype.sliceRange = function (dateRange, dayTableModel) {\n return dayTableModel.sliceRange(dateRange);\n };\n return DayTableSlicer;\n}(Slicer));\n\nvar DayTable = /** @class */ (function (_super) {\n __extends(DayTable, _super);\n function DayTable() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.slicer = new DayTableSlicer();\n _this.tableRef = createRef();\n return _this;\n }\n DayTable.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n return (createElement(Table, __assign({ ref: this.tableRef }, this.slicer.sliceProps(props, props.dateProfile, props.nextDayThreshold, context, props.dayTableModel), { dateProfile: props.dateProfile, cells: props.dayTableModel.cells, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })));\n };\n return DayTable;\n}(DateComponent));\n\nvar DayTableView = /** @class */ (function (_super) {\n __extends(DayTableView, _super);\n function DayTableView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.buildDayTableModel = memoize(buildDayTableModel);\n _this.headerRef = createRef();\n _this.tableRef = createRef();\n return _this;\n }\n DayTableView.prototype.render = function () {\n var _this = this;\n var _a = this.context, options = _a.options, dateProfileGenerator = _a.dateProfileGenerator;\n var props = this.props;\n var dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator);\n var headerContent = options.dayHeaders && (createElement(DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 }));\n var bodyContent = function (contentArg) { return (createElement(DayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, dayTableModel: dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); };\n return options.dayMinWidth\n ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth)\n : this.renderSimpleLayout(headerContent, bodyContent);\n };\n return DayTableView;\n}(TableView));\nfunction buildDayTableModel(dateProfile, dateProfileGenerator) {\n var daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);\n return new DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit));\n}\n\nvar TableDateProfileGenerator = /** @class */ (function (_super) {\n __extends(TableDateProfileGenerator, _super);\n function TableDateProfileGenerator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // Computes the date range that will be rendered.\n TableDateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {\n var dateEnv = this.props.dateEnv;\n var renderRange = _super.prototype.buildRenderRange.call(this, currentRange, currentRangeUnit, isRangeAllDay);\n var start = renderRange.start;\n var end = renderRange.end;\n var endOfWeek;\n // year and month views should be aligned with weeks. this is already done for week\n if (/^(year|month)$/.test(currentRangeUnit)) {\n start = dateEnv.startOfWeek(start);\n // make end-of-week if not already\n endOfWeek = dateEnv.startOfWeek(end);\n if (endOfWeek.valueOf() !== end.valueOf()) {\n end = addWeeks(endOfWeek, 1);\n }\n }\n // ensure 6 weeks\n if (this.props.monthMode &&\n this.props.fixedWeekCount) {\n var rowCnt = Math.ceil(// could be partial weeks due to hiddenDays\n diffWeeks(start, end));\n end = addWeeks(end, 6 - rowCnt);\n }\n return { start: start, end: end };\n };\n return TableDateProfileGenerator;\n}(DateProfileGenerator));\n\nvar main = createPlugin({\n initialView: 'dayGridMonth',\n views: {\n dayGrid: {\n component: DayTableView,\n dateProfileGeneratorClass: TableDateProfileGenerator,\n },\n dayGridDay: {\n type: 'dayGrid',\n duration: { days: 1 },\n },\n dayGridWeek: {\n type: 'dayGrid',\n duration: { weeks: 1 },\n },\n dayGridMonth: {\n type: 'dayGrid',\n duration: { months: 1 },\n monthMode: true,\n fixedWeekCount: true,\n },\n },\n});\n\nexport default main;\nexport { DayTableView as DayGridView, DayTable, DayTableSlicer, Table, TableView, buildDayTableModel };\n//# sourceMappingURL=main.js.map\n","/*!\nFullCalendar v5.11.5\nDocs & License: https://fullcalendar.io/\n(c) 2022 Adam Shaw\n*/\nimport './main.css';\n\nimport { hasBgRendering, Splitter, createFormatter, createElement, ViewContextType, RenderHook, BaseComponent, createRef, diffDays, buildNavLinkAttrs, WeekNumberRoot, getStickyHeaderDates, ViewRoot, SimpleScrollGrid, getStickyFooterScrollbar, NowTimer, NowIndicatorRoot, renderScrollShim, DateComponent, rangeContainsMarker, startOfDay, asRoughMs, createDuration, RefMap, PositionCache, MoreLinkRoot, setRef, SegHierarchy, groupIntersectingEntries, buildEntryKey, binarySearch, getEntrySpanEnd, StandardEvent, DayCellContent, Fragment, getSegMeta, memoize, sortEventSegs, DayCellRoot, buildIsoString, computeEarliestSegStart, buildEventRangeKey, BgEvent, renderFill, addDurations, multiplyDuration, wholeDivideDurations, intersectRanges, Slicer, formatIsoTimeString, DayHeader, DaySeriesModel, DayTableModel, createPlugin } from '@fullcalendar/common';\nimport { __extends, __assign } from 'tslib';\nimport { DayTable } from '@fullcalendar/daygrid';\n\nvar AllDaySplitter = /** @class */ (function (_super) {\n __extends(AllDaySplitter, _super);\n function AllDaySplitter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AllDaySplitter.prototype.getKeyInfo = function () {\n return {\n allDay: {},\n timed: {},\n };\n };\n AllDaySplitter.prototype.getKeysForDateSpan = function (dateSpan) {\n if (dateSpan.allDay) {\n return ['allDay'];\n }\n return ['timed'];\n };\n AllDaySplitter.prototype.getKeysForEventDef = function (eventDef) {\n if (!eventDef.allDay) {\n return ['timed'];\n }\n if (hasBgRendering(eventDef)) {\n return ['timed', 'allDay'];\n }\n return ['allDay'];\n };\n return AllDaySplitter;\n}(Splitter));\n\nvar DEFAULT_SLAT_LABEL_FORMAT = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'short',\n});\nfunction TimeColsAxisCell(props) {\n var classNames = [\n 'fc-timegrid-slot',\n 'fc-timegrid-slot-label',\n props.isLabeled ? 'fc-scrollgrid-shrink' : 'fc-timegrid-slot-minor',\n ];\n return (createElement(ViewContextType.Consumer, null, function (context) {\n if (!props.isLabeled) {\n return (createElement(\"td\", { className: classNames.join(' '), \"data-time\": props.isoTimeStr }));\n }\n var dateEnv = context.dateEnv, options = context.options, viewApi = context.viewApi;\n var labelFormat = // TODO: fully pre-parse\n options.slotLabelFormat == null ? DEFAULT_SLAT_LABEL_FORMAT :\n Array.isArray(options.slotLabelFormat) ? createFormatter(options.slotLabelFormat[0]) :\n createFormatter(options.slotLabelFormat);\n var hookProps = {\n level: 0,\n time: props.time,\n date: dateEnv.toDate(props.date),\n view: viewApi,\n text: dateEnv.format(props.date, labelFormat),\n };\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.slotLabelClassNames, content: options.slotLabelContent, defaultContent: renderInnerContent, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement(\"td\", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), \"data-time\": props.isoTimeStr },\n createElement(\"div\", { className: \"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame\" },\n createElement(\"div\", { className: \"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion\", ref: innerElRef }, innerContent)))); }));\n }));\n}\nfunction renderInnerContent(props) {\n return props.text;\n}\n\nvar TimeBodyAxis = /** @class */ (function (_super) {\n __extends(TimeBodyAxis, _super);\n function TimeBodyAxis() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimeBodyAxis.prototype.render = function () {\n return this.props.slatMetas.map(function (slatMeta) { return (createElement(\"tr\", { key: slatMeta.key },\n createElement(TimeColsAxisCell, __assign({}, slatMeta)))); });\n };\n return TimeBodyAxis;\n}(BaseComponent));\n\nvar DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'short' });\nvar AUTO_ALL_DAY_MAX_EVENT_ROWS = 5;\nvar TimeColsView = /** @class */ (function (_super) {\n __extends(TimeColsView, _super);\n function TimeColsView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.allDaySplitter = new AllDaySplitter(); // for use by subclasses\n _this.headerElRef = createRef();\n _this.rootElRef = createRef();\n _this.scrollerElRef = createRef();\n _this.state = {\n slatCoords: null,\n };\n _this.handleScrollTopRequest = function (scrollTop) {\n var scrollerEl = _this.scrollerElRef.current;\n if (scrollerEl) { // TODO: not sure how this could ever be null. weirdness with the reducer\n scrollerEl.scrollTop = scrollTop;\n }\n };\n /* Header Render Methods\n ------------------------------------------------------------------------------------------------------------------*/\n _this.renderHeadAxis = function (rowKey, frameHeight) {\n if (frameHeight === void 0) { frameHeight = ''; }\n var options = _this.context.options;\n var dateProfile = _this.props.dateProfile;\n var range = dateProfile.renderRange;\n var dayCnt = diffDays(range.start, range.end);\n var navLinkAttrs = (dayCnt === 1) // only do in day views (to avoid doing in week views that dont need it)\n ? buildNavLinkAttrs(_this.context, range.start, 'week')\n : {};\n if (options.weekNumbers && rowKey === 'day') {\n return (createElement(WeekNumberRoot, { date: range.start, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement(\"th\", { ref: rootElRef, \"aria-hidden\": true, className: [\n 'fc-timegrid-axis',\n 'fc-scrollgrid-shrink',\n ].concat(classNames).join(' ') },\n createElement(\"div\", { className: \"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid\", style: { height: frameHeight } },\n createElement(\"a\", __assign({ ref: innerElRef, className: \"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner\" }, navLinkAttrs), innerContent)))); }));\n }\n return (createElement(\"th\", { \"aria-hidden\": true, className: \"fc-timegrid-axis\" },\n createElement(\"div\", { className: \"fc-timegrid-axis-frame\", style: { height: frameHeight } })));\n };\n /* Table Component Render Methods\n ------------------------------------------------------------------------------------------------------------------*/\n // only a one-way height sync. we don't send the axis inner-content height to the DayGrid,\n // but DayGrid still needs to have classNames on inner elements in order to measure.\n _this.renderTableRowAxis = function (rowHeight) {\n var _a = _this.context, options = _a.options, viewApi = _a.viewApi;\n var hookProps = {\n text: options.allDayText,\n view: viewApi,\n };\n return (\n // TODO: make reusable hook. used in list view too\n createElement(RenderHook, { hookProps: hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement(\"td\", { ref: rootElRef, \"aria-hidden\": true, className: [\n 'fc-timegrid-axis',\n 'fc-scrollgrid-shrink',\n ].concat(classNames).join(' ') },\n createElement(\"div\", { className: 'fc-timegrid-axis-frame fc-scrollgrid-shrink-frame' + (rowHeight == null ? ' fc-timegrid-axis-frame-liquid' : ''), style: { height: rowHeight } },\n createElement(\"span\", { className: \"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner\", ref: innerElRef }, innerContent)))); }));\n };\n _this.handleSlatCoords = function (slatCoords) {\n _this.setState({ slatCoords: slatCoords });\n };\n return _this;\n }\n // rendering\n // ----------------------------------------------------------------------------------------------------\n TimeColsView.prototype.renderSimpleLayout = function (headerRowContent, allDayContent, timeContent) {\n var _a = this, context = _a.context, props = _a.props;\n var sections = [];\n var stickyHeaderDates = getStickyHeaderDates(context.options);\n if (headerRowContent) {\n sections.push({\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunk: {\n elRef: this.headerElRef,\n tableClassName: 'fc-col-header',\n rowContent: headerRowContent,\n },\n });\n }\n if (allDayContent) {\n sections.push({\n type: 'body',\n key: 'all-day',\n chunk: { content: allDayContent },\n });\n sections.push({\n type: 'body',\n key: 'all-day-divider',\n outerContent: ( // TODO: rename to cellContent so don't need to define