Plugin Directory

Changeset 3351250


Ignore:
Timestamp:
08/27/2025 01:30:31 PM (7 months ago)
Author:
spellhammer
Message:

Update to version 1.2.9 from GitHub

Location:
pie-calendar
Files:
6 added
2 deleted
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • pie-calendar/tags/1.2.9/build/blocks/calendar/block.json

    r3312639 r3351250  
    6161      "default": false
    6262    },
     63    "duration": {
     64      "type": "number",
     65      "default": 1
     66    },
    6367    "hidepastevents": {
    6468      "type": "boolean",
  • pie-calendar/tags/1.2.9/build/blocks/calendar/index.asset.php

    r3312639 r3351250  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'ff9132c9db8b5d9a145e');
     1<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => '8bf2438ffbf1e85d10be');
  • pie-calendar/tags/1.2.9/build/blocks/calendar/index.css

    r3283614 r3351250  
    5656.piecal-controls.fc .piecal-controls__view-chooser {
    5757    max-width: calc(50% - 8px);
     58}
     59
     60.piecal-controls.fc .piecal-controls__view-chooser select {
     61    border-radius: 0.25em;
     62    padding: 0.5em;
     63    padding-right: 2em;
     64    appearance: none;
     65    -webkit-appearance: none;
     66    -moz-appearance: none;
     67    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%22800px%22%20height%3D%22800px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.29289%208.29289C4.68342%207.90237%205.31658%207.90237%205.70711%208.29289L12%2014.5858L18.2929%208.29289C18.6834%207.90237%2019.3166%207.90237%2019.7071%208.29289C20.0976%208.68342%2020.0976%209.31658%2019.7071%209.70711L12.7071%2016.7071C12.3166%2017.0976%2011.6834%2017.0976%2011.2929%2016.7071L4.29289%209.70711C3.90237%209.31658%203.90237%208.68342%204.29289%208.29289Z%22%20fill%3D%22%23000000%22%2F%3E%0A%3C%2Fsvg%3E");
     68    background-size: 1em;
     69    background-repeat: no-repeat;
     70    background-position: 97% center;
    5871}
    5972
  • pie-calendar/tags/1.2.9/build/blocks/calendar/index.js

    r3312639 r3351250  
    1 (()=>{"use strict";var e,t={92:(e,t,n)=>{const r=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,o=window.wp.blockEditor,a=window.wp.components,l=window.wp.coreData,c=window.wp.apiFetch;var d=n.n(c);const u=window.wp.url,f=[{value:"",label:(0,s.__)("Default (Browser Language)","piecal")},{value:"af",label:"Afrikaans"},{value:"ar",label:"Arabic"},{value:"bg",label:"Bulgarian"},{value:"ca",label:"Catalan"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"en",label:"English"},{value:"en-gb",label:"English (UK)"},{value:"en-au",label:"English (Australia)"},{value:"es",label:"Spanish"},{value:"eu",label:"Basque"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"fr-ca",label:"French (Canada)"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"nl",label:"Dutch"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pt-br",label:"Portuguese (Brazil)"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"sv",label:"Swedish"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"vi",label:"Vietnamese"},{value:"zh-cn",label:"Chinese (China)"},{value:"zh-tw",label:"Chinese (Taiwan)"}],h=window.React,p=window.ReactDOM;var g,m,v,b,y,A,w,E,C,D={},_=[],S=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function R(e,t){for(var n in t)e[n]=t[n];return e}function x(e){var t=e.parentNode;t&&t.removeChild(e)}function k(e,t,n){var r,i,s,o={};for(s in t)"key"==s?r=t[s]:"ref"==s?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?g.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===o[s]&&(o[s]=e.defaultProps[s]);return T(e,o,r,i,null)}function T(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++v:i};return null==i&&null!=m.vnode&&m.vnode(s),s}function M(e){return e.children}function O(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||S.test(t)?n:n+"px"}function I(e,t,n,r,i){var s;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||O(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||O(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r||e.addEventListener(t,s?P:N,s):e.removeEventListener(t,s?P:N,s);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function N(e){y=!0;try{return this.l[e.type+!1](m.event?m.event(e):e)}finally{y=!1}}function P(e){y=!0;try{return this.l[e.type+!0](m.event?m.event(e):e)}finally{y=!1}}function H(e,t){this.props=e,this.context=t}function B(e,t){if(null==t)return e.__?B(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?B(e):null}function z(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return z(e)}}function j(e){y?setTimeout(e):E(e)}function U(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!W.__r++||w!==m.debounceRendering)&&((w=m.debounceRendering)||j)(W)}function W(){var e,t,n,r,i,s,o,a;for(A.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=A.shift();)e.__d&&(t=A.length,r=void 0,i=void 0,o=(s=(n=e).__v).__e,(a=n.__P)&&(r=[],(i=R({},s)).__v=s.__v+1,q(a,s,i,n.__n,void 0!==a.ownerSVGElement,null!=s.__h?[o]:null,r,null==o?B(s):o,s.__h),Z(r,s),s.__e!=o&&z(s)),A.length>t&&A.sort((function(e,t){return e.__v.__b-t.__v.__b})));W.__r=0}function F(e,t,n,r,i,s,o,a,l,c){var d,u,f,h,p,g,m,v=r&&r.__k||_,b=v.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(h=n.__k[d]=null==(h=t[d])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?T(null,h,null,null,h):Array.isArray(h)?T(M,{children:h},null,null,null):h.__b>0?T(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=v[d])||f&&h.key==f.key&&h.type===f.type)v[d]=void 0;else for(u=0;u<b;u++){if((f=v[u])&&h.key==f.key&&h.type===f.type){v[u]=void 0;break}f=null}q(e,h,f=f||D,i,s,o,a,l,c),p=h.__e,(u=h.ref)&&f.ref!=u&&(m||(m=[]),f.ref&&m.push(f.ref,null,h),m.push(u,h.__c||p,h)),null!=p?(null==g&&(g=p),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=G(h,l,e):l=V(e,h,f,v,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=B(f))}for(n.__e=g,d=b;d--;)null!=v[d]&&("function"==typeof n.type&&null!=v[d].__e&&v[d].__e==n.__d&&(n.__d=Q(r).nextSibling),J(v[d],v[d]));if(m)for(d=0;d<m.length;d++)$(m[d],m[++d],m[++d])}function G(e,t,n){for(var r,i=e.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=e,t="function"==typeof r.type?G(r,t,n):V(n,r,r,i,r.__e,t));return t}function L(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){L(e,t)})):t.push(e)),t}function V(e,t,n,r,i,s){var o,a,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||i!=s||null==i.parentNode)e:if(null==s||s.parentNode!==e)e.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;e.insertBefore(i,s),o=s}return void 0!==o?o:i.nextSibling}function Q(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Q(n)))return r;return null}function q(e,t,n,r,i,s,o,a,l){var c,d,u,f,h,p,g,v,b,y,A,w,E,C,D,_=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,s=[a]),(c=m.__b)&&c(t);try{e:if("function"==typeof _){if(v=t.props,b=(c=_.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in _&&_.prototype.render?t.__c=d=new _(v,y):(t.__c=d=new H(v,y),d.constructor=_,d.render=X),b&&b.sub(d),d.props=v,d.state||(d.state={}),d.context=y,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=_.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=R({},d.__s)),R(d.__s,_.getDerivedStateFromProps(v,d.__s))),f=d.props,h=d.state,d.__v=t,u)null==_.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==_.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,y),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[],d.__h.length&&o.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,p)}))}if(d.context=y,d.props=v,d.__P=e,w=m.__r,E=0,"prototype"in _&&_.prototype.render){for(d.state=d.__s,d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do{d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++E<25);d.state=d.__s,null!=d.getChildContext&&(r=R(R({},r),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(f,h)),D=null!=c&&c.type===M&&null==c.key?c.props.children:c,F(e,Array.isArray(D)?D:[D],t,n,r,i,s,o,a,l),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Y(n.__e,t,n,r,i,s,o,l);(c=m.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=s)&&(t.__e=a,t.__h=!!l,s[s.indexOf(a)]=null),m.__e(e,t,n)}}function Z(e,t){m.__c&&m.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){m.__e(e,t.__v)}}))}function Y(e,t,n,r,i,s,o,a){var l,c,d,u=n.props,f=t.props,h=t.type,p=0;if("svg"===h&&(i=!0),null!=s)for(;p<s.length;p++)if((l=s[p])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,s[p]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),s=null,a=!1}if(null===h)u===f||a&&e.data===f||(e.data=f);else{if(s=s&&g.call(e.childNodes),c=(u=n.props||D).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!a){if(null!=s)for(u={},p=0;p<e.attributes.length;p++)u[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,i){var s;for(s in n)"children"===s||"key"===s||s in t||I(e,s,null,n[s],r);for(s in t)i&&"function"!=typeof t[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===t[s]||I(e,s,t[s],n[s],r)}(e,f,u,i,a),d)t.__k=[];else if(p=t.props.children,F(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==h,s,o,s?s[0]:n.__k&&B(n,0),a),null!=s)for(p=s.length;p--;)null!=s[p]&&x(s[p]);a||("value"in f&&void 0!==(p=f.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==u.value)&&I(e,"value",p,u.value,!1),"checked"in f&&void 0!==(p=f.checked)&&p!==e.checked&&I(e,"checked",p,u.checked,!1))}return e}function $(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){m.__e(e,n)}}function J(e,t,n){var r,i;if(m.unmount&&m.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){m.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&J(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||x(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,n){return this.constructor(e,n)}function K(e,t,n){var r,i,s;m.__&&m.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,s=[],q(t,e=(!r&&n||t).__k=k(M,null,[e]),i||D,D,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?g.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r),Z(s,e)}g=_.slice,m={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},v=0,b=function(e){return null!=e&&void 0===e.constructor},y=!1,H.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=R({},this.state),"function"==typeof e&&(e=e(R({},n),this.props)),e&&R(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),U(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),U(this))},H.prototype.render=M,A=[],E="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,W.__r=0,C=0;var ee,te,ne,re=[],ie=[],se=m.__b,oe=m.__r,ae=m.diffed,le=m.__c,ce=m.unmount;function de(){for(var e;e=re.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(he),e.__H.__h.forEach(pe),e.__H.__h=[]}catch(t){e.__H.__h=[],m.__e(t,e.__v)}}m.__b=function(e){ee=null,se&&se(e)},m.__r=function(e){oe&&oe(e);var t=(ee=e.__c).__H;t&&(te===ee?(t.__h=[],ee.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ie,e.__N=e.i=void 0}))):(t.__h.forEach(he),t.__h.forEach(pe),t.__h=[])),te=ee},m.diffed=function(e){ae&&ae(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==re.push(t)&&ne===m.requestAnimationFrame||((ne=m.requestAnimationFrame)||fe)(de)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ie&&(e.__=e.__V),e.i=void 0,e.__V=ie}))),te=ee=null},m.__c=function(e,t){t.some((function(e){try{e.__h.forEach(he),e.__h=e.__h.filter((function(e){return!e.__||pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],m.__e(n,e.__v)}})),le&&le(e,t)},m.unmount=function(e){ce&&ce(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{he(e)}catch(e){t=e}})),n.__H=void 0,t&&m.__e(t,n.__v))};var ue="function"==typeof requestAnimationFrame;function fe(e){var t,n=function(){clearTimeout(r),ue&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ue&&(t=requestAnimationFrame(n))}function he(e){var t=ee,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ee=t}function pe(e){var t=ee;e.__c=e.__(),ee=t}function ge(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function me(e){this.props=e}(me.prototype=new H).isPureReactComponent=!0,me.prototype.shouldComponentUpdate=function(e,t){return ge(this.props,e)||ge(this.state,t)};var ve=m.__b;m.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ve&&ve(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var be=m.__e;m.__e=function(e,t,n,r){if(e.then)for(var i,s=t;s=s.__;)if((i=s.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);be(e,t,n,r)};var ye=m.unmount;function Ae(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ae(e,t,n)}))),e}function we(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return we(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Ee(){this.__u=0,this.t=null,this.__b=null}function Ce(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function De(){this.u=null,this.o=null}m.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),ye&&ye(e)},(Ee.prototype=new H).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ce(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=we(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Ee.prototype.componentWillUnmount=function(){this.t=[]},Ee.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ae(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&k(M,null,e.fallback);return i&&(i.__h=null),[k(M,null,t.__a?null:e.children),i]};var _e=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Se(e){return this.getChildContext=function(){return e.context},e.children}function Re(e){var t=this,n=e.i;t.componentWillUnmount=function(){K(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),K(k(Se,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(De.prototype=new H).__a=function(e){var t=this,n=Ce(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),_e(t,e,r)):i()};n?n(s):s()}},De.prototype.render=function(e){this.u=null,this.o=new Map;var t=L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},De.prototype.componentDidUpdate=De.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){_e(e,n,t)}))};var xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ke=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Te="undefined"!=typeof document,Me=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(H.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Oe=m.event;function Ie(){}function Ne(){return this.cancelBubble}function Pe(){return this.defaultPrevented}m.event=function(e){return Oe&&(e=Oe(e)),e.persist=Ie,e.isPropagationStopped=Ne,e.isDefaultPrevented=Pe,e.nativeEvent=e};var He={configurable:!0,get:function(){return this.class}},Be=m.vnode;m.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var s in r={},n){var o=n[s];Te&&"children"===s&&"noscript"===t||"value"===s&&"defaultValue"in n&&null==o||("defaultValue"===s&&"value"in n&&null==n.value?s="value":"download"===s&&!0===o?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+t)&&!Me(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&ke.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===o&&(o=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=L(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=L(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(He.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",He))}e.$$typeof=xe,Be&&Be(e)};var ze=m.__r;m.__r=function(e){ze&&ze(e),e.__c};const je=[],Ue=new Map;function We(e){je.push(e),Ue.forEach((t=>{Ge(t,e)}))}function Fe(e){let t=Ue.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=(void 0===Le&&(Le=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}()),Le);n&&(t.nonce=n);const r=e===document?document.head:e,i=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,i)}Ue.set(e,t),function(e){for(const t of je)Ge(e,t)}(t)}}function Ge(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)}))}let Le;"undefined"!=typeof document&&Fe(document),We(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');class Ve{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(n[e]-=1,n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Qe(e){e.parentNode&&e.parentNode.removeChild(e)}function qe(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Ze(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Ze(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}const Ye=/(top|left|right|bottom|width|height)$/i;function $e(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Ye.test(t)?e.style[t]=`${n}px`:e.style[t]=n}let Je=0;function Xe(){return Je+=1,"fc-dom-"+Je}function Ke(e,t,n,r){let i=function(e,t){return n=>{let r=qe(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function et(e){return Object.assign({onClick:e},tt(e))}function tt(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let nt=0;function rt(){return nt+=1,String(nt)}function it(e,t,n){return n.func?n.func(e,t):function(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}(e[n.field],t[n.field])*(n.order||1)}function st(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function ot(e,t,n){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce(((e,t,n)=>e.replace("$"+n,t||"")),e):n}function at(e){return e%1==0}function lt(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const ct=["years","months","days","milliseconds"],dt=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ut(e,t){return"string"==typeof e?function(e){let t=dt.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?ft(e):"number"==typeof e?ft({[t||"milliseconds"]:e}):null}function ft(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function ht(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function pt(e){return gt(e)/864e5}function gt(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function mt(e,t){let n=null;for(let r=0;r<ct.length;r+=1){let i=ct[r];if(t[i]){let r=e[i]/t[i];if(!at(r)||null!==n&&n!==r)return null;n=r}else if(e[i])return null}return n}function vt(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function bt(e,t,n){if(e===t)return!0;let r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}const yt=["sun","mon","tue","wed","thu","fri","sat"];function At(e,t){let n=Tt(e);return n[2]+=7*t,Mt(n)}function wt(e,t){let n=Tt(e);return n[2]+=t,Mt(n)}function Et(e,t){let n=Tt(e);return n[6]+=t,Mt(n)}function Ct(e,t){return(t.valueOf()-e.valueOf())/864e5}function Dt(e,t){return It(e)===It(t)?Math.round(Ct(e,t)):null}function _t(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function St(e,t,n,r){let i=Mt([t,0,1+Rt(t,n,r)]),s=_t(e),o=Math.round(Ct(i,s));return Math.floor(o/7)+1}function Rt(e,t,n){let r=7+t-n;return-(7+Mt([e,0,r]).getUTCDay()-t)%7+r-1}function xt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kt(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Tt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Mt(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Ot(e){return!isNaN(e.valueOf())}function It(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Nt(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Ht(t,!0)))),r}function Pt(e){return e.toISOString().replace(/T.*$/,"")}function Ht(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=Math.round(r%60);return t?`${n+st(i,2)}:${st(s,2)}`:`GMT${n}${i}${s?`:${st(s,2)}`:""}`}function Bt(e,t,n){let r,i;return function(...s){if(r){if(!bt(r,s)){n&&n(i);let r=e.apply(this,s);t&&t(r,i)||(i=r)}}else i=e.apply(this,s);return r=s,i}}function zt(e,t,n){let r,i;return s=>{if(r){if(!vn(r,s)){n&&n(i);let r=e.call(this,s);t&&t(r,i)||(i=r)}}else i=e.call(this,s);return r=s,i}}const jt={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Ut={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Wt=/\s*([ap])\.?m\.?/i,Ft=/,/g,Gt=/\s+/g,Lt=/\u200e/g,Vt=/UTC|GMT/;class Qt{constructor(e){let t={},n={},r=0;for(let i in e)i in jt?(n[i]=e[i],r=Math.max(jt[i],r)):(t[i]=e[i],i in Ut&&(r=Math.max(Ut[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Bt(qt)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:s}=this,o=(a=e.marker,l=t.marker,(c=n.calendarSystem).getMarkerYear(a)!==c.getMarkerYear(l)?5:c.getMarkerMonth(a)!==c.getMarkerMonth(l)?4:c.getMarkerDay(a)!==c.getMarkerDay(l)?2:It(a)!==It(l)?1:0);var a,l,c;if(!o)return this.format(e,n);let d=o;!(d>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(d=1);let u=this.format(e,n),f=this.format(t,n);if(u===f)return u;let h=qt(function(e,t){let n={};for(let r in e)(!(r in Ut)||Ut[r]<=t)&&(n[r]=e[r]);return n}(i,d),s,n),p=h(e),g=h(t),m=function(e,t,n,r){let i=0;for(;i<e.length;){let s=e.indexOf(t,i);if(-1===s)break;let o=e.substr(0,s);i=s+t.length;let a=e.substr(i),l=0;for(;l<n.length;){let e=n.indexOf(r,l);if(-1===e)break;let t=n.substr(0,e);l=e+r.length;let i=n.substr(l);if(o===t&&a===i)return{before:o,after:a}}}return null}(u,p,f,g),v=s.separator||r||n.defaultSeparator||"";return m?m.before+p+v+g+m.after:u+v+f}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function qt(e,t,n){let r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?e=>Ht(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,i){let s=[];return"long"===i?s.push(n):"short"!==i&&"narrow"!==i||s.push(t),"long"!==i&&"short"!==i||s.push(" "),s.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&s.reverse(),s.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return s=>{let o,{marker:a}=s;return o=r&&!a.getUTCMinutes()?r:i,function(e,t,n,r,i){return e=e.replace(Lt,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;return e=e.replace(Vt,(()=>(n=!0,t))),n||(e+=` ${t}`),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":Ht(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Ft,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(Wt,"").trim():"narrow"===r.meridiem?e=e.replace(Wt,((e,t)=>t.toLocaleLowerCase())):"short"===r.meridiem?e=e.replace(Wt,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===r.meridiem&&(e=e.replace(Wt,(e=>e.toLocaleLowerCase()))),e=(e=e.replace(Gt," ")).trim()}(o.format(a),s,e,t,n)}}(e,t,n)}function Zt(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Yt(e,t,n,r){let i=Zt(e,n.calendarSystem);return{date:i,start:i,end:t?Zt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class $t{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Yt(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Yt(e,t,n,r))}}class Jt{constructor(e){this.func=e}format(e,t,n){return this.func(Yt(e,null,t,n))}formatRange(e,t,n,r){return this.func(Yt(e,t,n,r))}}function Xt(e){return"object"==typeof e&&e?new Qt(e):"string"==typeof e?new $t(e):"function"==typeof e?new Jt(e):null}const Kt={navLinkDayClick:dn,navLinkWeekClick:dn,duration:ut,bootstrapFontAwesome:dn,buttonIcons:dn,customButtons:dn,defaultAllDayEventDuration:ut,defaultTimedEventDuration:ut,nextDayThreshold:ut,scrollTime:ut,scrollTimeReset:Boolean,slotMinTime:ut,slotMaxTime:ut,dayPopoverFormat:Xt,slotDuration:ut,snapDuration:ut,headerToolbar:dn,footerToolbar:dn,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Xt,dayHeaderClassNames:dn,dayHeaderContent:dn,dayHeaderDidMount:dn,dayHeaderWillUnmount:dn,dayCellClassNames:dn,dayCellContent:dn,dayCellDidMount:dn,dayCellWillUnmount:dn,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:dn,weekNumbers:Boolean,weekNumberClassNames:dn,weekNumberContent:dn,weekNumberDidMount:dn,weekNumberWillUnmount:dn,editable:Boolean,viewClassNames:dn,viewDidMount:dn,viewWillUnmount:dn,nowIndicator:Boolean,nowIndicatorClassNames:dn,nowIndicatorContent:dn,nowIndicatorDidMount:dn,nowIndicatorWillUnmount:dn,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:dn,locale:dn,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:dn,eventOrder:function(e){let t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t+=1)n=i[t],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r},eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:dn,contentHeight:dn,direction:String,weekNumberFormat:Xt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:dn,initialDate:dn,now:dn,eventDataTransform:dn,stickyHeaderDates:dn,stickyFooterScrollbar:dn,viewHeight:dn,defaultAllDay:Boolean,eventSourceFailure:dn,eventSourceSuccess:dn,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:dn,eventConstraint:dn,eventAllow:dn,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:dn,eventContent:dn,eventDidMount:dn,eventWillUnmount:dn,selectConstraint:dn,selectOverlap:dn,selectAllow:dn,droppable:Boolean,unselectCancel:String,slotLabelFormat:dn,slotLaneClassNames:dn,slotLaneContent:dn,slotLaneDidMount:dn,slotLaneWillUnmount:dn,slotLabelClassNames:dn,slotLabelContent:dn,slotLabelDidMount:dn,slotLabelWillUnmount:dn,dayMaxEvents:dn,dayMaxEventRows:dn,dayMinWidth:Number,slotLabelInterval:ut,allDayText:String,allDayClassNames:dn,allDayContent:dn,allDayDidMount:dn,allDayWillUnmount:dn,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Xt,rerenderDelay:Number,moreLinkText:dn,moreLinkHint:dn,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:dn,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:ut,hiddenDays:dn,fixedWeekCount:Boolean,validRange:dn,visibleRange:dn,titleFormat:dn,eventInteractive:Boolean,noEventsText:String,viewHint:dn,navLinkHint:dn,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:dn,moreLinkClassNames:dn,moreLinkContent:dn,moreLinkDidMount:dn,moreLinkWillUnmount:dn,monthStartFormat:Xt,handleCustomRendering:dn,customRenderingMetaMap:dn,customRenderingReplaces:Boolean},en={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},tn={datesSet:dn,eventsSet:dn,eventAdd:dn,eventChange:dn,eventRemove:dn,windowResize:dn,eventClick:dn,eventMouseEnter:dn,eventMouseLeave:dn,select:dn,unselect:dn,loading:dn,_unmount:dn,_beforeprint:dn,_afterprint:dn,_noEventDrop:dn,_noEventResize:dn,_resize:dn,_scrollRequest:dn},nn={buttonText:dn,buttonHints:dn,views:dn,plugins:dn,initialEvents:dn,events:dn,eventSources:dn},rn={headerToolbar:sn,footerToolbar:sn,buttonText:sn,buttonHints:sn,buttonIcons:sn,dateIncrement:sn,plugins:on,events:on,eventSources:on,resources:on};function sn(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?vn(e,t):e===t}function on(e,t){return Array.isArray(e)&&Array.isArray(t)?bt(e,t):e===t}const an={type:String,component:dn,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:dn,usesMinMaxTime:Boolean,classNames:dn,content:dn,didMount:dn,willUnmount:dn};function ln(e){return fn(e,rn)}function cn(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function dn(e){return e}const{hasOwnProperty:un}=Object.prototype;function fn(e,t){let n={};if(t)for(let r in t)if(t[r]===sn){let t=[];for(let i=e.length-1;i>=0;i-=1){let s=e[i][r];if("object"==typeof s&&s)t.unshift(s);else if(void 0!==s){n[r]=s;break}}t.length&&(n[r]=fn(t))}for(let t=e.length-1;t>=0;t-=1){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function hn(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function pn(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function gn(e){let t={};for(let n of e)t[n]=!0;return t}function mn(e){let t=[];for(let n in e)t.push(e[n]);return t}function vn(e,t){if(e===t)return!0;for(let n in e)if(un.call(e,n)&&!(n in t))return!1;for(let n in t)if(un.call(t,n)&&e[n]!==t[n])return!1;return!0}const bn=/^on[A-Z]/;function yn(e,t){let n=[];for(let r in e)un.call(e,r)&&(r in t||n.push(r));for(let r in t)un.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function An(e,t,n={}){if(e===t)return!0;for(let o in t)if(!(o in e&&(r=e[o],i=t[o],s=n[o],r===i||!0===s||s&&s(r,i))))return!1;var r,i,s;for(let n in e)if(!(n in t))return!1;return!0}let wn={};var En;En=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Mt(e)}markerToArray(e){return Tt(e)}},wn.gregory=En;const Cn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class Dn{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new wn[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Mt(xt(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Mt(e)),null!==t&&Ot(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=Cn.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if(Ot(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=function(e,t){let n=Dt(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:(n=Dt(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),at(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),at(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),at(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(pt(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/(pt(n)/30):n.days&&(r=Dt(e,t),null!==r)?r/pt(n):(t.valueOf()-e.valueOf())/gt(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?_t(e):"hour"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),i=St(e,r,t,n);if(i<1)return St(e,r-1,t,n);let s=St(e,r+1,t,n);return s>=1?Math.min(i,s):i}(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=Et(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),Nt(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?Mt(xt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Mt(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-kt(Tt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Tt(e)):null}toDate(e,t){return"local"===this.timeZone?kt(Tt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Tt(e))*60):new Date(e.valueOf()-(t||0))}}class Sn{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if("object"==typeof e&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}function Rn(e){e();let t=m.debounceRendering,n=[];for(m.debounceRendering=function(e){n.push(e)},K(k(xn,{}),document.createElement("div"));n.length;)n.shift()();m.debounceRendering=t}Sn.prototype.classes={},Sn.prototype.iconClasses={},Sn.prototype.baseIconClass="",Sn.prototype.iconOverridePrefix="";class xn extends H{render(){return k("div",{})}componentDidMount(){this.setState({})}}function kn(e){let t=function(e,t){var n={__c:t="__cC"+C++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,U(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}class Tn{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const Mn=kn({});function On(e,t,n,r,i,s,o,a,l,c,d,u,f){return{dateEnv:i,options:n,pluginHooks:o,emitter:c,dispatch:a,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:"rtl"===n.direction,addResizeHandler(e){c.on("_resize",e)},removeResizeHandler(e){c.off("_resize",e)},createScrollResponder:e=>new Tn(e,c,ut(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:u,unregisterInteractiveComponent:f}}class In extends H{shouldComponentUpdate(e,t){return this.debug&&console.log(yn(e,this.props),yn(t,this.state)),!An(this.props,e,this.propEquality)||!An(this.state,t,this.stateEquality)}safeSetState(e){An(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}In.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},In.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},In.contextType=Mn,In.prototype.propEquality={},In.prototype.stateEquality={};class Nn extends In{}function Pn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}Nn.contextType=Mn;class Hn extends Nn{constructor(){super(...arguments),this.id=rt(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&Bn(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Pn(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:s}=e,o=zn(e,[],this.handleEl);let a,l,c=!1,d=[];if(null!=r){const e="function"==typeof r?r(s,k):r;if(!0===e)c=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?d=Array.prototype.slice.call(e.domNodes):(t?b(e):"function"!=typeof e)?a=e:l=e}}else c=!Bn(e.generatorName,n);return c&&i&&(a=i(s)),this.queuedDomNodes=d,this.currentGeneratorMeta=l,k(e.elTag,o,a)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:i,customRenderingMetaMap:s}=r.options;if(i){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==s?void 0:s[n.generatorName];r&&i(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(jn)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!bt(e,t)){t.forEach(Qe);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function Bn(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function zn(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function jn(e){return Boolean(e)}Hn.addPropsEquality({elClasses:bt,elStyle:vn,elAttrs:function(e,t){const n=yn(e,t);for(let e of n)if(!bn.test(e))return!1;return!0},renderProps:vn});const Un=kn(0);class Wn extends H{constructor(){super(...arguments),this.InnerContent=Fn.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Pn(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const n="function"==typeof e?e(t):e||[];return"string"==typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=zn(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?k(e.elTag,n,r):r}return k(Hn,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function Fn(e,t){const n=e.props;return k(Hn,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}Wn.contextType=Un;class Gn extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return k(Wn,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...Ln(e.viewSpec),...e.elClasses||[]],renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount}),(()=>e.children))}}function Ln(e){return[`fc-${e.type}-view`,"fc-view"]}function Vn(e,t){let n,r,i=[],{start:s}=t;for(e.sort(Qn),n=0;n<e.length;n+=1)r=e[n],r.start>s&&i.push({start:s,end:r.start}),r.end>s&&(s=r.end);return s<t.end&&i.push({start:s,end:t.end}),i}function Qn(e,t){return e.start.valueOf()-t.start.valueOf()}function qn(e,t){let{start:n,end:r}=e,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function Zn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function Yn(e){let t=Math.floor(Ct(e.start,e.end))||1,n=_t(e.start);return{start:n,end:wt(n,t)}}function $n(e,t=ut(0)){let n=null,r=null;if(e.end){r=_t(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=gt(t)&&(r=wt(r,1))}return e.start&&(n=_t(e.start),r&&r<=n&&(r=wt(n,1))),{start:n,end:r}}function Jn(e,t,n,r){return"year"===r?ut(n.diffWholeYears(e,t),"year"):"month"===r?ut(n.diffWholeMonths(e,t),"month"):function(e,t){let n=_t(e),r=_t(t);return{years:0,months:0,days:Math.round(Ct(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}function Xn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}class Kn{constructor(e){this.props=e,this.nowDate=Xn(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let r,i,s,o,a,l,{props:c}=this;var d,u,f,h;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(d=e,e=null!=(u=r).start&&d<u.start?u.start:null!=u.end&&d>=u.end?new Date(u.end.valueOf()-1):d),i=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(i.unit),o=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,s),o=this.trimHiddenDays(o),a=o,c.showNonCurrentDates||(a=qn(a,i.range)),a=this.adjustActiveRange(a),a=qn(a,r),f=i.range,h=r,l=(null===f.end||null===h.start||f.end>h.start)&&(null===f.start||null===h.end||f.start<h.end),Zn(o,e)||(e=o.start),{currentDate:e,validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:s,activeRange:a,renderRange:o,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,i=null,s=null,o=null;return r.duration?(i=r.duration,s=r.durationUnit,o=this.buildRangeFromDuration(e,t,i,s)):(n=this.props.dayCount)?(s="day",o=this.buildRangeFromDayCount(e,t,n)):(o=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),s=vt(i).unit,o=this.buildRangeFromDuration(e,t,i,s)),{duration:i,unit:s,range:o}}getFallbackDuration(){return ut({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:s,end:o}=e;return n&&(pt(r)<0&&(s=_t(s),s=t.add(s,r)),pt(i)>1&&(o=_t(o),o=wt(o,-1),o=t.add(o,i))),{start:s,end:o}}buildRangeFromDuration(e,t,n,r){let i,s,o,{dateEnv:a,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&gt(e)<gt(n)?vt(e).unit:r}function c(){i=a.startOf(e,l),s=a.add(i,n),o={start:i,end:s}}return pt(n)<=1&&this.isHiddenDay(i)&&(i=this.skipHiddenDays(i,t),i=_t(i)),c(),this.trimHiddenDays(o)||(e=this.skipHiddenDays(e,t),c()),o}buildRangeFromDayCount(e,t,n){let r,{dateEnv:i,dateAlignment:s}=this.props,o=0,a=e;s&&(a=i.startOf(a,s)),a=_t(a),a=this.skipHiddenDays(a,t),r=a;do{r=wt(r,1),this.isHiddenDay(r)||(o+=1)}while(o<n);return{start:a,end:r}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let t,{dateIncrement:n}=this.props;return n||((t=this.props.dateAlignment)?ut(1,t):e||ut({days:1}))}refineRange(e){if(e){let t=function(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}(e,this.props.dateEnv);return t&&(t=$n(t)),t}return null}initHiddenDays(){let e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:t,end:n}=e;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=wt(e,t);return e}}function er(e,t,n,r){return{instanceId:rt(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}function tr(e,t,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:o,instances:a}=e;a=hn(a,(e=>!o[e.defId].recurringDef));for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||(o=n.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let l=nr(n,o,t,r,i.recurringTypes);for(let t of l){let n=er(e,{start:t,end:r.add(t,o)});a[n.instanceId]=n}}}return{defs:o,instances:a}}function nr(e,t,n,r,i){let s=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(s=s.map(_t)),s}const rr={id:String,groupId:String,title:String,url:String,interactive:Boolean},ir={start:dn,end:dn,date:dn,allDay:Boolean},sr=Object.assign(Object.assign(Object.assign({},rr),ir),{extendedProps:dn});function or(e,t,n,r,i=lr(n),s,o){let{refined:a,extra:l}=ar(e,n,i),c=function(e,t){let n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),d=function(e,t,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(e,n);if(s){let{allDay:n}=e;return null==n&&(n=t,null==n&&(n=s.allDayGuess,null==n&&(n=!1))),{allDay:n,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}(a,c,n.dateEnv,n.pluginHooks.recurringTypes);if(d){let e=cr(a,l,t?t.sourceId:"",d.allDay,Boolean(d.duration),n,s);return e.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:e,instance:null}}let u=function(e,t,n,r){let i,s,{allDay:o}=e,a=null,l=!1,c=null,d=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(d),i)a=i.marker;else if(!r)return null;return null!=e.end&&(s=n.dateEnv.createMarkerMeta(e.end)),null==o&&(o=null!=t?t:(!i||i.isTimeUnspecified)&&(!s||s.isTimeUnspecified)),o&&a&&(a=_t(a)),s&&(c=s.marker,o&&(c=_t(c)),a&&c<=a&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,o?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:o,hasEnd:l,range:{start:a,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:s?s.forcedTzo:null}}(a,c,n,r);if(u){let e=cr(a,l,t?t.sourceId:"",u.allDay,u.hasEnd,n,s),r=er(e.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function ar(e,t,n=lr(t)){return cn(e,n)}function lr(e){return Object.assign(Object.assign(Object.assign({},gr),sr),e.pluginHooks.eventRefiners)}function cr(e,t,n,r,i,s,o){let a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(o&&e.id?o[e.id]:"")||rt(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:vr(e,s),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of s.pluginHooks.eventDefMemberAdders)Object.assign(a,t(e));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function dr(e,t,n,r,i,s){let o={defs:{},instances:{}},a=lr(n);for(let l of e){let e=or(l,t,n,r,a,i,s);e&&ur(e,o)}return o}function ur(e,t={defs:{},instances:{}}){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function fr(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function hr(e,t){let n=hn(e.defs,t),r=hn(e.instances,(e=>n[e.defId]));return{defs:n,instances:r}}function pr(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const gr={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:dn,overlap:dn,allow:dn,className:pr,classNames:pr,color:String,backgroundColor:String,borderColor:String,textColor:String},mr={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function vr(e,t){let n=function(e,t){return Array.isArray(e)?dr(e,null,t,!0):"object"==typeof e&&e?dr([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function br(e){return e.reduce(yr,mr)}function yr(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const Ar={id:String,defaultAllDay:Boolean,url:String,format:String,events:dn,eventDataTransform:dn,success:dn,failure:dn};function wr(e,t,n=Er(t)){let r;if("string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){let{refined:i,extra:s}=cn(r,n),o=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;t-=1){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:rt(),sourceDefId:o.sourceDefId,meta:o.meta,ui:vr(i,t),extendedProps:s}}return null}function Er(e){return Object.assign(Object.assign(Object.assign({},gr),Ar),e.pluginHooks.eventSourceRefiners)}function Cr(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Dr(e,i)),r&&(e=Dr(e,r)),e}function Dr(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function _r(e,t,n){let{defs:r}=e,i=pn(e.instances,(e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})));return{defs:r,instances:i}}function Sr(e,t){return hr(e,(e=>e.sourceId!==t))}class Rr{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((e=>e!==n))):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}const xr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function kr(e,t,n){let{dateEnv:r,options:i}=n,s=t;return e?(s=_t(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Tr(e,t,n,r){let i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function Mr(e,t,n,r,i){let{dateEnv:s}=i,o=r.standardProps&&!0===r.standardProps.allDay,a=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return o&&(l.range=Yn(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:s.add(l.range.start,r.datesDelta),end:s.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:s.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:s.add(l.range.end,r.endDelta)}),a&&(l.range={start:l.range.start,end:kr(t.allDay,l.range.start,i)}),t.allDay&&(l.range={start:_t(l.range.start),end:_t(l.range.end)}),l.range.end<l.range.start&&(l.range.end=kr(t.allDay,l.range.start,i)),l}class Or{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Ir{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in ir)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=rr[e](t),this.mutate({standardProps:{publicId:t}});else if(e in rr)t=rr[e](t),this.mutate({standardProps:{[e]:t}});else if(e in gr){let n=gr[e](t);n="color"===e?{backgroundColor:t,borderColor:t}:"editable"===e?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=Jn(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e,t={}){let n,{dateEnv:r}=this._context;if((null==e||(n=r.createMarker(e),n))&&this._instance)if(n){let e=Jn(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,n={}){let r,{dateEnv:i}=this._context,s={allDay:n.allDay},o=i.createMarker(e);var a,l;if(o&&(null==t||(r=i.createMarker(t),r))&&this._instance){let e=this._instance.range;!0===n.allDay&&(e=Yn(e));let t=Jn(e.start,o,i,n.granularity);if(r){let o=Jn(e.end,r,i,n.granularity);l=o,(a=t).years===l.years&&a.months===l.months&&a.days===l.days&&a.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:s}):this.mutate({startDelta:t,endDelta:o,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:t,standardProps:s})}}moveStart(e){let t=ut(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=ut(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=ut(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Xt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:i}=r.getCurrentData(),s=function(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=hr(e,(e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r}));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}(i,t.instanceId);s=function(e,t,n,r){let i=jr(e.defs,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}),s={defs:{},instances:{}};for(let t in e.defs){let o=e.defs[t];s.defs[t]=Tr(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],a=s.defs[o.defId];s.instances[t]=Mr(o,a,i[o.defId],n,r)}return s}(s,0,e,r);let o=new Ir(r,n,t);this._def=s.defs[n.defId],this._instance=s.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:s}),r.emitter.trigger("eventChange",{oldEvent:o,event:this,relatedEvents:Pr(s,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,t=Nr(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new Or(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,s={allDay:t.allDay};return t.title&&(s.title=t.title),r&&(s.start=r),i&&(s.end=i),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(s,t.extendedProps):s.extendedProps=t.extendedProps),s}toJSON(){return this.toPlainObject()}}function Nr(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function Pr(e,t,n){let{defs:r,instances:i}=e,s=[],o=n?n.instanceId:"";for(let e in i){let n=i[e],a=r[n.defId];n.instanceId!==o&&s.push(new Ir(t,a,n))}return s}function Hr(e,t,n,r){let i={},s={},o={},a=[],l=[],c=jr(e.defs,t);for(let t in e.defs){let n=e.defs[t];"inverse-background"===c[n.defId].display&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):s[t]=[])}for(let t in e.instances){let o=e.instances[t],d=e.defs[o.defId],u=c[d.defId],f=o.range,h=!d.allDay&&r?$n(f,r):f,p=qn(h,n);p&&("inverse-background"===u.display?d.groupId?i[d.groupId].push(p):s[o.defId].push(p):"none"!==u.display&&("background"===u.display?a:l).push({def:d,ui:u,instance:o,range:p,isStart:h.start&&h.start.valueOf()===p.start.valueOf(),isEnd:h.end&&h.end.valueOf()===p.end.valueOf()}))}for(let e in i){let t=Vn(i[e],n);for(let n of t){let t=o[e],r=c[t.defId];a.push({def:t,ui:r,instance:null,range:n,isStart:!1,isEnd:!1})}}for(let t in s){let r=Vn(s[t],n);for(let n of r)a.push({def:e.defs[t],ui:c[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Br(e,t){e.fcSeg=t}function zr(e){return e.fcSeg||e.parentNode.fcSeg||null}function jr(e,t){return pn(e,(e=>Ur(e,t)))}function Ur(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),br(n)}function Wr(e,t){let n=e.map(Fr);return n.sort(((e,n)=>function(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=it(e,t,n[r]),i)return i;return 0}(e,n,t))),n.map((e=>e._seg))}function Fr(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:e})}function Gr(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:s}=e.eventRange,o=s.startEditable;for(let e of r)o=e(o,i,s,t);return o}function Lr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function Vr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function Qr(e,t,n,r,i,s,o){let{dateEnv:a,options:l}=n,{displayEventTime:c,displayEventEnd:d}=l,u=e.eventRange.def,f=e.eventRange.instance;null==c&&(c=!1!==r),null==d&&(d=!1!==i);let h=f.range.start,p=f.range.end,g=s||e.start||e.eventRange.range.start,m=o||e.end||e.eventRange.range.end,v=_t(h).valueOf()===_t(g).valueOf(),b=_t(Et(p,-1)).valueOf()===_t(Et(m,-1)).valueOf();return c&&!u.allDay&&(v||b)?(g=v?h:g,m=b?p:m,d&&u.hasEnd?a.formatRange(g,m,t,{forcedStartTzo:s?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):a.format(g,t,{forcedTzo:s?null:f.forcedStartTzo})):""}function qr(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Zn(t,r.start)}}function Zr(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function Yr(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function $r(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:o}=t,{eventInteractive:a}=o;return null==a&&(a=n.interactive,null==a&&(a=Boolean(s.hasHandlers("eventClick")))),a?tt((e=>{s.trigger("eventClick",{el:e.target,event:new Ir(t,n,r),jsEvent:e,view:t.viewApi})})):{}}const Jr={start:dn,end:dn,allDay:Boolean};function Xr(e,t,n){return Object.assign(Object.assign({},Kr(e,t,n)),{timeZone:t.timeZone})}function Kr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}class ei extends Error{constructor(e,t){super(e),this.response=t}}let ti;function ni(){return null==ti&&(ti=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),ti}class ri extends Nn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{Rn((()=>{this.setState({forPrint:!0})}))},this.handleAfterPrint=()=>{Rn((()=>{this.setState({forPrint:!1})}))}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,s=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return ni()||s.push("fc-liquid-hack"),e.children(s,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class ii{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}const si={};class oi{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering((()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:i}=this.getCurrentData(),s=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(let e in r)s.push(e);for(t=0;t<s.length;t+=1)if(n=r[s[t]],n&&n.singleUnit===e)return n;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Xn(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=ut(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Xt(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Xt(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};let r=this.getCurrentData(),i=function(e,t,n){let r=function(e,t){let{refined:n,extra:r}=cn(e,Jr),i=n.start?t.createMarkerMeta(n.start):null,s=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return null==o&&(o=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:o},r)}(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}(n,r.dateEnv,ut({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),function(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},function(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));var r,i;return Object.assign(n,(r=e,i=t.dateEnv,Object.assign(Object.assign({},Kr(r.range,i,r.allDay)),{allDay:r.allDay}))),n}(e,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}(i,0,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))}addEvent(e,t){if(e instanceof Ir){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:ur({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n,r=this.getCurrentData();if(t instanceof Or)n=t.internalEventSource;else if("boolean"==typeof t)t&&([n]=mn(r.eventSources));else if(null!=t){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;n=e.internalEventSource}let i=or(e,n,r,!1);if(i){let e=new Ir(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:ur(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Nr(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let s=n[i];if(s.publicId===e){if(s.recurringDef)return new Ir(t,s,null);for(let e in r){let n=r[e];if(n.defId===s.defId)return new Ir(t,s,n)}}}return null}getEvents(){let e=this.getCurrentData();return Pr(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new Or(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new Or(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Or)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=wr(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new Or(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=ut(e);t&&this.trigger("_scrollRequest",{time:t})}}function ai(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}const li={defs:{},instances:{}};class ci{constructor(){this.getKeysForEventDefs=Bt(this._getKeysForEventDefs),this.splitDateSelection=Bt(this._splitDateSpan),this.splitEventStore=Bt(this._splitEventStore),this.splitIndividualUi=Bt(this._splitIndividualUi),this.splitEventDrag=Bt(this._splitInteraction),this.splitEventResize=Bt(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,n),s=this.splitEventStore(e.eventStore,n),o=this.splitEventDrag(e.eventDrag),a=this.splitEventResize(e.eventResize),l={};this.eventUiBuilders=pn(t,((e,t)=>this.eventUiBuilders[t]||Bt(di)));for(let n in t){let c=t[n],d=s[n]||li,u=this.eventUiBuilders[n];l[n]={businessHours:c.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:d,eventUiBases:u(e.eventUiBases[""],c.ui,i[n]),eventSelection:d.instances[e.eventSelection]?e.eventSelection:"",eventDrag:o[n]||null,eventResize:a[n]||null}}return l}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return pn(e.defs,(e=>this.getKeysForEventDef(e)))}_splitEventStore(e,t){let{defs:n,instances:r}=e,i={};for(let e in n)for(let r of t[e])i[r]||(i[r]={defs:{},instances:{}}),i[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])i[r]&&(i[r].instances[e]=n)}return i}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let i of t[r])n[i]||(n[i]={}),n[i][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),s=r=>{t[r]||(t[r]={affectedEvents:n[r]||li,mutatedEvents:i[r]||li,isEvent:e.isEvent})};for(let e in n)s(e);for(let e in i)s(e)}return t}}function di(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let i={"":br(r)};return n&&Object.assign(i,n),i}function ui(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Zn(r.activeRange,e)),isOther:Boolean(r&&!Zn(r.currentRange,e)),isToday:Boolean(t&&Zn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function fi(e,t){let n=["fc-day",`fc-day-${yt[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const hi=Xt({year:"numeric",month:"long",day:"numeric"}),pi=Xt({week:"long"});function gi(e,t,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:o}=e;let a=i.format(t,"week"===n?pi:hi);if(s.navLinks){let e=i.toDate(t);const l=e=>{let r="day"===n?s.navLinkDayClick:"week"===n?s.navLinkWeekClick:null;"function"==typeof r?r.call(o,i.toDate(t),e):("string"==typeof r&&(n=r),o.zoomTo(t,n))};return Object.assign({title:ot(s.navLinkHint,[a,e],a),"data-navlink":""},r?et(l):{onClick:l})}return{"aria-label":a}}let mi;class vi{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let t,{lefts:n,rights:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}topToIndex(e){let t,{tops:n,bottoms:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return bi(this.tops||[],e.tops||[])&&bi(this.bottoms||[],e.bottoms||[])&&bi(this.lefts||[],e.lefts||[])&&bi(this.rights||[],e.rights||[])}}function bi(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class yi extends Nn{constructor(){super(...arguments),this.uid=rt()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!qe(e,".fc-event-mirror")}isValidDateDownEl(e){return!(qe(e,".fc-event:not(.fc-bg-event)")||qe(e,".fc-more-link")||qe(e,"a[data-navlink]")||qe(e,".fc-popover"))}}class Ai{constructor(e=(e=>e.thickness||1)){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){const r=Object.assign(Object.assign({},t),{span:Ci(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(Di(r,t.level,t.levelCoord),Di(n,t.level,[e])):Di(n[t.level],t.lateral,e),this.stackCnts[Ei(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,s=t.length,o=0,a=-1,l=-1,c=null,d=0;for(let u=0;u<s;u+=1){const s=t[u];if(!r&&s>=o+this.getEntryThickness(e))break;let f,h=n[u],p=_i(h,e.span.start,wi),g=p[0]+p[1];for(;(f=h[g])&&f.span.start<e.span.end;){let e=s+this.getEntryThickness(f);e>o&&(o=e,c=f,a=u,l=g),e===o&&(d=Math.max(d,i[Ei(f)]+1)),g+=1}}let u=0;if(c)for(u=a+1;u<s&&t[u]<o;)u+=1;let f=-1;return u<s&&t[u]===o&&(f=_i(n[u],e.span.end,wi)[0]),{touchingLevel:a,touchingLateral:l,touchingEntry:c,stackCnt:d,levelCoord:o,level:u,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],s=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:s}))}return r}}function wi(e){return e.span.end}function Ei(e){return e.index+":"+e.span.start}function Ci(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function Di(e,t,n){e.splice(t,0,n)}function _i(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),o=n(e[s]);if(t<o)i=s;else{if(!(t>o))return[s,1];r=s+1}}return[r,0]}Boolean;const Si="fc-col-header-cell";function Ri(e){return e.text}class xi extends Nn{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:s,dateProfile:o}=i,a=ui(s,i.todayRange,null,o),l=[Si].concat(fi(a,n)),c=e.format(s,i.dayHeaderFormat),d=!a.isDisabled&&i.colCnt>1?gi(this.context,s):{},u=Object.assign(Object.assign(Object.assign({date:e.toDate(s),view:r},i.extraRenderProps),{text:c}),a);return k(Wn,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":a.isDisabled?void 0:Pt(s)},i.extraDataAttrs),renderProps:u,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>k("div",{className:"fc-scrollgrid-sync-inner"},!a.isDisabled&&k(e,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]}))))}}const ki=Xt({weekday:"long"});class Ti extends Nn{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,s=wt(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},a=t.format(s,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:s},o),{view:r}),e.extraRenderProps),{text:a});return k(Wn,{elTag:"th",elClasses:[Si,...fi(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(n=>k("div",{className:"fc-scrollgrid-sync-inner"},k(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(s,ki)}}))))}}class Mi extends H{constructor(e,t){super(e,t),this.initialNowDate=Xn(t.options.now,t.dateEnv),this.initialNowQueriedMs=(new Date).valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:t}=this,n=Et(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,ut(1,e.unit)),s=i.valueOf()-n.valueOf();return s=Math.min(864e5,s),{currentState:{nowDate:r,todayRange:Oi(r)},nextState:{nowDate:i,todayRange:Oi(i)},waitMs:s}}setTimeout(){let{nextState:e,waitMs:t}=this.computeTiming();this.timeoutId=setTimeout((()=>{this.setState(e,(()=>{this.setTimeout()}))}),t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function Oi(e){let t=_t(e);return{start:t,end:wt(t,1)}}Mi.contextType=Mn;class Ii extends Nn{constructor(){super(...arguments),this.createDayHeaderFormatter=Bt(Ni)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return k(Mi,{unit:"day"},((e,o)=>k("tr",{role:"row"},i&&i("day"),t.map((e=>r?k(xi,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:s}):k(Ti,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s}))))))}}function Ni(e,t,n){return e||function(e,t){return Xt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}class Pi{constructor(e,t){let n=e.start,{end:r}=e,i=[],s=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),s.push(n)),n=wt(n,1);this.dates=s,this.indices=i,this.cnt=s.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(wt(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(Ct(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}}class Hi{constructor(e,t){let n,r,i,{dates:s}=e;if(t){for(r=s[0].getUTCDay(),n=1;n<s.length&&s[n].getUTCDay()!==r;n+=1);i=Math.ceil(s.length/n)}else i=1,n=s.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,s=e;for(;s<=i;){let o=Math.floor(s/t),a=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:s%t,lastCol:(a-1)%t,isStart:n.isStart&&s===e,isEnd:n.isEnd&&a-1===i}),s=a}}return r}}class Bi{constructor(){this.sliceBusinessHours=Bt(this._sliceBusinessHours),this.sliceDateSelection=Bt(this._sliceDateSpan),this.sliceEventStore=Bt(this._sliceEventStore),this.sliceEventDrag=Bt(this._sliceInteraction),this.sliceEventResize=Bt(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:s}=e,o=this.sliceEventStore(e.eventStore,s,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,s,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,s,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,s,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:Et(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(tr(e,zi(t,Boolean(n)),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let s=Hr(e,t,zi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let s=Hr(e.mutatedEvents,t,zi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...s){if(!e)return[];let o=zi(t,Boolean(n)),a=qn(e.range,o);if(a){let t=function(e,t,n){let r=ar({editable:!1},n),i=cr(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:Ur(i,t),instance:er(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e=Object.assign(Object.assign({},e),{range:a}),r,i),n=this.sliceRange(e.range,...s);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:wt(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}}function zi(e,t){let n=e.activeRange;return t?n:{start:Et(n.start,e.slotMinTime.milliseconds),end:Et(n.end,e.slotMaxTime.milliseconds-864e5)}}const ji=/^(visible|hidden)$/;class Ui extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),k("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(ji.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(ji.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return ji.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return ji.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Wi{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,s=!1;null!==e?(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,s=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],i=!0)),this.masterCallback&&(i&&this.masterCallback(null,String(t)),s&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return function(e,t=0,n,r=1){let i=[];null==n&&(n=Object.keys(e).length);for(let s=t;s<n;s+=r){let t=e[s];void 0!==t&&i.push(t)}return i}(this.currentMap,e,t,n)}getAll(){return mn(this.currentMap)}}function Fi(e,t){return e.liquid&&t.liquid}function Gi(e,t){return bt(e,t,vn)}function Li(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(k("col",{style:{width:"shrink"===r.width?Vi(t):r.width||"",minWidth:r.minWidth||""}}))}return k("colgroup",{},...n)}function Vi(e){return null==e?4:e}function Qi(e,t){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function qi(e){return k("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Zi(e){let{stickyHeaderDates:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Yi(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}class $i extends Nn{constructor(){super(...arguments),this.processCols=Bt((e=>e),Gi),this.renderMicroColGroup=Bt(Li),this.scrollerRefs=new Wi,this.scrollerElRefs=new Wi(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),s=this.renderMicroColGroup(i,t.shrinkWidth),o=function(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let a,l=r.length,c=0,d=[],u=[],f=[];for(;c<l&&"header"===(a=r[c]).type;)d.push(this.renderSection(a,s,!0)),c+=1;for(;c<l&&"body"===(a=r[c]).type;)u.push(this.renderSection(a,s,!1)),c+=1;for(;c<l&&"footer"===(a=r[c]).type;)f.push(this.renderSection(a,s,!0)),c+=1;let h=!ni();const p={role:"rowgroup"};return k("table",{role:"grid",className:o.join(" "),style:{height:e.height}},Boolean(!h&&d.length)&&k("thead",p,...d),Boolean(!h&&u.length)&&k("tbody",p,...u),Boolean(!h&&f.length)&&k("tfoot",p,...f),h&&k("tbody",p,...d,...u,...f))}renderSection(e,t,n){return"outerContent"in e?k(M,{key:e.key},e.outerContent):k("tr",{key:e.key,role:"presentation",className:Qi(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if("outerContent"in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:s,scrollerClientWidths:o,scrollerClientHeights:a}=this.state,l=function(e,t){return null!=t.maxHeight||Fi(e,t)}(i,e),c=Fi(i,e),d=i.liquid?s?"scroll":l?"auto":"hidden":"visible",u=e.key,f=function(e,t,n,r){let{expandRows:i}=n;return"function"==typeof t.content?t.content(n):k("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,k(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:i.collapsibleWidth||void 0===o[u]?null:o[u],clientHeight:void 0!==a[u]?a[u]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return k(r?"th":"td",{ref:n.elRef,role:"presentation"},k("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},k(Ui,{ref:this.scrollerRefs.createRef(u),elRef:this.scrollerElRefs.createRef(u),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&Pn(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?function(e){let t=function(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let t=n[e].querySelectorAll(".fc-scrollgrid-shrink");for(let e=0;e<t.length;e+=1)r.push(t[e])}return r}(e),n=0;for(let e of t)n=Math.max(n,lt(e));return Math.ceil(n)}(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=(mi||(mi=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=function(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}(e);return document.body.removeChild(e),t}()),mi),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},s={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,a=n.currentMap[o];if(a){let t=a.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),s[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:s}}}$i.addStateEquality({scrollerClientWidths:vn,scrollerClientHeights:vn});class Ji extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&Br(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:s}=i,o={event:new Ir(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:s.textColor,backgroundColor:s.backgroundColor,borderColor:s.borderColor,isDraggable:!e.disableDragging&&Gr(r,t),isStartResizable:!e.disableResizing&&Lr(r,t),isEndResizable:!e.disableResizing&&Vr(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return k(Wn,Object.assign({},e,{elRef:this.handleEl,elClasses:[...Zr(o),...r.eventRange.ui.classNames,...e.elClasses||[]],renderProps:o,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Br(this.el,this.props.seg)}}class Xi extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,s=Qr(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:$r(r,t),defaultGenerator:Ki,timeText:s}),((e,t)=>k(M,null,k(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function Ki(e){return k("div",{className:"fc-event-main-frame"},e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title-container"},k("div",{className:"fc-event-title fc-sticky"},e.event.title||k(M,null," "))))}const es=e=>k(Mn.Consumer,null,(t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return k(Wn,Object.assign({},e,{elTag:e.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))})),ts=Xt({day:"numeric"});class ns extends Nn{constructor(){super(...arguments),this.refineRenderProps=zt(is)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return k(Wn,Object.assign({},e,{elClasses:[...fi(r,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Pt(e.date)}),renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount}))}}function rs(e){return Boolean(e.dayCellContent||Bn("dayCellContent",e))}function is(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,s=ui(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:ts):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},s),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}class ss extends Nn{render(){let{props:e}=this,{seg:t}=e;return k(Ji,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:os,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function os(e){let{title:t}=e.event;return t&&k("div",{className:"fc-event-title"},e.event.title)}function as(e){return k("div",{className:`fc-${e}`})}const ls=e=>k(Mn.Consumer,null,(t=>{let{dateEnv:n,options:r}=t,{date:i}=e,s=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,s),date:i};return k(Wn,Object.assign({},e,{renderProps:o,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:cs,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))}));function cs(e){return e.text}class ds extends Nn{constructor(){super(...arguments),this.state={titleId:Xe()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=function(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return function(e,t){var n=k(Re,{__v:e,i:t});return n.containerInfo=t,n}(k("div",Object.assign({},n.extraAttrs,{id:n.id,className:i.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),k("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},k("span",{className:"fc-popover-title",id:r.titleId},n.title),k("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),k("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=function(e){let t=function(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}(e),n=e.getBoundingClientRect();for(let e of t){let t=ai(n,e.getBoundingClientRect());if(!t)return null;n=t}return n}(t);if(i){let s=r.getBoundingClientRect(),o=n?qe(t,".fc-scrollgrid").getBoundingClientRect().top:i.top,a=e?i.right-s.width:i.left;o=Math.max(o,10),a=Math.min(a,document.documentElement.clientWidth-10-s.width),a=Math.max(a,10);let l=r.offsetParent.getBoundingClientRect();!function(e,t){for(let n in t)$e(e,n,t[n])}(r,{top:o-l.top,left:a-l.left})}}}class us extends yi{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:s}=n,o=t.format(r,e.dayPopoverFormat);return k(ns,{elRef:this.handleRootEl,date:r,dateProfile:s,todayRange:i},((t,r,i)=>k(ds,{elRef:i.ref,id:n.id,title:o,extraClassNames:["fc-more-popover"].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},rs(e)&&k(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children)))}queryHit(e,t,n,r){let{rootEl:i,props:s}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:s.dateProfile,dateSpan:Object.assign({allDay:!s.forceTimed,range:{start:s.startDate,end:s.endDate}},s.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}}class fs extends Nn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:Xe()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=ps(t).start;function s(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new Ir(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof r&&(r=r({date:i,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(s),hiddenSegs:t.hiddenSegs.map(s),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"==typeof r&&n.calendarApi.zoomTo(i,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return k(Mn.Consumer,null,(n=>{let{viewApi:r,options:i,calendarApi:s}=n,{moreLinkText:o}=i,{moreCnt:a}=e,l=ps(e),c="function"==typeof o?o.call(s,a):`+${a} ${o}`,d=ot(i.moreLinkHint,[a],c),u={num:a,shortText:`+${a}`,text:c,view:r};return k(M,null,Boolean(e.moreCnt)&&k(Wn,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),et(this.handleClick)),{title:d,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:u,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||hs,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&k(us,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=qe(this.linkEl,".fc-view-harness"))}}function hs(e){return e.text}function ps(e){if(e.allDayDate)return{start:e.allDayDate,end:wt(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:gs(t),end:(n=t,n.reduce(vs).eventRange.range.end)};var n}function gs(e){return e.reduce(ms).eventRange.range.start}function ms(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function vs(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}class bs{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class ys extends bs{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}const As=[],ws={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Es=Object.assign(Object.assign({},ws),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function Cs(e){let t=e.length>0?e[0].code:"en",n=As.concat(e),r={en:Es};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function Ds(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let e=r.length;e>0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||Es;return _s(e,n,r)}(e,t):_s(e.code,[e.code],e)}function _s(e,t,n){let r=fn([ws,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Ss(e){return{id:rt(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}class Rs extends Sn{}function xs(e,t,n,r){if(t[e])return t[e];let i=function(e,t,n,r){let i=n[e],s=r[e],o=e=>i&&null!==i[e]?i[e]:s&&null!==s[e]?s[e]:null,a=o("component"),l=o("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=xs(l,t,n,r)}return!a&&c&&(a=c.component),a?{type:e,component:a,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,r);return i&&(t[e]=i),i}function ks(e){return pn(e,Ts)}function Ts(e){let t="function"==typeof e?{component:e}:e,{component:n}=t;return t.content?n=Ms(t):!n||n.prototype instanceof Nn||(n=Ms(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function Ms(e){return t=>k(Mn.Consumer,null,(n=>k(Wn,{elTag:"div",elClasses:Ln(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function Os(e,t,n,r){let i=ks(e),s=ks(t.views),o=function(e,t){let n,r={};for(n in e)xs(n,r,e,t);for(n in t)xs(n,r,e,t);return r}(i,s);return pn(o,(e=>function(e,t,n,r,i){let s=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,a="",l="",c={};if(s&&(o=function(e){let t=JSON.stringify(e),n=Is[t];return void 0===n&&(n=ut(e),Is[t]=n),n}(s),o)){let e=vt(o);a=e.unit,1===e.value&&(l=a,c=t[a]?t[a].rawOptions:{})}let d=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},u=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:o,durationUnit:a,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(i)||e.defaults.buttonText||d(en)||e.type,buttonTitleOverride:u(r)||u(n)||e.overrides.buttonHint,buttonTitleDefault:u(i)||e.defaults.buttonHint||u(en)}}(e,s,t,n,r)))}Rs.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},Rs.prototype.baseIconClass="fc-icon",Rs.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},Rs.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},Rs.prototype.iconOverrideOption="buttonIcons",Rs.prototype.iconOverrideCustomButtonOption="icon",Rs.prototype.iconOverridePrefix="fc-icon-";let Is={};function Ns(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function Ps(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=Hs(i,n,r)),Object.assign(Object.assign({},e),i)}function Hs(e,t,n){return Bs(e,hn(e,(e=>function(e,t,n){return Us(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n))),t,!1,n)}function Bs(e,t,n,r,i){let s={};for(let o in e){let a=e[o];t[o]?s[o]=zs(a,n,r,i):s[o]=a}return s}function zs(e,t,n,r){let{options:i,calendarApi:s}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],a=rt();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},(n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(s,o,n.response)||o),e.success&&(o=e.success.call(s,o,n.response)||o),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:o})}),(n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:n})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:a})}function js(e,t){return hn(e,(e=>Us(e,t)))}function Us(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ws(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Fs(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Gs(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ls(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Vs(e,t,n,r,i){return{header:e.headerToolbar?Qs(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?Qs(e.footerToolbar,e,t,n,r,i):null}}function Qs(e,t,n,r,i,s){let o={},a=[],l=!1;for(let c in e){let d=qs(e[c],t,n,r,i,s);o[c]=d.widgets,a.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:l}}function qs(e,t,n,r,i,s){let o="rtl"===t.direction,a=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},d=n.buttonHints||{},u=t.buttonHints||{},f=e?e.split(" "):[],h=[],p=!1;return{widgets:f.map((e=>e.split(",").map((e=>{if("title"===e)return p=!0,{buttonName:e};let n,f,g,m,v,b;if(n=a[e])g=e=>{n.click&&n.click.call(e.target,e,e.target)},(m=r.getCustomButtonIconClass(n))||(m=r.getIconClass(e,o))||(v=n.text),b=n.hint||n.text;else if(f=i[e]){h.push(e),g=()=>{s.changeView(e)},(v=f.buttonTextOverride)||(m=r.getIconClass(e,o))||(v=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;b=ot(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(s[e])if(g=()=>{s[e]()},(v=l[e])||(m=r.getIconClass(e,o))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";b=ot(d[t]||u[t],[c.year||"year","year"],c[e])}else b=t=>ot(d[e]||u[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:g,buttonIcon:m,buttonText:v,buttonHint:b}})))),viewsWithButtons:h,hasTitle:p}}class Zs{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}function Ys(e,t){let n=mn(t.getCurrentData().eventSources);if(1===n.length&&1===e.length&&Array.isArray(n[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}const $s=[Ss({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),Ss({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;!function(e,n,r){let i=!1,s=function(e){i||(i=!0,t({rawEvents:e}))},o=function(e){i||(i=!0,r(e))},a=e(s,o);a&&"function"==typeof a.then&&a.then(s,o)}(e.eventSource.meta.bind(null,Xr(e.range,r)),0,n)}}]}),Ss({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:dn,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,i=function(e,t,n){let r,i,s,o,{dateEnv:a,options:l}=n,c={};return r=e.startParam,null==r&&(r=l.startParam),i=e.endParam,null==i&&(i=l.endParam),s=e.timeZoneParam,null==s&&(s=l.timeZoneParam),o="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},Object.assign(c,o),c[r]=a.formatIso(t.start),c[i]=a.formatIso(t.end),"local"!==a.timeZone&&(c[s]=a.timeZone),c}(r,e.range,e.context);(function(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new ei("Failure parsing JSON",e)}));throw new ei("Request failed",e)}))})(r.method,r.url,i).then((([e,n])=>{t({rawEvents:e,response:n})}),n)}}]}),Ss({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let i,s={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null};return e.duration&&(i=e.duration),!i&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,i={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:i,typeData:s}}var n,r;return null},expand(e,t,n){let r=qn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){let i=e?gn(e):null,s=_t(n.start),o=n.end,a=[];for(;s<o;){let e;i&&!i[s.getUTCDay()]||(e=t?r.add(s,t):s,a.push(e)),s=wt(s,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:dn,startTime:ut,endTime:ut,duration:ut,startRecur:dn,endRecur:dn}}),Ss({name:"change-handler",optionChangeHandlers:{events(e,t){Ys([e],t)},eventSources:Ys}}),Ss({name:"misc",isLoadingFuncs:[e=>Ns(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},Xr(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Pr(e,t))}}})];class Js{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Ve(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function Xs(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Xt(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=Dt(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class Ks{constructor(e){this.computeCurrentViewData=Bt(this._computeCurrentViewData),this.organizeRawLocales=Bt(Cs),this.buildLocale=Bt(Ds),this.buildPluginHooks=function(){let e,t=[],n=[];return(r,i)=>(e&&bt(r,t)&&bt(i,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let l of e){const e=l.name,c=n[e];void 0===c?(n[e]=l.id,i(l.deps),a=l,r={premiumReleaseDate:(t=(o=r).premiumReleaseDate,s=a.premiumReleaseDate,void 0===t?s:void 0===s?t:new Date(Math.max(t.valueOf(),s.valueOf()))),reducers:o.reducers.concat(a.reducers),isLoadingFuncs:o.isLoadingFuncs.concat(a.isLoadingFuncs),contextInit:o.contextInit.concat(a.contextInit),eventRefiners:Object.assign(Object.assign({},o.eventRefiners),a.eventRefiners),eventDefMemberAdders:o.eventDefMemberAdders.concat(a.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},o.eventSourceRefiners),a.eventSourceRefiners),isDraggableTransformers:o.isDraggableTransformers.concat(a.isDraggableTransformers),eventDragMutationMassagers:o.eventDragMutationMassagers.concat(a.eventDragMutationMassagers),eventDefMutationAppliers:o.eventDefMutationAppliers.concat(a.eventDefMutationAppliers),dateSelectionTransformers:o.dateSelectionTransformers.concat(a.dateSelectionTransformers),datePointTransforms:o.datePointTransforms.concat(a.datePointTransforms),dateSpanTransforms:o.dateSpanTransforms.concat(a.dateSpanTransforms),views:Object.assign(Object.assign({},o.views),a.views),viewPropsTransformers:o.viewPropsTransformers.concat(a.viewPropsTransformers),isPropsValid:a.isPropsValid||o.isPropsValid,externalDefTransforms:o.externalDefTransforms.concat(a.externalDefTransforms),viewContainerAppends:o.viewContainerAppends.concat(a.viewContainerAppends),eventDropTransformers:o.eventDropTransformers.concat(a.eventDropTransformers),calendarInteractions:o.calendarInteractions.concat(a.calendarInteractions),componentInteractions:o.componentInteractions.concat(a.componentInteractions),themeClasses:Object.assign(Object.assign({},o.themeClasses),a.themeClasses),eventSourceDefs:o.eventSourceDefs.concat(a.eventSourceDefs),cmdFormatter:a.cmdFormatter||o.cmdFormatter,recurringTypes:o.recurringTypes.concat(a.recurringTypes),namedTimeZonedImpl:a.namedTimeZonedImpl||o.namedTimeZonedImpl,initialView:o.initialView||a.initialView,elementDraggingImpl:o.elementDraggingImpl||a.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},o.optionChangeHandlers),a.optionChangeHandlers),scrollGridImpl:a.scrollGridImpl||o.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},o.listenerRefiners),a.listenerRefiners),optionRefiners:Object.assign(Object.assign({},o.optionRefiners),a.optionRefiners),propSetHandlers:Object.assign(Object.assign({},o.propSetHandlers),a.propSetHandlers)}):c!==l.id&&console.warn(`Duplicate plugin '${e}'`)}var t,s,o,a}return e&&i(e),i(t),r}(r,i)),t=r,n=i,e)}(),this.buildDateEnv=Bt(eo),this.buildTheme=Bt(to),this.parseToolbars=Bt(Vs),this.buildViewSpecs=Bt(Os),this.buildDateProfileGenerator=zt(no),this.buildViewApi=Bt(ro),this.buildViewUiProps=zt(oo),this.buildEventUiBySource=Bt(io,vn),this.buildEventUiBases=Bt(so),this.parseContextBusinessHours=zt(lo),this.buildTitle=Bt(Xs),this.emitter=new Rr,this.actionRunner=new Js(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause();let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let s=function(e,t){let n=e.initialDate;return null!=n?t.createMarker(n):Xn(e.now,t)}(n.calendarOptions,n.dateEnv),o=i.dateProfileGenerator.build(s);Zn(o.activeRange,s)||(s=o.currentRange.start);let a={dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let e of n.pluginHooks.contextInit)e(a);let l=function(e,t,n){let r=t?t.activeRange:null;return Ps({},function(e,t){let n=Er(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=wr(e,t,n);r&&i.push(r)}return i}(e,n),r,n)}(n.calendarOptions,o,a),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:s,dateProfile:o,businessHours:this.parseContextBusinessHours(a),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},d=Object.assign(Object.assign({},a),c);for(let e of n.pluginHooks.reducers)Object.assign(c,e(null,null,d));ao(c,a)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=function(e,t){return"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType),e}(n.currentViewType,e),a=this.computeCurrentViewData(o,s,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(a.options);let l={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:d}=n;this.data&&this.data.dateProfileGenerator!==a.dateProfileGenerator&&(d=a.dateProfileGenerator.build(c)),c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),d=function(e,t,n,r){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(i=r.buildPrev(e,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(e,n),i.isValid)return i}return e}(d,e,c,a.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&Zn(d.currentRange,c)||(c=d.currentRange.start);let u=function(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Ps(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return s=e,o=t.sourceId,hn(s,(e=>e.sourceId!==o));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Hs(e,i,r):e;case"FETCH_EVENT_SOURCES":return Bs(e,t.sourceIds?gn(t.sourceIds):js(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var s,o}(n.eventSources,e,d,l),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,s){if(t&&n===t.latestFetchId){let n=dr(Cr(i,t,s),t,s);return r&&(n=tr(n,r,s)),fr(Sr(e,t.sourceId),n)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"RESET_RAW_EVENTS":return function(e,t,n,r,i){const{defIdMap:s,instanceIdMap:o}=function(e){const{defs:t,instances:n}=e,r={},i={};for(let e in t){const n=t[e],{publicId:i}=n;i&&(r[i]=e)}for(let e in n){const r=t[n[e].defId],{publicId:s}=r;s&&(i[s]=e)}return{defIdMap:r,instanceIdMap:i}}(e);return tr(dr(Cr(n,t,i),t,i,!1,s,o),r,i)}(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=tr(t,n,r)),fr(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return fr(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?tr(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){let{defs:n,instances:r}=e,i={},s={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(s[e]=r[e]);return{defs:i,instances:s}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Sr(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return hr(e,(e=>!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,u,d,l),h=Ns(u)&&!a.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:p,selectionConfig:g}=this.buildViewUiProps(l),m=this.buildEventUiBySource(u),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:c,dateProfile:d,eventSources:u,eventStore:f,renderableEventStore:h,selectionConfig:g,eventUiBases:this.buildEventUiBases(h.defs,p,m),businessHours:this.parseContextBusinessHours(l),dateSelection:Ws(n.dateSelection,e),eventSelection:Fs(n.eventSelection,e),eventDrag:Gs(n.eventDrag,e),eventResize:Ls(n.eventResize,e)},b=Object.assign(Object.assign({},l),v);for(let t of s.pluginHooks.reducers)Object.assign(v,t(n,e,b));let y=ao(n,l),A=ao(v,l);!y&&A?r.trigger("loading",!0):y&&!A&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),s=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,a=n&&n.calendarOptions,l=r.calendarOptions;if(a&&a!==l){a.timeZone!==l.timeZone&&(t.eventSources=s.eventSources=function(e,t,n){let r=t?t.activeRange:null;return Bs(e,js(e,n),r,!0,n)}(s.eventSources,t.dateProfile,s),t.eventStore=s.eventStore=_r(s.eventStore,n.dateEnv,s.dateEnv),t.renderableEventStore=s.renderableEventStore=_r(s.renderableEventStore,n.dateEnv,s.dateEnv));for(let e in o)-1===this.optionsForHandling.indexOf(e)&&a[e]===l[e]||o[e](l[e],s)}this.optionsForHandling=[],e.onData&&e.onData(s)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:s,availableLocaleData:o,extra:a}=this.processRawCalendarOptions(e,t);co(a);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,s),d=this.buildTheme(r,i),u=this.parseToolbars(r,this.stableOptionOverrides,d,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:l,viewSpecs:c,theme:d,toolbarConfig:u,localeDefaults:s,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=ln([en,e,t]),i=this.organizeRawLocales(n),s=i.map,o=this.buildLocale(r||i.defaultCode,s).options,a=this.buildPluginHooks(e.plugins||[],$s),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),a.listenerRefiners),a.optionRefiners),c={},d=ln([en,o,e,t]),u={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,p=!1;for(let e in d)-1===this.optionsForRefining.indexOf(e)&&(d[e]===f[e]||rn[e]&&e in f&&rn[e](f[e],d[e]))?u[e]=h[e]:l[e]?(u[e]=l[e](d[e]),p=!0):c[e]=f[e];return p&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:a,availableLocaleData:i,localeDefaults:o,extra:c}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:s,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return co(o),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let s=ln([en,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),an),t.listenerRefiners),t.optionRefiners),a={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,u={};for(let e in s)s[e]===l[e]||rn[e]&&rn[e](s[e],l[e])?a[e]=c[e]:(s[e]===this.currentCalendarOptionsInput[e]||rn[e]&&rn[e](s[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(a[e]=this.currentCalendarOptionsRefined[e]):o[e]?a[e]=o[e](s[e]):u[e]=s[e],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=a),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}}}function eo(e,t,n,r,i,s,o,a){let l=Ds(t||o.defaultCode,o.map);return new Dn({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:a})}function to(e,t){return new(t.themeClasses[e.themeSystem]||Rs)(e)}function no(e){return new(e.dateProfileGeneratorClass||Kn)(e)}function ro(e,t,n){return new Zs(e,t,n)}function io(e){return pn(e,(e=>e.ui))}function so(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function oo(e){let{options:t}=e;return{eventUiSingleBase:vr({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:vr({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ao(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function lo(e){return t=e.options.businessHours,n=e,dr(function(e){let t;return t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"==typeof e&&e?[e]:[],t=t.map((e=>Object.assign(Object.assign({},xr),e))),t}(t),null,n);var t,n}function co(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class uo extends Nn{render(){return k("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let s of e){let{buttonName:e,buttonClick:o,buttonText:a,buttonIcon:l,buttonHint:c}=s;if("title"===e)i=!1,r.push(k("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let i=e===t.activeButton,s=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,d=[`fc-${e}-button`,n.getClass("button")];i&&d.push(n.getClass("buttonActive")),r.push(k("button",{type:"button",title:"function"==typeof c?c(t.navUnit):c,disabled:s,"aria-pressed":i,className:d.join(" "),onClick:o},a||(l?k("span",{className:l,role:"img"}):"")))}}return r.length>1?k("div",{className:i&&n.getClass("buttonGroup")||""},...r):r[0]}}class fo extends Nn{render(){let e,t,{model:n,extraClassName:r}=this.props,i=!1,s=n.sectionWidgets,o=s.center;return s.left?(i=!0,e=s.left):e=s.start,s.right?(i=!0,t=s.right):t=s.end,k("div",{className:[r||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",o||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return k(uo,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class ho extends Nn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",s="";return n?null!==t.availableWidth?i=t.availableWidth/n:s=1/n*100+"%":i=e.height||"",k("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:s}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class po extends ii{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=zr(t);if(i&&n.isValidSegDownEl(e.target)){let s=qe(e.target,".fc-event-forced-url"),o=s?s.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new Ir(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=Ke(e.el,"click",".fc-event",this.handleSegClick)}}class go extends ii{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{zr(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let i;return Ke(e,"mouseover",".fc-event",((e,t)=>{if(t!==i){i=t,n(e,t);let s=e=>{i=null,r(e,t),t.removeEventListener("mouseleave",s)};t.addEventListener("mouseleave",s)}}))}(e.el,0,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,s=zr(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Ir(i,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:i.viewApi})}}class mo extends In{constructor(){super(...arguments),this.buildViewContext=Bt(On),this.buildViewPropTransformers=Bt(bo),this.buildToolbarProps=Bt(vo),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:Xe()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[po,go].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(n)));this.interactionsStore[e.uid]=r,si[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete si[e.uid]},this.resizeRunner=new Ve((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Xn(t.options.now,t.dateEnv),t.viewTitle),s=!1,o="";t.isHeightAuto||t.forPrint?o="":null!=r.height?s=!0:null!=r.contentHeight?o=r.contentHeight:e=Math.max(r.aspectRatio,.5);let a=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return k(Mn.Provider,{value:a},n.header&&k(fo,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},i)),k(ho,{liquid:s,height:o,aspectRatio:e,labeledById:l},this.renderView(t),this.buildAppendContent()),n.footer&&k(fo,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return k(M,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));return k(n.component,Object.assign({},r))}}function vo(e,t,n,r,i,s){let o=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:s,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!Zn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function bo(e){return e.map((e=>new e))}class yo extends oi{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;Rn((()=>{K(k(ri,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),k(Un.Provider,{value:this.customContentRenderId},k(mo,Object.assign({isHeightAuto:r,forPrint:i},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,K(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&Fe(e.getRootNode())}(e),this.el=e,this.renderRunner=new Ve(this.handleRenderRequest),new Ks({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){Rn((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!bt(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){$e(this.el,"height",e)}}const Ao=parseInt(String(h.version).split(".")[0])<18;class wo extends h.Component{constructor(){super(...arguments),this.elRef=(0,h.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const e=[];for(const t of this.state.customRenderingMap.values())e.push(h.createElement(Eo,{key:t.id,customRendering:t}));return h.createElement("div",{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;const e=new ys;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new yo(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),e.subscribe((e=>{const n=Date.now(),r=!t;(Ao||r||this.isUpdating||this.isUnmounting||n-t<100?Co:p.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=n,r?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}wo.act=Co;class Eo extends h.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,n="function"==typeof t?t(e.renderProps):t;return(0,p.createPortal)(n,e.containerEl)}}function Co(e){e()}class Do extends yi{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],s=Zi(r.options);return e&&i.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:r.viewSpec},k($i,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{props:s,context:o}=this,a=!s.forPrint&&Zi(o.options),l=!s.forPrint&&Yi(o.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:qi}]}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},k(i,{liquid:!s.isHeightAuto&&!s.forPrint,forPrint:s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}}function _o(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function So(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function Ro(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}const xo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function ko(e){let{display:t}=e.eventRange.ui;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}class To extends Nn{render(){let{props:e}=this;return k(Xi,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:xo,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class Mo extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=Qr(r,n.eventTimeFormat||xo,t,!0,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:$r(e.seg,t),defaultGenerator:Oo,timeText:i,isResizing:!1,isDateSelecting:!1}))}}function Oo(e){return k(M,null,k("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title"},e.event.title||k(M,null," ")))}class Io extends Nn{constructor(){super(...arguments),this.compileSegs=Bt(No)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return k(fs,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return k(M,null,t.map((t=>{let r=t.eventRange.instance.instanceId;return k("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:n[r]?"hidden":""}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))):k(To,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))))})))}})}}function No(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const Po=Xt({week:"narrow"});class Ho extends yi{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:Xe()},this.handleRootEl=e=>{Pn(this.rootElRef,e),Pn(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:s}=e,{date:o,dateProfile:a}=t;const l=t.showDayNumber&&function(e,t,n){const{start:r,end:i}=t,s=Et(i,-1),o=n.getYear(r),a=n.getMonth(r),l=n.getYear(s),c=n.getMonth(s);return!(o===l&&a===c)&&Boolean(e.valueOf()===r.valueOf()||1===n.getDay(e)&&e.valueOf()<i.valueOf())}(o,a.currentRange,s);return k(ns,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:Bo,date:o,dateProfile:a,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:l,extraRenderProps:t.extraRenderProps},((s,a)=>k("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&k(ls,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:gi(e,o,"week"),date:o,defaultFormat:Po}),!a.isDisabled&&(t.showDayNumber||rs(i)||t.forceDayTop)?k("div",{className:"fc-daygrid-day-top"},k(s,{elTag:"a",elClasses:["fc-daygrid-day-number",l&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},gi(e,o)),{id:n.dayNumberId})})):t.showDayNumber?k("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},k("a",{className:"fc-daygrid-day-number"}," ")):void 0,k("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,k("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},k(Io,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),k("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function Bo(e){return e.dayNumberText||k(M,null," ")}function zo(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function jo(e){return zo(e)+":"+e.lastCol}function Uo(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,s=i.range,o=qn(s,{start:r[t].date,end:wt(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===s.end.valueOf()})}class Wo extends Ai{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[Ei(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){const{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:s,touchingLevel:o,touchingLateral:a}=e;if(this.hiddenConsumes&&s){const e=Ei(s);if(!i[e])if(this.allowReslicing){const e=Object.assign(Object.assign({},s),{span:Ci(s.span,t.span)});i[Ei(e)]=!0,r[o][a]=e,n.push(e),this.splitEntry(s,t,n)}else i[e]=!0,n.push(s)}super.handleInvalidInsertion(e,t,n)}}class Fo extends yi{constructor(){super(...arguments),this.cellElRefs=new Wi,this.frameElRefs=new Wi,this.fgElRefs=new Wi,this.segHarnessRefs=new Wi,this.rootElRef={current:null},this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,s=So(e.businessHourSegs,i),o=So(e.bgEventSegs,i),a=So(this.getHighlightSegs(),i),l=So(this.getMirrorSegs(),i),{singleColPlacements:c,multiColPlacements:d,moreCnts:u,moreMarginTops:f}=function(e,t,n,r,i,s,o){let a=new Wo((t=>{let n=e[t.index].eventRange.instance.instanceId+":"+t.span.start+":"+(t.span.end-1);return i[n]||1}));a.allowReslicing=!0,a.strictOrder=r,!0===t||!0===n?(a.maxCoord=s,a.hiddenConsumes=!0):"number"==typeof t?a.maxStackCnt=t:"number"==typeof n&&(a.maxStackCnt=n,a.hiddenConsumes=!0);let l=[],c=[];for(let t=0;t<e.length;t+=1){let n=e[t],r=jo(n);null!=i[r]?l.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}}):c.push(n)}let d=a.addSegs(l),u=a.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:p}=function(e,t,n){let r=function(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}(e,n.length),i=[],s=[],o=[];for(let e=0;e<n.length;e+=1){let a=r[e],l=[],c=0,d=0;for(let r of a){let i=t[r.index];l.push({seg:Uo(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-c}),c=r.levelCoord+r.thickness}let u=[];c=0,d=0;for(let r of a){let i=t[r.index],s=r.span.end-r.span.start>1,o=r.span.start===e;d+=r.levelCoord-c,c=r.levelCoord+r.thickness,s?(d+=r.thickness,o&&u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:d}),d=0)}i.push(l),s.push(u),o.push(d)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:o}}(u,e,o),g=[],m=[];for(let e of c){h[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)f[t].push({seg:Uo(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)g.push(0);for(let t of d){let n=e[t.index],r=t.span;h[r.start].push({seg:Uo(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)g[e]+=1,f[e].push({seg:Uo(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(p[e]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:g,moreMarginTops:m}}(Wr(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),h=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return k("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?c[n]:d[n],e.todayRange,h),i=this.renderFgSegs(n,function(e,t){if(!e.length)return[];let n=function(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0})))}(l[n],d),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return k(Ho,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===n,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:u[n],moreMarginTop:f[n],singlePlacements:c[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:k(M,null,k(M,null,r),k(M,null,i)),bgContent:k(M,null,this.renderFillSegs(a[n],"highlight"),this.renderFillSegs(s[n],"non-business"),this.renderFillSegs(o[n],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!vn(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,s,o){let{context:a}=this,{eventSelection:l}=this.props,{framePositions:c}=this.state,d=1===this.props.cells.length,u=i||s||o,f=[];if(c)for(let e of t){let{seg:t}=e,{instanceId:h}=t.eventRange.instance,p=e.isVisible&&!r[h],g=e.isAbsolute,m="",v="";g&&(a.isRtl?(v=0,m=c.lefts[t.lastCol]-c.lefts[t.firstCol]):(m=0,v=c.rights[t.firstCol]-c.rights[t.lastCol])),f.push(k("div",{className:"fc-daygrid-event-harness"+(g?" fc-daygrid-event-harness-abs":""),key:zo(t),ref:u?null:this.segHarnessRefs.createRef(jo(t)),style:{visibility:p?"":"hidden",marginTop:g?"":e.marginTop,top:g?e.absoluteTop:"",left:m,right:v}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:i,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n))):k(To,Object.assign({seg:t,isDragging:i,isResizing:s,isDateSelecting:o,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,s=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};s.push(k("div",{key:Yr(o.eventRange),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?k(ss,Object.assign({seg:o},qr(o,r))):as(t)))}return k(M,{},...s)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>r.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,r=new vi(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new vi(t,e,!0,!1)})}}const i=this.state.segHeights,s=this.querySegHeights(),o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({segHeights:Object.assign(Object.assign({},i),s),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}Fo.addStateEquality({segHeights:vn});class Go extends yi{constructor(){super(...arguments),this.splitBusinessHourSegs=Bt(_o),this.splitBgEventSegs=Bt(_o),this.splitFgEventSegs=Bt(_o),this.splitDateSelectionSegs=Bt(_o),this.splitEventDrag=Bt(Ro),this.splitEventResize=Bt(Ro),this.rowRefs=new Wi}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),s=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),a=this.splitEventDrag(e.eventDrag,n),l=this.splitEventResize(e.eventResize,n),c=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return k(Mi,{unit:"day"},((t,d)=>k(M,null,e.cells.map(((t,u)=>k(Fo,{ref:this.rowRefs.createRef(u),key:t.length?t[0].date.toISOString():u,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:d,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[u],eventSelection:e.eventSelection,bgEventSegs:i[u].filter(Lo),fgEventSegs:s[u],dateSelectionSegs:o[u],eventDrag:a[u],eventResize:l[u],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new vi(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new vi(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),s=r.topToIndex(t);if(null!=s&&null!=i){let e=this.props.cells[s][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(s,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(s,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[s],bottom:r.bottoms[s]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:wt(n,1)}}}function Lo(e){return e.eventRange.def.allDay}class Vo extends yi{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=!0===n||!0===t;i&&!r&&(i=!1,t=null,n=null);let s=["fc-daygrid-body",i?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",r?"":"fc-daygrid-body-natural"];return k("div",{ref:this.elRef,className:s.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:""}},e.colGroupNode,k("tbody",{role:"presentation"},k(Go,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let n;var r;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${r=t.currentDate,r.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`)),n||(n=e.querySelector(`[data-date="${Pt(t.currentDate)}"]`)),n}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}}class Qo extends Bi{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class qo extends yi{constructor(){super(...arguments),this.slicer=new Qo,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return k(Vo,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}function Zo(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,/year|month|week/.test(e.currentRangeUnit))}We(':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}');var Yo=Ss({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends Do{constructor(){super(...arguments),this.buildDayTableModel=Bt(Zo),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&k(Ii,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:1===r.rowCnt}),s=t=>k(qo,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,s,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,s)}},dateProfileGeneratorClass:class extends Kn{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return function(e){let t,{dateEnv:n,currentRange:r}=e,{start:i,end:s}=r;if(e.snapToWeek&&(i=n.startOfWeek(i),t=n.startOfWeek(s),t.valueOf()!==s.valueOf()&&(s=At(t,1))),e.fixedWeekCount){let e=n.startOfWeek(n.startOfMonth(wt(r.end,-1)));s=At(s,6-Math.ceil(Ct(e,s)/7))}return{start:i,end:s}}({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class $o extends ci{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t}}const Jo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Xo(e){let t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return k(Mn.Consumer,null,(n=>{if(!e.isLabeled)return k("td",{className:t.join(" "),"data-time":e.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,o=null==i.slotLabelFormat?Jo:Array.isArray(i.slotLabelFormat)?Xt(i.slotLabelFormat[0]):Xt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:s,text:r.format(e.date,o)};return k(Wn,{elTag:"td",elClasses:t,elAttrs:{"data-time":e.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:Ko,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(e=>k("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},k(e,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]}))))}))}function Ko(e){return e.text}class ea extends Nn{render(){return this.props.slatMetas.map((e=>k("tr",{key:e.key},k(Xo,Object.assign({},e)))))}}const ta=Xt({week:"short"});class na extends yi{constructor(){super(...arguments),this.allDaySplitter=new $o,this.headerElRef={current:null},this.rootElRef={current:null},this.scrollerElRef={current:null},this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:n}=this.context,{dateProfile:r}=this.props,i=r.renderRange,s=1===Ct(i.start,i.end)?gi(this.context,i.start,"week"):{};return n.weekNumbers&&"day"===e?k(ls,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:i.start,defaultFormat:ta},(e=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},k(e,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:s})))):k("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},k("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:n}=this.context,r={text:t.allDayText,view:n};return k(Wn,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:r,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:ra,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},(t=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",null==e?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},k(t,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]}))))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,n){let{context:r,props:i}=this,s=[],o=Zi(r.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(s.push({type:"body",key:"all-day",chunk:{content:t}}),s.push({type:"body",key:"all-day-divider",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),s.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:r.viewSpec},k($i,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:s}))}renderHScrollLayout(e,t,n,r,i,s,o){let a=this.context.pluginHooks.scrollGridImpl;if(!a)throw new Error("No ScrollGrid implementation");let{context:l,props:c}=this,d=!c.forPrint&&Zi(l.options),u=!c.forPrint&&Yi(l.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderHeadAxis("day",e.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderTableRowAxis(e.rowSyncHeights[0]))},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{colSpan:2,className:"fc-timegrid-divider "+l.theme.getClass("tableCellShaded")}))}));let h=l.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(l.options.expandRows),chunks:[{key:"axis",content:e=>k("div",{className:"fc-timegrid-axis-chunk"},k("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,k("tbody",null,k(ea,{slatMetas:s}))),k("div",{className:"fc-timegrid-now-indicator-container"},k(Mi,{unit:h?"minute":"day"},(e=>{let t=h&&o&&o.safeComputeTop(e);return"number"==typeof t?k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:t},isAxis:!0,date:e}):null}))))},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),u&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:qi},{key:"cols",content:qi}]}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:l.viewSpec},k(a,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return!0!==e&&!0!==t||(e=void 0,t=5),{dayMaxEvents:e,dayMaxEventRows:t}}}function ra(e){return e.text}class ia{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(Zn(t.currentRange,e)){let n=_t(e),r=e.valueOf()-n.valueOf();if(r>=gt(t.slotMinTime)&&r<gt(t.slotMaxTime))return this.computeTimeTop(ut(r))}return null}computeDateTop(e,t){return t||(t=_t(e)),this.computeTimeTop(ut(e.valueOf()-t.valueOf()))}computeTimeTop(e){let t,n,{positions:r,dateProfile:i}=this,s=r.els.length,o=(e.milliseconds-gt(i.slotMinTime))/gt(this.slotDuration);return o=Math.max(0,o),o=Math.min(s,o),t=Math.floor(o),t=Math.min(t,s-1),n=o-t,r.tops[t]+r.getHeight(t)*n}}class sa extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{slatElRefs:r}=e;return k("tbody",null,e.slatMetas.map(((i,s)=>{let o={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi};return k("tr",{key:i.key,ref:r.createRef(i.key)},e.axis&&k(Xo,Object.assign({},i)),k(Wn,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!i.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":i.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))})))}}class oa extends Nn{constructor(){super(...arguments),this.rootElRef={current:null},this.slatElRefs=new Wi}render(){let{props:e,context:t}=this;return k("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},k("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,k(sa,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;var n;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new ia(new vi(this.rootElRef.current,(n=this.slatElRefs.currentMap,t.slatMetas.map((e=>n[e.key]))),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function aa(e,t){let n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function la(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.col].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}class ca extends Nn{render(){let{props:e}=this;return k(fs,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>ya(e.hiddenSegs,e),defaultGenerator:da,forceTimed:!0},(e=>k(e,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]})))}}function da(e){return e.shortText}function ua(e,t){if(!e)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=e,s=r,o=[];for(;s<i;)o.push(t(n,s)),s+=1;return o.sort(fa),[o.map(ha),o[0][1]]}function fa(e,t){return t[1]-e[1]}function ha(e){return e[0]}function pa(e,t){const n={};return(...r)=>{let i=e(...r);return i in n?n[i]:n[i]=t(...r)}}function ga(e,t,n=null,r=0){let i=[];if(n)for(let s=0;s<e.length;s+=1){let o=e[s],a=n.computeDateTop(o.start,t),l=Math.max(a+(r||0),n.computeDateTop(o.end,t));i.push({start:Math.round(a),end:Math.round(l)})}return i}const ma=Xt({hour:"numeric",minute:"2-digit",meridiem:!1});class va extends Nn{render(){return k(Xi,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ma}))}}class ba extends Nn{constructor(){super(...arguments),this.sortEventSegs=Bt(Wr)}render(){let{props:e,context:t}=this,{options:n}=t,r=n.selectMirror,i=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||r&&e.dateSelectionSegs||[],s=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return k(ns,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},(t=>k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,s,!1,!1,!1)),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(i,{},Boolean(e.eventDrag),Boolean(e.eventResize),Boolean(r),"mirror")),k("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),rs(n)&&k(t,{elTag:"div",elClasses:["fc-timegrid-col-misc"]}))))}renderFgSegs(e,t,n,r,i,s){let{props:o}=this;return o.forPrint?ya(e,o):this.renderPositionedFgSegs(e,t,n,r,i,s)}renderPositionedFgSegs(e,t,n,r,i,s){let{eventMaxStack:o,eventShortHeight:a,eventOrderStrict:l,eventMinHeight:c}=this.context.options,{date:d,slatCoords:u,eventSelection:f,todayRange:h,nowDate:p}=this.props,g=n||r||i,m=ga(e,d,u,c),{segPlacements:v,hiddenGroups:b}=function(e,t,n,r){let i=[],s=[];for(let n=0;n<e.length;n+=1){let r=t[n];r?i.push({index:n,thickness:1,span:r}):s.push(e[n])}let{segRects:o,hiddenGroups:a}=function(e,t,n){let r=new Ai;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);let i=function(e){let t=[];for(let i of e){let e=[],s={span:i.span,entries:[i]};for(let i of t)Ci(i.span,s.span)?s={entries:i.entries.concat(s.entries),span:(n=i.span,r=s.span,{start:Math.min(n.start,r.start),end:Math.max(n.end,r.end)})}:e.push(i);e.push(s),t=e}var n,r;return t}(r.addSegs(e)),s=function(e){const{entriesByLevel:t}=e,n=pa(((e,t)=>e+":"+t),((r,i)=>{let s=function(e,t,n){let{levelCoords:r,entriesByLevel:i}=e,s=i[t][n],o=r[t]+s.thickness,a=r.length,l=t;for(;l<a&&r[l]<o;l+=1);for(;l<a;l+=1){let e,t=i[l],n=_i(t,s.span.start,wi),r=n[0]+n[1],o=r;for(;(e=t[o])&&e.span.start<s.span.end;)o+=1;if(r<o)return{level:l,lateralStart:r,lateralEnd:o}}return null}(e,r,i),o=ua(s,n),a=t[r][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]}));return ua(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}(r);return s=function(e,t){const n=pa(((e,t,n)=>Ei(e)),((e,t,r)=>{let i,{nextLevelNodes:s,thickness:o}=e,a=o+r,l=o/a,c=[];if(s.length)for(let e of s)if(void 0===i){let r=n(e,t,a);i=r[0],c.push(r[1])}else{let t=n(e,i,0);c.push(t[1])}else i=1;let d=(i-t)*l;return[i-d,Object.assign(Object.assign({},e),{thickness:d,nextLevelNodes:c})]}));return e.map((e=>n(e,0,0)[1]))}(s),{segRects:function(e){let t=[];const n=pa(((e,t,n)=>Ei(e)),((e,n,i)=>{let s=Object.assign(Object.assign({},e),{levelCoord:n,stackDepth:i,stackForward:0});return t.push(s),s.stackForward=r(e.nextLevelNodes,n+e.thickness,i+1)+1}));function r(e,t,r){let i=0;for(let s of e)i=Math.max(n(s,t,r),i);return i}return r(e,0,0),t}(s),hiddenGroups:i}}(i,n,r),l=[];for(let t of o)l.push({seg:e[t.index],rect:t});for(let e of s)l.push({seg:e,rect:null});return{segPlacements:l,hiddenGroups:a}}(e,m,l,o);return k(M,null,this.renderHiddenGroups(b,e),v.map((e=>{let{seg:o,rect:l}=e,c=o.eventRange.instance.instanceId,d=g||Boolean(!t[c]&&l),u=Aa(l&&l.span),m=!g&&l?this.computeSegHStyle(l):{left:0,right:0},v=Boolean(l)&&l.stackForward>0,b=Boolean(l)&&l.span.end-l.span.start<a;return k("div",{className:"fc-timegrid-event-harness"+(v?" fc-timegrid-event-harness-inset":""),key:s||c,style:Object.assign(Object.assign({visibility:d?"":"hidden"},u),m)},k(va,Object.assign({seg:o,isDragging:n,isResizing:r,isDateSelecting:i,isSelected:c===f,isShort:b},qr(o,h,p))))})))}renderHiddenGroups(e,t){let{extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l}=this.props;return k(M,null,e.map((e=>{let c=Aa(e.span),d=(u=e.entries,f=t,u.map((e=>f[e.index])));var u,f;return k(ca,{key:Nt(gs(d)),hiddenSegs:d,top:c.top,bottom:c.bottom,extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l})})))}renderFillSegs(e,t){let{props:n,context:r}=this,i=ga(e,n.date,n.slatCoords,r.options.eventMinHeight).map(((r,i)=>{let s=e[i];return k("div",{key:Yr(s.eventRange),className:"fc-timegrid-bg-harness",style:Aa(r)},"bg-event"===t?k(ss,Object.assign({seg:s},qr(s,n.todayRange,n.nowDate))):as(t))}));return k(M,null,i)}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map(((e,r)=>k(es,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(e.start,n)},isAxis:!1,date:n}))):null}computeSegHStyle(e){let t,n,{isRtl:r,options:i}=this.context,s=i.slotEventOverlap,o=e.levelCoord,a=e.levelCoord+e.thickness;s&&(a=Math.min(1,o+2*(a-o))),r?(t=1-a,n=o):(t=o,n=1-a);let l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return s&&!e.stackForward&&(l[r?"marginLeft":"marginRight"]=20),l}}function ya(e,{todayRange:t,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let o=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return k(M,null,e.map((e=>{let i=e.eventRange.instance.instanceId;return k("div",{key:i,style:{visibility:o[i]?"hidden":""}},k(va,Object.assign({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===r,isShort:!1},qr(e,t,n))))})))}function Aa(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}class wa extends Nn{constructor(){super(...arguments),this.splitFgEventSegs=Bt(aa),this.splitBgEventSegs=Bt(aa),this.splitBusinessHourSegs=Bt(aa),this.splitNowIndicatorSegs=Bt(aa),this.splitDateSelectionSegs=Bt(aa),this.splitEventDrag=Bt(la),this.splitEventResize=Bt(la),this.rootElRef={current:null},this.cellElRefs=new Wi}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),r=e.cells.length,i=this.splitFgEventSegs(e.fgEventSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitBusinessHourSegs(e.businessHourSegs,r),a=this.splitNowIndicatorSegs(e.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(e.dateSelectionSegs,r),c=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r);return k("div",{className:"fc-timegrid-cols",ref:this.rootElRef},k("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,k("tbody",{role:"presentation"},k("tr",{role:"row"},e.axis&&k("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map(((t,n)=>k(ba,{key:t.key,elRef:this.cellElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,fgEventSegs:i[n],bgEventSegs:s[n],businessHourSegs:o[n],nowIndicatorSegs:a[n],dateSelectionSegs:l[n],eventDrag:c[n],eventResize:d[n],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint})))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;var t;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new vi(this.rootElRef.current,(t=this.cellElRefs.currentMap,e.cells.map((e=>t[e.key]))),!0,!1))}}class Ea extends yi{constructor(){super(...arguments),this.processSlotOptions=Bt(Ca),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:n}=this.state;if(t&&n){if(e.time){let r=n.computeTimeTop(e.time);r=Math.ceil(r),r&&(r+=1),t(r)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return k("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k(oa,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),k(wa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:n,options:r}=this.context,{colCoords:i}=this,{dateProfile:s}=this.props,{slatCoords:o}=this.state,{snapDuration:a,snapsPerSlot:l}=this.processSlotOptions(this.props.slotDuration,r.snapDuration),c=i.leftToIndex(e),d=o.positions.topToIndex(t);if(null!=c&&null!=d){let e=this.props.cells[c],r=o.positions.tops[d],u=o.positions.getHeight(d),f=(t-r)/u,h=d*l+Math.floor(f*l),p=this.props.cells[c].date,g=ht(s.slotMinTime,function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}(a,h)),m=n.add(p,g),v=n.add(m,a);return{dateProfile:s,dateSpan:Object.assign({range:{start:m,end:v},allDay:!1},e.extraDateSpan),dayEl:i.els[c],rect:{left:i.lefts[c],right:i.rights[c],top:r,bottom:r+u},layer:0}}return null}}function Ca(e,t){let n=t||e,r=mt(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}class Da extends Bi{sliceRange(e,t){let n=[];for(let r=0;r<t.length;r+=1){let i=qn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n}}class _a extends yi{constructor(){super(...arguments),this.buildDayRanges=Bt(Sa),this.slicer=new Da,this.timeColsRef={current:null}}render(){let{props:e,context:t}=this,{dateProfile:n,dayTableModel:r}=e,{nowIndicator:i,nextDayThreshold:s}=t.options,o=this.buildDayRanges(r,n,t.dateEnv);return k(Mi,{unit:i?"minute":"day"},((a,l)=>k(Ea,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:r.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:a,nowIndicatorSegs:i&&this.slicer.sliceNowDate(a,n,s,t,o),todayRange:l,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords}))))}}function Sa(e,t,n){let r=[];for(let i of e.headerDates)r.push({start:n.add(i,t.slotMinTime),end:n.add(i,t.slotMaxTime)});return r}const Ra=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function xa(e,t,n,r,i){let s=new Date(0),o=e,a=ut(0),l=n||function(e){let t,n,r;for(t=Ra.length-1;t>=0;t-=1)if(n=ut(Ra[t]),r=mt(n,e),null!==r&&r>1)return n;return e}(r),c=[];for(;gt(o)<gt(t);){let e=i.add(s,o),t=null!==mt(a,l);c.push({date:e,time:o,key:e.toISOString(),isoTimeStr:(d=e,st(d.getUTCHours(),2)+":"+st(d.getUTCMinutes(),2)+":"+st(d.getUTCSeconds(),2)),isLabeled:t}),o=ht(o,r),a=ht(a,r)}var d;return c}function ka(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,!1)}We('.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}');var Ta=Ss({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:class extends na{constructor(){super(...arguments),this.buildTimeColsModel=Bt(ka),this.buildSlatMetas=Bt(xa)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:r}=this,{dateProfile:i}=r,s=this.buildTimeColsModel(i,n),o=this.allDaySplitter.splitProps(r),a=this.buildSlatMetas(i.slotMinTime,i.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:l}=e,c=!l,d=l,u=e.dayHeaders&&k(Ii,{dates:s.headerDates,dateProfile:i,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=!1!==e.allDaySlot&&(t=>k(qo,Object.assign({},o.allDay,{dateProfile:i,dayTableModel:s,nextDayThreshold:e.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:r.forPrint},this.getAllDayMaxEventProps()))),h=t=>k(_a,Object.assign({},o.timed,{dayTableModel:s,dateProfile:i,axis:c,slotDuration:e.slotDuration,slatMetas:a,forPrint:r.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(u,f,h,s.colCnt,l,a,this.state.slatCoords):this.renderSimpleLayout(u,f,h)}},usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class Ma extends Nn{constructor(){super(...arguments),this.state={textId:Xe()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:r}=this.context,{cellId:i,dayDate:s,todayRange:o}=this.props,{textId:a}=this.state,l=ui(s,o),c=n.listDayFormat?t.format(s,n.listDayFormat):"",d=n.listDaySideFormat?t.format(s,n.listDaySideFormat):"",u=Object.assign({date:t.toDate(s),view:r,textId:a,text:c,sideText:d,navLinkAttrs:gi(this.context,s),sideNavLinkAttrs:gi(this.context,s,"day",!1)},l);return k(Wn,{elTag:"tr",elClasses:["fc-list-day",...fi(l,e)],elAttrs:{"data-date":Pt(s)},renderProps:u,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:Oa,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(t=>k("th",{scope:"colgroup",colSpan:3,id:i,"aria-labelledby":a},k(t,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]}))))}}function Oa(e){return k(M,null,e.text&&k("a",Object.assign({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&k("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}const Ia=Xt({hour:"numeric",minute:"2-digit",meridiem:"short"});class Na extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r,timeHeaderId:i,eventHeaderId:s,dateHeaderId:o}=e,a=n.eventTimeFormat||Ia;return k(Ji,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",r.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>function(e,t){let n=$r(e,t);return k("a",Object.assign({},n),e.eventRange.def.title)}(r,t),seg:r,timeText:"",disableDragging:!0,disableResizing:!0}),((e,n)=>k(M,null,function(e,t,n,r,i){let{options:s}=n;if(!1!==s.displayEventTime){let o,a=e.eventRange.def,l=e.eventRange.instance,c=!1;if(a.allDay?c=!0:function(e){let t=$n(e);return Ct(t.start,t.end)>1}(e.eventRange.range)?e.isStart?o=Qr(e,t,n,null,null,l.range.start,e.end):e.isEnd?o=Qr(e,t,n,null,null,e.start,l.range.end):c=!0:o=Qr(e,t,n),c){let e={text:n.options.allDayText,view:n.viewApi};return k(Wn,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:e,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:Pa,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return k("td",{className:"fc-list-event-time"},o)}return null}(r,a,t,i,o),k("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},k("span",{className:"fc-list-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}})),k(e,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${s} ${o}`}}))))}}function Pa(e){return e.text}function Ha(e){return e.text}function Ba(e){let t=_t(e.renderRange.start),n=e.renderRange.end,r=[],i=[];for(;t<n;)r.push(t),i.push({start:t,end:wt(t,1)}),t=wt(t,1);return{dayDates:r,dayRanges:i}}function za(e){return!1===e?null:Xt(e)}We(':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}');var ja=Ss({name:"@fullcalendar/list",optionRefiners:{listDayFormat:za,listDaySideFormat:za,noEventsClassNames:dn,noEventsContent:dn,noEventsDidMount:dn,noEventsWillUnmount:dn},views:{list:{component:class extends yi{constructor(){super(...arguments),this.computeDateVars=Bt(Ba),this.eventStoreToSegs=Bt(this._eventStoreToSegs),this.state={timeHeaderId:Xe(),eventHeaderId:Xe(),dateHeaderIdRoot:Xe()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:r}=this.computeDateVars(e.dateProfile),i=this.eventStoreToSegs(e.eventStore,e.eventUiBases,r);return k(Gn,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),!1!==t.options.stickyHeaderDates?"fc-list-sticky":""],viewSpec:t.viewSpec},k(Ui,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},i.length>0?this.renderSegList(i,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,n={text:e.noEventsText,view:t};return k(Wn,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:Ha,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},(e=>k(e,{elTag:"div",elClasses:["fc-list-empty-cushion"]})))}renderSegList(e,t){let{theme:n,options:r}=this.context,{timeHeaderId:i,eventHeaderId:s,dateHeaderIdRoot:o}=this.state,a=function(e){let t,n,r=[];for(t=0;t<e.length;t+=1)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return k(Mi,{unit:"day"},((e,l)=>{let c=[];for(let n=0;n<a.length;n+=1){let d=a[n];if(d){let a=Pt(t[n]),u=o+"-"+a;c.push(k(Ma,{key:a,cellId:u,dayDate:t[n],todayRange:l})),d=Wr(d,r.eventOrder);for(let t of d)c.push(k(Na,Object.assign({key:a+":"+t.eventRange.instance.instanceId,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:i,eventHeaderId:s,dateHeaderId:u},qr(t,l,e))))}}return k("table",{className:"fc-list-table "+n.getClass("table")},k("thead",null,k("tr",null,k("th",{scope:"col",id:i},r.timeHint),k("th",{scope:"col","aria-hidden":!0}),k("th",{scope:"col",id:s},r.eventHint))),k("tbody",null,c))}))}_eventStoreToSegs(e,t,n){return this.eventRangesToSegs(Hr(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(e,t){let n=[];for(let r of e)n.push(...this.eventRangeToSegs(r,t));return n}eventRangeToSegs(e,t){let n,r,i,{dateEnv:s}=this.context,{nextDayThreshold:o}=this.context.options,a=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n+=1)if(r=qn(a,t[n]),r&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},c.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<s.add(t[n+1].start,o))){i.end=a.end,i.isEnd=!0;break}return c}},buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});function Ua(e){let{attributes:t,events:n}=e;const r=(0,i.useRef)(null),s="dayGridMonth",[o,a]=(0,i.useState)("");(0,i.useEffect)((()=>{if(r.current){const e=t.view||s;r.current.getApi().changeView(e),a(r.current.getApi().view.title)}}),[t.view,t.wraptitles]);const l=()=>{r.current&&a(r.current.getApi().view.title)};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"piecal-controls fc"},(0,i.createElement)("div",{className:"piecal-controls__view-title","aria-live":"polite",role:"status"},(0,i.createElement)("span",{className:"visually-hidden"},`${o} - current view is ${r.current?.getApi().view.type}`),(0,i.createElement)("span",{"aria-hidden":"true"},o)),(0,i.createElement)("label",{className:"piecal-controls__view-chooser"},"Choose View",(0,i.createElement)("select",{value:r.current?.getApi().view.type,onChange:e=>r.current?.getApi().changeView(e.target.value),disabled:!0},(0,i.createElement)("option",{value:"dayGridMonth"},"View Chooser"))),(0,i.createElement)("div",{className:"piecal-controls__navigation-button-group"},(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__today-button",onClick:()=>{r.current?.getApi().today(),l()}},"Today"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__prev-button",onClick:()=>{r.current?.getApi().prev(),l()},"aria-label":`Previous ${r.current?.getApi().view.type}`},"<"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__next-button",onClick:()=>{r.current?.getApi().next(),l()},"aria-label":`Next ${r.current?.getApi().view.type}`},">"))),(0,i.createElement)("style",{"data-fullcalendar":!0}),(0,i.createElement)(wo,{ref:r,plugins:[Yo,Ta,ja],initialView:t.view||s,editable:!1,events:n,contentHeight:"auto",locale:t.locale,headerToolbar:!1,validRange:t.hidepastevents?{start:new Date}:void 0}))}const Wa=JSON.parse('{"u2":"piecal/calendar"}');(0,r.registerBlockType)(Wa.u2,{edit:function(e){let{attributes:t,setAttributes:n}=e;const[r,c]=(0,i.useState)([]),[h,p]=(0,i.useState)([]),[g,m]=(0,i.useState)([]);let v="piecal-wrapper";t.wraptitles&&(v+=" piecal-wrap-event-titles"),"true"===t.widget&&(v+=" piecal-wrapper--widget"),"responsive"===t.widget&&(v+=" piecal-wrapper--responsive-widget"),t.theme&&(v+=" piecal-theme-"+t.theme);const{records:b,hasResolved:y}=(0,l.useEntityRecords)("root","postType",{per_page:-1,visibility:"public",viewable:!0});return(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("/piecal/v1/events",{allAttributes:t}),method:"GET"}).then((e=>{const t=e.map((e=>{var t;return e.rset=JSON.parse(null!==(t=e.rset)&&void 0!==t?t:"{}"),e}));p(t)}))}),[t]),(0,i.useEffect)((()=>{y&&(c(b.filter((e=>e.viewable))),piecalGbVars?.explicitAllowedPostTypes?.length>0?m(b.filter((e=>e.viewable)).filter((e=>piecalGbVars.explicitAllowedPostTypes.includes(e.slug))).map((e=>e.name))):m(b.filter((e=>e.viewable)).map((e=>e.name))))}),[y]),(0,i.createElement)("div",(0,o.useBlockProps)({className:v}),(0,i.createElement)(o.InspectorControls,null,(0,i.createElement)(a.PanelBody,{title:(0,s.__)("Calendar Settings","piecal"),initialOpen:!0},r.length>0&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.FormTokenField,{label:(0,s.__)("Post Types","piecal"),value:t.type?t.type.map((e=>{const t=r.find((t=>t.slug===e));return t?t.name:e})):[],suggestions:g,__experimentalValidateInput:e=>g.includes(e),onChange:e=>{const t=e.map((e=>{const t=r.find((t=>t.name===e));return t?t.slug:e}));n({type:t})},help:(0,s.__)("Select post types to display in the calendar.","piecal")})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("View","piecal"),value:t.view,help:(0,s.__)("Choose the default calendar view that visitors will see when the page loads.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("Month - Classic","piecal"),value:"dayGridMonth"},{label:(0,s.__)("Month - List","piecal"),value:"listMonth"},{label:(0,s.__)("Week - Time Grid","piecal"),value:"timeGridWeek"},{label:(0,s.__)("Week - List","piecal"),value:"listWeek"},{label:(0,s.__)("Week - Classic","piecal"),value:"dayGridWeek"},{label:(0,s.__)("Day","piecal"),value:"listDay"}],onChange:e=>n({view:e})})),(""===t.view||"dayGridMonth"===t.view)&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Widget","piecal"),value:t.widget,help:(0,s.__)("Enable widget mode for a more compact calendar suitable for sidebars. 'Responsive' switches to widget mode on mobile only.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("True","piecal"),value:"true"},{label:(0,s.__)("Responsive","piecal"),value:"responsive"}],onChange:e=>n({widget:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Theme","piecal"),value:t.theme,help:(0,s.__)("Choose between light, dark, or adaptive theme. Adaptive will match your visitor's system preferences.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("Dark","piecal"),value:"dark"},{label:(0,s.__)("Adaptive","piecal"),value:"adaptive"}],onChange:e=>n({theme:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Wrap Titles","piecal"),checked:t.wraptitles,help:(0,s.__)("When enabled, event titles will wrap to multiple lines instead of being truncated with an ellipsis.","piecal"),onChange:e=>n({wraptitles:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Locale","piecal"),value:t.locale,help:(0,s.__)("Use a locale code to change the language of the calendar. For example, 'en-US' for English (United States).","piecal"),options:f,onChange:e=>n({locale:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Hide Timezone","piecal"),checked:t.hidetimezone,help:(0,s.__)("Tick this box to hide the event timezone from the calendar footer.","piecal"),onChange:e=>n({hidetimezone:e})})))),(0,i.createElement)(o.InspectorAdvancedControls,null,(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Disable Automatic End Dates","piecal"),checked:t.automaticenddates,help:(0,s.__)("By default, events with no end date will automatically end 1 hour after their start time. Disable to show events with no end date.","piecal"),onChange:e=>n({automaticenddates:e})}))),(0,i.createElement)(Ua,{attributes:t,events:h}))}})}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=(t,n,i,s)=>{if(!n){var o=1/0;for(d=0;d<e.length;d++){for(var[n,i,s]=e[d],a=!0,l=0;l<n.length;l++)(!1&s||o>=s)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,i,s]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={904:0,832:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,s,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(l)var d=l(r)}for(t&&t(n);c<o.length;c++)s=o[c],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return r.O(d)},n=globalThis.webpackChunkpiecalendar=globalThis.webpackChunkpiecalendar||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=r.O(void 0,[832],(()=>r(92)));i=r.O(i)})();
     1(()=>{"use strict";var e,t={561:(e,t,n)=>{const r=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,o=window.wp.blockEditor,a=window.wp.components,l=window.wp.coreData,c=window.wp.apiFetch;var d=n.n(c);const u=window.wp.url,f=[{value:"",label:(0,s.__)("Default (Browser Language)","piecal")},{value:"af",label:"Afrikaans"},{value:"ar",label:"Arabic"},{value:"bg",label:"Bulgarian"},{value:"ca",label:"Catalan"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"en",label:"English"},{value:"en-gb",label:"English (UK)"},{value:"en-au",label:"English (Australia)"},{value:"es",label:"Spanish"},{value:"eu",label:"Basque"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"fr-ca",label:"French (Canada)"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"nl",label:"Dutch"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pt-br",label:"Portuguese (Brazil)"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"sv",label:"Swedish"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"vi",label:"Vietnamese"},{value:"zh-cn",label:"Chinese (China)"},{value:"zh-tw",label:"Chinese (Taiwan)"}],h=(window.wp.hooks,window.React),p=window.ReactDOM;var g,m,v,b,y,A,w,E,C,D={},_=[],S=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function R(e,t){for(var n in t)e[n]=t[n];return e}function x(e){var t=e.parentNode;t&&t.removeChild(e)}function k(e,t,n){var r,i,s,o={};for(s in t)"key"==s?r=t[s]:"ref"==s?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?g.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===o[s]&&(o[s]=e.defaultProps[s]);return T(e,o,r,i,null)}function T(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++v:i};return null==i&&null!=m.vnode&&m.vnode(s),s}function M(e){return e.children}function O(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||S.test(t)?n:n+"px"}function I(e,t,n,r,i){var s;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||O(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||O(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r||e.addEventListener(t,s?P:N,s):e.removeEventListener(t,s?P:N,s);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function N(e){y=!0;try{return this.l[e.type+!1](m.event?m.event(e):e)}finally{y=!1}}function P(e){y=!0;try{return this.l[e.type+!0](m.event?m.event(e):e)}finally{y=!1}}function H(e,t){this.props=e,this.context=t}function B(e,t){if(null==t)return e.__?B(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?B(e):null}function z(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return z(e)}}function j(e){y?setTimeout(e):E(e)}function U(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!F.__r++||w!==m.debounceRendering)&&((w=m.debounceRendering)||j)(F)}function F(){var e,t,n,r,i,s,o,a;for(A.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=A.shift();)e.__d&&(t=A.length,r=void 0,i=void 0,o=(s=(n=e).__v).__e,(a=n.__P)&&(r=[],(i=R({},s)).__v=s.__v+1,q(a,s,i,n.__n,void 0!==a.ownerSVGElement,null!=s.__h?[o]:null,r,null==o?B(s):o,s.__h),Z(r,s),s.__e!=o&&z(s)),A.length>t&&A.sort((function(e,t){return e.__v.__b-t.__v.__b})));F.__r=0}function W(e,t,n,r,i,s,o,a,l,c){var d,u,f,h,p,g,m,v=r&&r.__k||_,b=v.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(h=n.__k[d]=null==(h=t[d])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?T(null,h,null,null,h):Array.isArray(h)?T(M,{children:h},null,null,null):h.__b>0?T(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=v[d])||f&&h.key==f.key&&h.type===f.type)v[d]=void 0;else for(u=0;u<b;u++){if((f=v[u])&&h.key==f.key&&h.type===f.type){v[u]=void 0;break}f=null}q(e,h,f=f||D,i,s,o,a,l,c),p=h.__e,(u=h.ref)&&f.ref!=u&&(m||(m=[]),f.ref&&m.push(f.ref,null,h),m.push(u,h.__c||p,h)),null!=p?(null==g&&(g=p),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=G(h,l,e):l=V(e,h,f,v,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=B(f))}for(n.__e=g,d=b;d--;)null!=v[d]&&("function"==typeof n.type&&null!=v[d].__e&&v[d].__e==n.__d&&(n.__d=Q(r).nextSibling),J(v[d],v[d]));if(m)for(d=0;d<m.length;d++)$(m[d],m[++d],m[++d])}function G(e,t,n){for(var r,i=e.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=e,t="function"==typeof r.type?G(r,t,n):V(n,r,r,i,r.__e,t));return t}function L(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){L(e,t)})):t.push(e)),t}function V(e,t,n,r,i,s){var o,a,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||i!=s||null==i.parentNode)e:if(null==s||s.parentNode!==e)e.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;e.insertBefore(i,s),o=s}return void 0!==o?o:i.nextSibling}function Q(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Q(n)))return r;return null}function q(e,t,n,r,i,s,o,a,l){var c,d,u,f,h,p,g,v,b,y,A,w,E,C,D,_=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,s=[a]),(c=m.__b)&&c(t);try{e:if("function"==typeof _){if(v=t.props,b=(c=_.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in _&&_.prototype.render?t.__c=d=new _(v,y):(t.__c=d=new H(v,y),d.constructor=_,d.render=X),b&&b.sub(d),d.props=v,d.state||(d.state={}),d.context=y,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=_.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=R({},d.__s)),R(d.__s,_.getDerivedStateFromProps(v,d.__s))),f=d.props,h=d.state,d.__v=t,u)null==_.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==_.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,y),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[],d.__h.length&&o.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,p)}))}if(d.context=y,d.props=v,d.__P=e,w=m.__r,E=0,"prototype"in _&&_.prototype.render){for(d.state=d.__s,d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do{d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++E<25);d.state=d.__s,null!=d.getChildContext&&(r=R(R({},r),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(f,h)),D=null!=c&&c.type===M&&null==c.key?c.props.children:c,W(e,Array.isArray(D)?D:[D],t,n,r,i,s,o,a,l),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Y(n.__e,t,n,r,i,s,o,l);(c=m.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=s)&&(t.__e=a,t.__h=!!l,s[s.indexOf(a)]=null),m.__e(e,t,n)}}function Z(e,t){m.__c&&m.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){m.__e(e,t.__v)}}))}function Y(e,t,n,r,i,s,o,a){var l,c,d,u=n.props,f=t.props,h=t.type,p=0;if("svg"===h&&(i=!0),null!=s)for(;p<s.length;p++)if((l=s[p])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,s[p]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),s=null,a=!1}if(null===h)u===f||a&&e.data===f||(e.data=f);else{if(s=s&&g.call(e.childNodes),c=(u=n.props||D).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!a){if(null!=s)for(u={},p=0;p<e.attributes.length;p++)u[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,i){var s;for(s in n)"children"===s||"key"===s||s in t||I(e,s,null,n[s],r);for(s in t)i&&"function"!=typeof t[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===t[s]||I(e,s,t[s],n[s],r)}(e,f,u,i,a),d)t.__k=[];else if(p=t.props.children,W(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==h,s,o,s?s[0]:n.__k&&B(n,0),a),null!=s)for(p=s.length;p--;)null!=s[p]&&x(s[p]);a||("value"in f&&void 0!==(p=f.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==u.value)&&I(e,"value",p,u.value,!1),"checked"in f&&void 0!==(p=f.checked)&&p!==e.checked&&I(e,"checked",p,u.checked,!1))}return e}function $(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){m.__e(e,n)}}function J(e,t,n){var r,i;if(m.unmount&&m.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){m.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&J(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||x(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,n){return this.constructor(e,n)}function K(e,t,n){var r,i,s;m.__&&m.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,s=[],q(t,e=(!r&&n||t).__k=k(M,null,[e]),i||D,D,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?g.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r),Z(s,e)}g=_.slice,m={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},v=0,b=function(e){return null!=e&&void 0===e.constructor},y=!1,H.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=R({},this.state),"function"==typeof e&&(e=e(R({},n),this.props)),e&&R(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),U(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),U(this))},H.prototype.render=M,A=[],E="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,F.__r=0,C=0;var ee,te,ne,re=[],ie=[],se=m.__b,oe=m.__r,ae=m.diffed,le=m.__c,ce=m.unmount;function de(){for(var e;e=re.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(he),e.__H.__h.forEach(pe),e.__H.__h=[]}catch(t){e.__H.__h=[],m.__e(t,e.__v)}}m.__b=function(e){ee=null,se&&se(e)},m.__r=function(e){oe&&oe(e);var t=(ee=e.__c).__H;t&&(te===ee?(t.__h=[],ee.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ie,e.__N=e.i=void 0}))):(t.__h.forEach(he),t.__h.forEach(pe),t.__h=[])),te=ee},m.diffed=function(e){ae&&ae(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==re.push(t)&&ne===m.requestAnimationFrame||((ne=m.requestAnimationFrame)||fe)(de)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ie&&(e.__=e.__V),e.i=void 0,e.__V=ie}))),te=ee=null},m.__c=function(e,t){t.some((function(e){try{e.__h.forEach(he),e.__h=e.__h.filter((function(e){return!e.__||pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],m.__e(n,e.__v)}})),le&&le(e,t)},m.unmount=function(e){ce&&ce(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{he(e)}catch(e){t=e}})),n.__H=void 0,t&&m.__e(t,n.__v))};var ue="function"==typeof requestAnimationFrame;function fe(e){var t,n=function(){clearTimeout(r),ue&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ue&&(t=requestAnimationFrame(n))}function he(e){var t=ee,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ee=t}function pe(e){var t=ee;e.__c=e.__(),ee=t}function ge(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function me(e){this.props=e}(me.prototype=new H).isPureReactComponent=!0,me.prototype.shouldComponentUpdate=function(e,t){return ge(this.props,e)||ge(this.state,t)};var ve=m.__b;m.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ve&&ve(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var be=m.__e;m.__e=function(e,t,n,r){if(e.then)for(var i,s=t;s=s.__;)if((i=s.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);be(e,t,n,r)};var ye=m.unmount;function Ae(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ae(e,t,n)}))),e}function we(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return we(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Ee(){this.__u=0,this.t=null,this.__b=null}function Ce(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function De(){this.u=null,this.o=null}m.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),ye&&ye(e)},(Ee.prototype=new H).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ce(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=we(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Ee.prototype.componentWillUnmount=function(){this.t=[]},Ee.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ae(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&k(M,null,e.fallback);return i&&(i.__h=null),[k(M,null,t.__a?null:e.children),i]};var _e=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Se(e){return this.getChildContext=function(){return e.context},e.children}function Re(e){var t=this,n=e.i;t.componentWillUnmount=function(){K(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),K(k(Se,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(De.prototype=new H).__a=function(e){var t=this,n=Ce(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),_e(t,e,r)):i()};n?n(s):s()}},De.prototype.render=function(e){this.u=null,this.o=new Map;var t=L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},De.prototype.componentDidUpdate=De.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){_e(e,n,t)}))};var xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ke=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Te="undefined"!=typeof document,Me=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(H.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Oe=m.event;function Ie(){}function Ne(){return this.cancelBubble}function Pe(){return this.defaultPrevented}m.event=function(e){return Oe&&(e=Oe(e)),e.persist=Ie,e.isPropagationStopped=Ne,e.isDefaultPrevented=Pe,e.nativeEvent=e};var He={configurable:!0,get:function(){return this.class}},Be=m.vnode;m.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var s in r={},n){var o=n[s];Te&&"children"===s&&"noscript"===t||"value"===s&&"defaultValue"in n&&null==o||("defaultValue"===s&&"value"in n&&null==n.value?s="value":"download"===s&&!0===o?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+t)&&!Me(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&ke.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===o&&(o=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=L(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=L(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(He.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",He))}e.$$typeof=xe,Be&&Be(e)};var ze=m.__r;m.__r=function(e){ze&&ze(e),e.__c};const je=[],Ue=new Map;function Fe(e){je.push(e),Ue.forEach((t=>{Ge(t,e)}))}function We(e){let t=Ue.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=(void 0===Le&&(Le=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}()),Le);n&&(t.nonce=n);const r=e===document?document.head:e,i=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,i)}Ue.set(e,t),function(e){for(const t of je)Ge(e,t)}(t)}}function Ge(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)}))}let Le;"undefined"!=typeof document&&We(document),Fe(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');class Ve{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(n[e]-=1,n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Qe(e){e.parentNode&&e.parentNode.removeChild(e)}function qe(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Ze(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Ze(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}const Ye=/(top|left|right|bottom|width|height)$/i;function $e(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Ye.test(t)?e.style[t]=`${n}px`:e.style[t]=n}let Je=0;function Xe(){return Je+=1,"fc-dom-"+Je}function Ke(e,t,n,r){let i=function(e,t){return n=>{let r=qe(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function et(e){return Object.assign({onClick:e},tt(e))}function tt(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let nt=0;function rt(){return nt+=1,String(nt)}function it(e,t,n){return n.func?n.func(e,t):function(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}(e[n.field],t[n.field])*(n.order||1)}function st(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function ot(e,t,n){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce(((e,t,n)=>e.replace("$"+n,t||"")),e):n}function at(e){return e%1==0}function lt(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const ct=["years","months","days","milliseconds"],dt=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ut(e,t){return"string"==typeof e?function(e){let t=dt.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?ft(e):"number"==typeof e?ft({[t||"milliseconds"]:e}):null}function ft(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function ht(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function pt(e){return gt(e)/864e5}function gt(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function mt(e,t){let n=null;for(let r=0;r<ct.length;r+=1){let i=ct[r];if(t[i]){let r=e[i]/t[i];if(!at(r)||null!==n&&n!==r)return null;n=r}else if(e[i])return null}return n}function vt(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function bt(e,t,n){if(e===t)return!0;let r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}const yt=["sun","mon","tue","wed","thu","fri","sat"];function At(e,t){let n=Tt(e);return n[2]+=7*t,Mt(n)}function wt(e,t){let n=Tt(e);return n[2]+=t,Mt(n)}function Et(e,t){let n=Tt(e);return n[6]+=t,Mt(n)}function Ct(e,t){return(t.valueOf()-e.valueOf())/864e5}function Dt(e,t){return It(e)===It(t)?Math.round(Ct(e,t)):null}function _t(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function St(e,t,n,r){let i=Mt([t,0,1+Rt(t,n,r)]),s=_t(e),o=Math.round(Ct(i,s));return Math.floor(o/7)+1}function Rt(e,t,n){let r=7+t-n;return-(7+Mt([e,0,r]).getUTCDay()-t)%7+r-1}function xt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kt(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Tt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Mt(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Ot(e){return!isNaN(e.valueOf())}function It(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Nt(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Ht(t,!0)))),r}function Pt(e){return e.toISOString().replace(/T.*$/,"")}function Ht(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=Math.round(r%60);return t?`${n+st(i,2)}:${st(s,2)}`:`GMT${n}${i}${s?`:${st(s,2)}`:""}`}function Bt(e,t,n){let r,i;return function(...s){if(r){if(!bt(r,s)){n&&n(i);let r=e.apply(this,s);t&&t(r,i)||(i=r)}}else i=e.apply(this,s);return r=s,i}}function zt(e,t,n){let r,i;return s=>{if(r){if(!vn(r,s)){n&&n(i);let r=e.call(this,s);t&&t(r,i)||(i=r)}}else i=e.call(this,s);return r=s,i}}const jt={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Ut={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Ft=/\s*([ap])\.?m\.?/i,Wt=/,/g,Gt=/\s+/g,Lt=/\u200e/g,Vt=/UTC|GMT/;class Qt{constructor(e){let t={},n={},r=0;for(let i in e)i in jt?(n[i]=e[i],r=Math.max(jt[i],r)):(t[i]=e[i],i in Ut&&(r=Math.max(Ut[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Bt(qt)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:s}=this,o=(a=e.marker,l=t.marker,(c=n.calendarSystem).getMarkerYear(a)!==c.getMarkerYear(l)?5:c.getMarkerMonth(a)!==c.getMarkerMonth(l)?4:c.getMarkerDay(a)!==c.getMarkerDay(l)?2:It(a)!==It(l)?1:0);var a,l,c;if(!o)return this.format(e,n);let d=o;!(d>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(d=1);let u=this.format(e,n),f=this.format(t,n);if(u===f)return u;let h=qt(function(e,t){let n={};for(let r in e)(!(r in Ut)||Ut[r]<=t)&&(n[r]=e[r]);return n}(i,d),s,n),p=h(e),g=h(t),m=function(e,t,n,r){let i=0;for(;i<e.length;){let s=e.indexOf(t,i);if(-1===s)break;let o=e.substr(0,s);i=s+t.length;let a=e.substr(i),l=0;for(;l<n.length;){let e=n.indexOf(r,l);if(-1===e)break;let t=n.substr(0,e);l=e+r.length;let i=n.substr(l);if(o===t&&a===i)return{before:o,after:a}}}return null}(u,p,f,g),v=s.separator||r||n.defaultSeparator||"";return m?m.before+p+v+g+m.after:u+v+f}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function qt(e,t,n){let r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?e=>Ht(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,i){let s=[];return"long"===i?s.push(n):"short"!==i&&"narrow"!==i||s.push(t),"long"!==i&&"short"!==i||s.push(" "),s.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&s.reverse(),s.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return s=>{let o,{marker:a}=s;return o=r&&!a.getUTCMinutes()?r:i,function(e,t,n,r,i){return e=e.replace(Lt,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;return e=e.replace(Vt,(()=>(n=!0,t))),n||(e+=` ${t}`),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":Ht(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Wt,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(Ft,"").trim():"narrow"===r.meridiem?e=e.replace(Ft,((e,t)=>t.toLocaleLowerCase())):"short"===r.meridiem?e=e.replace(Ft,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===r.meridiem&&(e=e.replace(Ft,(e=>e.toLocaleLowerCase()))),e=(e=e.replace(Gt," ")).trim()}(o.format(a),s,e,t,n)}}(e,t,n)}function Zt(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Yt(e,t,n,r){let i=Zt(e,n.calendarSystem);return{date:i,start:i,end:t?Zt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class $t{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Yt(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Yt(e,t,n,r))}}class Jt{constructor(e){this.func=e}format(e,t,n){return this.func(Yt(e,null,t,n))}formatRange(e,t,n,r){return this.func(Yt(e,t,n,r))}}function Xt(e){return"object"==typeof e&&e?new Qt(e):"string"==typeof e?new $t(e):"function"==typeof e?new Jt(e):null}const Kt={navLinkDayClick:dn,navLinkWeekClick:dn,duration:ut,bootstrapFontAwesome:dn,buttonIcons:dn,customButtons:dn,defaultAllDayEventDuration:ut,defaultTimedEventDuration:ut,nextDayThreshold:ut,scrollTime:ut,scrollTimeReset:Boolean,slotMinTime:ut,slotMaxTime:ut,dayPopoverFormat:Xt,slotDuration:ut,snapDuration:ut,headerToolbar:dn,footerToolbar:dn,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Xt,dayHeaderClassNames:dn,dayHeaderContent:dn,dayHeaderDidMount:dn,dayHeaderWillUnmount:dn,dayCellClassNames:dn,dayCellContent:dn,dayCellDidMount:dn,dayCellWillUnmount:dn,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:dn,weekNumbers:Boolean,weekNumberClassNames:dn,weekNumberContent:dn,weekNumberDidMount:dn,weekNumberWillUnmount:dn,editable:Boolean,viewClassNames:dn,viewDidMount:dn,viewWillUnmount:dn,nowIndicator:Boolean,nowIndicatorClassNames:dn,nowIndicatorContent:dn,nowIndicatorDidMount:dn,nowIndicatorWillUnmount:dn,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:dn,locale:dn,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:dn,eventOrder:function(e){let t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t+=1)n=i[t],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r},eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:dn,contentHeight:dn,direction:String,weekNumberFormat:Xt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:dn,initialDate:dn,now:dn,eventDataTransform:dn,stickyHeaderDates:dn,stickyFooterScrollbar:dn,viewHeight:dn,defaultAllDay:Boolean,eventSourceFailure:dn,eventSourceSuccess:dn,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:dn,eventConstraint:dn,eventAllow:dn,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:dn,eventContent:dn,eventDidMount:dn,eventWillUnmount:dn,selectConstraint:dn,selectOverlap:dn,selectAllow:dn,droppable:Boolean,unselectCancel:String,slotLabelFormat:dn,slotLaneClassNames:dn,slotLaneContent:dn,slotLaneDidMount:dn,slotLaneWillUnmount:dn,slotLabelClassNames:dn,slotLabelContent:dn,slotLabelDidMount:dn,slotLabelWillUnmount:dn,dayMaxEvents:dn,dayMaxEventRows:dn,dayMinWidth:Number,slotLabelInterval:ut,allDayText:String,allDayClassNames:dn,allDayContent:dn,allDayDidMount:dn,allDayWillUnmount:dn,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Xt,rerenderDelay:Number,moreLinkText:dn,moreLinkHint:dn,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:dn,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:ut,hiddenDays:dn,fixedWeekCount:Boolean,validRange:dn,visibleRange:dn,titleFormat:dn,eventInteractive:Boolean,noEventsText:String,viewHint:dn,navLinkHint:dn,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:dn,moreLinkClassNames:dn,moreLinkContent:dn,moreLinkDidMount:dn,moreLinkWillUnmount:dn,monthStartFormat:Xt,handleCustomRendering:dn,customRenderingMetaMap:dn,customRenderingReplaces:Boolean},en={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},tn={datesSet:dn,eventsSet:dn,eventAdd:dn,eventChange:dn,eventRemove:dn,windowResize:dn,eventClick:dn,eventMouseEnter:dn,eventMouseLeave:dn,select:dn,unselect:dn,loading:dn,_unmount:dn,_beforeprint:dn,_afterprint:dn,_noEventDrop:dn,_noEventResize:dn,_resize:dn,_scrollRequest:dn},nn={buttonText:dn,buttonHints:dn,views:dn,plugins:dn,initialEvents:dn,events:dn,eventSources:dn},rn={headerToolbar:sn,footerToolbar:sn,buttonText:sn,buttonHints:sn,buttonIcons:sn,dateIncrement:sn,plugins:on,events:on,eventSources:on,resources:on};function sn(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?vn(e,t):e===t}function on(e,t){return Array.isArray(e)&&Array.isArray(t)?bt(e,t):e===t}const an={type:String,component:dn,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:dn,usesMinMaxTime:Boolean,classNames:dn,content:dn,didMount:dn,willUnmount:dn};function ln(e){return fn(e,rn)}function cn(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function dn(e){return e}const{hasOwnProperty:un}=Object.prototype;function fn(e,t){let n={};if(t)for(let r in t)if(t[r]===sn){let t=[];for(let i=e.length-1;i>=0;i-=1){let s=e[i][r];if("object"==typeof s&&s)t.unshift(s);else if(void 0!==s){n[r]=s;break}}t.length&&(n[r]=fn(t))}for(let t=e.length-1;t>=0;t-=1){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function hn(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function pn(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function gn(e){let t={};for(let n of e)t[n]=!0;return t}function mn(e){let t=[];for(let n in e)t.push(e[n]);return t}function vn(e,t){if(e===t)return!0;for(let n in e)if(un.call(e,n)&&!(n in t))return!1;for(let n in t)if(un.call(t,n)&&e[n]!==t[n])return!1;return!0}const bn=/^on[A-Z]/;function yn(e,t){let n=[];for(let r in e)un.call(e,r)&&(r in t||n.push(r));for(let r in t)un.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function An(e,t,n={}){if(e===t)return!0;for(let o in t)if(!(o in e&&(r=e[o],i=t[o],s=n[o],r===i||!0===s||s&&s(r,i))))return!1;var r,i,s;for(let n in e)if(!(n in t))return!1;return!0}let wn={};var En;En=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Mt(e)}markerToArray(e){return Tt(e)}},wn.gregory=En;const Cn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class Dn{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new wn[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Mt(xt(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Mt(e)),null!==t&&Ot(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=Cn.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if(Ot(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=function(e,t){let n=Dt(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:(n=Dt(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),at(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),at(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),at(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(pt(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/(pt(n)/30):n.days&&(r=Dt(e,t),null!==r)?r/pt(n):(t.valueOf()-e.valueOf())/gt(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?_t(e):"hour"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),i=St(e,r,t,n);if(i<1)return St(e,r-1,t,n);let s=St(e,r+1,t,n);return s>=1?Math.min(i,s):i}(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=Et(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),Nt(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?Mt(xt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Mt(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-kt(Tt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Tt(e)):null}toDate(e,t){return"local"===this.timeZone?kt(Tt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Tt(e))*60):new Date(e.valueOf()-(t||0))}}class Sn{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if("object"==typeof e&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}function Rn(e){e();let t=m.debounceRendering,n=[];for(m.debounceRendering=function(e){n.push(e)},K(k(xn,{}),document.createElement("div"));n.length;)n.shift()();m.debounceRendering=t}Sn.prototype.classes={},Sn.prototype.iconClasses={},Sn.prototype.baseIconClass="",Sn.prototype.iconOverridePrefix="";class xn extends H{render(){return k("div",{})}componentDidMount(){this.setState({})}}function kn(e){let t=function(e,t){var n={__c:t="__cC"+C++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,U(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}class Tn{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const Mn=kn({});function On(e,t,n,r,i,s,o,a,l,c,d,u,f){return{dateEnv:i,options:n,pluginHooks:o,emitter:c,dispatch:a,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:"rtl"===n.direction,addResizeHandler(e){c.on("_resize",e)},removeResizeHandler(e){c.off("_resize",e)},createScrollResponder:e=>new Tn(e,c,ut(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:u,unregisterInteractiveComponent:f}}class In extends H{shouldComponentUpdate(e,t){return this.debug&&console.log(yn(e,this.props),yn(t,this.state)),!An(this.props,e,this.propEquality)||!An(this.state,t,this.stateEquality)}safeSetState(e){An(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}In.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},In.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},In.contextType=Mn,In.prototype.propEquality={},In.prototype.stateEquality={};class Nn extends In{}function Pn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}Nn.contextType=Mn;class Hn extends Nn{constructor(){super(...arguments),this.id=rt(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&Bn(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Pn(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:s}=e,o=zn(e,[],this.handleEl);let a,l,c=!1,d=[];if(null!=r){const e="function"==typeof r?r(s,k):r;if(!0===e)c=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?d=Array.prototype.slice.call(e.domNodes):(t?b(e):"function"!=typeof e)?a=e:l=e}}else c=!Bn(e.generatorName,n);return c&&i&&(a=i(s)),this.queuedDomNodes=d,this.currentGeneratorMeta=l,k(e.elTag,o,a)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:i,customRenderingMetaMap:s}=r.options;if(i){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==s?void 0:s[n.generatorName];r&&i(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(jn)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!bt(e,t)){t.forEach(Qe);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function Bn(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function zn(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function jn(e){return Boolean(e)}Hn.addPropsEquality({elClasses:bt,elStyle:vn,elAttrs:function(e,t){const n=yn(e,t);for(let e of n)if(!bn.test(e))return!1;return!0},renderProps:vn});const Un=kn(0);class Fn extends H{constructor(){super(...arguments),this.InnerContent=Wn.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Pn(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const n="function"==typeof e?e(t):e||[];return"string"==typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=zn(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?k(e.elTag,n,r):r}return k(Hn,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function Wn(e,t){const n=e.props;return k(Hn,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}Fn.contextType=Un;class Gn extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return k(Fn,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...Ln(e.viewSpec),...e.elClasses||[]],renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount}),(()=>e.children))}}function Ln(e){return[`fc-${e.type}-view`,"fc-view"]}function Vn(e,t){let n,r,i=[],{start:s}=t;for(e.sort(Qn),n=0;n<e.length;n+=1)r=e[n],r.start>s&&i.push({start:s,end:r.start}),r.end>s&&(s=r.end);return s<t.end&&i.push({start:s,end:t.end}),i}function Qn(e,t){return e.start.valueOf()-t.start.valueOf()}function qn(e,t){let{start:n,end:r}=e,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function Zn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function Yn(e){let t=Math.floor(Ct(e.start,e.end))||1,n=_t(e.start);return{start:n,end:wt(n,t)}}function $n(e,t=ut(0)){let n=null,r=null;if(e.end){r=_t(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=gt(t)&&(r=wt(r,1))}return e.start&&(n=_t(e.start),r&&r<=n&&(r=wt(n,1))),{start:n,end:r}}function Jn(e,t,n,r){return"year"===r?ut(n.diffWholeYears(e,t),"year"):"month"===r?ut(n.diffWholeMonths(e,t),"month"):function(e,t){let n=_t(e),r=_t(t);return{years:0,months:0,days:Math.round(Ct(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}function Xn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}class Kn{constructor(e){this.props=e,this.nowDate=Xn(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let r,i,s,o,a,l,{props:c}=this;var d,u,f,h;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(d=e,e=null!=(u=r).start&&d<u.start?u.start:null!=u.end&&d>=u.end?new Date(u.end.valueOf()-1):d),i=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(i.unit),o=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,s),o=this.trimHiddenDays(o),a=o,c.showNonCurrentDates||(a=qn(a,i.range)),a=this.adjustActiveRange(a),a=qn(a,r),f=i.range,h=r,l=(null===f.end||null===h.start||f.end>h.start)&&(null===f.start||null===h.end||f.start<h.end),Zn(o,e)||(e=o.start),{currentDate:e,validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:s,activeRange:a,renderRange:o,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,i=null,s=null,o=null;return r.duration?(i=r.duration,s=r.durationUnit,o=this.buildRangeFromDuration(e,t,i,s)):(n=this.props.dayCount)?(s="day",o=this.buildRangeFromDayCount(e,t,n)):(o=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),s=vt(i).unit,o=this.buildRangeFromDuration(e,t,i,s)),{duration:i,unit:s,range:o}}getFallbackDuration(){return ut({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:s,end:o}=e;return n&&(pt(r)<0&&(s=_t(s),s=t.add(s,r)),pt(i)>1&&(o=_t(o),o=wt(o,-1),o=t.add(o,i))),{start:s,end:o}}buildRangeFromDuration(e,t,n,r){let i,s,o,{dateEnv:a,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&gt(e)<gt(n)?vt(e).unit:r}function c(){i=a.startOf(e,l),s=a.add(i,n),o={start:i,end:s}}return pt(n)<=1&&this.isHiddenDay(i)&&(i=this.skipHiddenDays(i,t),i=_t(i)),c(),this.trimHiddenDays(o)||(e=this.skipHiddenDays(e,t),c()),o}buildRangeFromDayCount(e,t,n){let r,{dateEnv:i,dateAlignment:s}=this.props,o=0,a=e;s&&(a=i.startOf(a,s)),a=_t(a),a=this.skipHiddenDays(a,t),r=a;do{r=wt(r,1),this.isHiddenDay(r)||(o+=1)}while(o<n);return{start:a,end:r}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let t,{dateIncrement:n}=this.props;return n||((t=this.props.dateAlignment)?ut(1,t):e||ut({days:1}))}refineRange(e){if(e){let t=function(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}(e,this.props.dateEnv);return t&&(t=$n(t)),t}return null}initHiddenDays(){let e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:t,end:n}=e;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=wt(e,t);return e}}function er(e,t,n,r){return{instanceId:rt(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}function tr(e,t,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:o,instances:a}=e;a=hn(a,(e=>!o[e.defId].recurringDef));for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||(o=n.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let l=nr(n,o,t,r,i.recurringTypes);for(let t of l){let n=er(e,{start:t,end:r.add(t,o)});a[n.instanceId]=n}}}return{defs:o,instances:a}}function nr(e,t,n,r,i){let s=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(s=s.map(_t)),s}const rr={id:String,groupId:String,title:String,url:String,interactive:Boolean},ir={start:dn,end:dn,date:dn,allDay:Boolean},sr=Object.assign(Object.assign(Object.assign({},rr),ir),{extendedProps:dn});function or(e,t,n,r,i=lr(n),s,o){let{refined:a,extra:l}=ar(e,n,i),c=function(e,t){let n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),d=function(e,t,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(e,n);if(s){let{allDay:n}=e;return null==n&&(n=t,null==n&&(n=s.allDayGuess,null==n&&(n=!1))),{allDay:n,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}(a,c,n.dateEnv,n.pluginHooks.recurringTypes);if(d){let e=cr(a,l,t?t.sourceId:"",d.allDay,Boolean(d.duration),n,s);return e.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:e,instance:null}}let u=function(e,t,n,r){let i,s,{allDay:o}=e,a=null,l=!1,c=null,d=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(d),i)a=i.marker;else if(!r)return null;return null!=e.end&&(s=n.dateEnv.createMarkerMeta(e.end)),null==o&&(o=null!=t?t:(!i||i.isTimeUnspecified)&&(!s||s.isTimeUnspecified)),o&&a&&(a=_t(a)),s&&(c=s.marker,o&&(c=_t(c)),a&&c<=a&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,o?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:o,hasEnd:l,range:{start:a,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:s?s.forcedTzo:null}}(a,c,n,r);if(u){let e=cr(a,l,t?t.sourceId:"",u.allDay,u.hasEnd,n,s),r=er(e.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function ar(e,t,n=lr(t)){return cn(e,n)}function lr(e){return Object.assign(Object.assign(Object.assign({},gr),sr),e.pluginHooks.eventRefiners)}function cr(e,t,n,r,i,s,o){let a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(o&&e.id?o[e.id]:"")||rt(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:vr(e,s),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of s.pluginHooks.eventDefMemberAdders)Object.assign(a,t(e));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function dr(e,t,n,r,i,s){let o={defs:{},instances:{}},a=lr(n);for(let l of e){let e=or(l,t,n,r,a,i,s);e&&ur(e,o)}return o}function ur(e,t={defs:{},instances:{}}){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function fr(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function hr(e,t){let n=hn(e.defs,t),r=hn(e.instances,(e=>n[e.defId]));return{defs:n,instances:r}}function pr(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const gr={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:dn,overlap:dn,allow:dn,className:pr,classNames:pr,color:String,backgroundColor:String,borderColor:String,textColor:String},mr={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function vr(e,t){let n=function(e,t){return Array.isArray(e)?dr(e,null,t,!0):"object"==typeof e&&e?dr([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function br(e){return e.reduce(yr,mr)}function yr(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const Ar={id:String,defaultAllDay:Boolean,url:String,format:String,events:dn,eventDataTransform:dn,success:dn,failure:dn};function wr(e,t,n=Er(t)){let r;if("string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){let{refined:i,extra:s}=cn(r,n),o=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;t-=1){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:rt(),sourceDefId:o.sourceDefId,meta:o.meta,ui:vr(i,t),extendedProps:s}}return null}function Er(e){return Object.assign(Object.assign(Object.assign({},gr),Ar),e.pluginHooks.eventSourceRefiners)}function Cr(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Dr(e,i)),r&&(e=Dr(e,r)),e}function Dr(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function _r(e,t,n){let{defs:r}=e,i=pn(e.instances,(e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})));return{defs:r,instances:i}}function Sr(e,t){return hr(e,(e=>e.sourceId!==t))}class Rr{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((e=>e!==n))):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}const xr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function kr(e,t,n){let{dateEnv:r,options:i}=n,s=t;return e?(s=_t(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Tr(e,t,n,r){let i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function Mr(e,t,n,r,i){let{dateEnv:s}=i,o=r.standardProps&&!0===r.standardProps.allDay,a=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return o&&(l.range=Yn(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:s.add(l.range.start,r.datesDelta),end:s.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:s.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:s.add(l.range.end,r.endDelta)}),a&&(l.range={start:l.range.start,end:kr(t.allDay,l.range.start,i)}),t.allDay&&(l.range={start:_t(l.range.start),end:_t(l.range.end)}),l.range.end<l.range.start&&(l.range.end=kr(t.allDay,l.range.start,i)),l}class Or{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Ir{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in ir)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=rr[e](t),this.mutate({standardProps:{publicId:t}});else if(e in rr)t=rr[e](t),this.mutate({standardProps:{[e]:t}});else if(e in gr){let n=gr[e](t);n="color"===e?{backgroundColor:t,borderColor:t}:"editable"===e?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=Jn(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e,t={}){let n,{dateEnv:r}=this._context;if((null==e||(n=r.createMarker(e),n))&&this._instance)if(n){let e=Jn(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,n={}){let r,{dateEnv:i}=this._context,s={allDay:n.allDay},o=i.createMarker(e);var a,l;if(o&&(null==t||(r=i.createMarker(t),r))&&this._instance){let e=this._instance.range;!0===n.allDay&&(e=Yn(e));let t=Jn(e.start,o,i,n.granularity);if(r){let o=Jn(e.end,r,i,n.granularity);l=o,(a=t).years===l.years&&a.months===l.months&&a.days===l.days&&a.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:s}):this.mutate({startDelta:t,endDelta:o,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:t,standardProps:s})}}moveStart(e){let t=ut(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=ut(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=ut(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Xt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:i}=r.getCurrentData(),s=function(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=hr(e,(e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r}));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}(i,t.instanceId);s=function(e,t,n,r){let i=jr(e.defs,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}),s={defs:{},instances:{}};for(let t in e.defs){let o=e.defs[t];s.defs[t]=Tr(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],a=s.defs[o.defId];s.instances[t]=Mr(o,a,i[o.defId],n,r)}return s}(s,0,e,r);let o=new Ir(r,n,t);this._def=s.defs[n.defId],this._instance=s.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:s}),r.emitter.trigger("eventChange",{oldEvent:o,event:this,relatedEvents:Pr(s,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,t=Nr(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new Or(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,s={allDay:t.allDay};return t.title&&(s.title=t.title),r&&(s.start=r),i&&(s.end=i),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(s,t.extendedProps):s.extendedProps=t.extendedProps),s}toJSON(){return this.toPlainObject()}}function Nr(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function Pr(e,t,n){let{defs:r,instances:i}=e,s=[],o=n?n.instanceId:"";for(let e in i){let n=i[e],a=r[n.defId];n.instanceId!==o&&s.push(new Ir(t,a,n))}return s}function Hr(e,t,n,r){let i={},s={},o={},a=[],l=[],c=jr(e.defs,t);for(let t in e.defs){let n=e.defs[t];"inverse-background"===c[n.defId].display&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):s[t]=[])}for(let t in e.instances){let o=e.instances[t],d=e.defs[o.defId],u=c[d.defId],f=o.range,h=!d.allDay&&r?$n(f,r):f,p=qn(h,n);p&&("inverse-background"===u.display?d.groupId?i[d.groupId].push(p):s[o.defId].push(p):"none"!==u.display&&("background"===u.display?a:l).push({def:d,ui:u,instance:o,range:p,isStart:h.start&&h.start.valueOf()===p.start.valueOf(),isEnd:h.end&&h.end.valueOf()===p.end.valueOf()}))}for(let e in i){let t=Vn(i[e],n);for(let n of t){let t=o[e],r=c[t.defId];a.push({def:t,ui:r,instance:null,range:n,isStart:!1,isEnd:!1})}}for(let t in s){let r=Vn(s[t],n);for(let n of r)a.push({def:e.defs[t],ui:c[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Br(e,t){e.fcSeg=t}function zr(e){return e.fcSeg||e.parentNode.fcSeg||null}function jr(e,t){return pn(e,(e=>Ur(e,t)))}function Ur(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),br(n)}function Fr(e,t){let n=e.map(Wr);return n.sort(((e,n)=>function(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=it(e,t,n[r]),i)return i;return 0}(e,n,t))),n.map((e=>e._seg))}function Wr(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:e})}function Gr(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:s}=e.eventRange,o=s.startEditable;for(let e of r)o=e(o,i,s,t);return o}function Lr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function Vr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function Qr(e,t,n,r,i,s,o){let{dateEnv:a,options:l}=n,{displayEventTime:c,displayEventEnd:d}=l,u=e.eventRange.def,f=e.eventRange.instance;null==c&&(c=!1!==r),null==d&&(d=!1!==i);let h=f.range.start,p=f.range.end,g=s||e.start||e.eventRange.range.start,m=o||e.end||e.eventRange.range.end,v=_t(h).valueOf()===_t(g).valueOf(),b=_t(Et(p,-1)).valueOf()===_t(Et(m,-1)).valueOf();return c&&!u.allDay&&(v||b)?(g=v?h:g,m=b?p:m,d&&u.hasEnd?a.formatRange(g,m,t,{forcedStartTzo:s?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):a.format(g,t,{forcedTzo:s?null:f.forcedStartTzo})):""}function qr(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Zn(t,r.start)}}function Zr(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function Yr(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function $r(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:o}=t,{eventInteractive:a}=o;return null==a&&(a=n.interactive,null==a&&(a=Boolean(s.hasHandlers("eventClick")))),a?tt((e=>{s.trigger("eventClick",{el:e.target,event:new Ir(t,n,r),jsEvent:e,view:t.viewApi})})):{}}const Jr={start:dn,end:dn,allDay:Boolean};function Xr(e,t,n){return Object.assign(Object.assign({},Kr(e,t,n)),{timeZone:t.timeZone})}function Kr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}class ei extends Error{constructor(e,t){super(e),this.response=t}}let ti;function ni(){return null==ti&&(ti=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),ti}class ri extends Nn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{Rn((()=>{this.setState({forPrint:!0})}))},this.handleAfterPrint=()=>{Rn((()=>{this.setState({forPrint:!1})}))}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,s=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return ni()||s.push("fc-liquid-hack"),e.children(s,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class ii{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}const si={};class oi{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering((()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:i}=this.getCurrentData(),s=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(let e in r)s.push(e);for(t=0;t<s.length;t+=1)if(n=r[s[t]],n&&n.singleUnit===e)return n;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Xn(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=ut(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Xt(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Xt(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};let r=this.getCurrentData(),i=function(e,t,n){let r=function(e,t){let{refined:n,extra:r}=cn(e,Jr),i=n.start?t.createMarkerMeta(n.start):null,s=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return null==o&&(o=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:o},r)}(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}(n,r.dateEnv,ut({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),function(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},function(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));var r,i;return Object.assign(n,(r=e,i=t.dateEnv,Object.assign(Object.assign({},Kr(r.range,i,r.allDay)),{allDay:r.allDay}))),n}(e,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}(i,0,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))}addEvent(e,t){if(e instanceof Ir){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:ur({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n,r=this.getCurrentData();if(t instanceof Or)n=t.internalEventSource;else if("boolean"==typeof t)t&&([n]=mn(r.eventSources));else if(null!=t){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;n=e.internalEventSource}let i=or(e,n,r,!1);if(i){let e=new Ir(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:ur(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Nr(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let s=n[i];if(s.publicId===e){if(s.recurringDef)return new Ir(t,s,null);for(let e in r){let n=r[e];if(n.defId===s.defId)return new Ir(t,s,n)}}}return null}getEvents(){let e=this.getCurrentData();return Pr(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new Or(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new Or(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Or)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=wr(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new Or(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=ut(e);t&&this.trigger("_scrollRequest",{time:t})}}function ai(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}const li={defs:{},instances:{}};class ci{constructor(){this.getKeysForEventDefs=Bt(this._getKeysForEventDefs),this.splitDateSelection=Bt(this._splitDateSpan),this.splitEventStore=Bt(this._splitEventStore),this.splitIndividualUi=Bt(this._splitIndividualUi),this.splitEventDrag=Bt(this._splitInteraction),this.splitEventResize=Bt(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,n),s=this.splitEventStore(e.eventStore,n),o=this.splitEventDrag(e.eventDrag),a=this.splitEventResize(e.eventResize),l={};this.eventUiBuilders=pn(t,((e,t)=>this.eventUiBuilders[t]||Bt(di)));for(let n in t){let c=t[n],d=s[n]||li,u=this.eventUiBuilders[n];l[n]={businessHours:c.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:d,eventUiBases:u(e.eventUiBases[""],c.ui,i[n]),eventSelection:d.instances[e.eventSelection]?e.eventSelection:"",eventDrag:o[n]||null,eventResize:a[n]||null}}return l}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return pn(e.defs,(e=>this.getKeysForEventDef(e)))}_splitEventStore(e,t){let{defs:n,instances:r}=e,i={};for(let e in n)for(let r of t[e])i[r]||(i[r]={defs:{},instances:{}}),i[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])i[r]&&(i[r].instances[e]=n)}return i}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let i of t[r])n[i]||(n[i]={}),n[i][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),s=r=>{t[r]||(t[r]={affectedEvents:n[r]||li,mutatedEvents:i[r]||li,isEvent:e.isEvent})};for(let e in n)s(e);for(let e in i)s(e)}return t}}function di(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let i={"":br(r)};return n&&Object.assign(i,n),i}function ui(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Zn(r.activeRange,e)),isOther:Boolean(r&&!Zn(r.currentRange,e)),isToday:Boolean(t&&Zn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function fi(e,t){let n=["fc-day",`fc-day-${yt[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const hi=Xt({year:"numeric",month:"long",day:"numeric"}),pi=Xt({week:"long"});function gi(e,t,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:o}=e;let a=i.format(t,"week"===n?pi:hi);if(s.navLinks){let e=i.toDate(t);const l=e=>{let r="day"===n?s.navLinkDayClick:"week"===n?s.navLinkWeekClick:null;"function"==typeof r?r.call(o,i.toDate(t),e):("string"==typeof r&&(n=r),o.zoomTo(t,n))};return Object.assign({title:ot(s.navLinkHint,[a,e],a),"data-navlink":""},r?et(l):{onClick:l})}return{"aria-label":a}}let mi;class vi{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let t,{lefts:n,rights:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}topToIndex(e){let t,{tops:n,bottoms:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return bi(this.tops||[],e.tops||[])&&bi(this.bottoms||[],e.bottoms||[])&&bi(this.lefts||[],e.lefts||[])&&bi(this.rights||[],e.rights||[])}}function bi(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class yi extends Nn{constructor(){super(...arguments),this.uid=rt()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!qe(e,".fc-event-mirror")}isValidDateDownEl(e){return!(qe(e,".fc-event:not(.fc-bg-event)")||qe(e,".fc-more-link")||qe(e,"a[data-navlink]")||qe(e,".fc-popover"))}}class Ai{constructor(e=(e=>e.thickness||1)){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){const r=Object.assign(Object.assign({},t),{span:Ci(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(Di(r,t.level,t.levelCoord),Di(n,t.level,[e])):Di(n[t.level],t.lateral,e),this.stackCnts[Ei(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,s=t.length,o=0,a=-1,l=-1,c=null,d=0;for(let u=0;u<s;u+=1){const s=t[u];if(!r&&s>=o+this.getEntryThickness(e))break;let f,h=n[u],p=_i(h,e.span.start,wi),g=p[0]+p[1];for(;(f=h[g])&&f.span.start<e.span.end;){let e=s+this.getEntryThickness(f);e>o&&(o=e,c=f,a=u,l=g),e===o&&(d=Math.max(d,i[Ei(f)]+1)),g+=1}}let u=0;if(c)for(u=a+1;u<s&&t[u]<o;)u+=1;let f=-1;return u<s&&t[u]===o&&(f=_i(n[u],e.span.end,wi)[0]),{touchingLevel:a,touchingLateral:l,touchingEntry:c,stackCnt:d,levelCoord:o,level:u,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],s=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:s}))}return r}}function wi(e){return e.span.end}function Ei(e){return e.index+":"+e.span.start}function Ci(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function Di(e,t,n){e.splice(t,0,n)}function _i(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),o=n(e[s]);if(t<o)i=s;else{if(!(t>o))return[s,1];r=s+1}}return[r,0]}Boolean;const Si="fc-col-header-cell";function Ri(e){return e.text}class xi extends Nn{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:s,dateProfile:o}=i,a=ui(s,i.todayRange,null,o),l=[Si].concat(fi(a,n)),c=e.format(s,i.dayHeaderFormat),d=!a.isDisabled&&i.colCnt>1?gi(this.context,s):{},u=Object.assign(Object.assign(Object.assign({date:e.toDate(s),view:r},i.extraRenderProps),{text:c}),a);return k(Fn,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":a.isDisabled?void 0:Pt(s)},i.extraDataAttrs),renderProps:u,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>k("div",{className:"fc-scrollgrid-sync-inner"},!a.isDisabled&&k(e,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]}))))}}const ki=Xt({weekday:"long"});class Ti extends Nn{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,s=wt(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},a=t.format(s,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:s},o),{view:r}),e.extraRenderProps),{text:a});return k(Fn,{elTag:"th",elClasses:[Si,...fi(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(n=>k("div",{className:"fc-scrollgrid-sync-inner"},k(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(s,ki)}}))))}}class Mi extends H{constructor(e,t){super(e,t),this.initialNowDate=Xn(t.options.now,t.dateEnv),this.initialNowQueriedMs=(new Date).valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:t}=this,n=Et(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,ut(1,e.unit)),s=i.valueOf()-n.valueOf();return s=Math.min(864e5,s),{currentState:{nowDate:r,todayRange:Oi(r)},nextState:{nowDate:i,todayRange:Oi(i)},waitMs:s}}setTimeout(){let{nextState:e,waitMs:t}=this.computeTiming();this.timeoutId=setTimeout((()=>{this.setState(e,(()=>{this.setTimeout()}))}),t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function Oi(e){let t=_t(e);return{start:t,end:wt(t,1)}}Mi.contextType=Mn;class Ii extends Nn{constructor(){super(...arguments),this.createDayHeaderFormatter=Bt(Ni)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return k(Mi,{unit:"day"},((e,o)=>k("tr",{role:"row"},i&&i("day"),t.map((e=>r?k(xi,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:s}):k(Ti,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s}))))))}}function Ni(e,t,n){return e||function(e,t){return Xt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}class Pi{constructor(e,t){let n=e.start,{end:r}=e,i=[],s=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),s.push(n)),n=wt(n,1);this.dates=s,this.indices=i,this.cnt=s.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(wt(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(Ct(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}}class Hi{constructor(e,t){let n,r,i,{dates:s}=e;if(t){for(r=s[0].getUTCDay(),n=1;n<s.length&&s[n].getUTCDay()!==r;n+=1);i=Math.ceil(s.length/n)}else i=1,n=s.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,s=e;for(;s<=i;){let o=Math.floor(s/t),a=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:s%t,lastCol:(a-1)%t,isStart:n.isStart&&s===e,isEnd:n.isEnd&&a-1===i}),s=a}}return r}}class Bi{constructor(){this.sliceBusinessHours=Bt(this._sliceBusinessHours),this.sliceDateSelection=Bt(this._sliceDateSpan),this.sliceEventStore=Bt(this._sliceEventStore),this.sliceEventDrag=Bt(this._sliceInteraction),this.sliceEventResize=Bt(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:s}=e,o=this.sliceEventStore(e.eventStore,s,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,s,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,s,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,s,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:Et(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(tr(e,zi(t,Boolean(n)),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let s=Hr(e,t,zi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let s=Hr(e.mutatedEvents,t,zi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...s){if(!e)return[];let o=zi(t,Boolean(n)),a=qn(e.range,o);if(a){let t=function(e,t,n){let r=ar({editable:!1},n),i=cr(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:Ur(i,t),instance:er(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e=Object.assign(Object.assign({},e),{range:a}),r,i),n=this.sliceRange(e.range,...s);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:wt(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}}function zi(e,t){let n=e.activeRange;return t?n:{start:Et(n.start,e.slotMinTime.milliseconds),end:Et(n.end,e.slotMaxTime.milliseconds-864e5)}}const ji=/^(visible|hidden)$/;class Ui extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),k("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(ji.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(ji.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return ji.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return ji.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Fi{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,s=!1;null!==e?(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,s=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],i=!0)),this.masterCallback&&(i&&this.masterCallback(null,String(t)),s&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return function(e,t=0,n,r=1){let i=[];null==n&&(n=Object.keys(e).length);for(let s=t;s<n;s+=r){let t=e[s];void 0!==t&&i.push(t)}return i}(this.currentMap,e,t,n)}getAll(){return mn(this.currentMap)}}function Wi(e,t){return e.liquid&&t.liquid}function Gi(e,t){return bt(e,t,vn)}function Li(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(k("col",{style:{width:"shrink"===r.width?Vi(t):r.width||"",minWidth:r.minWidth||""}}))}return k("colgroup",{},...n)}function Vi(e){return null==e?4:e}function Qi(e,t){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function qi(e){return k("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Zi(e){let{stickyHeaderDates:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Yi(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}class $i extends Nn{constructor(){super(...arguments),this.processCols=Bt((e=>e),Gi),this.renderMicroColGroup=Bt(Li),this.scrollerRefs=new Fi,this.scrollerElRefs=new Fi(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),s=this.renderMicroColGroup(i,t.shrinkWidth),o=function(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let a,l=r.length,c=0,d=[],u=[],f=[];for(;c<l&&"header"===(a=r[c]).type;)d.push(this.renderSection(a,s,!0)),c+=1;for(;c<l&&"body"===(a=r[c]).type;)u.push(this.renderSection(a,s,!1)),c+=1;for(;c<l&&"footer"===(a=r[c]).type;)f.push(this.renderSection(a,s,!0)),c+=1;let h=!ni();const p={role:"rowgroup"};return k("table",{role:"grid",className:o.join(" "),style:{height:e.height}},Boolean(!h&&d.length)&&k("thead",p,...d),Boolean(!h&&u.length)&&k("tbody",p,...u),Boolean(!h&&f.length)&&k("tfoot",p,...f),h&&k("tbody",p,...d,...u,...f))}renderSection(e,t,n){return"outerContent"in e?k(M,{key:e.key},e.outerContent):k("tr",{key:e.key,role:"presentation",className:Qi(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if("outerContent"in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:s,scrollerClientWidths:o,scrollerClientHeights:a}=this.state,l=function(e,t){return null!=t.maxHeight||Wi(e,t)}(i,e),c=Wi(i,e),d=i.liquid?s?"scroll":l?"auto":"hidden":"visible",u=e.key,f=function(e,t,n,r){let{expandRows:i}=n;return"function"==typeof t.content?t.content(n):k("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,k(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:i.collapsibleWidth||void 0===o[u]?null:o[u],clientHeight:void 0!==a[u]?a[u]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return k(r?"th":"td",{ref:n.elRef,role:"presentation"},k("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},k(Ui,{ref:this.scrollerRefs.createRef(u),elRef:this.scrollerElRefs.createRef(u),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&Pn(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?function(e){let t=function(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let t=n[e].querySelectorAll(".fc-scrollgrid-shrink");for(let e=0;e<t.length;e+=1)r.push(t[e])}return r}(e),n=0;for(let e of t)n=Math.max(n,lt(e));return Math.ceil(n)}(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=(mi||(mi=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=function(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}(e);return document.body.removeChild(e),t}()),mi),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},s={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,a=n.currentMap[o];if(a){let t=a.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),s[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:s}}}$i.addStateEquality({scrollerClientWidths:vn,scrollerClientHeights:vn});class Ji extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&Br(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:s}=i,o={event:new Ir(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:s.textColor,backgroundColor:s.backgroundColor,borderColor:s.borderColor,isDraggable:!e.disableDragging&&Gr(r,t),isStartResizable:!e.disableResizing&&Lr(r,t),isEndResizable:!e.disableResizing&&Vr(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return k(Fn,Object.assign({},e,{elRef:this.handleEl,elClasses:[...Zr(o),...r.eventRange.ui.classNames,...e.elClasses||[]],renderProps:o,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Br(this.el,this.props.seg)}}class Xi extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,s=Qr(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:$r(r,t),defaultGenerator:Ki,timeText:s}),((e,t)=>k(M,null,k(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function Ki(e){return k("div",{className:"fc-event-main-frame"},e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title-container"},k("div",{className:"fc-event-title fc-sticky"},e.event.title||k(M,null," "))))}const es=e=>k(Mn.Consumer,null,(t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return k(Fn,Object.assign({},e,{elTag:e.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))})),ts=Xt({day:"numeric"});class ns extends Nn{constructor(){super(...arguments),this.refineRenderProps=zt(is)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return k(Fn,Object.assign({},e,{elClasses:[...fi(r,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Pt(e.date)}),renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount}))}}function rs(e){return Boolean(e.dayCellContent||Bn("dayCellContent",e))}function is(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,s=ui(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:ts):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},s),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}class ss extends Nn{render(){let{props:e}=this,{seg:t}=e;return k(Ji,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:os,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function os(e){let{title:t}=e.event;return t&&k("div",{className:"fc-event-title"},e.event.title)}function as(e){return k("div",{className:`fc-${e}`})}const ls=e=>k(Mn.Consumer,null,(t=>{let{dateEnv:n,options:r}=t,{date:i}=e,s=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,s),date:i};return k(Fn,Object.assign({},e,{renderProps:o,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:cs,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))}));function cs(e){return e.text}class ds extends Nn{constructor(){super(...arguments),this.state={titleId:Xe()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=function(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return function(e,t){var n=k(Re,{__v:e,i:t});return n.containerInfo=t,n}(k("div",Object.assign({},n.extraAttrs,{id:n.id,className:i.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),k("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},k("span",{className:"fc-popover-title",id:r.titleId},n.title),k("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),k("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=function(e){let t=function(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}(e),n=e.getBoundingClientRect();for(let e of t){let t=ai(n,e.getBoundingClientRect());if(!t)return null;n=t}return n}(t);if(i){let s=r.getBoundingClientRect(),o=n?qe(t,".fc-scrollgrid").getBoundingClientRect().top:i.top,a=e?i.right-s.width:i.left;o=Math.max(o,10),a=Math.min(a,document.documentElement.clientWidth-10-s.width),a=Math.max(a,10);let l=r.offsetParent.getBoundingClientRect();!function(e,t){for(let n in t)$e(e,n,t[n])}(r,{top:o-l.top,left:a-l.left})}}}class us extends yi{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:s}=n,o=t.format(r,e.dayPopoverFormat);return k(ns,{elRef:this.handleRootEl,date:r,dateProfile:s,todayRange:i},((t,r,i)=>k(ds,{elRef:i.ref,id:n.id,title:o,extraClassNames:["fc-more-popover"].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},rs(e)&&k(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children)))}queryHit(e,t,n,r){let{rootEl:i,props:s}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:s.dateProfile,dateSpan:Object.assign({allDay:!s.forceTimed,range:{start:s.startDate,end:s.endDate}},s.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}}class fs extends Nn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:Xe()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=ps(t).start;function s(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new Ir(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof r&&(r=r({date:i,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(s),hiddenSegs:t.hiddenSegs.map(s),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"==typeof r&&n.calendarApi.zoomTo(i,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return k(Mn.Consumer,null,(n=>{let{viewApi:r,options:i,calendarApi:s}=n,{moreLinkText:o}=i,{moreCnt:a}=e,l=ps(e),c="function"==typeof o?o.call(s,a):`+${a} ${o}`,d=ot(i.moreLinkHint,[a],c),u={num:a,shortText:`+${a}`,text:c,view:r};return k(M,null,Boolean(e.moreCnt)&&k(Fn,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),et(this.handleClick)),{title:d,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:u,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||hs,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&k(us,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=qe(this.linkEl,".fc-view-harness"))}}function hs(e){return e.text}function ps(e){if(e.allDayDate)return{start:e.allDayDate,end:wt(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:gs(t),end:(n=t,n.reduce(vs).eventRange.range.end)};var n}function gs(e){return e.reduce(ms).eventRange.range.start}function ms(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function vs(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}class bs{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class ys extends bs{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}const As=[],ws={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Es=Object.assign(Object.assign({},ws),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function Cs(e){let t=e.length>0?e[0].code:"en",n=As.concat(e),r={en:Es};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function Ds(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let e=r.length;e>0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||Es;return _s(e,n,r)}(e,t):_s(e.code,[e.code],e)}function _s(e,t,n){let r=fn([ws,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Ss(e){return{id:rt(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}class Rs extends Sn{}function xs(e,t,n,r){if(t[e])return t[e];let i=function(e,t,n,r){let i=n[e],s=r[e],o=e=>i&&null!==i[e]?i[e]:s&&null!==s[e]?s[e]:null,a=o("component"),l=o("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=xs(l,t,n,r)}return!a&&c&&(a=c.component),a?{type:e,component:a,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,r);return i&&(t[e]=i),i}function ks(e){return pn(e,Ts)}function Ts(e){let t="function"==typeof e?{component:e}:e,{component:n}=t;return t.content?n=Ms(t):!n||n.prototype instanceof Nn||(n=Ms(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function Ms(e){return t=>k(Mn.Consumer,null,(n=>k(Fn,{elTag:"div",elClasses:Ln(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function Os(e,t,n,r){let i=ks(e),s=ks(t.views),o=function(e,t){let n,r={};for(n in e)xs(n,r,e,t);for(n in t)xs(n,r,e,t);return r}(i,s);return pn(o,(e=>function(e,t,n,r,i){let s=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,a="",l="",c={};if(s&&(o=function(e){let t=JSON.stringify(e),n=Is[t];return void 0===n&&(n=ut(e),Is[t]=n),n}(s),o)){let e=vt(o);a=e.unit,1===e.value&&(l=a,c=t[a]?t[a].rawOptions:{})}let d=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},u=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:o,durationUnit:a,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(i)||e.defaults.buttonText||d(en)||e.type,buttonTitleOverride:u(r)||u(n)||e.overrides.buttonHint,buttonTitleDefault:u(i)||e.defaults.buttonHint||u(en)}}(e,s,t,n,r)))}Rs.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},Rs.prototype.baseIconClass="fc-icon",Rs.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},Rs.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},Rs.prototype.iconOverrideOption="buttonIcons",Rs.prototype.iconOverrideCustomButtonOption="icon",Rs.prototype.iconOverridePrefix="fc-icon-";let Is={};function Ns(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function Ps(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=Hs(i,n,r)),Object.assign(Object.assign({},e),i)}function Hs(e,t,n){return Bs(e,hn(e,(e=>function(e,t,n){return Us(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n))),t,!1,n)}function Bs(e,t,n,r,i){let s={};for(let o in e){let a=e[o];t[o]?s[o]=zs(a,n,r,i):s[o]=a}return s}function zs(e,t,n,r){let{options:i,calendarApi:s}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],a=rt();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},(n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(s,o,n.response)||o),e.success&&(o=e.success.call(s,o,n.response)||o),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:o})}),(n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:n})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:a})}function js(e,t){return hn(e,(e=>Us(e,t)))}function Us(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Fs(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Ws(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Gs(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ls(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Vs(e,t,n,r,i){return{header:e.headerToolbar?Qs(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?Qs(e.footerToolbar,e,t,n,r,i):null}}function Qs(e,t,n,r,i,s){let o={},a=[],l=!1;for(let c in e){let d=qs(e[c],t,n,r,i,s);o[c]=d.widgets,a.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:l}}function qs(e,t,n,r,i,s){let o="rtl"===t.direction,a=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},d=n.buttonHints||{},u=t.buttonHints||{},f=e?e.split(" "):[],h=[],p=!1;return{widgets:f.map((e=>e.split(",").map((e=>{if("title"===e)return p=!0,{buttonName:e};let n,f,g,m,v,b;if(n=a[e])g=e=>{n.click&&n.click.call(e.target,e,e.target)},(m=r.getCustomButtonIconClass(n))||(m=r.getIconClass(e,o))||(v=n.text),b=n.hint||n.text;else if(f=i[e]){h.push(e),g=()=>{s.changeView(e)},(v=f.buttonTextOverride)||(m=r.getIconClass(e,o))||(v=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;b=ot(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(s[e])if(g=()=>{s[e]()},(v=l[e])||(m=r.getIconClass(e,o))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";b=ot(d[t]||u[t],[c.year||"year","year"],c[e])}else b=t=>ot(d[e]||u[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:g,buttonIcon:m,buttonText:v,buttonHint:b}})))),viewsWithButtons:h,hasTitle:p}}class Zs{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}function Ys(e,t){let n=mn(t.getCurrentData().eventSources);if(1===n.length&&1===e.length&&Array.isArray(n[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}const $s=[Ss({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),Ss({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;!function(e,n,r){let i=!1,s=function(e){i||(i=!0,t({rawEvents:e}))},o=function(e){i||(i=!0,r(e))},a=e(s,o);a&&"function"==typeof a.then&&a.then(s,o)}(e.eventSource.meta.bind(null,Xr(e.range,r)),0,n)}}]}),Ss({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:dn,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,i=function(e,t,n){let r,i,s,o,{dateEnv:a,options:l}=n,c={};return r=e.startParam,null==r&&(r=l.startParam),i=e.endParam,null==i&&(i=l.endParam),s=e.timeZoneParam,null==s&&(s=l.timeZoneParam),o="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},Object.assign(c,o),c[r]=a.formatIso(t.start),c[i]=a.formatIso(t.end),"local"!==a.timeZone&&(c[s]=a.timeZone),c}(r,e.range,e.context);(function(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new ei("Failure parsing JSON",e)}));throw new ei("Request failed",e)}))})(r.method,r.url,i).then((([e,n])=>{t({rawEvents:e,response:n})}),n)}}]}),Ss({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let i,s={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null};return e.duration&&(i=e.duration),!i&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,i={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:i,typeData:s}}var n,r;return null},expand(e,t,n){let r=qn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){let i=e?gn(e):null,s=_t(n.start),o=n.end,a=[];for(;s<o;){let e;i&&!i[s.getUTCDay()]||(e=t?r.add(s,t):s,a.push(e)),s=wt(s,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:dn,startTime:ut,endTime:ut,duration:ut,startRecur:dn,endRecur:dn}}),Ss({name:"change-handler",optionChangeHandlers:{events(e,t){Ys([e],t)},eventSources:Ys}}),Ss({name:"misc",isLoadingFuncs:[e=>Ns(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},Xr(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Pr(e,t))}}})];class Js{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Ve(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function Xs(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Xt(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=Dt(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class Ks{constructor(e){this.computeCurrentViewData=Bt(this._computeCurrentViewData),this.organizeRawLocales=Bt(Cs),this.buildLocale=Bt(Ds),this.buildPluginHooks=function(){let e,t=[],n=[];return(r,i)=>(e&&bt(r,t)&&bt(i,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let l of e){const e=l.name,c=n[e];void 0===c?(n[e]=l.id,i(l.deps),a=l,r={premiumReleaseDate:(t=(o=r).premiumReleaseDate,s=a.premiumReleaseDate,void 0===t?s:void 0===s?t:new Date(Math.max(t.valueOf(),s.valueOf()))),reducers:o.reducers.concat(a.reducers),isLoadingFuncs:o.isLoadingFuncs.concat(a.isLoadingFuncs),contextInit:o.contextInit.concat(a.contextInit),eventRefiners:Object.assign(Object.assign({},o.eventRefiners),a.eventRefiners),eventDefMemberAdders:o.eventDefMemberAdders.concat(a.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},o.eventSourceRefiners),a.eventSourceRefiners),isDraggableTransformers:o.isDraggableTransformers.concat(a.isDraggableTransformers),eventDragMutationMassagers:o.eventDragMutationMassagers.concat(a.eventDragMutationMassagers),eventDefMutationAppliers:o.eventDefMutationAppliers.concat(a.eventDefMutationAppliers),dateSelectionTransformers:o.dateSelectionTransformers.concat(a.dateSelectionTransformers),datePointTransforms:o.datePointTransforms.concat(a.datePointTransforms),dateSpanTransforms:o.dateSpanTransforms.concat(a.dateSpanTransforms),views:Object.assign(Object.assign({},o.views),a.views),viewPropsTransformers:o.viewPropsTransformers.concat(a.viewPropsTransformers),isPropsValid:a.isPropsValid||o.isPropsValid,externalDefTransforms:o.externalDefTransforms.concat(a.externalDefTransforms),viewContainerAppends:o.viewContainerAppends.concat(a.viewContainerAppends),eventDropTransformers:o.eventDropTransformers.concat(a.eventDropTransformers),calendarInteractions:o.calendarInteractions.concat(a.calendarInteractions),componentInteractions:o.componentInteractions.concat(a.componentInteractions),themeClasses:Object.assign(Object.assign({},o.themeClasses),a.themeClasses),eventSourceDefs:o.eventSourceDefs.concat(a.eventSourceDefs),cmdFormatter:a.cmdFormatter||o.cmdFormatter,recurringTypes:o.recurringTypes.concat(a.recurringTypes),namedTimeZonedImpl:a.namedTimeZonedImpl||o.namedTimeZonedImpl,initialView:o.initialView||a.initialView,elementDraggingImpl:o.elementDraggingImpl||a.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},o.optionChangeHandlers),a.optionChangeHandlers),scrollGridImpl:a.scrollGridImpl||o.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},o.listenerRefiners),a.listenerRefiners),optionRefiners:Object.assign(Object.assign({},o.optionRefiners),a.optionRefiners),propSetHandlers:Object.assign(Object.assign({},o.propSetHandlers),a.propSetHandlers)}):c!==l.id&&console.warn(`Duplicate plugin '${e}'`)}var t,s,o,a}return e&&i(e),i(t),r}(r,i)),t=r,n=i,e)}(),this.buildDateEnv=Bt(eo),this.buildTheme=Bt(to),this.parseToolbars=Bt(Vs),this.buildViewSpecs=Bt(Os),this.buildDateProfileGenerator=zt(no),this.buildViewApi=Bt(ro),this.buildViewUiProps=zt(oo),this.buildEventUiBySource=Bt(io,vn),this.buildEventUiBases=Bt(so),this.parseContextBusinessHours=zt(lo),this.buildTitle=Bt(Xs),this.emitter=new Rr,this.actionRunner=new Js(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause();let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let s=function(e,t){let n=e.initialDate;return null!=n?t.createMarker(n):Xn(e.now,t)}(n.calendarOptions,n.dateEnv),o=i.dateProfileGenerator.build(s);Zn(o.activeRange,s)||(s=o.currentRange.start);let a={dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let e of n.pluginHooks.contextInit)e(a);let l=function(e,t,n){let r=t?t.activeRange:null;return Ps({},function(e,t){let n=Er(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=wr(e,t,n);r&&i.push(r)}return i}(e,n),r,n)}(n.calendarOptions,o,a),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:s,dateProfile:o,businessHours:this.parseContextBusinessHours(a),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},d=Object.assign(Object.assign({},a),c);for(let e of n.pluginHooks.reducers)Object.assign(c,e(null,null,d));ao(c,a)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=function(e,t){return"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType),e}(n.currentViewType,e),a=this.computeCurrentViewData(o,s,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(a.options);let l={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:d}=n;this.data&&this.data.dateProfileGenerator!==a.dateProfileGenerator&&(d=a.dateProfileGenerator.build(c)),c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),d=function(e,t,n,r){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(i=r.buildPrev(e,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(e,n),i.isValid)return i}return e}(d,e,c,a.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&Zn(d.currentRange,c)||(c=d.currentRange.start);let u=function(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Ps(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return s=e,o=t.sourceId,hn(s,(e=>e.sourceId!==o));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Hs(e,i,r):e;case"FETCH_EVENT_SOURCES":return Bs(e,t.sourceIds?gn(t.sourceIds):js(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var s,o}(n.eventSources,e,d,l),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,s){if(t&&n===t.latestFetchId){let n=dr(Cr(i,t,s),t,s);return r&&(n=tr(n,r,s)),fr(Sr(e,t.sourceId),n)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"RESET_RAW_EVENTS":return function(e,t,n,r,i){const{defIdMap:s,instanceIdMap:o}=function(e){const{defs:t,instances:n}=e,r={},i={};for(let e in t){const n=t[e],{publicId:i}=n;i&&(r[i]=e)}for(let e in n){const r=t[n[e].defId],{publicId:s}=r;s&&(i[s]=e)}return{defIdMap:r,instanceIdMap:i}}(e);return tr(dr(Cr(n,t,i),t,i,!1,s,o),r,i)}(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=tr(t,n,r)),fr(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return fr(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?tr(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){let{defs:n,instances:r}=e,i={},s={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(s[e]=r[e]);return{defs:i,instances:s}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Sr(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return hr(e,(e=>!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,u,d,l),h=Ns(u)&&!a.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:p,selectionConfig:g}=this.buildViewUiProps(l),m=this.buildEventUiBySource(u),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:c,dateProfile:d,eventSources:u,eventStore:f,renderableEventStore:h,selectionConfig:g,eventUiBases:this.buildEventUiBases(h.defs,p,m),businessHours:this.parseContextBusinessHours(l),dateSelection:Fs(n.dateSelection,e),eventSelection:Ws(n.eventSelection,e),eventDrag:Gs(n.eventDrag,e),eventResize:Ls(n.eventResize,e)},b=Object.assign(Object.assign({},l),v);for(let t of s.pluginHooks.reducers)Object.assign(v,t(n,e,b));let y=ao(n,l),A=ao(v,l);!y&&A?r.trigger("loading",!0):y&&!A&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),s=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,a=n&&n.calendarOptions,l=r.calendarOptions;if(a&&a!==l){a.timeZone!==l.timeZone&&(t.eventSources=s.eventSources=function(e,t,n){let r=t?t.activeRange:null;return Bs(e,js(e,n),r,!0,n)}(s.eventSources,t.dateProfile,s),t.eventStore=s.eventStore=_r(s.eventStore,n.dateEnv,s.dateEnv),t.renderableEventStore=s.renderableEventStore=_r(s.renderableEventStore,n.dateEnv,s.dateEnv));for(let e in o)-1===this.optionsForHandling.indexOf(e)&&a[e]===l[e]||o[e](l[e],s)}this.optionsForHandling=[],e.onData&&e.onData(s)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:s,availableLocaleData:o,extra:a}=this.processRawCalendarOptions(e,t);co(a);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,s),d=this.buildTheme(r,i),u=this.parseToolbars(r,this.stableOptionOverrides,d,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:l,viewSpecs:c,theme:d,toolbarConfig:u,localeDefaults:s,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=ln([en,e,t]),i=this.organizeRawLocales(n),s=i.map,o=this.buildLocale(r||i.defaultCode,s).options,a=this.buildPluginHooks(e.plugins||[],$s),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),a.listenerRefiners),a.optionRefiners),c={},d=ln([en,o,e,t]),u={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,p=!1;for(let e in d)-1===this.optionsForRefining.indexOf(e)&&(d[e]===f[e]||rn[e]&&e in f&&rn[e](f[e],d[e]))?u[e]=h[e]:l[e]?(u[e]=l[e](d[e]),p=!0):c[e]=f[e];return p&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:a,availableLocaleData:i,localeDefaults:o,extra:c}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:s,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return co(o),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let s=ln([en,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),an),t.listenerRefiners),t.optionRefiners),a={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,u={};for(let e in s)s[e]===l[e]||rn[e]&&rn[e](s[e],l[e])?a[e]=c[e]:(s[e]===this.currentCalendarOptionsInput[e]||rn[e]&&rn[e](s[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(a[e]=this.currentCalendarOptionsRefined[e]):o[e]?a[e]=o[e](s[e]):u[e]=s[e],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=a),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}}}function eo(e,t,n,r,i,s,o,a){let l=Ds(t||o.defaultCode,o.map);return new Dn({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:a})}function to(e,t){return new(t.themeClasses[e.themeSystem]||Rs)(e)}function no(e){return new(e.dateProfileGeneratorClass||Kn)(e)}function ro(e,t,n){return new Zs(e,t,n)}function io(e){return pn(e,(e=>e.ui))}function so(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function oo(e){let{options:t}=e;return{eventUiSingleBase:vr({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:vr({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ao(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function lo(e){return t=e.options.businessHours,n=e,dr(function(e){let t;return t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"==typeof e&&e?[e]:[],t=t.map((e=>Object.assign(Object.assign({},xr),e))),t}(t),null,n);var t,n}function co(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class uo extends Nn{render(){return k("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let s of e){let{buttonName:e,buttonClick:o,buttonText:a,buttonIcon:l,buttonHint:c}=s;if("title"===e)i=!1,r.push(k("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let i=e===t.activeButton,s=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,d=[`fc-${e}-button`,n.getClass("button")];i&&d.push(n.getClass("buttonActive")),r.push(k("button",{type:"button",title:"function"==typeof c?c(t.navUnit):c,disabled:s,"aria-pressed":i,className:d.join(" "),onClick:o},a||(l?k("span",{className:l,role:"img"}):"")))}}return r.length>1?k("div",{className:i&&n.getClass("buttonGroup")||""},...r):r[0]}}class fo extends Nn{render(){let e,t,{model:n,extraClassName:r}=this.props,i=!1,s=n.sectionWidgets,o=s.center;return s.left?(i=!0,e=s.left):e=s.start,s.right?(i=!0,t=s.right):t=s.end,k("div",{className:[r||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",o||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return k(uo,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class ho extends Nn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",s="";return n?null!==t.availableWidth?i=t.availableWidth/n:s=1/n*100+"%":i=e.height||"",k("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:s}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class po extends ii{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=zr(t);if(i&&n.isValidSegDownEl(e.target)){let s=qe(e.target,".fc-event-forced-url"),o=s?s.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new Ir(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=Ke(e.el,"click",".fc-event",this.handleSegClick)}}class go extends ii{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{zr(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let i;return Ke(e,"mouseover",".fc-event",((e,t)=>{if(t!==i){i=t,n(e,t);let s=e=>{i=null,r(e,t),t.removeEventListener("mouseleave",s)};t.addEventListener("mouseleave",s)}}))}(e.el,0,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,s=zr(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Ir(i,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:i.viewApi})}}class mo extends In{constructor(){super(...arguments),this.buildViewContext=Bt(On),this.buildViewPropTransformers=Bt(bo),this.buildToolbarProps=Bt(vo),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:Xe()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[po,go].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(n)));this.interactionsStore[e.uid]=r,si[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete si[e.uid]},this.resizeRunner=new Ve((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Xn(t.options.now,t.dateEnv),t.viewTitle),s=!1,o="";t.isHeightAuto||t.forPrint?o="":null!=r.height?s=!0:null!=r.contentHeight?o=r.contentHeight:e=Math.max(r.aspectRatio,.5);let a=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return k(Mn.Provider,{value:a},n.header&&k(fo,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},i)),k(ho,{liquid:s,height:o,aspectRatio:e,labeledById:l},this.renderView(t),this.buildAppendContent()),n.footer&&k(fo,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return k(M,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));return k(n.component,Object.assign({},r))}}function vo(e,t,n,r,i,s){let o=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:s,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!Zn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function bo(e){return e.map((e=>new e))}class yo extends oi{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;Rn((()=>{K(k(ri,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),k(Un.Provider,{value:this.customContentRenderId},k(mo,Object.assign({isHeightAuto:r,forPrint:i},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,K(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&We(e.getRootNode())}(e),this.el=e,this.renderRunner=new Ve(this.handleRenderRequest),new Ks({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){Rn((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!bt(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){$e(this.el,"height",e)}}const Ao=parseInt(String(h.version).split(".")[0])<18;class wo extends h.Component{constructor(){super(...arguments),this.elRef=(0,h.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const e=[];for(const t of this.state.customRenderingMap.values())e.push(h.createElement(Eo,{key:t.id,customRendering:t}));return h.createElement("div",{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;const e=new ys;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new yo(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),e.subscribe((e=>{const n=Date.now(),r=!t;(Ao||r||this.isUpdating||this.isUnmounting||n-t<100?Co:p.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=n,r?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}wo.act=Co;class Eo extends h.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,n="function"==typeof t?t(e.renderProps):t;return(0,p.createPortal)(n,e.containerEl)}}function Co(e){e()}class Do extends yi{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],s=Zi(r.options);return e&&i.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:r.viewSpec},k($i,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{props:s,context:o}=this,a=!s.forPrint&&Zi(o.options),l=!s.forPrint&&Yi(o.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:qi}]}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},k(i,{liquid:!s.isHeightAuto&&!s.forPrint,forPrint:s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}}function _o(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function So(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function Ro(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}const xo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function ko(e){let{display:t}=e.eventRange.ui;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}class To extends Nn{render(){let{props:e}=this;return k(Xi,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:xo,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class Mo extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=Qr(r,n.eventTimeFormat||xo,t,!0,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:$r(e.seg,t),defaultGenerator:Oo,timeText:i,isResizing:!1,isDateSelecting:!1}))}}function Oo(e){return k(M,null,k("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title"},e.event.title||k(M,null," ")))}class Io extends Nn{constructor(){super(...arguments),this.compileSegs=Bt(No)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return k(fs,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return k(M,null,t.map((t=>{let r=t.eventRange.instance.instanceId;return k("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:n[r]?"hidden":""}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))):k(To,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))))})))}})}}function No(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const Po=Xt({week:"narrow"});class Ho extends yi{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:Xe()},this.handleRootEl=e=>{Pn(this.rootElRef,e),Pn(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:s}=e,{date:o,dateProfile:a}=t;const l=t.showDayNumber&&function(e,t,n){const{start:r,end:i}=t,s=Et(i,-1),o=n.getYear(r),a=n.getMonth(r),l=n.getYear(s),c=n.getMonth(s);return!(o===l&&a===c)&&Boolean(e.valueOf()===r.valueOf()||1===n.getDay(e)&&e.valueOf()<i.valueOf())}(o,a.currentRange,s);return k(ns,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:Bo,date:o,dateProfile:a,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:l,extraRenderProps:t.extraRenderProps},((s,a)=>k("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&k(ls,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:gi(e,o,"week"),date:o,defaultFormat:Po}),!a.isDisabled&&(t.showDayNumber||rs(i)||t.forceDayTop)?k("div",{className:"fc-daygrid-day-top"},k(s,{elTag:"a",elClasses:["fc-daygrid-day-number",l&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},gi(e,o)),{id:n.dayNumberId})})):t.showDayNumber?k("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},k("a",{className:"fc-daygrid-day-number"}," ")):void 0,k("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,k("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},k(Io,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),k("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function Bo(e){return e.dayNumberText||k(M,null," ")}function zo(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function jo(e){return zo(e)+":"+e.lastCol}function Uo(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,s=i.range,o=qn(s,{start:r[t].date,end:wt(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===s.end.valueOf()})}class Fo extends Ai{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[Ei(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){const{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:s,touchingLevel:o,touchingLateral:a}=e;if(this.hiddenConsumes&&s){const e=Ei(s);if(!i[e])if(this.allowReslicing){const e=Object.assign(Object.assign({},s),{span:Ci(s.span,t.span)});i[Ei(e)]=!0,r[o][a]=e,n.push(e),this.splitEntry(s,t,n)}else i[e]=!0,n.push(s)}super.handleInvalidInsertion(e,t,n)}}class Wo extends yi{constructor(){super(...arguments),this.cellElRefs=new Fi,this.frameElRefs=new Fi,this.fgElRefs=new Fi,this.segHarnessRefs=new Fi,this.rootElRef={current:null},this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,s=So(e.businessHourSegs,i),o=So(e.bgEventSegs,i),a=So(this.getHighlightSegs(),i),l=So(this.getMirrorSegs(),i),{singleColPlacements:c,multiColPlacements:d,moreCnts:u,moreMarginTops:f}=function(e,t,n,r,i,s,o){let a=new Fo((t=>{let n=e[t.index].eventRange.instance.instanceId+":"+t.span.start+":"+(t.span.end-1);return i[n]||1}));a.allowReslicing=!0,a.strictOrder=r,!0===t||!0===n?(a.maxCoord=s,a.hiddenConsumes=!0):"number"==typeof t?a.maxStackCnt=t:"number"==typeof n&&(a.maxStackCnt=n,a.hiddenConsumes=!0);let l=[],c=[];for(let t=0;t<e.length;t+=1){let n=e[t],r=jo(n);null!=i[r]?l.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}}):c.push(n)}let d=a.addSegs(l),u=a.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:p}=function(e,t,n){let r=function(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}(e,n.length),i=[],s=[],o=[];for(let e=0;e<n.length;e+=1){let a=r[e],l=[],c=0,d=0;for(let r of a){let i=t[r.index];l.push({seg:Uo(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-c}),c=r.levelCoord+r.thickness}let u=[];c=0,d=0;for(let r of a){let i=t[r.index],s=r.span.end-r.span.start>1,o=r.span.start===e;d+=r.levelCoord-c,c=r.levelCoord+r.thickness,s?(d+=r.thickness,o&&u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:d}),d=0)}i.push(l),s.push(u),o.push(d)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:o}}(u,e,o),g=[],m=[];for(let e of c){h[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)f[t].push({seg:Uo(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)g.push(0);for(let t of d){let n=e[t.index],r=t.span;h[r.start].push({seg:Uo(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)g[e]+=1,f[e].push({seg:Uo(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(p[e]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:g,moreMarginTops:m}}(Fr(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),h=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return k("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?c[n]:d[n],e.todayRange,h),i=this.renderFgSegs(n,function(e,t){if(!e.length)return[];let n=function(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0})))}(l[n],d),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return k(Ho,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===n,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:u[n],moreMarginTop:f[n],singlePlacements:c[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:k(M,null,k(M,null,r),k(M,null,i)),bgContent:k(M,null,this.renderFillSegs(a[n],"highlight"),this.renderFillSegs(s[n],"non-business"),this.renderFillSegs(o[n],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!vn(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,s,o){let{context:a}=this,{eventSelection:l}=this.props,{framePositions:c}=this.state,d=1===this.props.cells.length,u=i||s||o,f=[];if(c)for(let e of t){let{seg:t}=e,{instanceId:h}=t.eventRange.instance,p=e.isVisible&&!r[h],g=e.isAbsolute,m="",v="";g&&(a.isRtl?(v=0,m=c.lefts[t.lastCol]-c.lefts[t.firstCol]):(m=0,v=c.rights[t.firstCol]-c.rights[t.lastCol])),f.push(k("div",{className:"fc-daygrid-event-harness"+(g?" fc-daygrid-event-harness-abs":""),key:zo(t),ref:u?null:this.segHarnessRefs.createRef(jo(t)),style:{visibility:p?"":"hidden",marginTop:g?"":e.marginTop,top:g?e.absoluteTop:"",left:m,right:v}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:i,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n))):k(To,Object.assign({seg:t,isDragging:i,isResizing:s,isDateSelecting:o,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,s=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};s.push(k("div",{key:Yr(o.eventRange),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?k(ss,Object.assign({seg:o},qr(o,r))):as(t)))}return k(M,{},...s)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>r.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,r=new vi(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new vi(t,e,!0,!1)})}}const i=this.state.segHeights,s=this.querySegHeights(),o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({segHeights:Object.assign(Object.assign({},i),s),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}Wo.addStateEquality({segHeights:vn});class Go extends yi{constructor(){super(...arguments),this.splitBusinessHourSegs=Bt(_o),this.splitBgEventSegs=Bt(_o),this.splitFgEventSegs=Bt(_o),this.splitDateSelectionSegs=Bt(_o),this.splitEventDrag=Bt(Ro),this.splitEventResize=Bt(Ro),this.rowRefs=new Fi}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),s=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),a=this.splitEventDrag(e.eventDrag,n),l=this.splitEventResize(e.eventResize,n),c=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return k(Mi,{unit:"day"},((t,d)=>k(M,null,e.cells.map(((t,u)=>k(Wo,{ref:this.rowRefs.createRef(u),key:t.length?t[0].date.toISOString():u,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:d,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[u],eventSelection:e.eventSelection,bgEventSegs:i[u].filter(Lo),fgEventSegs:s[u],dateSelectionSegs:o[u],eventDrag:a[u],eventResize:l[u],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new vi(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new vi(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),s=r.topToIndex(t);if(null!=s&&null!=i){let e=this.props.cells[s][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(s,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(s,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[s],bottom:r.bottoms[s]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:wt(n,1)}}}function Lo(e){return e.eventRange.def.allDay}class Vo extends yi{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=!0===n||!0===t;i&&!r&&(i=!1,t=null,n=null);let s=["fc-daygrid-body",i?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",r?"":"fc-daygrid-body-natural"];return k("div",{ref:this.elRef,className:s.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:""}},e.colGroupNode,k("tbody",{role:"presentation"},k(Go,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let n;var r;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${r=t.currentDate,r.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`)),n||(n=e.querySelector(`[data-date="${Pt(t.currentDate)}"]`)),n}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}}class Qo extends Bi{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class qo extends yi{constructor(){super(...arguments),this.slicer=new Qo,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return k(Vo,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}function Zo(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,/year|month|week/.test(e.currentRangeUnit))}Fe(':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}');var Yo=Ss({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends Do{constructor(){super(...arguments),this.buildDayTableModel=Bt(Zo),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&k(Ii,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:1===r.rowCnt}),s=t=>k(qo,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,s,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,s)}},dateProfileGeneratorClass:class extends Kn{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return function(e){let t,{dateEnv:n,currentRange:r}=e,{start:i,end:s}=r;if(e.snapToWeek&&(i=n.startOfWeek(i),t=n.startOfWeek(s),t.valueOf()!==s.valueOf()&&(s=At(t,1))),e.fixedWeekCount){let e=n.startOfWeek(n.startOfMonth(wt(r.end,-1)));s=At(s,6-Math.ceil(Ct(e,s)/7))}return{start:i,end:s}}({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class $o extends ci{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t}}const Jo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Xo(e){let t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return k(Mn.Consumer,null,(n=>{if(!e.isLabeled)return k("td",{className:t.join(" "),"data-time":e.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,o=null==i.slotLabelFormat?Jo:Array.isArray(i.slotLabelFormat)?Xt(i.slotLabelFormat[0]):Xt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:s,text:r.format(e.date,o)};return k(Fn,{elTag:"td",elClasses:t,elAttrs:{"data-time":e.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:Ko,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(e=>k("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},k(e,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]}))))}))}function Ko(e){return e.text}class ea extends Nn{render(){return this.props.slatMetas.map((e=>k("tr",{key:e.key},k(Xo,Object.assign({},e)))))}}const ta=Xt({week:"short"});class na extends yi{constructor(){super(...arguments),this.allDaySplitter=new $o,this.headerElRef={current:null},this.rootElRef={current:null},this.scrollerElRef={current:null},this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:n}=this.context,{dateProfile:r}=this.props,i=r.renderRange,s=1===Ct(i.start,i.end)?gi(this.context,i.start,"week"):{};return n.weekNumbers&&"day"===e?k(ls,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:i.start,defaultFormat:ta},(e=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},k(e,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:s})))):k("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},k("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:n}=this.context,r={text:t.allDayText,view:n};return k(Fn,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:r,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:ra,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},(t=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",null==e?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},k(t,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]}))))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,n){let{context:r,props:i}=this,s=[],o=Zi(r.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(s.push({type:"body",key:"all-day",chunk:{content:t}}),s.push({type:"body",key:"all-day-divider",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),s.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:r.viewSpec},k($i,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:s}))}renderHScrollLayout(e,t,n,r,i,s,o){let a=this.context.pluginHooks.scrollGridImpl;if(!a)throw new Error("No ScrollGrid implementation");let{context:l,props:c}=this,d=!c.forPrint&&Zi(l.options),u=!c.forPrint&&Yi(l.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderHeadAxis("day",e.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderTableRowAxis(e.rowSyncHeights[0]))},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{colSpan:2,className:"fc-timegrid-divider "+l.theme.getClass("tableCellShaded")}))}));let h=l.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(l.options.expandRows),chunks:[{key:"axis",content:e=>k("div",{className:"fc-timegrid-axis-chunk"},k("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,k("tbody",null,k(ea,{slatMetas:s}))),k("div",{className:"fc-timegrid-now-indicator-container"},k(Mi,{unit:h?"minute":"day"},(e=>{let t=h&&o&&o.safeComputeTop(e);return"number"==typeof t?k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:t},isAxis:!0,date:e}):null}))))},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),u&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:qi},{key:"cols",content:qi}]}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:l.viewSpec},k(a,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return!0!==e&&!0!==t||(e=void 0,t=5),{dayMaxEvents:e,dayMaxEventRows:t}}}function ra(e){return e.text}class ia{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(Zn(t.currentRange,e)){let n=_t(e),r=e.valueOf()-n.valueOf();if(r>=gt(t.slotMinTime)&&r<gt(t.slotMaxTime))return this.computeTimeTop(ut(r))}return null}computeDateTop(e,t){return t||(t=_t(e)),this.computeTimeTop(ut(e.valueOf()-t.valueOf()))}computeTimeTop(e){let t,n,{positions:r,dateProfile:i}=this,s=r.els.length,o=(e.milliseconds-gt(i.slotMinTime))/gt(this.slotDuration);return o=Math.max(0,o),o=Math.min(s,o),t=Math.floor(o),t=Math.min(t,s-1),n=o-t,r.tops[t]+r.getHeight(t)*n}}class sa extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{slatElRefs:r}=e;return k("tbody",null,e.slatMetas.map(((i,s)=>{let o={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi};return k("tr",{key:i.key,ref:r.createRef(i.key)},e.axis&&k(Xo,Object.assign({},i)),k(Fn,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!i.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":i.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))})))}}class oa extends Nn{constructor(){super(...arguments),this.rootElRef={current:null},this.slatElRefs=new Fi}render(){let{props:e,context:t}=this;return k("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},k("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,k(sa,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;var n;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new ia(new vi(this.rootElRef.current,(n=this.slatElRefs.currentMap,t.slatMetas.map((e=>n[e.key]))),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function aa(e,t){let n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function la(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.col].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}class ca extends Nn{render(){let{props:e}=this;return k(fs,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>ya(e.hiddenSegs,e),defaultGenerator:da,forceTimed:!0},(e=>k(e,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]})))}}function da(e){return e.shortText}function ua(e,t){if(!e)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=e,s=r,o=[];for(;s<i;)o.push(t(n,s)),s+=1;return o.sort(fa),[o.map(ha),o[0][1]]}function fa(e,t){return t[1]-e[1]}function ha(e){return e[0]}function pa(e,t){const n={};return(...r)=>{let i=e(...r);return i in n?n[i]:n[i]=t(...r)}}function ga(e,t,n=null,r=0){let i=[];if(n)for(let s=0;s<e.length;s+=1){let o=e[s],a=n.computeDateTop(o.start,t),l=Math.max(a+(r||0),n.computeDateTop(o.end,t));i.push({start:Math.round(a),end:Math.round(l)})}return i}const ma=Xt({hour:"numeric",minute:"2-digit",meridiem:!1});class va extends Nn{render(){return k(Xi,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ma}))}}class ba extends Nn{constructor(){super(...arguments),this.sortEventSegs=Bt(Fr)}render(){let{props:e,context:t}=this,{options:n}=t,r=n.selectMirror,i=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||r&&e.dateSelectionSegs||[],s=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return k(ns,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},(t=>k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,s,!1,!1,!1)),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(i,{},Boolean(e.eventDrag),Boolean(e.eventResize),Boolean(r),"mirror")),k("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),rs(n)&&k(t,{elTag:"div",elClasses:["fc-timegrid-col-misc"]}))))}renderFgSegs(e,t,n,r,i,s){let{props:o}=this;return o.forPrint?ya(e,o):this.renderPositionedFgSegs(e,t,n,r,i,s)}renderPositionedFgSegs(e,t,n,r,i,s){let{eventMaxStack:o,eventShortHeight:a,eventOrderStrict:l,eventMinHeight:c}=this.context.options,{date:d,slatCoords:u,eventSelection:f,todayRange:h,nowDate:p}=this.props,g=n||r||i,m=ga(e,d,u,c),{segPlacements:v,hiddenGroups:b}=function(e,t,n,r){let i=[],s=[];for(let n=0;n<e.length;n+=1){let r=t[n];r?i.push({index:n,thickness:1,span:r}):s.push(e[n])}let{segRects:o,hiddenGroups:a}=function(e,t,n){let r=new Ai;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);let i=function(e){let t=[];for(let i of e){let e=[],s={span:i.span,entries:[i]};for(let i of t)Ci(i.span,s.span)?s={entries:i.entries.concat(s.entries),span:(n=i.span,r=s.span,{start:Math.min(n.start,r.start),end:Math.max(n.end,r.end)})}:e.push(i);e.push(s),t=e}var n,r;return t}(r.addSegs(e)),s=function(e){const{entriesByLevel:t}=e,n=pa(((e,t)=>e+":"+t),((r,i)=>{let s=function(e,t,n){let{levelCoords:r,entriesByLevel:i}=e,s=i[t][n],o=r[t]+s.thickness,a=r.length,l=t;for(;l<a&&r[l]<o;l+=1);for(;l<a;l+=1){let e,t=i[l],n=_i(t,s.span.start,wi),r=n[0]+n[1],o=r;for(;(e=t[o])&&e.span.start<s.span.end;)o+=1;if(r<o)return{level:l,lateralStart:r,lateralEnd:o}}return null}(e,r,i),o=ua(s,n),a=t[r][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]}));return ua(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}(r);return s=function(e,t){const n=pa(((e,t,n)=>Ei(e)),((e,t,r)=>{let i,{nextLevelNodes:s,thickness:o}=e,a=o+r,l=o/a,c=[];if(s.length)for(let e of s)if(void 0===i){let r=n(e,t,a);i=r[0],c.push(r[1])}else{let t=n(e,i,0);c.push(t[1])}else i=1;let d=(i-t)*l;return[i-d,Object.assign(Object.assign({},e),{thickness:d,nextLevelNodes:c})]}));return e.map((e=>n(e,0,0)[1]))}(s),{segRects:function(e){let t=[];const n=pa(((e,t,n)=>Ei(e)),((e,n,i)=>{let s=Object.assign(Object.assign({},e),{levelCoord:n,stackDepth:i,stackForward:0});return t.push(s),s.stackForward=r(e.nextLevelNodes,n+e.thickness,i+1)+1}));function r(e,t,r){let i=0;for(let s of e)i=Math.max(n(s,t,r),i);return i}return r(e,0,0),t}(s),hiddenGroups:i}}(i,n,r),l=[];for(let t of o)l.push({seg:e[t.index],rect:t});for(let e of s)l.push({seg:e,rect:null});return{segPlacements:l,hiddenGroups:a}}(e,m,l,o);return k(M,null,this.renderHiddenGroups(b,e),v.map((e=>{let{seg:o,rect:l}=e,c=o.eventRange.instance.instanceId,d=g||Boolean(!t[c]&&l),u=Aa(l&&l.span),m=!g&&l?this.computeSegHStyle(l):{left:0,right:0},v=Boolean(l)&&l.stackForward>0,b=Boolean(l)&&l.span.end-l.span.start<a;return k("div",{className:"fc-timegrid-event-harness"+(v?" fc-timegrid-event-harness-inset":""),key:s||c,style:Object.assign(Object.assign({visibility:d?"":"hidden"},u),m)},k(va,Object.assign({seg:o,isDragging:n,isResizing:r,isDateSelecting:i,isSelected:c===f,isShort:b},qr(o,h,p))))})))}renderHiddenGroups(e,t){let{extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l}=this.props;return k(M,null,e.map((e=>{let c=Aa(e.span),d=(u=e.entries,f=t,u.map((e=>f[e.index])));var u,f;return k(ca,{key:Nt(gs(d)),hiddenSegs:d,top:c.top,bottom:c.bottom,extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l})})))}renderFillSegs(e,t){let{props:n,context:r}=this,i=ga(e,n.date,n.slatCoords,r.options.eventMinHeight).map(((r,i)=>{let s=e[i];return k("div",{key:Yr(s.eventRange),className:"fc-timegrid-bg-harness",style:Aa(r)},"bg-event"===t?k(ss,Object.assign({seg:s},qr(s,n.todayRange,n.nowDate))):as(t))}));return k(M,null,i)}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map(((e,r)=>k(es,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(e.start,n)},isAxis:!1,date:n}))):null}computeSegHStyle(e){let t,n,{isRtl:r,options:i}=this.context,s=i.slotEventOverlap,o=e.levelCoord,a=e.levelCoord+e.thickness;s&&(a=Math.min(1,o+2*(a-o))),r?(t=1-a,n=o):(t=o,n=1-a);let l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return s&&!e.stackForward&&(l[r?"marginLeft":"marginRight"]=20),l}}function ya(e,{todayRange:t,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let o=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return k(M,null,e.map((e=>{let i=e.eventRange.instance.instanceId;return k("div",{key:i,style:{visibility:o[i]?"hidden":""}},k(va,Object.assign({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===r,isShort:!1},qr(e,t,n))))})))}function Aa(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}class wa extends Nn{constructor(){super(...arguments),this.splitFgEventSegs=Bt(aa),this.splitBgEventSegs=Bt(aa),this.splitBusinessHourSegs=Bt(aa),this.splitNowIndicatorSegs=Bt(aa),this.splitDateSelectionSegs=Bt(aa),this.splitEventDrag=Bt(la),this.splitEventResize=Bt(la),this.rootElRef={current:null},this.cellElRefs=new Fi}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),r=e.cells.length,i=this.splitFgEventSegs(e.fgEventSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitBusinessHourSegs(e.businessHourSegs,r),a=this.splitNowIndicatorSegs(e.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(e.dateSelectionSegs,r),c=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r);return k("div",{className:"fc-timegrid-cols",ref:this.rootElRef},k("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,k("tbody",{role:"presentation"},k("tr",{role:"row"},e.axis&&k("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map(((t,n)=>k(ba,{key:t.key,elRef:this.cellElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,fgEventSegs:i[n],bgEventSegs:s[n],businessHourSegs:o[n],nowIndicatorSegs:a[n],dateSelectionSegs:l[n],eventDrag:c[n],eventResize:d[n],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint})))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;var t;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new vi(this.rootElRef.current,(t=this.cellElRefs.currentMap,e.cells.map((e=>t[e.key]))),!0,!1))}}class Ea extends yi{constructor(){super(...arguments),this.processSlotOptions=Bt(Ca),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:n}=this.state;if(t&&n){if(e.time){let r=n.computeTimeTop(e.time);r=Math.ceil(r),r&&(r+=1),t(r)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return k("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k(oa,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),k(wa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:n,options:r}=this.context,{colCoords:i}=this,{dateProfile:s}=this.props,{slatCoords:o}=this.state,{snapDuration:a,snapsPerSlot:l}=this.processSlotOptions(this.props.slotDuration,r.snapDuration),c=i.leftToIndex(e),d=o.positions.topToIndex(t);if(null!=c&&null!=d){let e=this.props.cells[c],r=o.positions.tops[d],u=o.positions.getHeight(d),f=(t-r)/u,h=d*l+Math.floor(f*l),p=this.props.cells[c].date,g=ht(s.slotMinTime,function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}(a,h)),m=n.add(p,g),v=n.add(m,a);return{dateProfile:s,dateSpan:Object.assign({range:{start:m,end:v},allDay:!1},e.extraDateSpan),dayEl:i.els[c],rect:{left:i.lefts[c],right:i.rights[c],top:r,bottom:r+u},layer:0}}return null}}function Ca(e,t){let n=t||e,r=mt(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}class Da extends Bi{sliceRange(e,t){let n=[];for(let r=0;r<t.length;r+=1){let i=qn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n}}class _a extends yi{constructor(){super(...arguments),this.buildDayRanges=Bt(Sa),this.slicer=new Da,this.timeColsRef={current:null}}render(){let{props:e,context:t}=this,{dateProfile:n,dayTableModel:r}=e,{nowIndicator:i,nextDayThreshold:s}=t.options,o=this.buildDayRanges(r,n,t.dateEnv);return k(Mi,{unit:i?"minute":"day"},((a,l)=>k(Ea,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:r.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:a,nowIndicatorSegs:i&&this.slicer.sliceNowDate(a,n,s,t,o),todayRange:l,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords}))))}}function Sa(e,t,n){let r=[];for(let i of e.headerDates)r.push({start:n.add(i,t.slotMinTime),end:n.add(i,t.slotMaxTime)});return r}const Ra=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function xa(e,t,n,r,i){let s=new Date(0),o=e,a=ut(0),l=n||function(e){let t,n,r;for(t=Ra.length-1;t>=0;t-=1)if(n=ut(Ra[t]),r=mt(n,e),null!==r&&r>1)return n;return e}(r),c=[];for(;gt(o)<gt(t);){let e=i.add(s,o),t=null!==mt(a,l);c.push({date:e,time:o,key:e.toISOString(),isoTimeStr:(d=e,st(d.getUTCHours(),2)+":"+st(d.getUTCMinutes(),2)+":"+st(d.getUTCSeconds(),2)),isLabeled:t}),o=ht(o,r),a=ht(a,r)}var d;return c}function ka(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,!1)}Fe('.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}');var Ta=Ss({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:class extends na{constructor(){super(...arguments),this.buildTimeColsModel=Bt(ka),this.buildSlatMetas=Bt(xa)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:r}=this,{dateProfile:i}=r,s=this.buildTimeColsModel(i,n),o=this.allDaySplitter.splitProps(r),a=this.buildSlatMetas(i.slotMinTime,i.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:l}=e,c=!l,d=l,u=e.dayHeaders&&k(Ii,{dates:s.headerDates,dateProfile:i,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=!1!==e.allDaySlot&&(t=>k(qo,Object.assign({},o.allDay,{dateProfile:i,dayTableModel:s,nextDayThreshold:e.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:r.forPrint},this.getAllDayMaxEventProps()))),h=t=>k(_a,Object.assign({},o.timed,{dayTableModel:s,dateProfile:i,axis:c,slotDuration:e.slotDuration,slatMetas:a,forPrint:r.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(u,f,h,s.colCnt,l,a,this.state.slatCoords):this.renderSimpleLayout(u,f,h)}},usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class Ma extends Nn{constructor(){super(...arguments),this.state={textId:Xe()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:r}=this.context,{cellId:i,dayDate:s,todayRange:o}=this.props,{textId:a}=this.state,l=ui(s,o),c=n.listDayFormat?t.format(s,n.listDayFormat):"",d=n.listDaySideFormat?t.format(s,n.listDaySideFormat):"",u=Object.assign({date:t.toDate(s),view:r,textId:a,text:c,sideText:d,navLinkAttrs:gi(this.context,s),sideNavLinkAttrs:gi(this.context,s,"day",!1)},l);return k(Fn,{elTag:"tr",elClasses:["fc-list-day",...fi(l,e)],elAttrs:{"data-date":Pt(s)},renderProps:u,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:Oa,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(t=>k("th",{scope:"colgroup",colSpan:3,id:i,"aria-labelledby":a},k(t,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]}))))}}function Oa(e){return k(M,null,e.text&&k("a",Object.assign({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&k("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}const Ia=Xt({hour:"numeric",minute:"2-digit",meridiem:"short"});class Na extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r,timeHeaderId:i,eventHeaderId:s,dateHeaderId:o}=e,a=n.eventTimeFormat||Ia;return k(Ji,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",r.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>function(e,t){let n=$r(e,t);return k("a",Object.assign({},n),e.eventRange.def.title)}(r,t),seg:r,timeText:"",disableDragging:!0,disableResizing:!0}),((e,n)=>k(M,null,function(e,t,n,r,i){let{options:s}=n;if(!1!==s.displayEventTime){let o,a=e.eventRange.def,l=e.eventRange.instance,c=!1;if(a.allDay?c=!0:function(e){let t=$n(e);return Ct(t.start,t.end)>1}(e.eventRange.range)?e.isStart?o=Qr(e,t,n,null,null,l.range.start,e.end):e.isEnd?o=Qr(e,t,n,null,null,e.start,l.range.end):c=!0:o=Qr(e,t,n),c){let e={text:n.options.allDayText,view:n.viewApi};return k(Fn,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:e,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:Pa,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return k("td",{className:"fc-list-event-time"},o)}return null}(r,a,t,i,o),k("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},k("span",{className:"fc-list-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}})),k(e,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${s} ${o}`}}))))}}function Pa(e){return e.text}function Ha(e){return e.text}function Ba(e){let t=_t(e.renderRange.start),n=e.renderRange.end,r=[],i=[];for(;t<n;)r.push(t),i.push({start:t,end:wt(t,1)}),t=wt(t,1);return{dayDates:r,dayRanges:i}}function za(e){return!1===e?null:Xt(e)}Fe(':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}');var ja=Ss({name:"@fullcalendar/list",optionRefiners:{listDayFormat:za,listDaySideFormat:za,noEventsClassNames:dn,noEventsContent:dn,noEventsDidMount:dn,noEventsWillUnmount:dn},views:{list:{component:class extends yi{constructor(){super(...arguments),this.computeDateVars=Bt(Ba),this.eventStoreToSegs=Bt(this._eventStoreToSegs),this.state={timeHeaderId:Xe(),eventHeaderId:Xe(),dateHeaderIdRoot:Xe()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:r}=this.computeDateVars(e.dateProfile),i=this.eventStoreToSegs(e.eventStore,e.eventUiBases,r);return k(Gn,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),!1!==t.options.stickyHeaderDates?"fc-list-sticky":""],viewSpec:t.viewSpec},k(Ui,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},i.length>0?this.renderSegList(i,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,n={text:e.noEventsText,view:t};return k(Fn,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:Ha,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},(e=>k(e,{elTag:"div",elClasses:["fc-list-empty-cushion"]})))}renderSegList(e,t){let{theme:n,options:r}=this.context,{timeHeaderId:i,eventHeaderId:s,dateHeaderIdRoot:o}=this.state,a=function(e){let t,n,r=[];for(t=0;t<e.length;t+=1)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return k(Mi,{unit:"day"},((e,l)=>{let c=[];for(let n=0;n<a.length;n+=1){let d=a[n];if(d){let a=Pt(t[n]),u=o+"-"+a;c.push(k(Ma,{key:a,cellId:u,dayDate:t[n],todayRange:l})),d=Fr(d,r.eventOrder);for(let t of d)c.push(k(Na,Object.assign({key:a+":"+t.eventRange.instance.instanceId,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:i,eventHeaderId:s,dateHeaderId:u},qr(t,l,e))))}}return k("table",{className:"fc-list-table "+n.getClass("table")},k("thead",null,k("tr",null,k("th",{scope:"col",id:i},r.timeHint),k("th",{scope:"col","aria-hidden":!0}),k("th",{scope:"col",id:s},r.eventHint))),k("tbody",null,c))}))}_eventStoreToSegs(e,t,n){return this.eventRangesToSegs(Hr(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(e,t){let n=[];for(let r of e)n.push(...this.eventRangeToSegs(r,t));return n}eventRangeToSegs(e,t){let n,r,i,{dateEnv:s}=this.context,{nextDayThreshold:o}=this.context.options,a=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n+=1)if(r=qn(a,t[n]),r&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},c.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<s.add(t[n+1].start,o))){i.end=a.end,i.isEnd=!0;break}return c}},buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});function Ua(e){let{attributes:t,events:n}=e;const r=(0,i.useRef)(null),s="dayGridMonth",[o,a]=(0,i.useState)(""),[l,c]=(0,i.useState)([]),[f,h]=(0,i.useState)(!1),[p,g]=(0,i.useState)(1);(0,i.useEffect)((()=>{if(r.current){const e=t.view||s;r.current.getApi().changeView(e),a(r.current.getApi().view.title)}}),[t.view,t.wraptitles]),(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("piecal/v1/views_array",{duration:t.duration}),method:"GET"}).then((e=>{let t=["eventDataTransform","dateClick","eventClick","eventDidMount","dayCellDidMount","viewDidMount","viewWillUnmount","dayHeaderContent","dayHeaderDidMount"];for(let n in e){let r=e[n];for(let e in r)if(t.includes(e)){let t=r[e],n=new Function("info",t);r[e]=n}delete r.customProps}c(e),h(!0)}))}),[t.duration]);const m=()=>{r.current&&a(r.current.getApi().view.title)};return f?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"piecal-controls fc"},(0,i.createElement)("div",{className:"piecal-controls__view-title","aria-live":"polite",role:"status"},(0,i.createElement)("span",{className:"visually-hidden"},`${o} - current view is ${r.current?.getApi().view.type}`),(0,i.createElement)("span",{"aria-hidden":"true"},o)),(0,i.createElement)("label",{className:"piecal-controls__view-chooser"},"Choose View",(0,i.createElement)("select",{value:r.current?.getApi().view.type,onChange:e=>r.current?.getApi().changeView(e.target.value),disabled:!0},(0,i.createElement)("option",{value:"dayGridMonth"},"View Chooser"))),(0,i.createElement)("div",{className:"piecal-controls__navigation-button-group"},(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__today-button",onClick:()=>{r.current?.getApi().today(),m()}},"Today"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__prev-button",onClick:()=>{r.current?.getApi().prev(),m()},"aria-label":`Previous ${r.current?.getApi().view.type}`},"<"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__next-button",onClick:()=>{r.current?.getApi().next(),m()},"aria-label":`Next ${r.current?.getApi().view.type}`},">"))),(0,i.createElement)("style",{"data-fullcalendar":!0}),(0,i.createElement)("div",{className:"piecal-blockeditor-container",style:{width:"100%"},"data-view":t.view},(0,i.createElement)(wo,{ref:r,plugins:[Yo,Ta,ja],initialView:t.view||s,editable:!1,views:f?l:[],events:n,contentHeight:"auto",locale:t.locale,headerToolbar:!1,validRange:t.hidepastevents?{start:new Date}:void 0}))):(0,i.createElement)("div",null,"Loading calendar...")}const Fa=JSON.parse('{"u2":"piecal/calendar"}');(0,r.registerBlockType)(Fa.u2,{edit:function(e){var t;let{attributes:n,setAttributes:r}=e;const[c,h]=(0,i.useState)([]),[p,g]=(0,i.useState)([]),[m,v]=(0,i.useState)([]),[b,y]=(0,i.useState)([]),[A,w]=(0,i.useState)([]);let E="piecal-wrapper";n.wraptitles&&(E+=" piecal-wrap-event-titles"),"true"===n.widget&&(E+=" piecal-wrapper--widget"),"responsive"===n.widget&&(E+=" piecal-wrapper--responsive-widget"),n.theme&&(E+=" piecal-theme-"+n.theme);const{records:C,hasResolved:D}=(0,l.useEntityRecords)("root","postType",{per_page:-1,visibility:"public",viewable:!0});return(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("/piecal/v1/events",{allAttributes:n}),method:"GET"}).then((e=>{const t=e.map((e=>{var t;return e.rset=JSON.parse(null!==(t=e.rset)&&void 0!==t?t:"{}"),e}));g(t)}))}),[n]),(0,i.useEffect)((()=>{D&&(h(C.filter((e=>e.viewable))),piecalGbVars?.explicitAllowedPostTypes?.length>0?v(C.filter((e=>e.viewable)).filter((e=>piecalGbVars.explicitAllowedPostTypes.includes(e.slug))).map((e=>e.name))):v(C.filter((e=>e.viewable)).map((e=>e.name))))}),[D]),(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("piecal/v1/views"),method:"GET"}).then((e=>{y(e)}))}),[]),(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("piecal/v1/views_array"),method:"GET"}).then((e=>{w(e)}))}),[]),(0,i.createElement)("div",(0,o.useBlockProps)({className:E}),(0,i.createElement)(o.InspectorControls,null,(0,i.createElement)(a.PanelBody,{title:(0,s.__)("Calendar Settings","piecal"),initialOpen:!0},c.length>0&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.FormTokenField,{label:(0,s.__)("Post Types","piecal"),value:n.type?n.type.map((e=>{const t=c.find((t=>t.slug===e));return t?t.name:e})):[],suggestions:m,__experimentalValidateInput:e=>m.includes(e),onChange:e=>{const t=e.map((e=>{const t=c.find((t=>t.name===e));return t?t.slug:e}));r({type:t})},help:(0,s.__)("Select post types to display in the calendar.","piecal")})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("View","piecal"),value:n.view,help:(0,s.__)("Choose the default calendar view that visitors will see when the page loads.","piecal"),options:b,onChange:e=>r({view:e})})),A[n.view]&&A[n.view].duration&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.TextControl,{label:(0,s.__)("Duration","piecal"),value:null!==(t=n.duration)&&void 0!==t?t:1,help:(0,s.__)("Choose the number of months the calendar view should span, starting from beginning of current month. Minimum of 1, maximum of 24.","piecal"),min:1,onChange:e=>{var t;parseInt(e)<1||""==e?r({duration:1}):parseInt(e)>24?r({duration:24}):r({duration:null!==(t=parseInt(e))&&void 0!==t?t:1})},type:"number"})),(""===n.view||"dayGridMonth"===n.view)&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Widget","piecal"),value:n.widget,help:(0,s.__)("Enable widget mode for a more compact calendar suitable for sidebars. 'Responsive' switches to widget mode on mobile only.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("True","piecal"),value:"true"},{label:(0,s.__)("Responsive","piecal"),value:"responsive"}],onChange:e=>r({widget:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Theme","piecal"),value:n.theme,help:(0,s.__)("Choose between light, dark, or adaptive theme. Adaptive will match your visitor's system preferences.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("Dark","piecal"),value:"dark"},{label:(0,s.__)("Adaptive","piecal"),value:"adaptive"}],onChange:e=>r({theme:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Wrap Titles","piecal"),checked:n.wraptitles,help:(0,s.__)("When enabled, event titles will wrap to multiple lines instead of being truncated with an ellipsis.","piecal"),onChange:e=>r({wraptitles:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Locale","piecal"),value:n.locale,help:(0,s.__)("Use a locale code to change the language of the calendar. For example, 'en-US' for English (United States).","piecal"),options:f,onChange:e=>r({locale:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Hide Timezone","piecal"),checked:n.hidetimezone,help:(0,s.__)("Tick this box to hide the event timezone from the calendar footer.","piecal"),onChange:e=>r({hidetimezone:e})})))),(0,i.createElement)(o.InspectorAdvancedControls,null,(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Disable Automatic End Dates","piecal"),checked:n.automaticenddates,help:(0,s.__)("By default, events with no end date will automatically end 1 hour after their start time. Disable to show events with no end date.","piecal"),onChange:e=>r({automaticenddates:e})}))),(0,i.createElement)(Ua,{attributes:n,events:p}))}})}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=(t,n,i,s)=>{if(!n){var o=1/0;for(d=0;d<e.length;d++){for(var[n,i,s]=e[d],a=!0,l=0;l<n.length;l++)(!1&s||o>=s)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,i,s]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={904:0,832:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,s,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(l)var d=l(r)}for(t&&t(n);c<o.length;c++)s=o[c],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return r.O(d)},n=globalThis.webpackChunkpiecalendar=globalThis.webpackChunkpiecalendar||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=r.O(void 0,[832],(()=>r(561)));i=r.O(i)})();
  • pie-calendar/tags/1.2.9/build/blocks/calendar/render.php

    r3312639 r3351250  
    1818    'automaticenddates' => $attributes['automaticenddates'],
    1919    'featuredimage'     => $attributes['featuredimage'] ? 'true' : 'false',
     20    'duration'          => $attributes['duration'] ?? 1,
    2021    'hidepastevents'    => $attributes['hidepastevents'] ? 'true' : 'false',
    2122);
  • pie-calendar/tags/1.2.9/css/piecal.css

    r3236286 r3351250  
    5656.piecal-controls.fc .piecal-controls__view-chooser {
    5757    max-width: calc(50% - 8px);
     58}
     59
     60.piecal-controls.fc .piecal-controls__view-chooser select {
     61    border-radius: 0.25em;
     62    padding: 0.5em;
     63    padding-right: 2em;
     64    appearance: none;
     65    -webkit-appearance: none;
     66    -moz-appearance: none;
     67    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%22800px%22%20height%3D%22800px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.29289%208.29289C4.68342%207.90237%205.31658%207.90237%205.70711%208.29289L12%2014.5858L18.2929%208.29289C18.6834%207.90237%2019.3166%207.90237%2019.7071%208.29289C20.0976%208.68342%2020.0976%209.31658%2019.7071%209.70711L12.7071%2016.7071C12.3166%2017.0976%2011.6834%2017.0976%2011.2929%2016.7071L4.29289%209.70711C3.90237%209.31658%203.90237%208.68342%204.29289%208.29289Z%22%20fill%3D%22%23000000%22%2F%3E%0A%3C%2Fsvg%3E");
     68    background-size: 1em;
     69    background-repeat: no-repeat;
     70    background-position: 97% center;
    5871}
    5972
  • pie-calendar/tags/1.2.9/includes/block.php

    r3312639 r3351250  
    1717    $block_path = PIECAL_DIR . 'build/blocks/event-info/block.json';
    1818    register_block_type( $block_path );
     19
     20    wp_register_style( 'piecal-block-inline-styles', false );
    1921}
    2022add_action( 'init', 'piecal_register_block_type' );
    21 
    22 
    2323
    2424/**
     
    5757
    5858/**
    59  * Register the REST endpoint.
     59 * Register the REST endpoints.
    6060 *
    6161 * @return void
    6262 */
    63 function piecal_register_rest_endpoint() {
     63function piecal_register_rest_endpoints() {
    6464    register_rest_route(
    6565        'piecal/v1',
     
    7373        )
    7474    );
    75 }
    76 add_action( 'rest_api_init', 'piecal_register_rest_endpoint' );
     75
     76    register_rest_route(
     77        'piecal/v1',
     78        '/views',
     79        array(
     80            'methods'             => 'GET',
     81            'callback'            => 'piecal_get_views',
     82            'permission_callback' => function () {
     83                return current_user_can( 'edit_posts' );
     84            },
     85        )
     86    );
     87
     88    register_rest_route(
     89        'piecal/v1',
     90        '/views_array',
     91        array(
     92            'methods'             => 'GET',
     93            'callback'            => 'piecal_get_views_array',
     94            'permission_callback' => function () {
     95                return current_user_can( 'edit_posts' );
     96            },
     97        )
     98    );
     99}
     100add_action( 'rest_api_init', 'piecal_register_rest_endpoints' );
    77101
    78102
     
    137161                'start'  => get_post_meta( $event->ID, '_piecal_start_date', true ),
    138162                'end'    => get_post_meta( $event->ID, '_piecal_end_date', true ),
    139                 'allDay' => get_post_meta(get_the_ID(), '_piecal_is_allday') ? get_post_meta(get_the_ID(), '_piecal_is_allday', true) : "false"
     163                'allDay' => get_post_meta(get_the_ID(), '_piecal_is_allday') ? get_post_meta(get_the_ID(), '_piecal_is_allday', true) : "false",
     164                "details" => str_replace("&amp;", "&", htmlentities(get_the_excerpt(), ENT_QUOTES) ),
     165                "permalink" => get_permalink(),
    140166            );
    141167
     
    153179    return rest_ensure_response( $events );
    154180}
     181
     182function piecal_get_views( $request ) {
     183    require_once PIECAL_DIR . '/includes/utils/Views.php';
     184
     185    $customViews = [
     186        "listUpcoming" => [
     187            "type" => "listMonth",
     188            "duration" => [
     189                "months" => isset( $atts['duration'] ) ? intval( $atts['duration'] ) : 2
     190            ],
     191            "customProps" => [
     192                /* Translators: String for Upcoming view in view picker dropdown. */
     193                "niceName" => __( 'List - Upcoming', 'piecal' )
     194            ]
     195        ]
     196    ];
     197
     198    $customViews = apply_filters( 'piecal_custom_views', $customViews, [] );
     199   
     200    $allowedViews = ['dayGridMonth', 'listMonth', 'timeGridWeek', 'listWeek', 'dayGridWeek', 'listDay'];
     201    $allowedViews = apply_filters('piecal_allowed_views', $allowedViews);
     202   
     203    $viewLabels = [
     204        /* Translators: String for Month - Classic view in view picker dropdown. */
     205        "dayGridMonth" => __( 'Month - Classic', 'piecal' ),
     206        /* Translators: String for Month - List view in view picker dropdown. */
     207        "listMonth" => __( 'Month - List', 'piecal' ),
     208        /* Translators: String for Week - Time Grid view in view picker dropdown. */
     209        "timeGridWeek" => __( 'Week - Time Grid', 'piecal' ),
     210        /* Translators: String for Week - List view in view picker dropdown. */
     211        "listWeek" => __( 'Week - List', 'piecal' ),
     212        /* Translators: String for Week - Day Grid view in view picker dropdown. */
     213        "dayGridWeek" => __( 'Week - Classic', 'piecal' ),
     214        /* Translators: String for Day - List view in view picker dropdown. */
     215        "listDay" => __( 'Day - List', 'piecal' )
     216    ];
     217    $viewLabels = apply_filters('piecal_view_labels', $viewLabels);
     218
     219    $reformattedViewLabels = [];
     220
     221    foreach ($viewLabels as $view => $label) {
     222        $reformattedViewLabels[] = [
     223            'label' => $label,
     224            'value' => $view
     225        ];
     226    }
     227
     228    array_unshift($reformattedViewLabels, [
     229        'label' => __("Default", "piecal"),
     230        'value' => ""
     231    ]);
     232
     233    return rest_ensure_response( $reformattedViewLabels );
     234}
     235
     236function piecal_get_views_array() {
     237    $customViews = [
     238        "listUpcoming" => [
     239            "type" => "listMonth",
     240            "duration" => [
     241                "months" => isset( $_GET['duration'] ) ? intval( $_GET['duration'] ) : 2
     242            ],
     243            "customProps" => [
     244                /* Translators: String for Upcoming view in view picker dropdown. */
     245                "niceName" => __( 'List - Upcoming', 'piecal' )
     246            ]
     247        ]
     248    ];
     249
     250    $atts['duration'] = isset( $_GET['duration'] ) ? intval( $_GET['duration'] ) : 2;
     251    $atts['duration'] = $atts['duration'] > 24 ? 24 : $atts['duration'];
     252    $atts['duration'] = $atts['duration'] < 1 ? 1 : $atts['duration'];
     253
     254    $atts['duration'] = apply_filters( 'piecal_override_view_duration', $atts['duration'] );
     255
     256    $customViews = apply_filters( 'piecal_custom_views', $customViews, $atts );
     257
     258    return rest_ensure_response( $customViews );
     259}
  • pie-calendar/tags/1.2.9/includes/shortcode.php

    r3283614 r3351250  
    22
    33require_once PIECAL_DIR . '/includes/utils/Scripts.php';
     4require_once PIECAL_DIR . '/includes/utils/Views.php';
    45
    56add_shortcode( 'piecal', 'piecal_render_calendar' );
     
    910    function piecal_render_calendar( $atts ) {
    1011        do_action( 'piecal_render_calendar', $atts );
     12        do_action( 'piecal_inline_styles' );
    1113
    1214        Piecal\Utils\Scripts::loadCoreScriptsAndStyles();
     
    137139        }
    138140
    139         $eventsArray = apply_filters('piecal_events_array_filter', $eventsArray, $rangeStart = null, $rangeEnd = null, $appendOffset);
    140 
    141         remove_filter('excerpt_more', 'piecal_replace_read_more', 99);
    142 
    143         $allowedViews = ['dayGridMonth', 'listMonth', 'timeGridWeek', 'listWeek', 'dayGridWeek', 'listDay'];
    144         $initialView = $atts['view'] ?? 'dayGridMonth';
    145        
    146         if( !in_array($initialView, $allowedViews) ) {
    147             $initialView = 'dayGridMonth';
    148         }
     141    $eventsArray = apply_filters('piecal_events_array_filter', $eventsArray, $rangeStart = null, $rangeEnd = null, $appendOffset);
     142
     143    remove_filter('excerpt_more', 'piecal_replace_read_more', 99);
     144
     145    $duration = isset( $atts['duration'] ) ? intval( $atts['duration'] ) : 2;
     146    $duration = $duration > 24 ? 24 : $duration;
     147    $duration = $duration < 1 ? 1 : $duration;
     148
     149    $atts['duration'] = apply_filters( 'piecal_override_view_duration', $duration );
     150   
     151    $allowedViews = ['dayGridMonth', 'listMonth', 'timeGridWeek', 'listWeek', 'dayGridWeek', 'listDay'];
     152    $allowedViews = apply_filters('piecal_allowed_views', $allowedViews);
     153   
     154    $viewLabels = [
     155        /* Translators: String for Month - Classic view in view picker dropdown. */
     156        "dayGridMonth" => __( 'Month - Classic', 'piecal' ),
     157        /* Translators: String for Month - List view in view picker dropdown. */
     158        "listMonth" => __( 'Month - List', 'piecal' ),
     159        /* Translators: String for Week - Time Grid view in view picker dropdown. */
     160        "timeGridWeek" => __( 'Week - Time Grid', 'piecal' ),
     161        /* Translators: String for Week - List view in view picker dropdown. */
     162        "listWeek" => __( 'Week - List', 'piecal' ),
     163        /* Translators: String for Week - Day Grid view in view picker dropdown. */
     164        "dayGridWeek" => __( 'Week - Day Grid', 'piecal' ),
     165        /* Translators: String for Day - List view in view picker dropdown. */
     166        "listDay" => __( 'Day - List', 'piecal' )
     167    ];
     168    $viewLabels = apply_filters('piecal_view_labels', $viewLabels);
     169
     170    $initialView = $atts['view'] ?? 'dayGridMonth';
     171   
     172    if( !in_array($initialView, $allowedViews) ) {
     173        $initialView = 'dayGridMonth';
     174    }
    149175
    150176    do_action('piecal_before_core_frontend_scripts');
     
    166192
    167193    $wrapperClass = 'piecal-wrapper';
    168     $wrapperViewAttribute = 'dayGridMonth';
     194    $wrapperViewAttribute = $atts['view'] ?? 'dayGridMonth';
    169195
    170196    if( isset( $atts['wraptitles'] ) ) {
     
    172198    }
    173199
    174     if( isset( $atts['theme'] ) ) {
    175         $wrapperClass .= ' piecal-theme-' . $atts['theme'];
     200    $allowedThemes = ['dark',  'adaptive'];
     201
     202    if( isset( $atts['theme'] ) && in_array( $atts['theme'], $allowedThemes ) ) {
     203        $wrapperClass .= ' piecal-theme-' . esc_attr( $atts['theme'] );
    176204    }
    177205
     
    190218    $customCalendarProps = apply_filters('piecal_calendar_object_properties', $customCalendarProps, $eventsArray, $appendOffset, $atts);
    191219
     220    $views = Piecal\Utils\Views::addCustomViews( [] );
     221   
    192222    ob_start();
     223
    193224    ?>
    194225    <script>
     
    199230
    200231            let alreadyExpandedOccurrences = [];
     232
     233            function piecalPrepareCustomViewsForCalendar( views ) {
     234                let supportedEventHandlers = [
     235                    'eventDataTransform',
     236                    'dateClick',
     237                    'eventClick',
     238                    'eventDidMount',
     239                    'dayCellDidMount',
     240                    'viewDidMount',
     241                    'viewWillUnmount',
     242                    'dayHeaderContent',
     243                    'dayHeaderDidMount'
     244                ];
     245
     246                for( let view in views ) {
     247                    let viewProps = views[view];
     248
     249                    for( let prop in viewProps ) {
     250                        if( supportedEventHandlers.includes( prop ) ) {
     251                            let eventHandlerCode = viewProps[prop];
     252
     253                            let handlerFunction = new Function( 'info', eventHandlerCode );
     254
     255                            viewProps[prop] = handlerFunction;
     256                        }
     257                    }
     258
     259                    // Remove customProps since we don't want those output inside the calendar object
     260                    delete viewProps.customProps;
     261
     262                    // Add in the $atts['duration'] value if the view has a duration property.
     263                    if( viewProps.duration ) {
     264                        viewProps.duration = {
     265                            months: <?php echo intval($duration); ?>
     266                        };
     267                    }
     268                }
     269
     270                return views;
     271            }
    201272           
    202273            document.addEventListener('DOMContentLoaded', function() {
     
    213284                    eventTimeFormat: <?php echo json_encode($localeDateStringFormat); ?>,
    214285                    dayHeaderFormat: { weekday: 'long' },
     286                    views: piecalPrepareCustomViewsForCalendar(<?php echo json_encode($views); ?>),
    215287                    eventClick: function( info ) {
    216                         Alpine.store("calendarEngine").eventTitle = info.event._def.title;
    217                         Alpine.store("calendarEngine").eventStart = info.event.start;
    218                         Alpine.store("calendarEngine").eventEnd = info.event.end;
    219                         Alpine.store("calendarEngine").eventDetails = info.event._def.extendedProps.details;
    220                         Alpine.store("calendarEngine").eventUrl = info.event._def.extendedProps.permalink;
    221                         Alpine.store("calendarEngine").eventAllDay = info.event.allDay;
    222                         Alpine.store("calendarEngine").eventType = info.event._def.extendedProps.postType;
    223                         Alpine.store('calendarEngine').showPopover = true;
    224                         Alpine.store('calendarEngine').eventActualEnd = info.event._def.extendedProps.actualEnd;
    225                         Alpine.store('calendarEngine').appendOffset = "<?php echo $appendOffset; ?>";
    226 
    227                         // Always pass through event data via the URL if it's a recurring instance, or if adaptive timezones are enabled.
    228                         // Do not pass through event data via the URL if it's a non-recurring instance and adaptive timezones are disabled.
    229                         if( info.event._def.extendedProps.isRecurringInstance || ( !info.event._def.extendedProps.isRecurringInstance && piecalVars.useAdaptiveTimezones && Alpine.store('calendarEngine').appendOffset ) ) {
    230                             // Construct the URL with parameters
    231                             const baseUrl    = info.event._def.extendedProps.permalink;
    232                             const eventStart = new Date( info.event.start );
    233                             const eventEnd   = new Date( info.event.end );
    234                             const viewerTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
    235 
    236 
    237                             const url        = new URL( baseUrl );
    238                             url.searchParams.append( 'eventstart', Math.floor( eventStart.getTime() / 1000 ) );
    239                             url.searchParams.append( 'eventend', Math.floor( eventEnd.getTime() / 1000 ) );
    240                             url.searchParams.append( 'timezone', viewerTimezone );
    241 
    242                             // Assign the constructed URL to the store
    243                             Alpine.store("calendarEngine").eventUrl = url.toString();
    244                         }
     288                        info = piecalJS.eventClick( info, {
     289                            appendOffset: <?php echo $appendOffset ? 'true' : 'false'; ?>
     290                        } );
    245291
    246292                        <?php do_action( 'piecal_additional_event_click_js' ); ?>
    247 
    248                         if( info.jsEvent.type == "keydown" ) {
    249                             setTimeout( () => {
    250                                 document.querySelector('.piecal-popover__inner > button').focus();
    251                             }, 100);
    252                         }
    253293                    },
    254294                    eventDataTransform: function(event) { 
    255                         // Safely decode encoded HTML entities for output as titles
    256                         let scrubber = document.createElement('textarea');
    257                         scrubber.innerHTML = event.title;
    258                         event.title = scrubber.value;
    259 
    260                         // Extend end date for all day events that span multiple days
    261                         let { actualEnd, end } = piecalUtils.getAlldayMultidayEventEnd( event ) ?? {};
    262 
    263                         if( actualEnd && end ) {   
    264                             event.actualEnd = actualEnd;
    265                             event.end = end;
    266                         }
     295                        event = piecalJS.eventDataTransform( event );
    267296
    268297                        <?php do_action( 'piecal_additional_event_data_transform_js' ); ?>
     
    271300                    },
    272301                    dateClick: function( info ) {
    273                         if( info.jsEvent.target.tagName != 'A' ) return;
    274 
    275                         this.gotoDate(info.dateStr);
    276                         piecalChangeView('listDay');
    277                        
     302                        info = piecalJS.dateClick( info );
    278303
    279304                        <?php do_action( 'piecal_additional_date_click_js' ); ?>
    280305                    },
    281306                    eventDidMount: function( info ) {
    282                         let link = info.el;
    283 
    284                         const locale = info.view.dateEnv.locale.codeArg;
    285 
    286                         const formattedTime = new Intl.DateTimeFormat(locale, {
    287                             hour: 'numeric',
    288                             minute: 'numeric',
    289                             hour12: true
    290                         });
    291 
    292                         const formattedDate = new Intl.DateTimeFormat(locale, {
    293                             day: 'numeric',
    294                             month: 'numeric',
    295                             year: 'numeric'
    296                         });
    297 
    298                         if( link.tagName == 'TR' ) {
    299                             link = info.el.querySelector('a');
    300                         }
    301 
    302                         if( !link || link.tagName != "A" ) return;
    303 
    304                         link.setAttribute('role', 'button');
    305                         link.setAttribute('href', 'javascript:void(0)');
    306 
    307                         if( info.event.allDay ) {
    308                             /* Translators: Text for all-day event description. */
    309                             const allDayDescriptionText = <?php _e("'All-day event'", 'piecal'); ?>;
    310 
    311                             link.setAttribute('aria-label', `${allDayDescriptionText} - ${info.event.title}`);
    312                         }
    313 
    314                         // Handle multi-day event aria label to let screen readers know the event spans multiple days
    315                         if( info.event.end && (info.event.end - info.event.start) > (24 * 60 * 60 * 1000) ) {
    316                            
    317                             const startDate = formattedDate.format(info.event.start);
    318                             const startTime = info.event.allDay ? '' : formattedTime.format(info.event.start);
    319 
    320                             const endDate = formattedDate.format(info.event.end);
    321                             const endTime = info.event.allDay ? '' :formattedTime.format(info.event.end);
    322 
    323                             /* Translators: Text describing span of multi-day event. */
    324                             const spanText = <?php _e("'to'", 'piecal'); ?>;
    325 
    326                             /* Translators: Text for multi-day event description. */
    327                             const multiDayDescriptionText = <?php _e("'Multi-day event running from'", 'piecal'); ?>;
    328 
    329                             /* Translators: Text for multi-day all-day event description. */
    330                             const multiDayAllDayDescriptionText = <?php _e("'Multi-day, all-day event running from'", 'piecal'); ?>;
    331 
    332                             const descriptionText = info.event.allDay ? multiDayAllDayDescriptionText : multiDayDescriptionText;
    333 
    334                             /* Translators: Text describing span of multi-day event. */
    335                             link.setAttribute('aria-label', `${descriptionText} ${startDate} ${startTime} ${spanText} ${endDate} ${endTime} - ${info.event.title}`);
    336                         }
     307                        info = piecalJS.eventDidMount( info );
    337308
    338309                        <?php do_action( 'piecal_additional_event_did_mount_js' ); ?>
    339310                    },
    340311                    dayCellDidMount: function( info ) {
    341                         let dayLink = info.el.querySelector('.fc-daygrid-day-top a');
    342 
    343                         if( !dayLink ) return;
    344 
    345                         dayLink.setAttribute('role', 'button');
    346                         dayLink.setAttribute('href', 'javascript:void(0)');
    347 
    348                         // Prevent double read out of button label
    349                         dayLink.closest('td').removeAttribute('aria-labelledby');
    350                        
    351                         setTimeout( () => {
    352                             if( info.el.querySelector('.fc-daygrid-day-events .fc-daygrid-event-harness') ) {
    353                                 dayLink.setAttribute('aria-label', dayLink.getAttribute('aria-label') + ', has events.');
    354                             }
    355                         }, 100);
    356 
    357                         dayLink.addEventListener('keydown', (event) => {
    358                             if( event.key == "Enter" || event.key == ' ' ) {
    359                                 event.preventDefault();
    360                                 window.calendar.gotoDate(info.date);
    361                                 piecalChangeView('listDay');
    362 
    363                                 setTimeout( () => {
    364                                     let focusTarget = document.querySelector('.fc-list-day-text');
    365                                     focusTarget?.setAttribute('tabindex', '0');
    366                                     focusTarget?.focus();
    367                                 }, 100);
    368                             }
    369                         })
     312                        info = piecalJS.dayCellDidMount( info );
    370313
    371314                        <?php do_action( 'piecal_additional_day_cell_did_mount_js' ); ?>
    372315                    },
    373316                    dayHeaderContent: function( info ) {
    374                         let overriddenDayHeaderViews = ['dayGridMonth', 'timeGridWeek', 'dayGridWeek'];
    375 
    376                         if( overriddenDayHeaderViews.includes(info.view.type) ) {
    377                             return '';
    378                         }
     317                        info = piecalJS.dayHeaderContent( info );
    379318
    380319                        <?php do_action( 'piecal_additional_day_header_content_js' ); ?>
     
    383322                    },
    384323                    dayHeaderDidMount: function( info ) {
    385                         let dayHeaderLink = info.el.querySelector('a');
    386 
    387                         let fullDayName = piecalUtils.getShortenedDayNames(info.text, 'full');
    388                         let shortDayName = piecalUtils.getShortenedDayNames(info.text, 'short');
    389                         let singleLetterDayName = piecalUtils.getShortenedDayNames(info.text, 'single');
    390 
    391                         let shortenableViews = ['dayGridMonth', 'timeGridWeek', 'dayGridWeek'];
    392 
    393                         if( shortenableViews.includes(info.view.type) ) {
    394                             dayHeaderLink.innerHTML = `<span class="piecal-grid-day-header-text piecal-grid-day-header-text--full">${fullDayName}</span>
    395                                                        <span class="piecal-grid-day-header-text piecal-grid-day-header-text--short">${shortDayName}</span>
    396                                                        <span class="piecal-grid-day-header-text piecal-grid-day-header-text--single-letter">${singleLetterDayName}</span>`;
    397                         }
     324                        info = piecalJS.dayHeaderDidMount( info );
    398325
    399326                        <?php do_action( 'piecal_additional_day_header_did_mount_js' ); ?>
     
    408335
    409336            function piecalChangeView( view ) {
     337                piecalCleanView( document.querySelector('.piecal-wrapper').getAttribute('data-view'), view );
    410338                document.querySelector('.piecal-wrapper').setAttribute('data-view', view);
    411339                window.calendar.changeView(view);
     
    413341                Alpine.store('calendarEngine').viewTitle = window.calendar.currentData.viewTitle;
    414342                Alpine.store('calendarEngine').viewSpec = window.calendar.currentData.viewSpec.buttonTextDefault;
     343            }
     344
     345            // This function forces the calendar to re-render events when the view is changed, but only
     346            // when necessary. This prevents artifacts from custom views from persisting between view changes
     347            // when those views have the same or similar types, e.g. listMonth and listUpcoming.
     348            function piecalCleanView( oldView, newView ) {
     349                if( oldView.toLowerCase().includes( 'list' ) && newView.toLowerCase().includes( 'grid' ) ) {
     350                    return false;
     351                }
     352
     353                if( oldView.toLowerCase().includes( 'list' ) && newView.toLowerCase().includes( 'list' ) ) {
     354                    window.calendar.changeView('dayGridMonth');
     355                }
     356
     357                if( oldView.toLowerCase().includes( 'grid' ) && newView.toLowerCase().includes( 'grid' ) ) {
     358                    window.calendar.changeView('listMonth');
     359                }
    415360            }
    416361
     
    506451                    ?>
    507452                    <select x-model="$store.calendarEngine.calendarView" @change="piecalChangeView($store.calendarEngine.calendarView)">
    508                         <option value="dayGridMonth">
    509                             <?php
    510                                 /* Translators: String for Month - Classic view in view picker dropdown. */
    511                                 _e( 'Month - Classic', 'piecal' );
    512                             ?>
    513                         </option>
    514                         <option value="listMonth">
    515                             <?php
    516                                 /* Translators: String for Month - List view in view picker dropdown. */
    517                                 _e( 'Month - List', 'piecal' );
    518                             ?>
    519                         </option>
    520                         <option value="timeGridWeek">
    521                             <?php
    522                                 /* Translators: String for Week - Time Grid view in view picker dropdown. */
    523                                 _e( 'Week - Time Grid', 'piecal' );
    524                             ?>
    525                         </option>
    526                         <option value="listWeek">
    527                             <?php
    528                                 /* Translators: String for Week - List view in view picker dropdown. */
    529                                 _e( 'Week - List', 'piecal' );
    530                             ?>
    531                         </option>
    532                         <option value="dayGridWeek">
    533                             <?php
    534                                 /* Translators: String for Week - Classic view in view picker dropdown. */
    535                                 _e( 'Week - Classic', 'piecal' );
    536                             ?>
    537                         </option>
    538                         <option value="listDay">
    539                             <?php
    540                                 /* Translators: String for Day - Classic view in view picker dropdown. */
    541                                 _e( 'Day', 'piecal' );
    542                             ?>
    543                         </option>
     453                        <?php foreach( $allowedViews as $view ) { ?>
     454                            <option value="<?php echo $view; ?>">
     455                                <?php echo $viewLabels[$view]; ?>
     456                            </option>
     457                        <?php } ?>
    544458                    </select>
    545459                </label>
  • pie-calendar/tags/1.2.9/includes/utils/Scripts.php

    r3236286 r3351250  
    55class Scripts {
    66    public static function loadCoreScriptsAndStyles() {
    7         self::enqueueBundle( ['alpinefocus', 'alpinejs', 'fullcalendar', 'piecal-utils', 'piecalCSS'] );
     7        self::enqueueBundle( ['alpinefocus', 'alpinejs', 'fullcalendar', 'piecal-utils', 'piecalJS', 'piecalCSS'] );
    88    }
    99   
     
    2424                case 'piecal-utils':
    2525                    wp_enqueue_script('piecal-utils');
     26                break;
     27                case 'piecalJS':
     28                    wp_enqueue_script('piecalJS');
    2629                break;
    2730                case 'alpinejs':
     
    6265            switch( $script ) {
    6366                case 'alpinejs':
    64                     wp_register_script( 'alpinejs', PIECAL_PATH . 'vendor/alpine.3.11.1.js', ['alpinefocus'] );
     67                    wp_register_script( 'alpinejs', PIECAL_PATH . 'vendor/alpine.3.11.1.min.js', ['alpinefocus'] );
    6568                break;
    6669                case 'alpinefocus':
     
    8184                        'useAdaptiveTimezones' => $useAdaptiveTimezones
    8285                    ] );
     86                break;
     87                case 'piecalJS':
     88                    wp_register_script( 'piecalJS', PIECAL_PATH . 'includes/js/piecal.js', array( 'wp-i18n' ), PIECAL_VERSION );
    8389                break;
    8490                case 'piecalCSS':
  • pie-calendar/tags/1.2.9/languages/piecal.pot

    r3312639 r3351250  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Pie Calendar 1.2.8\n"
     5"Project-Id-Version: Pie Calendar 1.2.9\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pie-calendar\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-06-09T19:46:15+00:00\n"
     12"POT-Creation-Date: 2025-08-27T13:24:40+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    3838#: plugin.php
    3939msgid "https://piecalendar.com/about"
     40msgstr ""
     41
     42#. Translators: String for Upcoming view in view picker dropdown.
     43#: includes/block.php:193
     44#: includes/block.php:245
     45#: includes/utils/Views.php:88
     46msgid "List - Upcoming"
     47msgstr ""
     48
     49#. Translators: String for Month - Classic view in view picker dropdown.
     50#: includes/block.php:205
     51#: includes/shortcode.php:156
     52msgid "Month - Classic"
     53msgstr ""
     54
     55#. Translators: String for Month - List view in view picker dropdown.
     56#: includes/block.php:207
     57#: includes/shortcode.php:158
     58msgid "Month - List"
     59msgstr ""
     60
     61#. Translators: String for Week - Time Grid view in view picker dropdown.
     62#: includes/block.php:209
     63#: includes/shortcode.php:160
     64msgid "Week - Time Grid"
     65msgstr ""
     66
     67#. Translators: String for Week - List view in view picker dropdown.
     68#: includes/block.php:211
     69#: includes/shortcode.php:162
     70msgid "Week - List"
     71msgstr ""
     72
     73#. Translators: String for Week - Day Grid view in view picker dropdown.
     74#: includes/block.php:213
     75msgid "Week - Classic"
     76msgstr ""
     77
     78#. Translators: String for Day - List view in view picker dropdown.
     79#: includes/block.php:215
     80#: includes/shortcode.php:166
     81msgid "Day - List"
     82msgstr ""
     83
     84#: includes/block.php:229
     85#: build/blocks/calendar/index.js:1
     86#: src/blocks/calendar/edit.js:392
     87#: src/blocks/calendar/edit.js:409
     88msgid "Default"
    4089msgstr ""
    4190
     
    85134#. Translators: This string is for displaying the viewer's time zone via the Pie Calendar Info shortcode
    86135#: includes/piecal-info-shortcode.php:37
    87 #: includes/shortcode.php:638
     136#: includes/shortcode.php:552
    88137msgid "Event times are listed in your local time zone: "
    89138msgstr ""
     
    116165msgstr ""
    117166
    118 #: includes/shortcode.php:309
    119 msgid "'All-day event'"
    120 msgstr ""
    121 
    122 #: includes/shortcode.php:324
    123 msgid "'to'"
    124 msgstr ""
    125 
    126 #: includes/shortcode.php:327
    127 msgid "'Multi-day event running from'"
    128 msgstr ""
    129 
    130 #: includes/shortcode.php:330
    131 msgid "'Multi-day, all-day event running from'"
    132 msgstr ""
    133 
    134 #: includes/shortcode.php:486
     167#. Translators: String for Week - Day Grid view in view picker dropdown.
     168#: includes/shortcode.php:164
     169msgid "Week - Day Grid"
     170msgstr ""
     171
     172#: includes/shortcode.php:431
    135173msgid "Skip Calendar"
    136174msgstr ""
    137175
    138 #: includes/shortcode.php:498
     176#: includes/shortcode.php:443
    139177msgid "Back to full month view."
    140178msgstr ""
    141179
    142 #: includes/shortcode.php:500
     180#: includes/shortcode.php:445
    143181msgid "Back To Full Month"
    144182msgstr ""
    145183
    146184#. Translators: Label for calendar view chooser.
     185#: includes/shortcode.php:450
     186msgid "Choose View"
     187msgstr ""
     188
     189#. Translators: Label for close button in Pie Calendar popover.
     190#: includes/shortcode.php:492
     191msgid "Close event details"
     192msgstr ""
     193
     194#. Translators: Label for event start date in Pie Calendar popover.
    147195#: includes/shortcode.php:505
    148 msgid "Choose View"
    149 msgstr ""
    150 
    151 #. Translators: String for Month - Classic view in view picker dropdown.
    152 #: includes/shortcode.php:511
    153 #: build/blocks/calendar/index.js:1
    154 #: src/blocks/calendar/edit.js:280
    155 msgid "Month - Classic"
    156 msgstr ""
    157 
    158 #. Translators: String for Month - List view in view picker dropdown.
    159 #: includes/shortcode.php:517
    160 #: build/blocks/calendar/index.js:1
    161 #: src/blocks/calendar/edit.js:283
    162 msgid "Month - List"
    163 msgstr ""
    164 
    165 #. Translators: String for Week - Time Grid view in view picker dropdown.
    166 #: includes/shortcode.php:523
    167 #: build/blocks/calendar/index.js:1
    168 #: src/blocks/calendar/edit.js:285
    169 msgid "Week - Time Grid"
    170 msgstr ""
    171 
    172 #. Translators: String for Week - List view in view picker dropdown.
    173 #: includes/shortcode.php:529
    174 #: build/blocks/calendar/index.js:1
    175 #: src/blocks/calendar/edit.js:288
    176 msgid "Week - List"
    177 msgstr ""
    178 
    179 #. Translators: String for Week - Classic view in view picker dropdown.
    180 #: includes/shortcode.php:535
    181 #: build/blocks/calendar/index.js:1
    182 #: src/blocks/calendar/edit.js:289
    183 msgid "Week - Classic"
    184 msgstr ""
    185 
    186 #. Translators: String for Day - Classic view in view picker dropdown.
    187 #: includes/shortcode.php:541
    188 #: build/blocks/calendar/index.js:1
    189 #: src/blocks/calendar/edit.js:290
    190 msgid "Day"
    191 msgstr ""
    192 
    193 #. Translators: Label for close button in Pie Calendar popover.
    194 #: includes/shortcode.php:578
    195 msgid "Close event details"
    196 msgstr ""
    197 
    198 #. Translators: Label for event start date in Pie Calendar popover.
    199 #: includes/shortcode.php:591
    200196msgid "Starts"
    201197msgstr ""
    202198
    203199#. Translators: Label for event end date in Pie Calendar popover.
    204 #: includes/shortcode.php:600
     200#: includes/shortcode.php:514
    205201msgid "Ends"
    206202msgstr ""
    207203
    208204#. Translators: Label for "View <Post Type>" in Pie Calendar popover.
    209 #: includes/shortcode.php:619
     205#: includes/shortcode.php:533
    210206msgid "View "
    211207msgstr ""
     
    231227msgstr ""
    232228
    233 #: plugin.php:147
     229#: plugin.php:148
    234230msgid ""
    235231"<p>Pie Calendar has been activated.</p> \n"
     
    247243msgstr ""
    248244
    249 #: plugin.php:237
     245#: plugin.php:245
    250246msgid "Navigate to the Pie Calendar website to purchase the Pro version."
    251247msgstr ""
    252248
    253 #: plugin.php:238
     249#: plugin.php:246
    254250msgid "Upgrade to Pro"
    255251msgstr ""
     
    261257
    262258#: build/blocks/calendar/index.js:1
    263 #: src/blocks/calendar/edit.js:235
     259#: src/blocks/calendar/edit.js:311
    264260msgid "Calendar Settings"
    265261msgstr ""
    266262
    267263#: build/blocks/calendar/index.js:1
    268 #: src/blocks/calendar/edit.js:239
     264#: src/blocks/calendar/edit.js:315
    269265msgid "Post Types"
    270266msgstr ""
    271267
    272268#: build/blocks/calendar/index.js:1
    273 #: src/blocks/calendar/edit.js:261
     269#: src/blocks/calendar/edit.js:337
    274270msgid "Select post types to display in the calendar."
    275271msgstr ""
    276272
    277273#: build/blocks/calendar/index.js:1
    278 #: src/blocks/calendar/edit.js:271
     274#: src/blocks/calendar/edit.js:347
    279275msgid "View"
    280276msgstr ""
    281277
    282278#: build/blocks/calendar/index.js:1
    283 #: src/blocks/calendar/edit.js:273
     279#: src/blocks/calendar/edit.js:349
    284280msgid "Choose the default calendar view that visitors will see when the page loads."
    285281msgstr ""
    286282
    287283#: build/blocks/calendar/index.js:1
    288 #: src/blocks/calendar/edit.js:278
    289 #: src/blocks/calendar/edit.js:305
    290 #: src/blocks/calendar/edit.js:322
    291 msgid "Default"
    292 msgstr ""
    293 
    294 #: build/blocks/calendar/index.js:1
    295 #: src/blocks/calendar/edit.js:298
     284#: src/blocks/calendar/edit.js:360
     285msgid "Duration"
     286msgstr ""
     287
     288#: build/blocks/calendar/index.js:1
     289#: src/blocks/calendar/edit.js:362
     290msgid "Choose the number of months the calendar view should span, starting from beginning of current month. Minimum of 1, maximum of 24."
     291msgstr ""
     292
     293#: build/blocks/calendar/index.js:1
     294#: src/blocks/calendar/edit.js:385
    296295msgid "Widget"
    297296msgstr ""
    298297
    299298#: build/blocks/calendar/index.js:1
    300 #: src/blocks/calendar/edit.js:300
     299#: src/blocks/calendar/edit.js:387
    301300msgid "Enable widget mode for a more compact calendar suitable for sidebars. 'Responsive' switches to widget mode on mobile only."
    302301msgstr ""
    303302
    304303#: build/blocks/calendar/index.js:1
    305 #: src/blocks/calendar/edit.js:306
     304#: src/blocks/calendar/edit.js:393
    306305msgid "True"
    307306msgstr ""
    308307
    309308#: build/blocks/calendar/index.js:1
    310 #: src/blocks/calendar/edit.js:307
     309#: src/blocks/calendar/edit.js:394
    311310msgid "Responsive"
    312311msgstr ""
    313312
    314313#: build/blocks/calendar/index.js:1
    315 #: src/blocks/calendar/edit.js:315
     314#: src/blocks/calendar/edit.js:402
    316315msgid "Theme"
    317316msgstr ""
    318317
    319318#: build/blocks/calendar/index.js:1
    320 #: src/blocks/calendar/edit.js:317
     319#: src/blocks/calendar/edit.js:404
    321320msgid "Choose between light, dark, or adaptive theme. Adaptive will match your visitor's system preferences."
    322321msgstr ""
    323322
    324323#: build/blocks/calendar/index.js:1
    325 #: src/blocks/calendar/edit.js:323
     324#: src/blocks/calendar/edit.js:410
    326325msgid "Dark"
    327326msgstr ""
    328327
    329328#: build/blocks/calendar/index.js:1
    330 #: src/blocks/calendar/edit.js:324
     329#: src/blocks/calendar/edit.js:411
    331330msgid "Adaptive"
    332331msgstr ""
    333332
    334333#: build/blocks/calendar/index.js:1
    335 #: src/blocks/calendar/edit.js:331
     334#: src/blocks/calendar/edit.js:418
    336335msgid "Wrap Titles"
    337336msgstr ""
    338337
    339338#: build/blocks/calendar/index.js:1
    340 #: src/blocks/calendar/edit.js:333
     339#: src/blocks/calendar/edit.js:420
    341340msgid "When enabled, event titles will wrap to multiple lines instead of being truncated with an ellipsis."
    342341msgstr ""
    343342
    344343#: build/blocks/calendar/index.js:1
    345 #: src/blocks/calendar/edit.js:342
     344#: src/blocks/calendar/edit.js:429
    346345msgid "Locale"
    347346msgstr ""
    348347
    349348#: build/blocks/calendar/index.js:1
    350 #: src/blocks/calendar/edit.js:344
     349#: src/blocks/calendar/edit.js:431
    351350msgid "Use a locale code to change the language of the calendar. For example, 'en-US' for English (United States)."
    352351msgstr ""
    353352
    354353#: build/blocks/calendar/index.js:1
    355 #: src/blocks/calendar/edit.js:354
     354#: src/blocks/calendar/edit.js:441
    356355msgid "Hide Timezone"
    357356msgstr ""
    358357
    359358#: build/blocks/calendar/index.js:1
    360 #: src/blocks/calendar/edit.js:356
     359#: src/blocks/calendar/edit.js:443
    361360msgid "Tick this box to hide the event timezone from the calendar footer."
    362361msgstr ""
    363362
    364363#: build/blocks/calendar/index.js:1
    365 #: src/blocks/calendar/edit.js:368
     364#: src/blocks/calendar/edit.js:455
    366365msgid "Disable Automatic End Dates"
    367366msgstr ""
    368367
    369368#: build/blocks/calendar/index.js:1
    370 #: src/blocks/calendar/edit.js:370
     369#: src/blocks/calendar/edit.js:457
    371370msgid "By default, events with no end date will automatically end 1 hour after their start time. Disable to show events with no end date."
    372371msgstr ""
     
    514513msgstr ""
    515514
     515#: includes/js/piecal.js:137
     516msgid "All-day event"
     517msgstr ""
     518
     519#. Translators: Text describing span of multi-day event.
     520#: includes/js/piecal.js:151
     521msgid "to"
     522msgstr ""
     523
     524#. Translators: Text for multi-day event description.
     525#: includes/js/piecal.js:154
     526msgid "Multi-day event running from"
     527msgstr ""
     528
     529#. Translators: Text for multi-day all-day event description.
     530#: includes/js/piecal.js:157
     531msgid "Multi-day, all-day event running from"
     532msgstr ""
     533
    516534#: build/blocks/calendar/block.json
    517535#: src/blocks/calendar/block.json
  • pie-calendar/tags/1.2.9/plugin.php

    r3312639 r3351250  
    1010 * Plugin URI:        https://piecalendar.com
    1111 * Description:       Turn any post type into a calendar event and display it on a calendar.
    12  * Version:           1.2.8
     12 * Version:           1.2.9
    1313 * Author:            Elijah Mills & Jonathan Jernigan
    1414 * Author URI:        https://piecalendar.com/about
     
    2626}
    2727
    28 define( 'PIECAL_VERSION', '1.2.8' );
     28define( 'PIECAL_VERSION', '1.2.9' );
    2929define( 'PIECAL_PATH', plugin_dir_url( __FILE__ ) );
    3030define( 'PIECAL_DIR', plugin_dir_path( __FILE__ ) );
     
    5050        'fullcalendar-locales',
    5151        'piecal-utils',
     52        'piecalJS',
    5253        'piecalCSS',
    5354        'piecalThemeDarkCSS',
     
    181182            false
    182183        );
     184
     185        // Register piecalJS if not already registered. We need this in the block editor environment.
     186        if ( ! wp_script_is( 'piecalJS', 'registered' ) ) {
     187            wp_register_script( 'piecalJS', PIECAL_PATH . 'includes/js/piecal.js', array( 'wp-i18n' ), PIECAL_VERSION );
     188        }
     189               
     190        wp_enqueue_script('piecalJS');
    183191    }
    184192);
     
    260268/**
    261269 * Set script translations
    262  * This doesn't work yet.
    263  */
    264 // add_action( 'wp_enqueue_scripts', 'piecal_load_js_translations', 100 );
    265 
    266 // function piecal_load_js_translations() {
    267 // wp_set_script_translations(
    268 // 'piecalendar-custom-meta-plugin',
    269 // 'piecal',
    270 // plugin_dir_path( __FILE__ ) . 'languages'
    271 // );
    272 // }
     270 */
     271function piecal_set_script_translations() {
     272    wp_set_script_translations( 'piecalJS', 'piecal', plugin_dir_path( __FILE__ ) . 'languages' );
     273}
     274add_action( 'wp_enqueue_scripts', 'piecal_set_script_translations', 20 );
    273275
    274276/**
     
    322324    return $gmt_final_offset;
    323325}
     326
     327// Custom views API
     328require_once PIECAL_DIR . '/includes/utils/Views.php';
     329add_action( 'init', function() {
     330    Piecal\Utils\Views::addCustomViews( [], [] );
     331});
  • pie-calendar/tags/1.2.9/readme.txt

    r3312639 r3351250  
    1 === Events Calendar Made Simple – Pie Calendar ===
     1=== WordPress Events Calendar Plugin – Pie Calendar ===
    22Contributors: apexws, spellhammer
    33Tags: events, calendar, event
    44Donate link: https://piecalendar.com
    55Requires at least: 5.9
    6 Tested up to: 6.8.1
     6Tested up to: 6.8.2
    77Requires PHP: 7.4
    8 Stable tag: 1.2.8
     8Stable tag: 1.2.9
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8989
    9090== Changelog ==
     91
     92= 1.2.9 =
     93* New: Custom views API. See our documentation for more information.
     94* New: List - Upcoming view with duration attribute, useful for sites that have fewer events spread out over multiple months to prevent showing an empty calendar.
     95* Security: Fixed Authenticated (Contributor+) Stored-XSS vulnerability related to theme attribute reported to us on August 21st.
     96* Fix: Renamed alpine dependency to indicate it's minified. This may resolve issues with some optimization plugins.
     97* Tweak: Adjusted view chooser dropdown styles.
    9198
    9299= 1.2.8 =
  • pie-calendar/tags/1.2.9/src/blocks/calendar/block.json

    r3312639 r3351250  
    5858      "default": false
    5959    },
     60    "duration": {
     61      "type": "number",
     62      "default": 1
     63    },
    6064    "hidepastevents": {
    6165      "type": "boolean",
  • pie-calendar/tags/1.2.9/src/blocks/calendar/edit.js

    r3312639 r3351250  
    2323  CheckboxControl,
    2424  FormTokenField,
     25  TextControl,
    2526} from "@wordpress/components";
    2627import { useEntityRecords } from "@wordpress/core-data";
     
    2930import { addQueryArgs } from "@wordpress/url";
    3031import { SUPPORTED_LOCALES } from "./locales";
     32import { addFilter, applyFilters } from "@wordpress/hooks";
    3133/**
    3234 * Import the full calendar library.
     
    5355  const defaultView = "dayGridMonth";
    5456  const [viewTitle, setViewTitle] = useState('');
     57  const [views, setViews] = useState([]);
     58  const [viewsLoaded, setViewsLoaded] = useState(false); // Add loading state
     59  const [duration, setDuration] = useState(1);
    5560
    5661  useEffect(() => {
     
    6267  }, [attributes.view, attributes.wraptitles]);
    6368
     69  useEffect(() => {
     70    apiFetch({
     71      path: addQueryArgs("piecal/v1/views_array", { duration: attributes.duration } ),
     72      method: "GET",
     73    }).then((views) => {
     74        let supportedEventHandlers = [
     75          'eventDataTransform',
     76          'dateClick',
     77          'eventClick',
     78          'eventDidMount',
     79          'dayCellDidMount',
     80          'viewDidMount',
     81          'viewWillUnmount',
     82          'dayHeaderContent',
     83          'dayHeaderDidMount'
     84      ];
     85
     86      for( let view in views ) {
     87          let viewProps = views[view];
     88
     89          for( let prop in viewProps ) {
     90              if( supportedEventHandlers.includes( prop ) ) {
     91                  let eventHandlerCode = viewProps[prop];
     92
     93                  let handlerFunction = new Function( 'info', eventHandlerCode );
     94
     95                  viewProps[prop] = handlerFunction;
     96              }
     97          }
     98
     99          // Remove customProps since we don't want those output inside the calendar object
     100          delete viewProps.customProps;
     101      }
     102
     103      setViews(views);
     104      setViewsLoaded(true); // Mark views as loaded
     105    });
     106  }, [attributes.duration]);
     107
    64108  const updateTitle = () => {
    65109    if (calendarRef.current) {
     
    67111    }
    68112  };
     113
     114  // Don't render FullCalendar until views are loaded
     115  if (!viewsLoaded) {
     116    return <div>Loading calendar...</div>;
     117  }
    69118
    70119  return (
     
    125174      </div>
    126175      <style data-fullcalendar></style>
     176      <div className="piecal-blockeditor-container" style={{width: '100%'}} data-view={attributes.view}>
    127177      <FullCalendar
    128178        ref={calendarRef}
     
    130180        initialView={attributes.view || defaultView}
    131181        editable={false}
     182        views={viewsLoaded ? views : []}
    132183        events={events}
    133184        contentHeight="auto"
     
    138189        } : undefined}
    139190      />
     191      </div>
    140192    </>
    141193  );
     
    159211  // Add this new state for managing suggestions
    160212  const [suggestions, setSuggestions] = useState([]);
     213
     214  // Add new state for managing views
     215  const [views, setViews] = useState([]);
     216
     217  // Add new state for managing view array
     218  const [viewsArray, setViewsArray] = useState([]);
    161219
    162220  const blockWrapperClass = "piecal-wrapper";
     
    229287    }
    230288  }, [postTypehasResolved]);
     289
     290  useEffect(() => {
     291    apiFetch({
     292      path: addQueryArgs("piecal/v1/views"),
     293      method: "GET",
     294    }).then((views) => {
     295      setViews(views);
     296    });
     297  }, []); // Add empty dependency array to run only once on mount
     298
     299  useEffect(() => {
     300    apiFetch({
     301      path: addQueryArgs("piecal/v1/views_array"),
     302      method: "GET",
     303    }).then((viewsArray) => {
     304      setViewsArray(viewsArray);
     305    });
     306  }, []); // Add empty dependency array to run only once on mount
    231307
    232308  return (
     
    275351                "piecal"
    276352              )}
    277               options={[
    278                 { label: __("Default", "piecal"), value: "" },
    279                 {
    280                   label: __("Month - Classic", "piecal"),
    281                   value: "dayGridMonth",
    282                 },
    283                 { label: __("Month - List", "piecal"), value: "listMonth" },
    284                 {
    285                   label: __("Week - Time Grid", "piecal"),
    286                   value: "timeGridWeek",
    287                 },
    288                 { label: __("Week - List", "piecal"), value: "listWeek" },
    289                 { label: __("Week - Classic", "piecal"), value: "dayGridWeek" },
    290                 { label: __("Day", "piecal"), value: "listDay" },
    291               ]}
     353              options={views}
    292354              onChange={(view) => setAttributes({ view })}
    293355            />
    294356          </PanelRow>
     357          {( viewsArray[attributes.view] && viewsArray[attributes.view].duration ) && ( // Next check if attributes.view in the views Array has a duration property before showing
     358            <PanelRow>
     359              <TextControl
     360                label={__("Duration", "piecal")}
     361                value={attributes.duration ?? 1}
     362                help={__(
     363                  "Choose the number of months the calendar view should span, starting from beginning of current month. Minimum of 1, maximum of 24.",
     364                  "piecal"
     365                )}
     366                min={1}
     367                onChange={(duration) => {
     368                  if( parseInt(duration) < 1 || duration == "" ) {
     369                    setAttributes({ duration: 1 });
     370                    return;
     371                  }
     372                  if( parseInt(duration) > 24 ) {
     373                    setAttributes({ duration: 24 });
     374                    return;
     375                  }
     376                  setAttributes({ duration: parseInt(duration) ?? 1 }) }
     377                }
     378                type={"number"}
     379              />
     380            </PanelRow>
     381          )}
    295382          {(attributes.view === "" || attributes.view === "dayGridMonth") && (
    296383            <PanelRow>
  • pie-calendar/tags/1.2.9/src/blocks/calendar/render.php

    r3312639 r3351250  
    1818    'automaticenddates' => $attributes['automaticenddates'],
    1919    'featuredimage'     => $attributes['featuredimage'] ? 'true' : 'false',
     20    'duration'          => $attributes['duration'] ?? 1,
    2021    'hidepastevents'    => $attributes['hidepastevents'] ? 'true' : 'false',
    2122);
  • pie-calendar/trunk/build/blocks/calendar/block.json

    r3312639 r3351250  
    6161      "default": false
    6262    },
     63    "duration": {
     64      "type": "number",
     65      "default": 1
     66    },
    6367    "hidepastevents": {
    6468      "type": "boolean",
  • pie-calendar/trunk/build/blocks/calendar/index.asset.php

    r3312639 r3351250  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'ff9132c9db8b5d9a145e');
     1<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-url'), 'version' => '8bf2438ffbf1e85d10be');
  • pie-calendar/trunk/build/blocks/calendar/index.css

    r3283614 r3351250  
    5656.piecal-controls.fc .piecal-controls__view-chooser {
    5757    max-width: calc(50% - 8px);
     58}
     59
     60.piecal-controls.fc .piecal-controls__view-chooser select {
     61    border-radius: 0.25em;
     62    padding: 0.5em;
     63    padding-right: 2em;
     64    appearance: none;
     65    -webkit-appearance: none;
     66    -moz-appearance: none;
     67    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%22800px%22%20height%3D%22800px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.29289%208.29289C4.68342%207.90237%205.31658%207.90237%205.70711%208.29289L12%2014.5858L18.2929%208.29289C18.6834%207.90237%2019.3166%207.90237%2019.7071%208.29289C20.0976%208.68342%2020.0976%209.31658%2019.7071%209.70711L12.7071%2016.7071C12.3166%2017.0976%2011.6834%2017.0976%2011.2929%2016.7071L4.29289%209.70711C3.90237%209.31658%203.90237%208.68342%204.29289%208.29289Z%22%20fill%3D%22%23000000%22%2F%3E%0A%3C%2Fsvg%3E");
     68    background-size: 1em;
     69    background-repeat: no-repeat;
     70    background-position: 97% center;
    5871}
    5972
  • pie-calendar/trunk/build/blocks/calendar/index.js

    r3312639 r3351250  
    1 (()=>{"use strict";var e,t={92:(e,t,n)=>{const r=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,o=window.wp.blockEditor,a=window.wp.components,l=window.wp.coreData,c=window.wp.apiFetch;var d=n.n(c);const u=window.wp.url,f=[{value:"",label:(0,s.__)("Default (Browser Language)","piecal")},{value:"af",label:"Afrikaans"},{value:"ar",label:"Arabic"},{value:"bg",label:"Bulgarian"},{value:"ca",label:"Catalan"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"en",label:"English"},{value:"en-gb",label:"English (UK)"},{value:"en-au",label:"English (Australia)"},{value:"es",label:"Spanish"},{value:"eu",label:"Basque"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"fr-ca",label:"French (Canada)"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"nl",label:"Dutch"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pt-br",label:"Portuguese (Brazil)"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"sv",label:"Swedish"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"vi",label:"Vietnamese"},{value:"zh-cn",label:"Chinese (China)"},{value:"zh-tw",label:"Chinese (Taiwan)"}],h=window.React,p=window.ReactDOM;var g,m,v,b,y,A,w,E,C,D={},_=[],S=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function R(e,t){for(var n in t)e[n]=t[n];return e}function x(e){var t=e.parentNode;t&&t.removeChild(e)}function k(e,t,n){var r,i,s,o={};for(s in t)"key"==s?r=t[s]:"ref"==s?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?g.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===o[s]&&(o[s]=e.defaultProps[s]);return T(e,o,r,i,null)}function T(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++v:i};return null==i&&null!=m.vnode&&m.vnode(s),s}function M(e){return e.children}function O(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||S.test(t)?n:n+"px"}function I(e,t,n,r,i){var s;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||O(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||O(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r||e.addEventListener(t,s?P:N,s):e.removeEventListener(t,s?P:N,s);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function N(e){y=!0;try{return this.l[e.type+!1](m.event?m.event(e):e)}finally{y=!1}}function P(e){y=!0;try{return this.l[e.type+!0](m.event?m.event(e):e)}finally{y=!1}}function H(e,t){this.props=e,this.context=t}function B(e,t){if(null==t)return e.__?B(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?B(e):null}function z(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return z(e)}}function j(e){y?setTimeout(e):E(e)}function U(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!W.__r++||w!==m.debounceRendering)&&((w=m.debounceRendering)||j)(W)}function W(){var e,t,n,r,i,s,o,a;for(A.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=A.shift();)e.__d&&(t=A.length,r=void 0,i=void 0,o=(s=(n=e).__v).__e,(a=n.__P)&&(r=[],(i=R({},s)).__v=s.__v+1,q(a,s,i,n.__n,void 0!==a.ownerSVGElement,null!=s.__h?[o]:null,r,null==o?B(s):o,s.__h),Z(r,s),s.__e!=o&&z(s)),A.length>t&&A.sort((function(e,t){return e.__v.__b-t.__v.__b})));W.__r=0}function F(e,t,n,r,i,s,o,a,l,c){var d,u,f,h,p,g,m,v=r&&r.__k||_,b=v.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(h=n.__k[d]=null==(h=t[d])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?T(null,h,null,null,h):Array.isArray(h)?T(M,{children:h},null,null,null):h.__b>0?T(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=v[d])||f&&h.key==f.key&&h.type===f.type)v[d]=void 0;else for(u=0;u<b;u++){if((f=v[u])&&h.key==f.key&&h.type===f.type){v[u]=void 0;break}f=null}q(e,h,f=f||D,i,s,o,a,l,c),p=h.__e,(u=h.ref)&&f.ref!=u&&(m||(m=[]),f.ref&&m.push(f.ref,null,h),m.push(u,h.__c||p,h)),null!=p?(null==g&&(g=p),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=G(h,l,e):l=V(e,h,f,v,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=B(f))}for(n.__e=g,d=b;d--;)null!=v[d]&&("function"==typeof n.type&&null!=v[d].__e&&v[d].__e==n.__d&&(n.__d=Q(r).nextSibling),J(v[d],v[d]));if(m)for(d=0;d<m.length;d++)$(m[d],m[++d],m[++d])}function G(e,t,n){for(var r,i=e.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=e,t="function"==typeof r.type?G(r,t,n):V(n,r,r,i,r.__e,t));return t}function L(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){L(e,t)})):t.push(e)),t}function V(e,t,n,r,i,s){var o,a,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||i!=s||null==i.parentNode)e:if(null==s||s.parentNode!==e)e.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;e.insertBefore(i,s),o=s}return void 0!==o?o:i.nextSibling}function Q(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Q(n)))return r;return null}function q(e,t,n,r,i,s,o,a,l){var c,d,u,f,h,p,g,v,b,y,A,w,E,C,D,_=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,s=[a]),(c=m.__b)&&c(t);try{e:if("function"==typeof _){if(v=t.props,b=(c=_.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in _&&_.prototype.render?t.__c=d=new _(v,y):(t.__c=d=new H(v,y),d.constructor=_,d.render=X),b&&b.sub(d),d.props=v,d.state||(d.state={}),d.context=y,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=_.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=R({},d.__s)),R(d.__s,_.getDerivedStateFromProps(v,d.__s))),f=d.props,h=d.state,d.__v=t,u)null==_.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==_.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,y),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[],d.__h.length&&o.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,p)}))}if(d.context=y,d.props=v,d.__P=e,w=m.__r,E=0,"prototype"in _&&_.prototype.render){for(d.state=d.__s,d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do{d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++E<25);d.state=d.__s,null!=d.getChildContext&&(r=R(R({},r),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(f,h)),D=null!=c&&c.type===M&&null==c.key?c.props.children:c,F(e,Array.isArray(D)?D:[D],t,n,r,i,s,o,a,l),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Y(n.__e,t,n,r,i,s,o,l);(c=m.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=s)&&(t.__e=a,t.__h=!!l,s[s.indexOf(a)]=null),m.__e(e,t,n)}}function Z(e,t){m.__c&&m.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){m.__e(e,t.__v)}}))}function Y(e,t,n,r,i,s,o,a){var l,c,d,u=n.props,f=t.props,h=t.type,p=0;if("svg"===h&&(i=!0),null!=s)for(;p<s.length;p++)if((l=s[p])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,s[p]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),s=null,a=!1}if(null===h)u===f||a&&e.data===f||(e.data=f);else{if(s=s&&g.call(e.childNodes),c=(u=n.props||D).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!a){if(null!=s)for(u={},p=0;p<e.attributes.length;p++)u[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,i){var s;for(s in n)"children"===s||"key"===s||s in t||I(e,s,null,n[s],r);for(s in t)i&&"function"!=typeof t[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===t[s]||I(e,s,t[s],n[s],r)}(e,f,u,i,a),d)t.__k=[];else if(p=t.props.children,F(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==h,s,o,s?s[0]:n.__k&&B(n,0),a),null!=s)for(p=s.length;p--;)null!=s[p]&&x(s[p]);a||("value"in f&&void 0!==(p=f.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==u.value)&&I(e,"value",p,u.value,!1),"checked"in f&&void 0!==(p=f.checked)&&p!==e.checked&&I(e,"checked",p,u.checked,!1))}return e}function $(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){m.__e(e,n)}}function J(e,t,n){var r,i;if(m.unmount&&m.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){m.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&J(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||x(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,n){return this.constructor(e,n)}function K(e,t,n){var r,i,s;m.__&&m.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,s=[],q(t,e=(!r&&n||t).__k=k(M,null,[e]),i||D,D,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?g.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r),Z(s,e)}g=_.slice,m={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},v=0,b=function(e){return null!=e&&void 0===e.constructor},y=!1,H.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=R({},this.state),"function"==typeof e&&(e=e(R({},n),this.props)),e&&R(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),U(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),U(this))},H.prototype.render=M,A=[],E="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,W.__r=0,C=0;var ee,te,ne,re=[],ie=[],se=m.__b,oe=m.__r,ae=m.diffed,le=m.__c,ce=m.unmount;function de(){for(var e;e=re.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(he),e.__H.__h.forEach(pe),e.__H.__h=[]}catch(t){e.__H.__h=[],m.__e(t,e.__v)}}m.__b=function(e){ee=null,se&&se(e)},m.__r=function(e){oe&&oe(e);var t=(ee=e.__c).__H;t&&(te===ee?(t.__h=[],ee.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ie,e.__N=e.i=void 0}))):(t.__h.forEach(he),t.__h.forEach(pe),t.__h=[])),te=ee},m.diffed=function(e){ae&&ae(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==re.push(t)&&ne===m.requestAnimationFrame||((ne=m.requestAnimationFrame)||fe)(de)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ie&&(e.__=e.__V),e.i=void 0,e.__V=ie}))),te=ee=null},m.__c=function(e,t){t.some((function(e){try{e.__h.forEach(he),e.__h=e.__h.filter((function(e){return!e.__||pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],m.__e(n,e.__v)}})),le&&le(e,t)},m.unmount=function(e){ce&&ce(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{he(e)}catch(e){t=e}})),n.__H=void 0,t&&m.__e(t,n.__v))};var ue="function"==typeof requestAnimationFrame;function fe(e){var t,n=function(){clearTimeout(r),ue&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ue&&(t=requestAnimationFrame(n))}function he(e){var t=ee,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ee=t}function pe(e){var t=ee;e.__c=e.__(),ee=t}function ge(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function me(e){this.props=e}(me.prototype=new H).isPureReactComponent=!0,me.prototype.shouldComponentUpdate=function(e,t){return ge(this.props,e)||ge(this.state,t)};var ve=m.__b;m.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ve&&ve(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var be=m.__e;m.__e=function(e,t,n,r){if(e.then)for(var i,s=t;s=s.__;)if((i=s.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);be(e,t,n,r)};var ye=m.unmount;function Ae(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ae(e,t,n)}))),e}function we(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return we(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Ee(){this.__u=0,this.t=null,this.__b=null}function Ce(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function De(){this.u=null,this.o=null}m.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),ye&&ye(e)},(Ee.prototype=new H).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ce(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=we(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Ee.prototype.componentWillUnmount=function(){this.t=[]},Ee.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ae(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&k(M,null,e.fallback);return i&&(i.__h=null),[k(M,null,t.__a?null:e.children),i]};var _e=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Se(e){return this.getChildContext=function(){return e.context},e.children}function Re(e){var t=this,n=e.i;t.componentWillUnmount=function(){K(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),K(k(Se,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(De.prototype=new H).__a=function(e){var t=this,n=Ce(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),_e(t,e,r)):i()};n?n(s):s()}},De.prototype.render=function(e){this.u=null,this.o=new Map;var t=L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},De.prototype.componentDidUpdate=De.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){_e(e,n,t)}))};var xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ke=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Te="undefined"!=typeof document,Me=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(H.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Oe=m.event;function Ie(){}function Ne(){return this.cancelBubble}function Pe(){return this.defaultPrevented}m.event=function(e){return Oe&&(e=Oe(e)),e.persist=Ie,e.isPropagationStopped=Ne,e.isDefaultPrevented=Pe,e.nativeEvent=e};var He={configurable:!0,get:function(){return this.class}},Be=m.vnode;m.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var s in r={},n){var o=n[s];Te&&"children"===s&&"noscript"===t||"value"===s&&"defaultValue"in n&&null==o||("defaultValue"===s&&"value"in n&&null==n.value?s="value":"download"===s&&!0===o?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+t)&&!Me(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&ke.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===o&&(o=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=L(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=L(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(He.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",He))}e.$$typeof=xe,Be&&Be(e)};var ze=m.__r;m.__r=function(e){ze&&ze(e),e.__c};const je=[],Ue=new Map;function We(e){je.push(e),Ue.forEach((t=>{Ge(t,e)}))}function Fe(e){let t=Ue.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=(void 0===Le&&(Le=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}()),Le);n&&(t.nonce=n);const r=e===document?document.head:e,i=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,i)}Ue.set(e,t),function(e){for(const t of je)Ge(e,t)}(t)}}function Ge(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)}))}let Le;"undefined"!=typeof document&&Fe(document),We(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');class Ve{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(n[e]-=1,n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Qe(e){e.parentNode&&e.parentNode.removeChild(e)}function qe(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Ze(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Ze(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}const Ye=/(top|left|right|bottom|width|height)$/i;function $e(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Ye.test(t)?e.style[t]=`${n}px`:e.style[t]=n}let Je=0;function Xe(){return Je+=1,"fc-dom-"+Je}function Ke(e,t,n,r){let i=function(e,t){return n=>{let r=qe(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function et(e){return Object.assign({onClick:e},tt(e))}function tt(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let nt=0;function rt(){return nt+=1,String(nt)}function it(e,t,n){return n.func?n.func(e,t):function(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}(e[n.field],t[n.field])*(n.order||1)}function st(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function ot(e,t,n){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce(((e,t,n)=>e.replace("$"+n,t||"")),e):n}function at(e){return e%1==0}function lt(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const ct=["years","months","days","milliseconds"],dt=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ut(e,t){return"string"==typeof e?function(e){let t=dt.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?ft(e):"number"==typeof e?ft({[t||"milliseconds"]:e}):null}function ft(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function ht(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function pt(e){return gt(e)/864e5}function gt(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function mt(e,t){let n=null;for(let r=0;r<ct.length;r+=1){let i=ct[r];if(t[i]){let r=e[i]/t[i];if(!at(r)||null!==n&&n!==r)return null;n=r}else if(e[i])return null}return n}function vt(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function bt(e,t,n){if(e===t)return!0;let r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}const yt=["sun","mon","tue","wed","thu","fri","sat"];function At(e,t){let n=Tt(e);return n[2]+=7*t,Mt(n)}function wt(e,t){let n=Tt(e);return n[2]+=t,Mt(n)}function Et(e,t){let n=Tt(e);return n[6]+=t,Mt(n)}function Ct(e,t){return(t.valueOf()-e.valueOf())/864e5}function Dt(e,t){return It(e)===It(t)?Math.round(Ct(e,t)):null}function _t(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function St(e,t,n,r){let i=Mt([t,0,1+Rt(t,n,r)]),s=_t(e),o=Math.round(Ct(i,s));return Math.floor(o/7)+1}function Rt(e,t,n){let r=7+t-n;return-(7+Mt([e,0,r]).getUTCDay()-t)%7+r-1}function xt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kt(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Tt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Mt(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Ot(e){return!isNaN(e.valueOf())}function It(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Nt(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Ht(t,!0)))),r}function Pt(e){return e.toISOString().replace(/T.*$/,"")}function Ht(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=Math.round(r%60);return t?`${n+st(i,2)}:${st(s,2)}`:`GMT${n}${i}${s?`:${st(s,2)}`:""}`}function Bt(e,t,n){let r,i;return function(...s){if(r){if(!bt(r,s)){n&&n(i);let r=e.apply(this,s);t&&t(r,i)||(i=r)}}else i=e.apply(this,s);return r=s,i}}function zt(e,t,n){let r,i;return s=>{if(r){if(!vn(r,s)){n&&n(i);let r=e.call(this,s);t&&t(r,i)||(i=r)}}else i=e.call(this,s);return r=s,i}}const jt={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Ut={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Wt=/\s*([ap])\.?m\.?/i,Ft=/,/g,Gt=/\s+/g,Lt=/\u200e/g,Vt=/UTC|GMT/;class Qt{constructor(e){let t={},n={},r=0;for(let i in e)i in jt?(n[i]=e[i],r=Math.max(jt[i],r)):(t[i]=e[i],i in Ut&&(r=Math.max(Ut[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Bt(qt)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:s}=this,o=(a=e.marker,l=t.marker,(c=n.calendarSystem).getMarkerYear(a)!==c.getMarkerYear(l)?5:c.getMarkerMonth(a)!==c.getMarkerMonth(l)?4:c.getMarkerDay(a)!==c.getMarkerDay(l)?2:It(a)!==It(l)?1:0);var a,l,c;if(!o)return this.format(e,n);let d=o;!(d>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(d=1);let u=this.format(e,n),f=this.format(t,n);if(u===f)return u;let h=qt(function(e,t){let n={};for(let r in e)(!(r in Ut)||Ut[r]<=t)&&(n[r]=e[r]);return n}(i,d),s,n),p=h(e),g=h(t),m=function(e,t,n,r){let i=0;for(;i<e.length;){let s=e.indexOf(t,i);if(-1===s)break;let o=e.substr(0,s);i=s+t.length;let a=e.substr(i),l=0;for(;l<n.length;){let e=n.indexOf(r,l);if(-1===e)break;let t=n.substr(0,e);l=e+r.length;let i=n.substr(l);if(o===t&&a===i)return{before:o,after:a}}}return null}(u,p,f,g),v=s.separator||r||n.defaultSeparator||"";return m?m.before+p+v+g+m.after:u+v+f}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function qt(e,t,n){let r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?e=>Ht(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,i){let s=[];return"long"===i?s.push(n):"short"!==i&&"narrow"!==i||s.push(t),"long"!==i&&"short"!==i||s.push(" "),s.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&s.reverse(),s.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return s=>{let o,{marker:a}=s;return o=r&&!a.getUTCMinutes()?r:i,function(e,t,n,r,i){return e=e.replace(Lt,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;return e=e.replace(Vt,(()=>(n=!0,t))),n||(e+=` ${t}`),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":Ht(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Ft,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(Wt,"").trim():"narrow"===r.meridiem?e=e.replace(Wt,((e,t)=>t.toLocaleLowerCase())):"short"===r.meridiem?e=e.replace(Wt,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===r.meridiem&&(e=e.replace(Wt,(e=>e.toLocaleLowerCase()))),e=(e=e.replace(Gt," ")).trim()}(o.format(a),s,e,t,n)}}(e,t,n)}function Zt(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Yt(e,t,n,r){let i=Zt(e,n.calendarSystem);return{date:i,start:i,end:t?Zt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class $t{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Yt(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Yt(e,t,n,r))}}class Jt{constructor(e){this.func=e}format(e,t,n){return this.func(Yt(e,null,t,n))}formatRange(e,t,n,r){return this.func(Yt(e,t,n,r))}}function Xt(e){return"object"==typeof e&&e?new Qt(e):"string"==typeof e?new $t(e):"function"==typeof e?new Jt(e):null}const Kt={navLinkDayClick:dn,navLinkWeekClick:dn,duration:ut,bootstrapFontAwesome:dn,buttonIcons:dn,customButtons:dn,defaultAllDayEventDuration:ut,defaultTimedEventDuration:ut,nextDayThreshold:ut,scrollTime:ut,scrollTimeReset:Boolean,slotMinTime:ut,slotMaxTime:ut,dayPopoverFormat:Xt,slotDuration:ut,snapDuration:ut,headerToolbar:dn,footerToolbar:dn,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Xt,dayHeaderClassNames:dn,dayHeaderContent:dn,dayHeaderDidMount:dn,dayHeaderWillUnmount:dn,dayCellClassNames:dn,dayCellContent:dn,dayCellDidMount:dn,dayCellWillUnmount:dn,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:dn,weekNumbers:Boolean,weekNumberClassNames:dn,weekNumberContent:dn,weekNumberDidMount:dn,weekNumberWillUnmount:dn,editable:Boolean,viewClassNames:dn,viewDidMount:dn,viewWillUnmount:dn,nowIndicator:Boolean,nowIndicatorClassNames:dn,nowIndicatorContent:dn,nowIndicatorDidMount:dn,nowIndicatorWillUnmount:dn,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:dn,locale:dn,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:dn,eventOrder:function(e){let t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t+=1)n=i[t],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r},eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:dn,contentHeight:dn,direction:String,weekNumberFormat:Xt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:dn,initialDate:dn,now:dn,eventDataTransform:dn,stickyHeaderDates:dn,stickyFooterScrollbar:dn,viewHeight:dn,defaultAllDay:Boolean,eventSourceFailure:dn,eventSourceSuccess:dn,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:dn,eventConstraint:dn,eventAllow:dn,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:dn,eventContent:dn,eventDidMount:dn,eventWillUnmount:dn,selectConstraint:dn,selectOverlap:dn,selectAllow:dn,droppable:Boolean,unselectCancel:String,slotLabelFormat:dn,slotLaneClassNames:dn,slotLaneContent:dn,slotLaneDidMount:dn,slotLaneWillUnmount:dn,slotLabelClassNames:dn,slotLabelContent:dn,slotLabelDidMount:dn,slotLabelWillUnmount:dn,dayMaxEvents:dn,dayMaxEventRows:dn,dayMinWidth:Number,slotLabelInterval:ut,allDayText:String,allDayClassNames:dn,allDayContent:dn,allDayDidMount:dn,allDayWillUnmount:dn,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Xt,rerenderDelay:Number,moreLinkText:dn,moreLinkHint:dn,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:dn,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:ut,hiddenDays:dn,fixedWeekCount:Boolean,validRange:dn,visibleRange:dn,titleFormat:dn,eventInteractive:Boolean,noEventsText:String,viewHint:dn,navLinkHint:dn,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:dn,moreLinkClassNames:dn,moreLinkContent:dn,moreLinkDidMount:dn,moreLinkWillUnmount:dn,monthStartFormat:Xt,handleCustomRendering:dn,customRenderingMetaMap:dn,customRenderingReplaces:Boolean},en={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},tn={datesSet:dn,eventsSet:dn,eventAdd:dn,eventChange:dn,eventRemove:dn,windowResize:dn,eventClick:dn,eventMouseEnter:dn,eventMouseLeave:dn,select:dn,unselect:dn,loading:dn,_unmount:dn,_beforeprint:dn,_afterprint:dn,_noEventDrop:dn,_noEventResize:dn,_resize:dn,_scrollRequest:dn},nn={buttonText:dn,buttonHints:dn,views:dn,plugins:dn,initialEvents:dn,events:dn,eventSources:dn},rn={headerToolbar:sn,footerToolbar:sn,buttonText:sn,buttonHints:sn,buttonIcons:sn,dateIncrement:sn,plugins:on,events:on,eventSources:on,resources:on};function sn(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?vn(e,t):e===t}function on(e,t){return Array.isArray(e)&&Array.isArray(t)?bt(e,t):e===t}const an={type:String,component:dn,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:dn,usesMinMaxTime:Boolean,classNames:dn,content:dn,didMount:dn,willUnmount:dn};function ln(e){return fn(e,rn)}function cn(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function dn(e){return e}const{hasOwnProperty:un}=Object.prototype;function fn(e,t){let n={};if(t)for(let r in t)if(t[r]===sn){let t=[];for(let i=e.length-1;i>=0;i-=1){let s=e[i][r];if("object"==typeof s&&s)t.unshift(s);else if(void 0!==s){n[r]=s;break}}t.length&&(n[r]=fn(t))}for(let t=e.length-1;t>=0;t-=1){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function hn(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function pn(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function gn(e){let t={};for(let n of e)t[n]=!0;return t}function mn(e){let t=[];for(let n in e)t.push(e[n]);return t}function vn(e,t){if(e===t)return!0;for(let n in e)if(un.call(e,n)&&!(n in t))return!1;for(let n in t)if(un.call(t,n)&&e[n]!==t[n])return!1;return!0}const bn=/^on[A-Z]/;function yn(e,t){let n=[];for(let r in e)un.call(e,r)&&(r in t||n.push(r));for(let r in t)un.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function An(e,t,n={}){if(e===t)return!0;for(let o in t)if(!(o in e&&(r=e[o],i=t[o],s=n[o],r===i||!0===s||s&&s(r,i))))return!1;var r,i,s;for(let n in e)if(!(n in t))return!1;return!0}let wn={};var En;En=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Mt(e)}markerToArray(e){return Tt(e)}},wn.gregory=En;const Cn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class Dn{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new wn[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Mt(xt(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Mt(e)),null!==t&&Ot(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=Cn.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if(Ot(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=function(e,t){let n=Dt(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:(n=Dt(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),at(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),at(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),at(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(pt(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/(pt(n)/30):n.days&&(r=Dt(e,t),null!==r)?r/pt(n):(t.valueOf()-e.valueOf())/gt(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?_t(e):"hour"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),i=St(e,r,t,n);if(i<1)return St(e,r-1,t,n);let s=St(e,r+1,t,n);return s>=1?Math.min(i,s):i}(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=Et(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),Nt(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?Mt(xt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Mt(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-kt(Tt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Tt(e)):null}toDate(e,t){return"local"===this.timeZone?kt(Tt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Tt(e))*60):new Date(e.valueOf()-(t||0))}}class Sn{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if("object"==typeof e&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}function Rn(e){e();let t=m.debounceRendering,n=[];for(m.debounceRendering=function(e){n.push(e)},K(k(xn,{}),document.createElement("div"));n.length;)n.shift()();m.debounceRendering=t}Sn.prototype.classes={},Sn.prototype.iconClasses={},Sn.prototype.baseIconClass="",Sn.prototype.iconOverridePrefix="";class xn extends H{render(){return k("div",{})}componentDidMount(){this.setState({})}}function kn(e){let t=function(e,t){var n={__c:t="__cC"+C++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,U(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}class Tn{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const Mn=kn({});function On(e,t,n,r,i,s,o,a,l,c,d,u,f){return{dateEnv:i,options:n,pluginHooks:o,emitter:c,dispatch:a,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:"rtl"===n.direction,addResizeHandler(e){c.on("_resize",e)},removeResizeHandler(e){c.off("_resize",e)},createScrollResponder:e=>new Tn(e,c,ut(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:u,unregisterInteractiveComponent:f}}class In extends H{shouldComponentUpdate(e,t){return this.debug&&console.log(yn(e,this.props),yn(t,this.state)),!An(this.props,e,this.propEquality)||!An(this.state,t,this.stateEquality)}safeSetState(e){An(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}In.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},In.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},In.contextType=Mn,In.prototype.propEquality={},In.prototype.stateEquality={};class Nn extends In{}function Pn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}Nn.contextType=Mn;class Hn extends Nn{constructor(){super(...arguments),this.id=rt(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&Bn(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Pn(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:s}=e,o=zn(e,[],this.handleEl);let a,l,c=!1,d=[];if(null!=r){const e="function"==typeof r?r(s,k):r;if(!0===e)c=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?d=Array.prototype.slice.call(e.domNodes):(t?b(e):"function"!=typeof e)?a=e:l=e}}else c=!Bn(e.generatorName,n);return c&&i&&(a=i(s)),this.queuedDomNodes=d,this.currentGeneratorMeta=l,k(e.elTag,o,a)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:i,customRenderingMetaMap:s}=r.options;if(i){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==s?void 0:s[n.generatorName];r&&i(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(jn)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!bt(e,t)){t.forEach(Qe);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function Bn(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function zn(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function jn(e){return Boolean(e)}Hn.addPropsEquality({elClasses:bt,elStyle:vn,elAttrs:function(e,t){const n=yn(e,t);for(let e of n)if(!bn.test(e))return!1;return!0},renderProps:vn});const Un=kn(0);class Wn extends H{constructor(){super(...arguments),this.InnerContent=Fn.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Pn(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const n="function"==typeof e?e(t):e||[];return"string"==typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=zn(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?k(e.elTag,n,r):r}return k(Hn,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function Fn(e,t){const n=e.props;return k(Hn,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}Wn.contextType=Un;class Gn extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return k(Wn,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...Ln(e.viewSpec),...e.elClasses||[]],renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount}),(()=>e.children))}}function Ln(e){return[`fc-${e.type}-view`,"fc-view"]}function Vn(e,t){let n,r,i=[],{start:s}=t;for(e.sort(Qn),n=0;n<e.length;n+=1)r=e[n],r.start>s&&i.push({start:s,end:r.start}),r.end>s&&(s=r.end);return s<t.end&&i.push({start:s,end:t.end}),i}function Qn(e,t){return e.start.valueOf()-t.start.valueOf()}function qn(e,t){let{start:n,end:r}=e,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function Zn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function Yn(e){let t=Math.floor(Ct(e.start,e.end))||1,n=_t(e.start);return{start:n,end:wt(n,t)}}function $n(e,t=ut(0)){let n=null,r=null;if(e.end){r=_t(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=gt(t)&&(r=wt(r,1))}return e.start&&(n=_t(e.start),r&&r<=n&&(r=wt(n,1))),{start:n,end:r}}function Jn(e,t,n,r){return"year"===r?ut(n.diffWholeYears(e,t),"year"):"month"===r?ut(n.diffWholeMonths(e,t),"month"):function(e,t){let n=_t(e),r=_t(t);return{years:0,months:0,days:Math.round(Ct(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}function Xn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}class Kn{constructor(e){this.props=e,this.nowDate=Xn(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let r,i,s,o,a,l,{props:c}=this;var d,u,f,h;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(d=e,e=null!=(u=r).start&&d<u.start?u.start:null!=u.end&&d>=u.end?new Date(u.end.valueOf()-1):d),i=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(i.unit),o=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,s),o=this.trimHiddenDays(o),a=o,c.showNonCurrentDates||(a=qn(a,i.range)),a=this.adjustActiveRange(a),a=qn(a,r),f=i.range,h=r,l=(null===f.end||null===h.start||f.end>h.start)&&(null===f.start||null===h.end||f.start<h.end),Zn(o,e)||(e=o.start),{currentDate:e,validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:s,activeRange:a,renderRange:o,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,i=null,s=null,o=null;return r.duration?(i=r.duration,s=r.durationUnit,o=this.buildRangeFromDuration(e,t,i,s)):(n=this.props.dayCount)?(s="day",o=this.buildRangeFromDayCount(e,t,n)):(o=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),s=vt(i).unit,o=this.buildRangeFromDuration(e,t,i,s)),{duration:i,unit:s,range:o}}getFallbackDuration(){return ut({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:s,end:o}=e;return n&&(pt(r)<0&&(s=_t(s),s=t.add(s,r)),pt(i)>1&&(o=_t(o),o=wt(o,-1),o=t.add(o,i))),{start:s,end:o}}buildRangeFromDuration(e,t,n,r){let i,s,o,{dateEnv:a,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&gt(e)<gt(n)?vt(e).unit:r}function c(){i=a.startOf(e,l),s=a.add(i,n),o={start:i,end:s}}return pt(n)<=1&&this.isHiddenDay(i)&&(i=this.skipHiddenDays(i,t),i=_t(i)),c(),this.trimHiddenDays(o)||(e=this.skipHiddenDays(e,t),c()),o}buildRangeFromDayCount(e,t,n){let r,{dateEnv:i,dateAlignment:s}=this.props,o=0,a=e;s&&(a=i.startOf(a,s)),a=_t(a),a=this.skipHiddenDays(a,t),r=a;do{r=wt(r,1),this.isHiddenDay(r)||(o+=1)}while(o<n);return{start:a,end:r}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let t,{dateIncrement:n}=this.props;return n||((t=this.props.dateAlignment)?ut(1,t):e||ut({days:1}))}refineRange(e){if(e){let t=function(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}(e,this.props.dateEnv);return t&&(t=$n(t)),t}return null}initHiddenDays(){let e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:t,end:n}=e;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=wt(e,t);return e}}function er(e,t,n,r){return{instanceId:rt(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}function tr(e,t,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:o,instances:a}=e;a=hn(a,(e=>!o[e.defId].recurringDef));for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||(o=n.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let l=nr(n,o,t,r,i.recurringTypes);for(let t of l){let n=er(e,{start:t,end:r.add(t,o)});a[n.instanceId]=n}}}return{defs:o,instances:a}}function nr(e,t,n,r,i){let s=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(s=s.map(_t)),s}const rr={id:String,groupId:String,title:String,url:String,interactive:Boolean},ir={start:dn,end:dn,date:dn,allDay:Boolean},sr=Object.assign(Object.assign(Object.assign({},rr),ir),{extendedProps:dn});function or(e,t,n,r,i=lr(n),s,o){let{refined:a,extra:l}=ar(e,n,i),c=function(e,t){let n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),d=function(e,t,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(e,n);if(s){let{allDay:n}=e;return null==n&&(n=t,null==n&&(n=s.allDayGuess,null==n&&(n=!1))),{allDay:n,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}(a,c,n.dateEnv,n.pluginHooks.recurringTypes);if(d){let e=cr(a,l,t?t.sourceId:"",d.allDay,Boolean(d.duration),n,s);return e.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:e,instance:null}}let u=function(e,t,n,r){let i,s,{allDay:o}=e,a=null,l=!1,c=null,d=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(d),i)a=i.marker;else if(!r)return null;return null!=e.end&&(s=n.dateEnv.createMarkerMeta(e.end)),null==o&&(o=null!=t?t:(!i||i.isTimeUnspecified)&&(!s||s.isTimeUnspecified)),o&&a&&(a=_t(a)),s&&(c=s.marker,o&&(c=_t(c)),a&&c<=a&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,o?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:o,hasEnd:l,range:{start:a,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:s?s.forcedTzo:null}}(a,c,n,r);if(u){let e=cr(a,l,t?t.sourceId:"",u.allDay,u.hasEnd,n,s),r=er(e.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function ar(e,t,n=lr(t)){return cn(e,n)}function lr(e){return Object.assign(Object.assign(Object.assign({},gr),sr),e.pluginHooks.eventRefiners)}function cr(e,t,n,r,i,s,o){let a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(o&&e.id?o[e.id]:"")||rt(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:vr(e,s),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of s.pluginHooks.eventDefMemberAdders)Object.assign(a,t(e));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function dr(e,t,n,r,i,s){let o={defs:{},instances:{}},a=lr(n);for(let l of e){let e=or(l,t,n,r,a,i,s);e&&ur(e,o)}return o}function ur(e,t={defs:{},instances:{}}){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function fr(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function hr(e,t){let n=hn(e.defs,t),r=hn(e.instances,(e=>n[e.defId]));return{defs:n,instances:r}}function pr(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const gr={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:dn,overlap:dn,allow:dn,className:pr,classNames:pr,color:String,backgroundColor:String,borderColor:String,textColor:String},mr={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function vr(e,t){let n=function(e,t){return Array.isArray(e)?dr(e,null,t,!0):"object"==typeof e&&e?dr([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function br(e){return e.reduce(yr,mr)}function yr(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const Ar={id:String,defaultAllDay:Boolean,url:String,format:String,events:dn,eventDataTransform:dn,success:dn,failure:dn};function wr(e,t,n=Er(t)){let r;if("string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){let{refined:i,extra:s}=cn(r,n),o=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;t-=1){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:rt(),sourceDefId:o.sourceDefId,meta:o.meta,ui:vr(i,t),extendedProps:s}}return null}function Er(e){return Object.assign(Object.assign(Object.assign({},gr),Ar),e.pluginHooks.eventSourceRefiners)}function Cr(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Dr(e,i)),r&&(e=Dr(e,r)),e}function Dr(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function _r(e,t,n){let{defs:r}=e,i=pn(e.instances,(e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})));return{defs:r,instances:i}}function Sr(e,t){return hr(e,(e=>e.sourceId!==t))}class Rr{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((e=>e!==n))):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}const xr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function kr(e,t,n){let{dateEnv:r,options:i}=n,s=t;return e?(s=_t(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Tr(e,t,n,r){let i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function Mr(e,t,n,r,i){let{dateEnv:s}=i,o=r.standardProps&&!0===r.standardProps.allDay,a=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return o&&(l.range=Yn(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:s.add(l.range.start,r.datesDelta),end:s.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:s.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:s.add(l.range.end,r.endDelta)}),a&&(l.range={start:l.range.start,end:kr(t.allDay,l.range.start,i)}),t.allDay&&(l.range={start:_t(l.range.start),end:_t(l.range.end)}),l.range.end<l.range.start&&(l.range.end=kr(t.allDay,l.range.start,i)),l}class Or{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Ir{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in ir)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=rr[e](t),this.mutate({standardProps:{publicId:t}});else if(e in rr)t=rr[e](t),this.mutate({standardProps:{[e]:t}});else if(e in gr){let n=gr[e](t);n="color"===e?{backgroundColor:t,borderColor:t}:"editable"===e?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=Jn(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e,t={}){let n,{dateEnv:r}=this._context;if((null==e||(n=r.createMarker(e),n))&&this._instance)if(n){let e=Jn(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,n={}){let r,{dateEnv:i}=this._context,s={allDay:n.allDay},o=i.createMarker(e);var a,l;if(o&&(null==t||(r=i.createMarker(t),r))&&this._instance){let e=this._instance.range;!0===n.allDay&&(e=Yn(e));let t=Jn(e.start,o,i,n.granularity);if(r){let o=Jn(e.end,r,i,n.granularity);l=o,(a=t).years===l.years&&a.months===l.months&&a.days===l.days&&a.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:s}):this.mutate({startDelta:t,endDelta:o,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:t,standardProps:s})}}moveStart(e){let t=ut(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=ut(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=ut(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Xt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:i}=r.getCurrentData(),s=function(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=hr(e,(e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r}));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}(i,t.instanceId);s=function(e,t,n,r){let i=jr(e.defs,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}),s={defs:{},instances:{}};for(let t in e.defs){let o=e.defs[t];s.defs[t]=Tr(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],a=s.defs[o.defId];s.instances[t]=Mr(o,a,i[o.defId],n,r)}return s}(s,0,e,r);let o=new Ir(r,n,t);this._def=s.defs[n.defId],this._instance=s.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:s}),r.emitter.trigger("eventChange",{oldEvent:o,event:this,relatedEvents:Pr(s,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,t=Nr(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new Or(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,s={allDay:t.allDay};return t.title&&(s.title=t.title),r&&(s.start=r),i&&(s.end=i),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(s,t.extendedProps):s.extendedProps=t.extendedProps),s}toJSON(){return this.toPlainObject()}}function Nr(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function Pr(e,t,n){let{defs:r,instances:i}=e,s=[],o=n?n.instanceId:"";for(let e in i){let n=i[e],a=r[n.defId];n.instanceId!==o&&s.push(new Ir(t,a,n))}return s}function Hr(e,t,n,r){let i={},s={},o={},a=[],l=[],c=jr(e.defs,t);for(let t in e.defs){let n=e.defs[t];"inverse-background"===c[n.defId].display&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):s[t]=[])}for(let t in e.instances){let o=e.instances[t],d=e.defs[o.defId],u=c[d.defId],f=o.range,h=!d.allDay&&r?$n(f,r):f,p=qn(h,n);p&&("inverse-background"===u.display?d.groupId?i[d.groupId].push(p):s[o.defId].push(p):"none"!==u.display&&("background"===u.display?a:l).push({def:d,ui:u,instance:o,range:p,isStart:h.start&&h.start.valueOf()===p.start.valueOf(),isEnd:h.end&&h.end.valueOf()===p.end.valueOf()}))}for(let e in i){let t=Vn(i[e],n);for(let n of t){let t=o[e],r=c[t.defId];a.push({def:t,ui:r,instance:null,range:n,isStart:!1,isEnd:!1})}}for(let t in s){let r=Vn(s[t],n);for(let n of r)a.push({def:e.defs[t],ui:c[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Br(e,t){e.fcSeg=t}function zr(e){return e.fcSeg||e.parentNode.fcSeg||null}function jr(e,t){return pn(e,(e=>Ur(e,t)))}function Ur(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),br(n)}function Wr(e,t){let n=e.map(Fr);return n.sort(((e,n)=>function(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=it(e,t,n[r]),i)return i;return 0}(e,n,t))),n.map((e=>e._seg))}function Fr(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:e})}function Gr(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:s}=e.eventRange,o=s.startEditable;for(let e of r)o=e(o,i,s,t);return o}function Lr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function Vr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function Qr(e,t,n,r,i,s,o){let{dateEnv:a,options:l}=n,{displayEventTime:c,displayEventEnd:d}=l,u=e.eventRange.def,f=e.eventRange.instance;null==c&&(c=!1!==r),null==d&&(d=!1!==i);let h=f.range.start,p=f.range.end,g=s||e.start||e.eventRange.range.start,m=o||e.end||e.eventRange.range.end,v=_t(h).valueOf()===_t(g).valueOf(),b=_t(Et(p,-1)).valueOf()===_t(Et(m,-1)).valueOf();return c&&!u.allDay&&(v||b)?(g=v?h:g,m=b?p:m,d&&u.hasEnd?a.formatRange(g,m,t,{forcedStartTzo:s?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):a.format(g,t,{forcedTzo:s?null:f.forcedStartTzo})):""}function qr(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Zn(t,r.start)}}function Zr(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function Yr(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function $r(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:o}=t,{eventInteractive:a}=o;return null==a&&(a=n.interactive,null==a&&(a=Boolean(s.hasHandlers("eventClick")))),a?tt((e=>{s.trigger("eventClick",{el:e.target,event:new Ir(t,n,r),jsEvent:e,view:t.viewApi})})):{}}const Jr={start:dn,end:dn,allDay:Boolean};function Xr(e,t,n){return Object.assign(Object.assign({},Kr(e,t,n)),{timeZone:t.timeZone})}function Kr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}class ei extends Error{constructor(e,t){super(e),this.response=t}}let ti;function ni(){return null==ti&&(ti=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),ti}class ri extends Nn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{Rn((()=>{this.setState({forPrint:!0})}))},this.handleAfterPrint=()=>{Rn((()=>{this.setState({forPrint:!1})}))}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,s=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return ni()||s.push("fc-liquid-hack"),e.children(s,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class ii{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}const si={};class oi{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering((()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:i}=this.getCurrentData(),s=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(let e in r)s.push(e);for(t=0;t<s.length;t+=1)if(n=r[s[t]],n&&n.singleUnit===e)return n;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Xn(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=ut(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Xt(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Xt(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};let r=this.getCurrentData(),i=function(e,t,n){let r=function(e,t){let{refined:n,extra:r}=cn(e,Jr),i=n.start?t.createMarkerMeta(n.start):null,s=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return null==o&&(o=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:o},r)}(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}(n,r.dateEnv,ut({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),function(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},function(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));var r,i;return Object.assign(n,(r=e,i=t.dateEnv,Object.assign(Object.assign({},Kr(r.range,i,r.allDay)),{allDay:r.allDay}))),n}(e,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}(i,0,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))}addEvent(e,t){if(e instanceof Ir){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:ur({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n,r=this.getCurrentData();if(t instanceof Or)n=t.internalEventSource;else if("boolean"==typeof t)t&&([n]=mn(r.eventSources));else if(null!=t){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;n=e.internalEventSource}let i=or(e,n,r,!1);if(i){let e=new Ir(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:ur(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Nr(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let s=n[i];if(s.publicId===e){if(s.recurringDef)return new Ir(t,s,null);for(let e in r){let n=r[e];if(n.defId===s.defId)return new Ir(t,s,n)}}}return null}getEvents(){let e=this.getCurrentData();return Pr(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new Or(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new Or(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Or)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=wr(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new Or(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=ut(e);t&&this.trigger("_scrollRequest",{time:t})}}function ai(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}const li={defs:{},instances:{}};class ci{constructor(){this.getKeysForEventDefs=Bt(this._getKeysForEventDefs),this.splitDateSelection=Bt(this._splitDateSpan),this.splitEventStore=Bt(this._splitEventStore),this.splitIndividualUi=Bt(this._splitIndividualUi),this.splitEventDrag=Bt(this._splitInteraction),this.splitEventResize=Bt(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,n),s=this.splitEventStore(e.eventStore,n),o=this.splitEventDrag(e.eventDrag),a=this.splitEventResize(e.eventResize),l={};this.eventUiBuilders=pn(t,((e,t)=>this.eventUiBuilders[t]||Bt(di)));for(let n in t){let c=t[n],d=s[n]||li,u=this.eventUiBuilders[n];l[n]={businessHours:c.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:d,eventUiBases:u(e.eventUiBases[""],c.ui,i[n]),eventSelection:d.instances[e.eventSelection]?e.eventSelection:"",eventDrag:o[n]||null,eventResize:a[n]||null}}return l}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return pn(e.defs,(e=>this.getKeysForEventDef(e)))}_splitEventStore(e,t){let{defs:n,instances:r}=e,i={};for(let e in n)for(let r of t[e])i[r]||(i[r]={defs:{},instances:{}}),i[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])i[r]&&(i[r].instances[e]=n)}return i}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let i of t[r])n[i]||(n[i]={}),n[i][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),s=r=>{t[r]||(t[r]={affectedEvents:n[r]||li,mutatedEvents:i[r]||li,isEvent:e.isEvent})};for(let e in n)s(e);for(let e in i)s(e)}return t}}function di(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let i={"":br(r)};return n&&Object.assign(i,n),i}function ui(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Zn(r.activeRange,e)),isOther:Boolean(r&&!Zn(r.currentRange,e)),isToday:Boolean(t&&Zn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function fi(e,t){let n=["fc-day",`fc-day-${yt[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const hi=Xt({year:"numeric",month:"long",day:"numeric"}),pi=Xt({week:"long"});function gi(e,t,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:o}=e;let a=i.format(t,"week"===n?pi:hi);if(s.navLinks){let e=i.toDate(t);const l=e=>{let r="day"===n?s.navLinkDayClick:"week"===n?s.navLinkWeekClick:null;"function"==typeof r?r.call(o,i.toDate(t),e):("string"==typeof r&&(n=r),o.zoomTo(t,n))};return Object.assign({title:ot(s.navLinkHint,[a,e],a),"data-navlink":""},r?et(l):{onClick:l})}return{"aria-label":a}}let mi;class vi{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let t,{lefts:n,rights:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}topToIndex(e){let t,{tops:n,bottoms:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return bi(this.tops||[],e.tops||[])&&bi(this.bottoms||[],e.bottoms||[])&&bi(this.lefts||[],e.lefts||[])&&bi(this.rights||[],e.rights||[])}}function bi(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class yi extends Nn{constructor(){super(...arguments),this.uid=rt()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!qe(e,".fc-event-mirror")}isValidDateDownEl(e){return!(qe(e,".fc-event:not(.fc-bg-event)")||qe(e,".fc-more-link")||qe(e,"a[data-navlink]")||qe(e,".fc-popover"))}}class Ai{constructor(e=(e=>e.thickness||1)){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){const r=Object.assign(Object.assign({},t),{span:Ci(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(Di(r,t.level,t.levelCoord),Di(n,t.level,[e])):Di(n[t.level],t.lateral,e),this.stackCnts[Ei(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,s=t.length,o=0,a=-1,l=-1,c=null,d=0;for(let u=0;u<s;u+=1){const s=t[u];if(!r&&s>=o+this.getEntryThickness(e))break;let f,h=n[u],p=_i(h,e.span.start,wi),g=p[0]+p[1];for(;(f=h[g])&&f.span.start<e.span.end;){let e=s+this.getEntryThickness(f);e>o&&(o=e,c=f,a=u,l=g),e===o&&(d=Math.max(d,i[Ei(f)]+1)),g+=1}}let u=0;if(c)for(u=a+1;u<s&&t[u]<o;)u+=1;let f=-1;return u<s&&t[u]===o&&(f=_i(n[u],e.span.end,wi)[0]),{touchingLevel:a,touchingLateral:l,touchingEntry:c,stackCnt:d,levelCoord:o,level:u,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],s=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:s}))}return r}}function wi(e){return e.span.end}function Ei(e){return e.index+":"+e.span.start}function Ci(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function Di(e,t,n){e.splice(t,0,n)}function _i(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),o=n(e[s]);if(t<o)i=s;else{if(!(t>o))return[s,1];r=s+1}}return[r,0]}Boolean;const Si="fc-col-header-cell";function Ri(e){return e.text}class xi extends Nn{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:s,dateProfile:o}=i,a=ui(s,i.todayRange,null,o),l=[Si].concat(fi(a,n)),c=e.format(s,i.dayHeaderFormat),d=!a.isDisabled&&i.colCnt>1?gi(this.context,s):{},u=Object.assign(Object.assign(Object.assign({date:e.toDate(s),view:r},i.extraRenderProps),{text:c}),a);return k(Wn,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":a.isDisabled?void 0:Pt(s)},i.extraDataAttrs),renderProps:u,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>k("div",{className:"fc-scrollgrid-sync-inner"},!a.isDisabled&&k(e,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]}))))}}const ki=Xt({weekday:"long"});class Ti extends Nn{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,s=wt(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},a=t.format(s,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:s},o),{view:r}),e.extraRenderProps),{text:a});return k(Wn,{elTag:"th",elClasses:[Si,...fi(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(n=>k("div",{className:"fc-scrollgrid-sync-inner"},k(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(s,ki)}}))))}}class Mi extends H{constructor(e,t){super(e,t),this.initialNowDate=Xn(t.options.now,t.dateEnv),this.initialNowQueriedMs=(new Date).valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:t}=this,n=Et(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,ut(1,e.unit)),s=i.valueOf()-n.valueOf();return s=Math.min(864e5,s),{currentState:{nowDate:r,todayRange:Oi(r)},nextState:{nowDate:i,todayRange:Oi(i)},waitMs:s}}setTimeout(){let{nextState:e,waitMs:t}=this.computeTiming();this.timeoutId=setTimeout((()=>{this.setState(e,(()=>{this.setTimeout()}))}),t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function Oi(e){let t=_t(e);return{start:t,end:wt(t,1)}}Mi.contextType=Mn;class Ii extends Nn{constructor(){super(...arguments),this.createDayHeaderFormatter=Bt(Ni)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return k(Mi,{unit:"day"},((e,o)=>k("tr",{role:"row"},i&&i("day"),t.map((e=>r?k(xi,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:s}):k(Ti,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s}))))))}}function Ni(e,t,n){return e||function(e,t){return Xt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}class Pi{constructor(e,t){let n=e.start,{end:r}=e,i=[],s=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),s.push(n)),n=wt(n,1);this.dates=s,this.indices=i,this.cnt=s.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(wt(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(Ct(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}}class Hi{constructor(e,t){let n,r,i,{dates:s}=e;if(t){for(r=s[0].getUTCDay(),n=1;n<s.length&&s[n].getUTCDay()!==r;n+=1);i=Math.ceil(s.length/n)}else i=1,n=s.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,s=e;for(;s<=i;){let o=Math.floor(s/t),a=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:s%t,lastCol:(a-1)%t,isStart:n.isStart&&s===e,isEnd:n.isEnd&&a-1===i}),s=a}}return r}}class Bi{constructor(){this.sliceBusinessHours=Bt(this._sliceBusinessHours),this.sliceDateSelection=Bt(this._sliceDateSpan),this.sliceEventStore=Bt(this._sliceEventStore),this.sliceEventDrag=Bt(this._sliceInteraction),this.sliceEventResize=Bt(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:s}=e,o=this.sliceEventStore(e.eventStore,s,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,s,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,s,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,s,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:Et(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(tr(e,zi(t,Boolean(n)),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let s=Hr(e,t,zi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let s=Hr(e.mutatedEvents,t,zi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...s){if(!e)return[];let o=zi(t,Boolean(n)),a=qn(e.range,o);if(a){let t=function(e,t,n){let r=ar({editable:!1},n),i=cr(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:Ur(i,t),instance:er(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e=Object.assign(Object.assign({},e),{range:a}),r,i),n=this.sliceRange(e.range,...s);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:wt(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}}function zi(e,t){let n=e.activeRange;return t?n:{start:Et(n.start,e.slotMinTime.milliseconds),end:Et(n.end,e.slotMaxTime.milliseconds-864e5)}}const ji=/^(visible|hidden)$/;class Ui extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),k("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(ji.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(ji.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return ji.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return ji.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Wi{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,s=!1;null!==e?(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,s=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],i=!0)),this.masterCallback&&(i&&this.masterCallback(null,String(t)),s&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return function(e,t=0,n,r=1){let i=[];null==n&&(n=Object.keys(e).length);for(let s=t;s<n;s+=r){let t=e[s];void 0!==t&&i.push(t)}return i}(this.currentMap,e,t,n)}getAll(){return mn(this.currentMap)}}function Fi(e,t){return e.liquid&&t.liquid}function Gi(e,t){return bt(e,t,vn)}function Li(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(k("col",{style:{width:"shrink"===r.width?Vi(t):r.width||"",minWidth:r.minWidth||""}}))}return k("colgroup",{},...n)}function Vi(e){return null==e?4:e}function Qi(e,t){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function qi(e){return k("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Zi(e){let{stickyHeaderDates:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Yi(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}class $i extends Nn{constructor(){super(...arguments),this.processCols=Bt((e=>e),Gi),this.renderMicroColGroup=Bt(Li),this.scrollerRefs=new Wi,this.scrollerElRefs=new Wi(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),s=this.renderMicroColGroup(i,t.shrinkWidth),o=function(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let a,l=r.length,c=0,d=[],u=[],f=[];for(;c<l&&"header"===(a=r[c]).type;)d.push(this.renderSection(a,s,!0)),c+=1;for(;c<l&&"body"===(a=r[c]).type;)u.push(this.renderSection(a,s,!1)),c+=1;for(;c<l&&"footer"===(a=r[c]).type;)f.push(this.renderSection(a,s,!0)),c+=1;let h=!ni();const p={role:"rowgroup"};return k("table",{role:"grid",className:o.join(" "),style:{height:e.height}},Boolean(!h&&d.length)&&k("thead",p,...d),Boolean(!h&&u.length)&&k("tbody",p,...u),Boolean(!h&&f.length)&&k("tfoot",p,...f),h&&k("tbody",p,...d,...u,...f))}renderSection(e,t,n){return"outerContent"in e?k(M,{key:e.key},e.outerContent):k("tr",{key:e.key,role:"presentation",className:Qi(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if("outerContent"in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:s,scrollerClientWidths:o,scrollerClientHeights:a}=this.state,l=function(e,t){return null!=t.maxHeight||Fi(e,t)}(i,e),c=Fi(i,e),d=i.liquid?s?"scroll":l?"auto":"hidden":"visible",u=e.key,f=function(e,t,n,r){let{expandRows:i}=n;return"function"==typeof t.content?t.content(n):k("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,k(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:i.collapsibleWidth||void 0===o[u]?null:o[u],clientHeight:void 0!==a[u]?a[u]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return k(r?"th":"td",{ref:n.elRef,role:"presentation"},k("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},k(Ui,{ref:this.scrollerRefs.createRef(u),elRef:this.scrollerElRefs.createRef(u),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&Pn(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?function(e){let t=function(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let t=n[e].querySelectorAll(".fc-scrollgrid-shrink");for(let e=0;e<t.length;e+=1)r.push(t[e])}return r}(e),n=0;for(let e of t)n=Math.max(n,lt(e));return Math.ceil(n)}(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=(mi||(mi=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=function(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}(e);return document.body.removeChild(e),t}()),mi),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},s={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,a=n.currentMap[o];if(a){let t=a.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),s[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:s}}}$i.addStateEquality({scrollerClientWidths:vn,scrollerClientHeights:vn});class Ji extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&Br(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:s}=i,o={event:new Ir(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:s.textColor,backgroundColor:s.backgroundColor,borderColor:s.borderColor,isDraggable:!e.disableDragging&&Gr(r,t),isStartResizable:!e.disableResizing&&Lr(r,t),isEndResizable:!e.disableResizing&&Vr(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return k(Wn,Object.assign({},e,{elRef:this.handleEl,elClasses:[...Zr(o),...r.eventRange.ui.classNames,...e.elClasses||[]],renderProps:o,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Br(this.el,this.props.seg)}}class Xi extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,s=Qr(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:$r(r,t),defaultGenerator:Ki,timeText:s}),((e,t)=>k(M,null,k(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function Ki(e){return k("div",{className:"fc-event-main-frame"},e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title-container"},k("div",{className:"fc-event-title fc-sticky"},e.event.title||k(M,null," "))))}const es=e=>k(Mn.Consumer,null,(t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return k(Wn,Object.assign({},e,{elTag:e.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))})),ts=Xt({day:"numeric"});class ns extends Nn{constructor(){super(...arguments),this.refineRenderProps=zt(is)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return k(Wn,Object.assign({},e,{elClasses:[...fi(r,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Pt(e.date)}),renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount}))}}function rs(e){return Boolean(e.dayCellContent||Bn("dayCellContent",e))}function is(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,s=ui(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:ts):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},s),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}class ss extends Nn{render(){let{props:e}=this,{seg:t}=e;return k(Ji,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:os,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function os(e){let{title:t}=e.event;return t&&k("div",{className:"fc-event-title"},e.event.title)}function as(e){return k("div",{className:`fc-${e}`})}const ls=e=>k(Mn.Consumer,null,(t=>{let{dateEnv:n,options:r}=t,{date:i}=e,s=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,s),date:i};return k(Wn,Object.assign({},e,{renderProps:o,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:cs,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))}));function cs(e){return e.text}class ds extends Nn{constructor(){super(...arguments),this.state={titleId:Xe()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=function(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return function(e,t){var n=k(Re,{__v:e,i:t});return n.containerInfo=t,n}(k("div",Object.assign({},n.extraAttrs,{id:n.id,className:i.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),k("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},k("span",{className:"fc-popover-title",id:r.titleId},n.title),k("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),k("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=function(e){let t=function(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}(e),n=e.getBoundingClientRect();for(let e of t){let t=ai(n,e.getBoundingClientRect());if(!t)return null;n=t}return n}(t);if(i){let s=r.getBoundingClientRect(),o=n?qe(t,".fc-scrollgrid").getBoundingClientRect().top:i.top,a=e?i.right-s.width:i.left;o=Math.max(o,10),a=Math.min(a,document.documentElement.clientWidth-10-s.width),a=Math.max(a,10);let l=r.offsetParent.getBoundingClientRect();!function(e,t){for(let n in t)$e(e,n,t[n])}(r,{top:o-l.top,left:a-l.left})}}}class us extends yi{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:s}=n,o=t.format(r,e.dayPopoverFormat);return k(ns,{elRef:this.handleRootEl,date:r,dateProfile:s,todayRange:i},((t,r,i)=>k(ds,{elRef:i.ref,id:n.id,title:o,extraClassNames:["fc-more-popover"].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},rs(e)&&k(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children)))}queryHit(e,t,n,r){let{rootEl:i,props:s}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:s.dateProfile,dateSpan:Object.assign({allDay:!s.forceTimed,range:{start:s.startDate,end:s.endDate}},s.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}}class fs extends Nn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:Xe()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=ps(t).start;function s(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new Ir(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof r&&(r=r({date:i,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(s),hiddenSegs:t.hiddenSegs.map(s),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"==typeof r&&n.calendarApi.zoomTo(i,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return k(Mn.Consumer,null,(n=>{let{viewApi:r,options:i,calendarApi:s}=n,{moreLinkText:o}=i,{moreCnt:a}=e,l=ps(e),c="function"==typeof o?o.call(s,a):`+${a} ${o}`,d=ot(i.moreLinkHint,[a],c),u={num:a,shortText:`+${a}`,text:c,view:r};return k(M,null,Boolean(e.moreCnt)&&k(Wn,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),et(this.handleClick)),{title:d,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:u,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||hs,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&k(us,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=qe(this.linkEl,".fc-view-harness"))}}function hs(e){return e.text}function ps(e){if(e.allDayDate)return{start:e.allDayDate,end:wt(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:gs(t),end:(n=t,n.reduce(vs).eventRange.range.end)};var n}function gs(e){return e.reduce(ms).eventRange.range.start}function ms(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function vs(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}class bs{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class ys extends bs{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}const As=[],ws={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Es=Object.assign(Object.assign({},ws),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function Cs(e){let t=e.length>0?e[0].code:"en",n=As.concat(e),r={en:Es};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function Ds(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let e=r.length;e>0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||Es;return _s(e,n,r)}(e,t):_s(e.code,[e.code],e)}function _s(e,t,n){let r=fn([ws,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Ss(e){return{id:rt(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}class Rs extends Sn{}function xs(e,t,n,r){if(t[e])return t[e];let i=function(e,t,n,r){let i=n[e],s=r[e],o=e=>i&&null!==i[e]?i[e]:s&&null!==s[e]?s[e]:null,a=o("component"),l=o("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=xs(l,t,n,r)}return!a&&c&&(a=c.component),a?{type:e,component:a,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,r);return i&&(t[e]=i),i}function ks(e){return pn(e,Ts)}function Ts(e){let t="function"==typeof e?{component:e}:e,{component:n}=t;return t.content?n=Ms(t):!n||n.prototype instanceof Nn||(n=Ms(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function Ms(e){return t=>k(Mn.Consumer,null,(n=>k(Wn,{elTag:"div",elClasses:Ln(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function Os(e,t,n,r){let i=ks(e),s=ks(t.views),o=function(e,t){let n,r={};for(n in e)xs(n,r,e,t);for(n in t)xs(n,r,e,t);return r}(i,s);return pn(o,(e=>function(e,t,n,r,i){let s=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,a="",l="",c={};if(s&&(o=function(e){let t=JSON.stringify(e),n=Is[t];return void 0===n&&(n=ut(e),Is[t]=n),n}(s),o)){let e=vt(o);a=e.unit,1===e.value&&(l=a,c=t[a]?t[a].rawOptions:{})}let d=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},u=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:o,durationUnit:a,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(i)||e.defaults.buttonText||d(en)||e.type,buttonTitleOverride:u(r)||u(n)||e.overrides.buttonHint,buttonTitleDefault:u(i)||e.defaults.buttonHint||u(en)}}(e,s,t,n,r)))}Rs.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},Rs.prototype.baseIconClass="fc-icon",Rs.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},Rs.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},Rs.prototype.iconOverrideOption="buttonIcons",Rs.prototype.iconOverrideCustomButtonOption="icon",Rs.prototype.iconOverridePrefix="fc-icon-";let Is={};function Ns(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function Ps(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=Hs(i,n,r)),Object.assign(Object.assign({},e),i)}function Hs(e,t,n){return Bs(e,hn(e,(e=>function(e,t,n){return Us(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n))),t,!1,n)}function Bs(e,t,n,r,i){let s={};for(let o in e){let a=e[o];t[o]?s[o]=zs(a,n,r,i):s[o]=a}return s}function zs(e,t,n,r){let{options:i,calendarApi:s}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],a=rt();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},(n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(s,o,n.response)||o),e.success&&(o=e.success.call(s,o,n.response)||o),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:o})}),(n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:n})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:a})}function js(e,t){return hn(e,(e=>Us(e,t)))}function Us(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ws(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Fs(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Gs(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ls(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Vs(e,t,n,r,i){return{header:e.headerToolbar?Qs(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?Qs(e.footerToolbar,e,t,n,r,i):null}}function Qs(e,t,n,r,i,s){let o={},a=[],l=!1;for(let c in e){let d=qs(e[c],t,n,r,i,s);o[c]=d.widgets,a.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:l}}function qs(e,t,n,r,i,s){let o="rtl"===t.direction,a=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},d=n.buttonHints||{},u=t.buttonHints||{},f=e?e.split(" "):[],h=[],p=!1;return{widgets:f.map((e=>e.split(",").map((e=>{if("title"===e)return p=!0,{buttonName:e};let n,f,g,m,v,b;if(n=a[e])g=e=>{n.click&&n.click.call(e.target,e,e.target)},(m=r.getCustomButtonIconClass(n))||(m=r.getIconClass(e,o))||(v=n.text),b=n.hint||n.text;else if(f=i[e]){h.push(e),g=()=>{s.changeView(e)},(v=f.buttonTextOverride)||(m=r.getIconClass(e,o))||(v=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;b=ot(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(s[e])if(g=()=>{s[e]()},(v=l[e])||(m=r.getIconClass(e,o))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";b=ot(d[t]||u[t],[c.year||"year","year"],c[e])}else b=t=>ot(d[e]||u[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:g,buttonIcon:m,buttonText:v,buttonHint:b}})))),viewsWithButtons:h,hasTitle:p}}class Zs{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}function Ys(e,t){let n=mn(t.getCurrentData().eventSources);if(1===n.length&&1===e.length&&Array.isArray(n[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}const $s=[Ss({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),Ss({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;!function(e,n,r){let i=!1,s=function(e){i||(i=!0,t({rawEvents:e}))},o=function(e){i||(i=!0,r(e))},a=e(s,o);a&&"function"==typeof a.then&&a.then(s,o)}(e.eventSource.meta.bind(null,Xr(e.range,r)),0,n)}}]}),Ss({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:dn,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,i=function(e,t,n){let r,i,s,o,{dateEnv:a,options:l}=n,c={};return r=e.startParam,null==r&&(r=l.startParam),i=e.endParam,null==i&&(i=l.endParam),s=e.timeZoneParam,null==s&&(s=l.timeZoneParam),o="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},Object.assign(c,o),c[r]=a.formatIso(t.start),c[i]=a.formatIso(t.end),"local"!==a.timeZone&&(c[s]=a.timeZone),c}(r,e.range,e.context);(function(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new ei("Failure parsing JSON",e)}));throw new ei("Request failed",e)}))})(r.method,r.url,i).then((([e,n])=>{t({rawEvents:e,response:n})}),n)}}]}),Ss({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let i,s={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null};return e.duration&&(i=e.duration),!i&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,i={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:i,typeData:s}}var n,r;return null},expand(e,t,n){let r=qn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){let i=e?gn(e):null,s=_t(n.start),o=n.end,a=[];for(;s<o;){let e;i&&!i[s.getUTCDay()]||(e=t?r.add(s,t):s,a.push(e)),s=wt(s,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:dn,startTime:ut,endTime:ut,duration:ut,startRecur:dn,endRecur:dn}}),Ss({name:"change-handler",optionChangeHandlers:{events(e,t){Ys([e],t)},eventSources:Ys}}),Ss({name:"misc",isLoadingFuncs:[e=>Ns(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},Xr(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Pr(e,t))}}})];class Js{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Ve(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function Xs(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Xt(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=Dt(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class Ks{constructor(e){this.computeCurrentViewData=Bt(this._computeCurrentViewData),this.organizeRawLocales=Bt(Cs),this.buildLocale=Bt(Ds),this.buildPluginHooks=function(){let e,t=[],n=[];return(r,i)=>(e&&bt(r,t)&&bt(i,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let l of e){const e=l.name,c=n[e];void 0===c?(n[e]=l.id,i(l.deps),a=l,r={premiumReleaseDate:(t=(o=r).premiumReleaseDate,s=a.premiumReleaseDate,void 0===t?s:void 0===s?t:new Date(Math.max(t.valueOf(),s.valueOf()))),reducers:o.reducers.concat(a.reducers),isLoadingFuncs:o.isLoadingFuncs.concat(a.isLoadingFuncs),contextInit:o.contextInit.concat(a.contextInit),eventRefiners:Object.assign(Object.assign({},o.eventRefiners),a.eventRefiners),eventDefMemberAdders:o.eventDefMemberAdders.concat(a.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},o.eventSourceRefiners),a.eventSourceRefiners),isDraggableTransformers:o.isDraggableTransformers.concat(a.isDraggableTransformers),eventDragMutationMassagers:o.eventDragMutationMassagers.concat(a.eventDragMutationMassagers),eventDefMutationAppliers:o.eventDefMutationAppliers.concat(a.eventDefMutationAppliers),dateSelectionTransformers:o.dateSelectionTransformers.concat(a.dateSelectionTransformers),datePointTransforms:o.datePointTransforms.concat(a.datePointTransforms),dateSpanTransforms:o.dateSpanTransforms.concat(a.dateSpanTransforms),views:Object.assign(Object.assign({},o.views),a.views),viewPropsTransformers:o.viewPropsTransformers.concat(a.viewPropsTransformers),isPropsValid:a.isPropsValid||o.isPropsValid,externalDefTransforms:o.externalDefTransforms.concat(a.externalDefTransforms),viewContainerAppends:o.viewContainerAppends.concat(a.viewContainerAppends),eventDropTransformers:o.eventDropTransformers.concat(a.eventDropTransformers),calendarInteractions:o.calendarInteractions.concat(a.calendarInteractions),componentInteractions:o.componentInteractions.concat(a.componentInteractions),themeClasses:Object.assign(Object.assign({},o.themeClasses),a.themeClasses),eventSourceDefs:o.eventSourceDefs.concat(a.eventSourceDefs),cmdFormatter:a.cmdFormatter||o.cmdFormatter,recurringTypes:o.recurringTypes.concat(a.recurringTypes),namedTimeZonedImpl:a.namedTimeZonedImpl||o.namedTimeZonedImpl,initialView:o.initialView||a.initialView,elementDraggingImpl:o.elementDraggingImpl||a.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},o.optionChangeHandlers),a.optionChangeHandlers),scrollGridImpl:a.scrollGridImpl||o.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},o.listenerRefiners),a.listenerRefiners),optionRefiners:Object.assign(Object.assign({},o.optionRefiners),a.optionRefiners),propSetHandlers:Object.assign(Object.assign({},o.propSetHandlers),a.propSetHandlers)}):c!==l.id&&console.warn(`Duplicate plugin '${e}'`)}var t,s,o,a}return e&&i(e),i(t),r}(r,i)),t=r,n=i,e)}(),this.buildDateEnv=Bt(eo),this.buildTheme=Bt(to),this.parseToolbars=Bt(Vs),this.buildViewSpecs=Bt(Os),this.buildDateProfileGenerator=zt(no),this.buildViewApi=Bt(ro),this.buildViewUiProps=zt(oo),this.buildEventUiBySource=Bt(io,vn),this.buildEventUiBases=Bt(so),this.parseContextBusinessHours=zt(lo),this.buildTitle=Bt(Xs),this.emitter=new Rr,this.actionRunner=new Js(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause();let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let s=function(e,t){let n=e.initialDate;return null!=n?t.createMarker(n):Xn(e.now,t)}(n.calendarOptions,n.dateEnv),o=i.dateProfileGenerator.build(s);Zn(o.activeRange,s)||(s=o.currentRange.start);let a={dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let e of n.pluginHooks.contextInit)e(a);let l=function(e,t,n){let r=t?t.activeRange:null;return Ps({},function(e,t){let n=Er(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=wr(e,t,n);r&&i.push(r)}return i}(e,n),r,n)}(n.calendarOptions,o,a),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:s,dateProfile:o,businessHours:this.parseContextBusinessHours(a),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},d=Object.assign(Object.assign({},a),c);for(let e of n.pluginHooks.reducers)Object.assign(c,e(null,null,d));ao(c,a)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=function(e,t){return"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType),e}(n.currentViewType,e),a=this.computeCurrentViewData(o,s,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(a.options);let l={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:d}=n;this.data&&this.data.dateProfileGenerator!==a.dateProfileGenerator&&(d=a.dateProfileGenerator.build(c)),c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),d=function(e,t,n,r){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(i=r.buildPrev(e,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(e,n),i.isValid)return i}return e}(d,e,c,a.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&Zn(d.currentRange,c)||(c=d.currentRange.start);let u=function(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Ps(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return s=e,o=t.sourceId,hn(s,(e=>e.sourceId!==o));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Hs(e,i,r):e;case"FETCH_EVENT_SOURCES":return Bs(e,t.sourceIds?gn(t.sourceIds):js(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var s,o}(n.eventSources,e,d,l),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,s){if(t&&n===t.latestFetchId){let n=dr(Cr(i,t,s),t,s);return r&&(n=tr(n,r,s)),fr(Sr(e,t.sourceId),n)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"RESET_RAW_EVENTS":return function(e,t,n,r,i){const{defIdMap:s,instanceIdMap:o}=function(e){const{defs:t,instances:n}=e,r={},i={};for(let e in t){const n=t[e],{publicId:i}=n;i&&(r[i]=e)}for(let e in n){const r=t[n[e].defId],{publicId:s}=r;s&&(i[s]=e)}return{defIdMap:r,instanceIdMap:i}}(e);return tr(dr(Cr(n,t,i),t,i,!1,s,o),r,i)}(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=tr(t,n,r)),fr(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return fr(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?tr(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){let{defs:n,instances:r}=e,i={},s={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(s[e]=r[e]);return{defs:i,instances:s}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Sr(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return hr(e,(e=>!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,u,d,l),h=Ns(u)&&!a.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:p,selectionConfig:g}=this.buildViewUiProps(l),m=this.buildEventUiBySource(u),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:c,dateProfile:d,eventSources:u,eventStore:f,renderableEventStore:h,selectionConfig:g,eventUiBases:this.buildEventUiBases(h.defs,p,m),businessHours:this.parseContextBusinessHours(l),dateSelection:Ws(n.dateSelection,e),eventSelection:Fs(n.eventSelection,e),eventDrag:Gs(n.eventDrag,e),eventResize:Ls(n.eventResize,e)},b=Object.assign(Object.assign({},l),v);for(let t of s.pluginHooks.reducers)Object.assign(v,t(n,e,b));let y=ao(n,l),A=ao(v,l);!y&&A?r.trigger("loading",!0):y&&!A&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),s=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,a=n&&n.calendarOptions,l=r.calendarOptions;if(a&&a!==l){a.timeZone!==l.timeZone&&(t.eventSources=s.eventSources=function(e,t,n){let r=t?t.activeRange:null;return Bs(e,js(e,n),r,!0,n)}(s.eventSources,t.dateProfile,s),t.eventStore=s.eventStore=_r(s.eventStore,n.dateEnv,s.dateEnv),t.renderableEventStore=s.renderableEventStore=_r(s.renderableEventStore,n.dateEnv,s.dateEnv));for(let e in o)-1===this.optionsForHandling.indexOf(e)&&a[e]===l[e]||o[e](l[e],s)}this.optionsForHandling=[],e.onData&&e.onData(s)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:s,availableLocaleData:o,extra:a}=this.processRawCalendarOptions(e,t);co(a);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,s),d=this.buildTheme(r,i),u=this.parseToolbars(r,this.stableOptionOverrides,d,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:l,viewSpecs:c,theme:d,toolbarConfig:u,localeDefaults:s,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=ln([en,e,t]),i=this.organizeRawLocales(n),s=i.map,o=this.buildLocale(r||i.defaultCode,s).options,a=this.buildPluginHooks(e.plugins||[],$s),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),a.listenerRefiners),a.optionRefiners),c={},d=ln([en,o,e,t]),u={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,p=!1;for(let e in d)-1===this.optionsForRefining.indexOf(e)&&(d[e]===f[e]||rn[e]&&e in f&&rn[e](f[e],d[e]))?u[e]=h[e]:l[e]?(u[e]=l[e](d[e]),p=!0):c[e]=f[e];return p&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:a,availableLocaleData:i,localeDefaults:o,extra:c}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:s,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return co(o),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let s=ln([en,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),an),t.listenerRefiners),t.optionRefiners),a={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,u={};for(let e in s)s[e]===l[e]||rn[e]&&rn[e](s[e],l[e])?a[e]=c[e]:(s[e]===this.currentCalendarOptionsInput[e]||rn[e]&&rn[e](s[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(a[e]=this.currentCalendarOptionsRefined[e]):o[e]?a[e]=o[e](s[e]):u[e]=s[e],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=a),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}}}function eo(e,t,n,r,i,s,o,a){let l=Ds(t||o.defaultCode,o.map);return new Dn({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:a})}function to(e,t){return new(t.themeClasses[e.themeSystem]||Rs)(e)}function no(e){return new(e.dateProfileGeneratorClass||Kn)(e)}function ro(e,t,n){return new Zs(e,t,n)}function io(e){return pn(e,(e=>e.ui))}function so(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function oo(e){let{options:t}=e;return{eventUiSingleBase:vr({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:vr({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ao(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function lo(e){return t=e.options.businessHours,n=e,dr(function(e){let t;return t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"==typeof e&&e?[e]:[],t=t.map((e=>Object.assign(Object.assign({},xr),e))),t}(t),null,n);var t,n}function co(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class uo extends Nn{render(){return k("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let s of e){let{buttonName:e,buttonClick:o,buttonText:a,buttonIcon:l,buttonHint:c}=s;if("title"===e)i=!1,r.push(k("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let i=e===t.activeButton,s=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,d=[`fc-${e}-button`,n.getClass("button")];i&&d.push(n.getClass("buttonActive")),r.push(k("button",{type:"button",title:"function"==typeof c?c(t.navUnit):c,disabled:s,"aria-pressed":i,className:d.join(" "),onClick:o},a||(l?k("span",{className:l,role:"img"}):"")))}}return r.length>1?k("div",{className:i&&n.getClass("buttonGroup")||""},...r):r[0]}}class fo extends Nn{render(){let e,t,{model:n,extraClassName:r}=this.props,i=!1,s=n.sectionWidgets,o=s.center;return s.left?(i=!0,e=s.left):e=s.start,s.right?(i=!0,t=s.right):t=s.end,k("div",{className:[r||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",o||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return k(uo,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class ho extends Nn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",s="";return n?null!==t.availableWidth?i=t.availableWidth/n:s=1/n*100+"%":i=e.height||"",k("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:s}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class po extends ii{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=zr(t);if(i&&n.isValidSegDownEl(e.target)){let s=qe(e.target,".fc-event-forced-url"),o=s?s.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new Ir(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=Ke(e.el,"click",".fc-event",this.handleSegClick)}}class go extends ii{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{zr(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let i;return Ke(e,"mouseover",".fc-event",((e,t)=>{if(t!==i){i=t,n(e,t);let s=e=>{i=null,r(e,t),t.removeEventListener("mouseleave",s)};t.addEventListener("mouseleave",s)}}))}(e.el,0,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,s=zr(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Ir(i,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:i.viewApi})}}class mo extends In{constructor(){super(...arguments),this.buildViewContext=Bt(On),this.buildViewPropTransformers=Bt(bo),this.buildToolbarProps=Bt(vo),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:Xe()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[po,go].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(n)));this.interactionsStore[e.uid]=r,si[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete si[e.uid]},this.resizeRunner=new Ve((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Xn(t.options.now,t.dateEnv),t.viewTitle),s=!1,o="";t.isHeightAuto||t.forPrint?o="":null!=r.height?s=!0:null!=r.contentHeight?o=r.contentHeight:e=Math.max(r.aspectRatio,.5);let a=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return k(Mn.Provider,{value:a},n.header&&k(fo,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},i)),k(ho,{liquid:s,height:o,aspectRatio:e,labeledById:l},this.renderView(t),this.buildAppendContent()),n.footer&&k(fo,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return k(M,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));return k(n.component,Object.assign({},r))}}function vo(e,t,n,r,i,s){let o=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:s,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!Zn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function bo(e){return e.map((e=>new e))}class yo extends oi{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;Rn((()=>{K(k(ri,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),k(Un.Provider,{value:this.customContentRenderId},k(mo,Object.assign({isHeightAuto:r,forPrint:i},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,K(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&Fe(e.getRootNode())}(e),this.el=e,this.renderRunner=new Ve(this.handleRenderRequest),new Ks({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){Rn((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!bt(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){$e(this.el,"height",e)}}const Ao=parseInt(String(h.version).split(".")[0])<18;class wo extends h.Component{constructor(){super(...arguments),this.elRef=(0,h.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const e=[];for(const t of this.state.customRenderingMap.values())e.push(h.createElement(Eo,{key:t.id,customRendering:t}));return h.createElement("div",{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;const e=new ys;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new yo(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),e.subscribe((e=>{const n=Date.now(),r=!t;(Ao||r||this.isUpdating||this.isUnmounting||n-t<100?Co:p.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=n,r?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}wo.act=Co;class Eo extends h.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,n="function"==typeof t?t(e.renderProps):t;return(0,p.createPortal)(n,e.containerEl)}}function Co(e){e()}class Do extends yi{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],s=Zi(r.options);return e&&i.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:r.viewSpec},k($i,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{props:s,context:o}=this,a=!s.forPrint&&Zi(o.options),l=!s.forPrint&&Yi(o.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:qi}]}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},k(i,{liquid:!s.isHeightAuto&&!s.forPrint,forPrint:s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}}function _o(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function So(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function Ro(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}const xo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function ko(e){let{display:t}=e.eventRange.ui;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}class To extends Nn{render(){let{props:e}=this;return k(Xi,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:xo,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class Mo extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=Qr(r,n.eventTimeFormat||xo,t,!0,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:$r(e.seg,t),defaultGenerator:Oo,timeText:i,isResizing:!1,isDateSelecting:!1}))}}function Oo(e){return k(M,null,k("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title"},e.event.title||k(M,null," ")))}class Io extends Nn{constructor(){super(...arguments),this.compileSegs=Bt(No)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return k(fs,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return k(M,null,t.map((t=>{let r=t.eventRange.instance.instanceId;return k("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:n[r]?"hidden":""}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))):k(To,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))))})))}})}}function No(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const Po=Xt({week:"narrow"});class Ho extends yi{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:Xe()},this.handleRootEl=e=>{Pn(this.rootElRef,e),Pn(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:s}=e,{date:o,dateProfile:a}=t;const l=t.showDayNumber&&function(e,t,n){const{start:r,end:i}=t,s=Et(i,-1),o=n.getYear(r),a=n.getMonth(r),l=n.getYear(s),c=n.getMonth(s);return!(o===l&&a===c)&&Boolean(e.valueOf()===r.valueOf()||1===n.getDay(e)&&e.valueOf()<i.valueOf())}(o,a.currentRange,s);return k(ns,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:Bo,date:o,dateProfile:a,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:l,extraRenderProps:t.extraRenderProps},((s,a)=>k("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&k(ls,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:gi(e,o,"week"),date:o,defaultFormat:Po}),!a.isDisabled&&(t.showDayNumber||rs(i)||t.forceDayTop)?k("div",{className:"fc-daygrid-day-top"},k(s,{elTag:"a",elClasses:["fc-daygrid-day-number",l&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},gi(e,o)),{id:n.dayNumberId})})):t.showDayNumber?k("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},k("a",{className:"fc-daygrid-day-number"}," ")):void 0,k("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,k("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},k(Io,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),k("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function Bo(e){return e.dayNumberText||k(M,null," ")}function zo(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function jo(e){return zo(e)+":"+e.lastCol}function Uo(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,s=i.range,o=qn(s,{start:r[t].date,end:wt(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===s.end.valueOf()})}class Wo extends Ai{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[Ei(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){const{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:s,touchingLevel:o,touchingLateral:a}=e;if(this.hiddenConsumes&&s){const e=Ei(s);if(!i[e])if(this.allowReslicing){const e=Object.assign(Object.assign({},s),{span:Ci(s.span,t.span)});i[Ei(e)]=!0,r[o][a]=e,n.push(e),this.splitEntry(s,t,n)}else i[e]=!0,n.push(s)}super.handleInvalidInsertion(e,t,n)}}class Fo extends yi{constructor(){super(...arguments),this.cellElRefs=new Wi,this.frameElRefs=new Wi,this.fgElRefs=new Wi,this.segHarnessRefs=new Wi,this.rootElRef={current:null},this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,s=So(e.businessHourSegs,i),o=So(e.bgEventSegs,i),a=So(this.getHighlightSegs(),i),l=So(this.getMirrorSegs(),i),{singleColPlacements:c,multiColPlacements:d,moreCnts:u,moreMarginTops:f}=function(e,t,n,r,i,s,o){let a=new Wo((t=>{let n=e[t.index].eventRange.instance.instanceId+":"+t.span.start+":"+(t.span.end-1);return i[n]||1}));a.allowReslicing=!0,a.strictOrder=r,!0===t||!0===n?(a.maxCoord=s,a.hiddenConsumes=!0):"number"==typeof t?a.maxStackCnt=t:"number"==typeof n&&(a.maxStackCnt=n,a.hiddenConsumes=!0);let l=[],c=[];for(let t=0;t<e.length;t+=1){let n=e[t],r=jo(n);null!=i[r]?l.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}}):c.push(n)}let d=a.addSegs(l),u=a.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:p}=function(e,t,n){let r=function(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}(e,n.length),i=[],s=[],o=[];for(let e=0;e<n.length;e+=1){let a=r[e],l=[],c=0,d=0;for(let r of a){let i=t[r.index];l.push({seg:Uo(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-c}),c=r.levelCoord+r.thickness}let u=[];c=0,d=0;for(let r of a){let i=t[r.index],s=r.span.end-r.span.start>1,o=r.span.start===e;d+=r.levelCoord-c,c=r.levelCoord+r.thickness,s?(d+=r.thickness,o&&u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:d}),d=0)}i.push(l),s.push(u),o.push(d)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:o}}(u,e,o),g=[],m=[];for(let e of c){h[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)f[t].push({seg:Uo(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)g.push(0);for(let t of d){let n=e[t.index],r=t.span;h[r.start].push({seg:Uo(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)g[e]+=1,f[e].push({seg:Uo(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(p[e]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:g,moreMarginTops:m}}(Wr(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),h=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return k("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?c[n]:d[n],e.todayRange,h),i=this.renderFgSegs(n,function(e,t){if(!e.length)return[];let n=function(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0})))}(l[n],d),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return k(Ho,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===n,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:u[n],moreMarginTop:f[n],singlePlacements:c[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:k(M,null,k(M,null,r),k(M,null,i)),bgContent:k(M,null,this.renderFillSegs(a[n],"highlight"),this.renderFillSegs(s[n],"non-business"),this.renderFillSegs(o[n],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!vn(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,s,o){let{context:a}=this,{eventSelection:l}=this.props,{framePositions:c}=this.state,d=1===this.props.cells.length,u=i||s||o,f=[];if(c)for(let e of t){let{seg:t}=e,{instanceId:h}=t.eventRange.instance,p=e.isVisible&&!r[h],g=e.isAbsolute,m="",v="";g&&(a.isRtl?(v=0,m=c.lefts[t.lastCol]-c.lefts[t.firstCol]):(m=0,v=c.rights[t.firstCol]-c.rights[t.lastCol])),f.push(k("div",{className:"fc-daygrid-event-harness"+(g?" fc-daygrid-event-harness-abs":""),key:zo(t),ref:u?null:this.segHarnessRefs.createRef(jo(t)),style:{visibility:p?"":"hidden",marginTop:g?"":e.marginTop,top:g?e.absoluteTop:"",left:m,right:v}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:i,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n))):k(To,Object.assign({seg:t,isDragging:i,isResizing:s,isDateSelecting:o,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,s=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};s.push(k("div",{key:Yr(o.eventRange),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?k(ss,Object.assign({seg:o},qr(o,r))):as(t)))}return k(M,{},...s)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>r.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,r=new vi(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new vi(t,e,!0,!1)})}}const i=this.state.segHeights,s=this.querySegHeights(),o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({segHeights:Object.assign(Object.assign({},i),s),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}Fo.addStateEquality({segHeights:vn});class Go extends yi{constructor(){super(...arguments),this.splitBusinessHourSegs=Bt(_o),this.splitBgEventSegs=Bt(_o),this.splitFgEventSegs=Bt(_o),this.splitDateSelectionSegs=Bt(_o),this.splitEventDrag=Bt(Ro),this.splitEventResize=Bt(Ro),this.rowRefs=new Wi}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),s=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),a=this.splitEventDrag(e.eventDrag,n),l=this.splitEventResize(e.eventResize,n),c=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return k(Mi,{unit:"day"},((t,d)=>k(M,null,e.cells.map(((t,u)=>k(Fo,{ref:this.rowRefs.createRef(u),key:t.length?t[0].date.toISOString():u,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:d,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[u],eventSelection:e.eventSelection,bgEventSegs:i[u].filter(Lo),fgEventSegs:s[u],dateSelectionSegs:o[u],eventDrag:a[u],eventResize:l[u],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new vi(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new vi(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),s=r.topToIndex(t);if(null!=s&&null!=i){let e=this.props.cells[s][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(s,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(s,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[s],bottom:r.bottoms[s]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:wt(n,1)}}}function Lo(e){return e.eventRange.def.allDay}class Vo extends yi{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=!0===n||!0===t;i&&!r&&(i=!1,t=null,n=null);let s=["fc-daygrid-body",i?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",r?"":"fc-daygrid-body-natural"];return k("div",{ref:this.elRef,className:s.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:""}},e.colGroupNode,k("tbody",{role:"presentation"},k(Go,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let n;var r;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${r=t.currentDate,r.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`)),n||(n=e.querySelector(`[data-date="${Pt(t.currentDate)}"]`)),n}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}}class Qo extends Bi{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class qo extends yi{constructor(){super(...arguments),this.slicer=new Qo,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return k(Vo,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}function Zo(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,/year|month|week/.test(e.currentRangeUnit))}We(':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}');var Yo=Ss({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends Do{constructor(){super(...arguments),this.buildDayTableModel=Bt(Zo),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&k(Ii,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:1===r.rowCnt}),s=t=>k(qo,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,s,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,s)}},dateProfileGeneratorClass:class extends Kn{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return function(e){let t,{dateEnv:n,currentRange:r}=e,{start:i,end:s}=r;if(e.snapToWeek&&(i=n.startOfWeek(i),t=n.startOfWeek(s),t.valueOf()!==s.valueOf()&&(s=At(t,1))),e.fixedWeekCount){let e=n.startOfWeek(n.startOfMonth(wt(r.end,-1)));s=At(s,6-Math.ceil(Ct(e,s)/7))}return{start:i,end:s}}({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class $o extends ci{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t}}const Jo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Xo(e){let t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return k(Mn.Consumer,null,(n=>{if(!e.isLabeled)return k("td",{className:t.join(" "),"data-time":e.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,o=null==i.slotLabelFormat?Jo:Array.isArray(i.slotLabelFormat)?Xt(i.slotLabelFormat[0]):Xt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:s,text:r.format(e.date,o)};return k(Wn,{elTag:"td",elClasses:t,elAttrs:{"data-time":e.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:Ko,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(e=>k("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},k(e,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]}))))}))}function Ko(e){return e.text}class ea extends Nn{render(){return this.props.slatMetas.map((e=>k("tr",{key:e.key},k(Xo,Object.assign({},e)))))}}const ta=Xt({week:"short"});class na extends yi{constructor(){super(...arguments),this.allDaySplitter=new $o,this.headerElRef={current:null},this.rootElRef={current:null},this.scrollerElRef={current:null},this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:n}=this.context,{dateProfile:r}=this.props,i=r.renderRange,s=1===Ct(i.start,i.end)?gi(this.context,i.start,"week"):{};return n.weekNumbers&&"day"===e?k(ls,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:i.start,defaultFormat:ta},(e=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},k(e,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:s})))):k("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},k("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:n}=this.context,r={text:t.allDayText,view:n};return k(Wn,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:r,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:ra,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},(t=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",null==e?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},k(t,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]}))))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,n){let{context:r,props:i}=this,s=[],o=Zi(r.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(s.push({type:"body",key:"all-day",chunk:{content:t}}),s.push({type:"body",key:"all-day-divider",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),s.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:r.viewSpec},k($i,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:s}))}renderHScrollLayout(e,t,n,r,i,s,o){let a=this.context.pluginHooks.scrollGridImpl;if(!a)throw new Error("No ScrollGrid implementation");let{context:l,props:c}=this,d=!c.forPrint&&Zi(l.options),u=!c.forPrint&&Yi(l.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderHeadAxis("day",e.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderTableRowAxis(e.rowSyncHeights[0]))},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{colSpan:2,className:"fc-timegrid-divider "+l.theme.getClass("tableCellShaded")}))}));let h=l.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(l.options.expandRows),chunks:[{key:"axis",content:e=>k("div",{className:"fc-timegrid-axis-chunk"},k("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,k("tbody",null,k(ea,{slatMetas:s}))),k("div",{className:"fc-timegrid-now-indicator-container"},k(Mi,{unit:h?"minute":"day"},(e=>{let t=h&&o&&o.safeComputeTop(e);return"number"==typeof t?k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:t},isAxis:!0,date:e}):null}))))},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),u&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:qi},{key:"cols",content:qi}]}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:l.viewSpec},k(a,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return!0!==e&&!0!==t||(e=void 0,t=5),{dayMaxEvents:e,dayMaxEventRows:t}}}function ra(e){return e.text}class ia{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(Zn(t.currentRange,e)){let n=_t(e),r=e.valueOf()-n.valueOf();if(r>=gt(t.slotMinTime)&&r<gt(t.slotMaxTime))return this.computeTimeTop(ut(r))}return null}computeDateTop(e,t){return t||(t=_t(e)),this.computeTimeTop(ut(e.valueOf()-t.valueOf()))}computeTimeTop(e){let t,n,{positions:r,dateProfile:i}=this,s=r.els.length,o=(e.milliseconds-gt(i.slotMinTime))/gt(this.slotDuration);return o=Math.max(0,o),o=Math.min(s,o),t=Math.floor(o),t=Math.min(t,s-1),n=o-t,r.tops[t]+r.getHeight(t)*n}}class sa extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{slatElRefs:r}=e;return k("tbody",null,e.slatMetas.map(((i,s)=>{let o={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi};return k("tr",{key:i.key,ref:r.createRef(i.key)},e.axis&&k(Xo,Object.assign({},i)),k(Wn,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!i.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":i.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))})))}}class oa extends Nn{constructor(){super(...arguments),this.rootElRef={current:null},this.slatElRefs=new Wi}render(){let{props:e,context:t}=this;return k("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},k("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,k(sa,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;var n;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new ia(new vi(this.rootElRef.current,(n=this.slatElRefs.currentMap,t.slatMetas.map((e=>n[e.key]))),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function aa(e,t){let n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function la(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.col].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}class ca extends Nn{render(){let{props:e}=this;return k(fs,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>ya(e.hiddenSegs,e),defaultGenerator:da,forceTimed:!0},(e=>k(e,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]})))}}function da(e){return e.shortText}function ua(e,t){if(!e)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=e,s=r,o=[];for(;s<i;)o.push(t(n,s)),s+=1;return o.sort(fa),[o.map(ha),o[0][1]]}function fa(e,t){return t[1]-e[1]}function ha(e){return e[0]}function pa(e,t){const n={};return(...r)=>{let i=e(...r);return i in n?n[i]:n[i]=t(...r)}}function ga(e,t,n=null,r=0){let i=[];if(n)for(let s=0;s<e.length;s+=1){let o=e[s],a=n.computeDateTop(o.start,t),l=Math.max(a+(r||0),n.computeDateTop(o.end,t));i.push({start:Math.round(a),end:Math.round(l)})}return i}const ma=Xt({hour:"numeric",minute:"2-digit",meridiem:!1});class va extends Nn{render(){return k(Xi,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ma}))}}class ba extends Nn{constructor(){super(...arguments),this.sortEventSegs=Bt(Wr)}render(){let{props:e,context:t}=this,{options:n}=t,r=n.selectMirror,i=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||r&&e.dateSelectionSegs||[],s=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return k(ns,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},(t=>k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,s,!1,!1,!1)),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(i,{},Boolean(e.eventDrag),Boolean(e.eventResize),Boolean(r),"mirror")),k("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),rs(n)&&k(t,{elTag:"div",elClasses:["fc-timegrid-col-misc"]}))))}renderFgSegs(e,t,n,r,i,s){let{props:o}=this;return o.forPrint?ya(e,o):this.renderPositionedFgSegs(e,t,n,r,i,s)}renderPositionedFgSegs(e,t,n,r,i,s){let{eventMaxStack:o,eventShortHeight:a,eventOrderStrict:l,eventMinHeight:c}=this.context.options,{date:d,slatCoords:u,eventSelection:f,todayRange:h,nowDate:p}=this.props,g=n||r||i,m=ga(e,d,u,c),{segPlacements:v,hiddenGroups:b}=function(e,t,n,r){let i=[],s=[];for(let n=0;n<e.length;n+=1){let r=t[n];r?i.push({index:n,thickness:1,span:r}):s.push(e[n])}let{segRects:o,hiddenGroups:a}=function(e,t,n){let r=new Ai;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);let i=function(e){let t=[];for(let i of e){let e=[],s={span:i.span,entries:[i]};for(let i of t)Ci(i.span,s.span)?s={entries:i.entries.concat(s.entries),span:(n=i.span,r=s.span,{start:Math.min(n.start,r.start),end:Math.max(n.end,r.end)})}:e.push(i);e.push(s),t=e}var n,r;return t}(r.addSegs(e)),s=function(e){const{entriesByLevel:t}=e,n=pa(((e,t)=>e+":"+t),((r,i)=>{let s=function(e,t,n){let{levelCoords:r,entriesByLevel:i}=e,s=i[t][n],o=r[t]+s.thickness,a=r.length,l=t;for(;l<a&&r[l]<o;l+=1);for(;l<a;l+=1){let e,t=i[l],n=_i(t,s.span.start,wi),r=n[0]+n[1],o=r;for(;(e=t[o])&&e.span.start<s.span.end;)o+=1;if(r<o)return{level:l,lateralStart:r,lateralEnd:o}}return null}(e,r,i),o=ua(s,n),a=t[r][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]}));return ua(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}(r);return s=function(e,t){const n=pa(((e,t,n)=>Ei(e)),((e,t,r)=>{let i,{nextLevelNodes:s,thickness:o}=e,a=o+r,l=o/a,c=[];if(s.length)for(let e of s)if(void 0===i){let r=n(e,t,a);i=r[0],c.push(r[1])}else{let t=n(e,i,0);c.push(t[1])}else i=1;let d=(i-t)*l;return[i-d,Object.assign(Object.assign({},e),{thickness:d,nextLevelNodes:c})]}));return e.map((e=>n(e,0,0)[1]))}(s),{segRects:function(e){let t=[];const n=pa(((e,t,n)=>Ei(e)),((e,n,i)=>{let s=Object.assign(Object.assign({},e),{levelCoord:n,stackDepth:i,stackForward:0});return t.push(s),s.stackForward=r(e.nextLevelNodes,n+e.thickness,i+1)+1}));function r(e,t,r){let i=0;for(let s of e)i=Math.max(n(s,t,r),i);return i}return r(e,0,0),t}(s),hiddenGroups:i}}(i,n,r),l=[];for(let t of o)l.push({seg:e[t.index],rect:t});for(let e of s)l.push({seg:e,rect:null});return{segPlacements:l,hiddenGroups:a}}(e,m,l,o);return k(M,null,this.renderHiddenGroups(b,e),v.map((e=>{let{seg:o,rect:l}=e,c=o.eventRange.instance.instanceId,d=g||Boolean(!t[c]&&l),u=Aa(l&&l.span),m=!g&&l?this.computeSegHStyle(l):{left:0,right:0},v=Boolean(l)&&l.stackForward>0,b=Boolean(l)&&l.span.end-l.span.start<a;return k("div",{className:"fc-timegrid-event-harness"+(v?" fc-timegrid-event-harness-inset":""),key:s||c,style:Object.assign(Object.assign({visibility:d?"":"hidden"},u),m)},k(va,Object.assign({seg:o,isDragging:n,isResizing:r,isDateSelecting:i,isSelected:c===f,isShort:b},qr(o,h,p))))})))}renderHiddenGroups(e,t){let{extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l}=this.props;return k(M,null,e.map((e=>{let c=Aa(e.span),d=(u=e.entries,f=t,u.map((e=>f[e.index])));var u,f;return k(ca,{key:Nt(gs(d)),hiddenSegs:d,top:c.top,bottom:c.bottom,extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l})})))}renderFillSegs(e,t){let{props:n,context:r}=this,i=ga(e,n.date,n.slatCoords,r.options.eventMinHeight).map(((r,i)=>{let s=e[i];return k("div",{key:Yr(s.eventRange),className:"fc-timegrid-bg-harness",style:Aa(r)},"bg-event"===t?k(ss,Object.assign({seg:s},qr(s,n.todayRange,n.nowDate))):as(t))}));return k(M,null,i)}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map(((e,r)=>k(es,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(e.start,n)},isAxis:!1,date:n}))):null}computeSegHStyle(e){let t,n,{isRtl:r,options:i}=this.context,s=i.slotEventOverlap,o=e.levelCoord,a=e.levelCoord+e.thickness;s&&(a=Math.min(1,o+2*(a-o))),r?(t=1-a,n=o):(t=o,n=1-a);let l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return s&&!e.stackForward&&(l[r?"marginLeft":"marginRight"]=20),l}}function ya(e,{todayRange:t,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let o=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return k(M,null,e.map((e=>{let i=e.eventRange.instance.instanceId;return k("div",{key:i,style:{visibility:o[i]?"hidden":""}},k(va,Object.assign({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===r,isShort:!1},qr(e,t,n))))})))}function Aa(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}class wa extends Nn{constructor(){super(...arguments),this.splitFgEventSegs=Bt(aa),this.splitBgEventSegs=Bt(aa),this.splitBusinessHourSegs=Bt(aa),this.splitNowIndicatorSegs=Bt(aa),this.splitDateSelectionSegs=Bt(aa),this.splitEventDrag=Bt(la),this.splitEventResize=Bt(la),this.rootElRef={current:null},this.cellElRefs=new Wi}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),r=e.cells.length,i=this.splitFgEventSegs(e.fgEventSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitBusinessHourSegs(e.businessHourSegs,r),a=this.splitNowIndicatorSegs(e.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(e.dateSelectionSegs,r),c=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r);return k("div",{className:"fc-timegrid-cols",ref:this.rootElRef},k("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,k("tbody",{role:"presentation"},k("tr",{role:"row"},e.axis&&k("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map(((t,n)=>k(ba,{key:t.key,elRef:this.cellElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,fgEventSegs:i[n],bgEventSegs:s[n],businessHourSegs:o[n],nowIndicatorSegs:a[n],dateSelectionSegs:l[n],eventDrag:c[n],eventResize:d[n],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint})))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;var t;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new vi(this.rootElRef.current,(t=this.cellElRefs.currentMap,e.cells.map((e=>t[e.key]))),!0,!1))}}class Ea extends yi{constructor(){super(...arguments),this.processSlotOptions=Bt(Ca),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:n}=this.state;if(t&&n){if(e.time){let r=n.computeTimeTop(e.time);r=Math.ceil(r),r&&(r+=1),t(r)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return k("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k(oa,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),k(wa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:n,options:r}=this.context,{colCoords:i}=this,{dateProfile:s}=this.props,{slatCoords:o}=this.state,{snapDuration:a,snapsPerSlot:l}=this.processSlotOptions(this.props.slotDuration,r.snapDuration),c=i.leftToIndex(e),d=o.positions.topToIndex(t);if(null!=c&&null!=d){let e=this.props.cells[c],r=o.positions.tops[d],u=o.positions.getHeight(d),f=(t-r)/u,h=d*l+Math.floor(f*l),p=this.props.cells[c].date,g=ht(s.slotMinTime,function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}(a,h)),m=n.add(p,g),v=n.add(m,a);return{dateProfile:s,dateSpan:Object.assign({range:{start:m,end:v},allDay:!1},e.extraDateSpan),dayEl:i.els[c],rect:{left:i.lefts[c],right:i.rights[c],top:r,bottom:r+u},layer:0}}return null}}function Ca(e,t){let n=t||e,r=mt(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}class Da extends Bi{sliceRange(e,t){let n=[];for(let r=0;r<t.length;r+=1){let i=qn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n}}class _a extends yi{constructor(){super(...arguments),this.buildDayRanges=Bt(Sa),this.slicer=new Da,this.timeColsRef={current:null}}render(){let{props:e,context:t}=this,{dateProfile:n,dayTableModel:r}=e,{nowIndicator:i,nextDayThreshold:s}=t.options,o=this.buildDayRanges(r,n,t.dateEnv);return k(Mi,{unit:i?"minute":"day"},((a,l)=>k(Ea,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:r.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:a,nowIndicatorSegs:i&&this.slicer.sliceNowDate(a,n,s,t,o),todayRange:l,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords}))))}}function Sa(e,t,n){let r=[];for(let i of e.headerDates)r.push({start:n.add(i,t.slotMinTime),end:n.add(i,t.slotMaxTime)});return r}const Ra=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function xa(e,t,n,r,i){let s=new Date(0),o=e,a=ut(0),l=n||function(e){let t,n,r;for(t=Ra.length-1;t>=0;t-=1)if(n=ut(Ra[t]),r=mt(n,e),null!==r&&r>1)return n;return e}(r),c=[];for(;gt(o)<gt(t);){let e=i.add(s,o),t=null!==mt(a,l);c.push({date:e,time:o,key:e.toISOString(),isoTimeStr:(d=e,st(d.getUTCHours(),2)+":"+st(d.getUTCMinutes(),2)+":"+st(d.getUTCSeconds(),2)),isLabeled:t}),o=ht(o,r),a=ht(a,r)}var d;return c}function ka(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,!1)}We('.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}');var Ta=Ss({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:class extends na{constructor(){super(...arguments),this.buildTimeColsModel=Bt(ka),this.buildSlatMetas=Bt(xa)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:r}=this,{dateProfile:i}=r,s=this.buildTimeColsModel(i,n),o=this.allDaySplitter.splitProps(r),a=this.buildSlatMetas(i.slotMinTime,i.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:l}=e,c=!l,d=l,u=e.dayHeaders&&k(Ii,{dates:s.headerDates,dateProfile:i,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=!1!==e.allDaySlot&&(t=>k(qo,Object.assign({},o.allDay,{dateProfile:i,dayTableModel:s,nextDayThreshold:e.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:r.forPrint},this.getAllDayMaxEventProps()))),h=t=>k(_a,Object.assign({},o.timed,{dayTableModel:s,dateProfile:i,axis:c,slotDuration:e.slotDuration,slatMetas:a,forPrint:r.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(u,f,h,s.colCnt,l,a,this.state.slatCoords):this.renderSimpleLayout(u,f,h)}},usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class Ma extends Nn{constructor(){super(...arguments),this.state={textId:Xe()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:r}=this.context,{cellId:i,dayDate:s,todayRange:o}=this.props,{textId:a}=this.state,l=ui(s,o),c=n.listDayFormat?t.format(s,n.listDayFormat):"",d=n.listDaySideFormat?t.format(s,n.listDaySideFormat):"",u=Object.assign({date:t.toDate(s),view:r,textId:a,text:c,sideText:d,navLinkAttrs:gi(this.context,s),sideNavLinkAttrs:gi(this.context,s,"day",!1)},l);return k(Wn,{elTag:"tr",elClasses:["fc-list-day",...fi(l,e)],elAttrs:{"data-date":Pt(s)},renderProps:u,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:Oa,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(t=>k("th",{scope:"colgroup",colSpan:3,id:i,"aria-labelledby":a},k(t,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]}))))}}function Oa(e){return k(M,null,e.text&&k("a",Object.assign({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&k("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}const Ia=Xt({hour:"numeric",minute:"2-digit",meridiem:"short"});class Na extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r,timeHeaderId:i,eventHeaderId:s,dateHeaderId:o}=e,a=n.eventTimeFormat||Ia;return k(Ji,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",r.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>function(e,t){let n=$r(e,t);return k("a",Object.assign({},n),e.eventRange.def.title)}(r,t),seg:r,timeText:"",disableDragging:!0,disableResizing:!0}),((e,n)=>k(M,null,function(e,t,n,r,i){let{options:s}=n;if(!1!==s.displayEventTime){let o,a=e.eventRange.def,l=e.eventRange.instance,c=!1;if(a.allDay?c=!0:function(e){let t=$n(e);return Ct(t.start,t.end)>1}(e.eventRange.range)?e.isStart?o=Qr(e,t,n,null,null,l.range.start,e.end):e.isEnd?o=Qr(e,t,n,null,null,e.start,l.range.end):c=!0:o=Qr(e,t,n),c){let e={text:n.options.allDayText,view:n.viewApi};return k(Wn,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:e,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:Pa,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return k("td",{className:"fc-list-event-time"},o)}return null}(r,a,t,i,o),k("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},k("span",{className:"fc-list-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}})),k(e,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${s} ${o}`}}))))}}function Pa(e){return e.text}function Ha(e){return e.text}function Ba(e){let t=_t(e.renderRange.start),n=e.renderRange.end,r=[],i=[];for(;t<n;)r.push(t),i.push({start:t,end:wt(t,1)}),t=wt(t,1);return{dayDates:r,dayRanges:i}}function za(e){return!1===e?null:Xt(e)}We(':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}');var ja=Ss({name:"@fullcalendar/list",optionRefiners:{listDayFormat:za,listDaySideFormat:za,noEventsClassNames:dn,noEventsContent:dn,noEventsDidMount:dn,noEventsWillUnmount:dn},views:{list:{component:class extends yi{constructor(){super(...arguments),this.computeDateVars=Bt(Ba),this.eventStoreToSegs=Bt(this._eventStoreToSegs),this.state={timeHeaderId:Xe(),eventHeaderId:Xe(),dateHeaderIdRoot:Xe()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:r}=this.computeDateVars(e.dateProfile),i=this.eventStoreToSegs(e.eventStore,e.eventUiBases,r);return k(Gn,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),!1!==t.options.stickyHeaderDates?"fc-list-sticky":""],viewSpec:t.viewSpec},k(Ui,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},i.length>0?this.renderSegList(i,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,n={text:e.noEventsText,view:t};return k(Wn,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:Ha,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},(e=>k(e,{elTag:"div",elClasses:["fc-list-empty-cushion"]})))}renderSegList(e,t){let{theme:n,options:r}=this.context,{timeHeaderId:i,eventHeaderId:s,dateHeaderIdRoot:o}=this.state,a=function(e){let t,n,r=[];for(t=0;t<e.length;t+=1)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return k(Mi,{unit:"day"},((e,l)=>{let c=[];for(let n=0;n<a.length;n+=1){let d=a[n];if(d){let a=Pt(t[n]),u=o+"-"+a;c.push(k(Ma,{key:a,cellId:u,dayDate:t[n],todayRange:l})),d=Wr(d,r.eventOrder);for(let t of d)c.push(k(Na,Object.assign({key:a+":"+t.eventRange.instance.instanceId,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:i,eventHeaderId:s,dateHeaderId:u},qr(t,l,e))))}}return k("table",{className:"fc-list-table "+n.getClass("table")},k("thead",null,k("tr",null,k("th",{scope:"col",id:i},r.timeHint),k("th",{scope:"col","aria-hidden":!0}),k("th",{scope:"col",id:s},r.eventHint))),k("tbody",null,c))}))}_eventStoreToSegs(e,t,n){return this.eventRangesToSegs(Hr(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(e,t){let n=[];for(let r of e)n.push(...this.eventRangeToSegs(r,t));return n}eventRangeToSegs(e,t){let n,r,i,{dateEnv:s}=this.context,{nextDayThreshold:o}=this.context.options,a=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n+=1)if(r=qn(a,t[n]),r&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},c.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<s.add(t[n+1].start,o))){i.end=a.end,i.isEnd=!0;break}return c}},buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});function Ua(e){let{attributes:t,events:n}=e;const r=(0,i.useRef)(null),s="dayGridMonth",[o,a]=(0,i.useState)("");(0,i.useEffect)((()=>{if(r.current){const e=t.view||s;r.current.getApi().changeView(e),a(r.current.getApi().view.title)}}),[t.view,t.wraptitles]);const l=()=>{r.current&&a(r.current.getApi().view.title)};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"piecal-controls fc"},(0,i.createElement)("div",{className:"piecal-controls__view-title","aria-live":"polite",role:"status"},(0,i.createElement)("span",{className:"visually-hidden"},`${o} - current view is ${r.current?.getApi().view.type}`),(0,i.createElement)("span",{"aria-hidden":"true"},o)),(0,i.createElement)("label",{className:"piecal-controls__view-chooser"},"Choose View",(0,i.createElement)("select",{value:r.current?.getApi().view.type,onChange:e=>r.current?.getApi().changeView(e.target.value),disabled:!0},(0,i.createElement)("option",{value:"dayGridMonth"},"View Chooser"))),(0,i.createElement)("div",{className:"piecal-controls__navigation-button-group"},(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__today-button",onClick:()=>{r.current?.getApi().today(),l()}},"Today"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__prev-button",onClick:()=>{r.current?.getApi().prev(),l()},"aria-label":`Previous ${r.current?.getApi().view.type}`},"<"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__next-button",onClick:()=>{r.current?.getApi().next(),l()},"aria-label":`Next ${r.current?.getApi().view.type}`},">"))),(0,i.createElement)("style",{"data-fullcalendar":!0}),(0,i.createElement)(wo,{ref:r,plugins:[Yo,Ta,ja],initialView:t.view||s,editable:!1,events:n,contentHeight:"auto",locale:t.locale,headerToolbar:!1,validRange:t.hidepastevents?{start:new Date}:void 0}))}const Wa=JSON.parse('{"u2":"piecal/calendar"}');(0,r.registerBlockType)(Wa.u2,{edit:function(e){let{attributes:t,setAttributes:n}=e;const[r,c]=(0,i.useState)([]),[h,p]=(0,i.useState)([]),[g,m]=(0,i.useState)([]);let v="piecal-wrapper";t.wraptitles&&(v+=" piecal-wrap-event-titles"),"true"===t.widget&&(v+=" piecal-wrapper--widget"),"responsive"===t.widget&&(v+=" piecal-wrapper--responsive-widget"),t.theme&&(v+=" piecal-theme-"+t.theme);const{records:b,hasResolved:y}=(0,l.useEntityRecords)("root","postType",{per_page:-1,visibility:"public",viewable:!0});return(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("/piecal/v1/events",{allAttributes:t}),method:"GET"}).then((e=>{const t=e.map((e=>{var t;return e.rset=JSON.parse(null!==(t=e.rset)&&void 0!==t?t:"{}"),e}));p(t)}))}),[t]),(0,i.useEffect)((()=>{y&&(c(b.filter((e=>e.viewable))),piecalGbVars?.explicitAllowedPostTypes?.length>0?m(b.filter((e=>e.viewable)).filter((e=>piecalGbVars.explicitAllowedPostTypes.includes(e.slug))).map((e=>e.name))):m(b.filter((e=>e.viewable)).map((e=>e.name))))}),[y]),(0,i.createElement)("div",(0,o.useBlockProps)({className:v}),(0,i.createElement)(o.InspectorControls,null,(0,i.createElement)(a.PanelBody,{title:(0,s.__)("Calendar Settings","piecal"),initialOpen:!0},r.length>0&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.FormTokenField,{label:(0,s.__)("Post Types","piecal"),value:t.type?t.type.map((e=>{const t=r.find((t=>t.slug===e));return t?t.name:e})):[],suggestions:g,__experimentalValidateInput:e=>g.includes(e),onChange:e=>{const t=e.map((e=>{const t=r.find((t=>t.name===e));return t?t.slug:e}));n({type:t})},help:(0,s.__)("Select post types to display in the calendar.","piecal")})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("View","piecal"),value:t.view,help:(0,s.__)("Choose the default calendar view that visitors will see when the page loads.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("Month - Classic","piecal"),value:"dayGridMonth"},{label:(0,s.__)("Month - List","piecal"),value:"listMonth"},{label:(0,s.__)("Week - Time Grid","piecal"),value:"timeGridWeek"},{label:(0,s.__)("Week - List","piecal"),value:"listWeek"},{label:(0,s.__)("Week - Classic","piecal"),value:"dayGridWeek"},{label:(0,s.__)("Day","piecal"),value:"listDay"}],onChange:e=>n({view:e})})),(""===t.view||"dayGridMonth"===t.view)&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Widget","piecal"),value:t.widget,help:(0,s.__)("Enable widget mode for a more compact calendar suitable for sidebars. 'Responsive' switches to widget mode on mobile only.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("True","piecal"),value:"true"},{label:(0,s.__)("Responsive","piecal"),value:"responsive"}],onChange:e=>n({widget:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Theme","piecal"),value:t.theme,help:(0,s.__)("Choose between light, dark, or adaptive theme. Adaptive will match your visitor's system preferences.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("Dark","piecal"),value:"dark"},{label:(0,s.__)("Adaptive","piecal"),value:"adaptive"}],onChange:e=>n({theme:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Wrap Titles","piecal"),checked:t.wraptitles,help:(0,s.__)("When enabled, event titles will wrap to multiple lines instead of being truncated with an ellipsis.","piecal"),onChange:e=>n({wraptitles:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Locale","piecal"),value:t.locale,help:(0,s.__)("Use a locale code to change the language of the calendar. For example, 'en-US' for English (United States).","piecal"),options:f,onChange:e=>n({locale:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Hide Timezone","piecal"),checked:t.hidetimezone,help:(0,s.__)("Tick this box to hide the event timezone from the calendar footer.","piecal"),onChange:e=>n({hidetimezone:e})})))),(0,i.createElement)(o.InspectorAdvancedControls,null,(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Disable Automatic End Dates","piecal"),checked:t.automaticenddates,help:(0,s.__)("By default, events with no end date will automatically end 1 hour after their start time. Disable to show events with no end date.","piecal"),onChange:e=>n({automaticenddates:e})}))),(0,i.createElement)(Ua,{attributes:t,events:h}))}})}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=(t,n,i,s)=>{if(!n){var o=1/0;for(d=0;d<e.length;d++){for(var[n,i,s]=e[d],a=!0,l=0;l<n.length;l++)(!1&s||o>=s)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,i,s]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={904:0,832:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,s,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(l)var d=l(r)}for(t&&t(n);c<o.length;c++)s=o[c],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return r.O(d)},n=globalThis.webpackChunkpiecalendar=globalThis.webpackChunkpiecalendar||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=r.O(void 0,[832],(()=>r(92)));i=r.O(i)})();
     1(()=>{"use strict";var e,t={561:(e,t,n)=>{const r=window.wp.blocks,i=window.wp.element,s=window.wp.i18n,o=window.wp.blockEditor,a=window.wp.components,l=window.wp.coreData,c=window.wp.apiFetch;var d=n.n(c);const u=window.wp.url,f=[{value:"",label:(0,s.__)("Default (Browser Language)","piecal")},{value:"af",label:"Afrikaans"},{value:"ar",label:"Arabic"},{value:"bg",label:"Bulgarian"},{value:"ca",label:"Catalan"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"en",label:"English"},{value:"en-gb",label:"English (UK)"},{value:"en-au",label:"English (Australia)"},{value:"es",label:"Spanish"},{value:"eu",label:"Basque"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"fr-ca",label:"French (Canada)"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"nl",label:"Dutch"},{value:"no",label:"Norwegian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pt-br",label:"Portuguese (Brazil)"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"sv",label:"Swedish"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"vi",label:"Vietnamese"},{value:"zh-cn",label:"Chinese (China)"},{value:"zh-tw",label:"Chinese (Taiwan)"}],h=(window.wp.hooks,window.React),p=window.ReactDOM;var g,m,v,b,y,A,w,E,C,D={},_=[],S=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function R(e,t){for(var n in t)e[n]=t[n];return e}function x(e){var t=e.parentNode;t&&t.removeChild(e)}function k(e,t,n){var r,i,s,o={};for(s in t)"key"==s?r=t[s]:"ref"==s?i=t[s]:o[s]=t[s];if(arguments.length>2&&(o.children=arguments.length>3?g.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===o[s]&&(o[s]=e.defaultProps[s]);return T(e,o,r,i,null)}function T(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++v:i};return null==i&&null!=m.vnode&&m.vnode(s),s}function M(e){return e.children}function O(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||S.test(t)?n:n+"px"}function I(e,t,n,r,i){var s;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||O(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||O(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])s=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r||e.addEventListener(t,s?P:N,s):e.removeEventListener(t,s?P:N,s);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function N(e){y=!0;try{return this.l[e.type+!1](m.event?m.event(e):e)}finally{y=!1}}function P(e){y=!0;try{return this.l[e.type+!0](m.event?m.event(e):e)}finally{y=!1}}function H(e,t){this.props=e,this.context=t}function B(e,t){if(null==t)return e.__?B(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?B(e):null}function z(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return z(e)}}function j(e){y?setTimeout(e):E(e)}function U(e){(!e.__d&&(e.__d=!0)&&A.push(e)&&!F.__r++||w!==m.debounceRendering)&&((w=m.debounceRendering)||j)(F)}function F(){var e,t,n,r,i,s,o,a;for(A.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=A.shift();)e.__d&&(t=A.length,r=void 0,i=void 0,o=(s=(n=e).__v).__e,(a=n.__P)&&(r=[],(i=R({},s)).__v=s.__v+1,q(a,s,i,n.__n,void 0!==a.ownerSVGElement,null!=s.__h?[o]:null,r,null==o?B(s):o,s.__h),Z(r,s),s.__e!=o&&z(s)),A.length>t&&A.sort((function(e,t){return e.__v.__b-t.__v.__b})));F.__r=0}function W(e,t,n,r,i,s,o,a,l,c){var d,u,f,h,p,g,m,v=r&&r.__k||_,b=v.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(h=n.__k[d]=null==(h=t[d])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?T(null,h,null,null,h):Array.isArray(h)?T(M,{children:h},null,null,null):h.__b>0?T(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=v[d])||f&&h.key==f.key&&h.type===f.type)v[d]=void 0;else for(u=0;u<b;u++){if((f=v[u])&&h.key==f.key&&h.type===f.type){v[u]=void 0;break}f=null}q(e,h,f=f||D,i,s,o,a,l,c),p=h.__e,(u=h.ref)&&f.ref!=u&&(m||(m=[]),f.ref&&m.push(f.ref,null,h),m.push(u,h.__c||p,h)),null!=p?(null==g&&(g=p),"function"==typeof h.type&&h.__k===f.__k?h.__d=l=G(h,l,e):l=V(e,h,f,v,p,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=B(f))}for(n.__e=g,d=b;d--;)null!=v[d]&&("function"==typeof n.type&&null!=v[d].__e&&v[d].__e==n.__d&&(n.__d=Q(r).nextSibling),J(v[d],v[d]));if(m)for(d=0;d<m.length;d++)$(m[d],m[++d],m[++d])}function G(e,t,n){for(var r,i=e.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=e,t="function"==typeof r.type?G(r,t,n):V(n,r,r,i,r.__e,t));return t}function L(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){L(e,t)})):t.push(e)),t}function V(e,t,n,r,i,s){var o,a,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||i!=s||null==i.parentNode)e:if(null==s||s.parentNode!==e)e.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;e.insertBefore(i,s),o=s}return void 0!==o?o:i.nextSibling}function Q(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Q(n)))return r;return null}function q(e,t,n,r,i,s,o,a,l){var c,d,u,f,h,p,g,v,b,y,A,w,E,C,D,_=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,a=t.__e=n.__e,t.__h=null,s=[a]),(c=m.__b)&&c(t);try{e:if("function"==typeof _){if(v=t.props,b=(c=_.contextType)&&r[c.__c],y=c?b?b.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in _&&_.prototype.render?t.__c=d=new _(v,y):(t.__c=d=new H(v,y),d.constructor=_,d.render=X),b&&b.sub(d),d.props=v,d.state||(d.state={}),d.context=y,d.__n=r,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=_.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=R({},d.__s)),R(d.__s,_.getDerivedStateFromProps(v,d.__s))),f=d.props,h=d.state,d.__v=t,u)null==_.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==_.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,y),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,y)||t.__v===n.__v){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[],d.__h.length&&o.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,y),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,p)}))}if(d.context=y,d.props=v,d.__P=e,w=m.__r,E=0,"prototype"in _&&_.prototype.render){for(d.state=d.__s,d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do{d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++E<25);d.state=d.__s,null!=d.getChildContext&&(r=R(R({},r),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(p=d.getSnapshotBeforeUpdate(f,h)),D=null!=c&&c.type===M&&null==c.key?c.props.children:c,W(e,Array.isArray(D)?D:[D],t,n,r,i,s,o,a,l),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),g&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Y(n.__e,t,n,r,i,s,o,l);(c=m.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=s)&&(t.__e=a,t.__h=!!l,s[s.indexOf(a)]=null),m.__e(e,t,n)}}function Z(e,t){m.__c&&m.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){m.__e(e,t.__v)}}))}function Y(e,t,n,r,i,s,o,a){var l,c,d,u=n.props,f=t.props,h=t.type,p=0;if("svg"===h&&(i=!0),null!=s)for(;p<s.length;p++)if((l=s[p])&&"setAttribute"in l==!!h&&(h?l.localName===h:3===l.nodeType)){e=l,s[p]=null;break}if(null==e){if(null===h)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),s=null,a=!1}if(null===h)u===f||a&&e.data===f||(e.data=f);else{if(s=s&&g.call(e.childNodes),c=(u=n.props||D).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!a){if(null!=s)for(u={},p=0;p<e.attributes.length;p++)u[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,i){var s;for(s in n)"children"===s||"key"===s||s in t||I(e,s,null,n[s],r);for(s in t)i&&"function"!=typeof t[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===t[s]||I(e,s,t[s],n[s],r)}(e,f,u,i,a),d)t.__k=[];else if(p=t.props.children,W(e,Array.isArray(p)?p:[p],t,n,r,i&&"foreignObject"!==h,s,o,s?s[0]:n.__k&&B(n,0),a),null!=s)for(p=s.length;p--;)null!=s[p]&&x(s[p]);a||("value"in f&&void 0!==(p=f.value)&&(p!==e.value||"progress"===h&&!p||"option"===h&&p!==u.value)&&I(e,"value",p,u.value,!1),"checked"in f&&void 0!==(p=f.checked)&&p!==e.checked&&I(e,"checked",p,u.checked,!1))}return e}function $(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){m.__e(e,n)}}function J(e,t,n){var r,i;if(m.unmount&&m.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||$(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){m.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&J(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||x(e.__e),e.__=e.__e=e.__d=void 0}function X(e,t,n){return this.constructor(e,n)}function K(e,t,n){var r,i,s;m.__&&m.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,s=[],q(t,e=(!r&&n||t).__k=k(M,null,[e]),i||D,D,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?g.call(t.childNodes):null,s,!r&&n?n:i?i.__e:t.firstChild,r),Z(s,e)}g=_.slice,m={__e:function(e,t,n,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},v=0,b=function(e){return null!=e&&void 0===e.constructor},y=!1,H.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=R({},this.state),"function"==typeof e&&(e=e(R({},n),this.props)),e&&R(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),U(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),U(this))},H.prototype.render=M,A=[],E="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,F.__r=0,C=0;var ee,te,ne,re=[],ie=[],se=m.__b,oe=m.__r,ae=m.diffed,le=m.__c,ce=m.unmount;function de(){for(var e;e=re.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(he),e.__H.__h.forEach(pe),e.__H.__h=[]}catch(t){e.__H.__h=[],m.__e(t,e.__v)}}m.__b=function(e){ee=null,se&&se(e)},m.__r=function(e){oe&&oe(e);var t=(ee=e.__c).__H;t&&(te===ee?(t.__h=[],ee.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ie,e.__N=e.i=void 0}))):(t.__h.forEach(he),t.__h.forEach(pe),t.__h=[])),te=ee},m.diffed=function(e){ae&&ae(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==re.push(t)&&ne===m.requestAnimationFrame||((ne=m.requestAnimationFrame)||fe)(de)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ie&&(e.__=e.__V),e.i=void 0,e.__V=ie}))),te=ee=null},m.__c=function(e,t){t.some((function(e){try{e.__h.forEach(he),e.__h=e.__h.filter((function(e){return!e.__||pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],m.__e(n,e.__v)}})),le&&le(e,t)},m.unmount=function(e){ce&&ce(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{he(e)}catch(e){t=e}})),n.__H=void 0,t&&m.__e(t,n.__v))};var ue="function"==typeof requestAnimationFrame;function fe(e){var t,n=function(){clearTimeout(r),ue&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ue&&(t=requestAnimationFrame(n))}function he(e){var t=ee,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),ee=t}function pe(e){var t=ee;e.__c=e.__(),ee=t}function ge(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function me(e){this.props=e}(me.prototype=new H).isPureReactComponent=!0,me.prototype.shouldComponentUpdate=function(e,t){return ge(this.props,e)||ge(this.state,t)};var ve=m.__b;m.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ve&&ve(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref");var be=m.__e;m.__e=function(e,t,n,r){if(e.then)for(var i,s=t;s=s.__;)if((i=s.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t);be(e,t,n,r)};var ye=m.unmount;function Ae(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Ae(e,t,n)}))),e}function we(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return we(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Ee(){this.__u=0,this.t=null,this.__b=null}function Ce(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function De(){this.u=null,this.o=null}m.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),ye&&ye(e)},(Ee.prototype=new H).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var i=Ce(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=we(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},Ee.prototype.componentWillUnmount=function(){this.t=[]},Ee.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ae(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&k(M,null,e.fallback);return i&&(i.__h=null),[k(M,null,t.__a?null:e.children),i]};var _e=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Se(e){return this.getChildContext=function(){return e.context},e.children}function Re(e){var t=this,n=e.i;t.componentWillUnmount=function(){K(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),K(k(Se,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(De.prototype=new H).__a=function(e){var t=this,n=Ce(t.__v),r=t.o.get(e);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),_e(t,e,r)):i()};n?n(s):s()}},De.prototype.render=function(e){this.u=null,this.o=new Map;var t=L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},De.prototype.componentDidUpdate=De.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){_e(e,n,t)}))};var xe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ke=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Te="undefined"!=typeof document,Me=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(H.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Oe=m.event;function Ie(){}function Ne(){return this.cancelBubble}function Pe(){return this.defaultPrevented}m.event=function(e){return Oe&&(e=Oe(e)),e.persist=Ie,e.isPropagationStopped=Ne,e.isDefaultPrevented=Pe,e.nativeEvent=e};var He={configurable:!0,get:function(){return this.class}},Be=m.vnode;m.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var i=-1===t.indexOf("-");for(var s in r={},n){var o=n[s];Te&&"children"===s&&"noscript"===t||"value"===s&&"defaultValue"in n&&null==o||("defaultValue"===s&&"value"in n&&null==n.value?s="value":"download"===s&&!0===o?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+t)&&!Me(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&ke.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===o&&(o=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=L(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=L(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(He.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",He))}e.$$typeof=xe,Be&&Be(e)};var ze=m.__r;m.__r=function(e){ze&&ze(e),e.__c};const je=[],Ue=new Map;function Fe(e){je.push(e),Ue.forEach((t=>{Ge(t,e)}))}function We(e){let t=Ue.get(e);if(!t||!t.isConnected){if(t=e.querySelector("style[data-fullcalendar]"),!t){t=document.createElement("style"),t.setAttribute("data-fullcalendar","");const n=(void 0===Le&&(Le=function(){const e=document.querySelector('meta[name="csp-nonce"]');if(e&&e.hasAttribute("content"))return e.getAttribute("content");const t=document.querySelector("script[nonce]");return t&&t.nonce||""}()),Le);n&&(t.nonce=n);const r=e===document?document.head:e,i=e===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(t,i)}Ue.set(e,t),function(e){for(const t of je)Ge(e,t)}(t)}}function Ge(e,t){const{sheet:n}=e,r=n.cssRules.length;t.split("}").forEach(((e,t)=>{(e=e.trim())&&n.insertRule(e+"}",r+t)}))}let Le;"undefined"!=typeof document&&We(document),Fe(':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}');class Ve{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(n[e]-=1,n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Qe(e){e.parentNode&&e.parentNode.removeChild(e)}function qe(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Ze(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Ze(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}const Ye=/(top|left|right|bottom|width|height)$/i;function $e(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Ye.test(t)?e.style[t]=`${n}px`:e.style[t]=n}let Je=0;function Xe(){return Je+=1,"fc-dom-"+Je}function Ke(e,t,n,r){let i=function(e,t){return n=>{let r=qe(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function et(e){return Object.assign({onClick:e},tt(e))}function tt(e){return{tabIndex:0,onKeyDown(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}let nt=0;function rt(){return nt+=1,String(nt)}function it(e,t,n){return n.func?n.func(e,t):function(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}(e[n.field],t[n.field])*(n.order||1)}function st(e,t){let n=String(e);return"000".substr(0,t-n.length)+n}function ot(e,t,n){return"function"==typeof e?e(...t):"string"==typeof e?t.reduce(((e,t,n)=>e.replace("$"+n,t||"")),e):n}function at(e){return e%1==0}function lt(e){let t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}const ct=["years","months","days","milliseconds"],dt=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ut(e,t){return"string"==typeof e?function(e){let t=dt.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?ft(e):"number"==typeof e?ft({[t||"milliseconds"]:e}):null}function ft(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function ht(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function pt(e){return gt(e)/864e5}function gt(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function mt(e,t){let n=null;for(let r=0;r<ct.length;r+=1){let i=ct[r];if(t[i]){let r=e[i]/t[i];if(!at(r)||null!==n&&n!==r)return null;n=r}else if(e[i])return null}return n}function vt(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function bt(e,t,n){if(e===t)return!0;let r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r+=1)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}const yt=["sun","mon","tue","wed","thu","fri","sat"];function At(e,t){let n=Tt(e);return n[2]+=7*t,Mt(n)}function wt(e,t){let n=Tt(e);return n[2]+=t,Mt(n)}function Et(e,t){let n=Tt(e);return n[6]+=t,Mt(n)}function Ct(e,t){return(t.valueOf()-e.valueOf())/864e5}function Dt(e,t){return It(e)===It(t)?Math.round(Ct(e,t)):null}function _t(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function St(e,t,n,r){let i=Mt([t,0,1+Rt(t,n,r)]),s=_t(e),o=Math.round(Ct(i,s));return Math.floor(o/7)+1}function Rt(e,t,n){let r=7+t-n;return-(7+Mt([e,0,r]).getUTCDay()-t)%7+r-1}function xt(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kt(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Tt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Mt(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Ot(e){return!isNaN(e.valueOf())}function It(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Nt(e,t,n=!1){let r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",Ht(t,!0)))),r}function Pt(e){return e.toISOString().replace(/T.*$/,"")}function Ht(e,t=!1){let n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=Math.round(r%60);return t?`${n+st(i,2)}:${st(s,2)}`:`GMT${n}${i}${s?`:${st(s,2)}`:""}`}function Bt(e,t,n){let r,i;return function(...s){if(r){if(!bt(r,s)){n&&n(i);let r=e.apply(this,s);t&&t(r,i)||(i=r)}}else i=e.apply(this,s);return r=s,i}}function zt(e,t,n){let r,i;return s=>{if(r){if(!vn(r,s)){n&&n(i);let r=e.call(this,s);t&&t(r,i)||(i=r)}}else i=e.call(this,s);return r=s,i}}const jt={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Ut={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Ft=/\s*([ap])\.?m\.?/i,Wt=/,/g,Gt=/\s+/g,Lt=/\u200e/g,Vt=/UTC|GMT/;class Qt{constructor(e){let t={},n={},r=0;for(let i in e)i in jt?(n[i]=e[i],r=Math.max(jt[i],r)):(t[i]=e[i],i in Ut&&(r=Math.max(Ut[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=Bt(qt)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:s}=this,o=(a=e.marker,l=t.marker,(c=n.calendarSystem).getMarkerYear(a)!==c.getMarkerYear(l)?5:c.getMarkerMonth(a)!==c.getMarkerMonth(l)?4:c.getMarkerDay(a)!==c.getMarkerDay(l)?2:It(a)!==It(l)?1:0);var a,l,c;if(!o)return this.format(e,n);let d=o;!(d>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(d=1);let u=this.format(e,n),f=this.format(t,n);if(u===f)return u;let h=qt(function(e,t){let n={};for(let r in e)(!(r in Ut)||Ut[r]<=t)&&(n[r]=e[r]);return n}(i,d),s,n),p=h(e),g=h(t),m=function(e,t,n,r){let i=0;for(;i<e.length;){let s=e.indexOf(t,i);if(-1===s)break;let o=e.substr(0,s);i=s+t.length;let a=e.substr(i),l=0;for(;l<n.length;){let e=n.indexOf(r,l);if(-1===e)break;let t=n.substr(0,e);l=e+r.length;let i=n.substr(l);if(o===t&&a===i)return{before:o,after:a}}}return null}(u,p,f,g),v=s.separator||r||n.defaultSeparator||"";return m?m.before+p+v+g+m.after:u+v+f}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function qt(e,t,n){let r=Object.keys(e).length;return 1===r&&"short"===e.timeZoneName?e=>Ht(e.timeZoneOffset):0===r&&t.week?e=>function(e,t,n,r,i){let s=[];return"long"===i?s.push(n):"short"!==i&&"narrow"!==i||s.push(t),"long"!==i&&"short"!==i||s.push(" "),s.push(r.simpleNumberFormat.format(e)),"rtl"===r.options.direction&&s.reverse(),s.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):function(e,t,n){e=Object.assign({},e),t=Object.assign({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";let r,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,r=new Intl.DateTimeFormat(n.locale.codes,t)}return s=>{let o,{marker:a}=s;return o=r&&!a.getUTCMinutes()?r:i,function(e,t,n,r,i){return e=e.replace(Lt,""),"short"===n.timeZoneName&&(e=function(e,t){let n=!1;return e=e.replace(Vt,(()=>(n=!0,t))),n||(e+=` ${t}`),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":Ht(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Wt,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(Ft,"").trim():"narrow"===r.meridiem?e=e.replace(Ft,((e,t)=>t.toLocaleLowerCase())):"short"===r.meridiem?e=e.replace(Ft,((e,t)=>`${t.toLocaleLowerCase()}m`)):"lowercase"===r.meridiem&&(e=e.replace(Ft,(e=>e.toLocaleLowerCase()))),e=(e=e.replace(Gt," ")).trim()}(o.format(a),s,e,t,n)}}(e,t,n)}function Zt(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function Yt(e,t,n,r){let i=Zt(e,n.calendarSystem);return{date:i,start:i,end:t?Zt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class $t{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,Yt(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,Yt(e,t,n,r))}}class Jt{constructor(e){this.func=e}format(e,t,n){return this.func(Yt(e,null,t,n))}formatRange(e,t,n,r){return this.func(Yt(e,t,n,r))}}function Xt(e){return"object"==typeof e&&e?new Qt(e):"string"==typeof e?new $t(e):"function"==typeof e?new Jt(e):null}const Kt={navLinkDayClick:dn,navLinkWeekClick:dn,duration:ut,bootstrapFontAwesome:dn,buttonIcons:dn,customButtons:dn,defaultAllDayEventDuration:ut,defaultTimedEventDuration:ut,nextDayThreshold:ut,scrollTime:ut,scrollTimeReset:Boolean,slotMinTime:ut,slotMaxTime:ut,dayPopoverFormat:Xt,slotDuration:ut,snapDuration:ut,headerToolbar:dn,footerToolbar:dn,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Xt,dayHeaderClassNames:dn,dayHeaderContent:dn,dayHeaderDidMount:dn,dayHeaderWillUnmount:dn,dayCellClassNames:dn,dayCellContent:dn,dayCellDidMount:dn,dayCellWillUnmount:dn,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:dn,weekNumbers:Boolean,weekNumberClassNames:dn,weekNumberContent:dn,weekNumberDidMount:dn,weekNumberWillUnmount:dn,editable:Boolean,viewClassNames:dn,viewDidMount:dn,viewWillUnmount:dn,nowIndicator:Boolean,nowIndicatorClassNames:dn,nowIndicatorContent:dn,nowIndicatorDidMount:dn,nowIndicatorWillUnmount:dn,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:dn,locale:dn,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:dn,eventOrder:function(e){let t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t+=1)n=i[t],"string"==typeof n?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r},eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:dn,contentHeight:dn,direction:String,weekNumberFormat:Xt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:dn,initialDate:dn,now:dn,eventDataTransform:dn,stickyHeaderDates:dn,stickyFooterScrollbar:dn,viewHeight:dn,defaultAllDay:Boolean,eventSourceFailure:dn,eventSourceSuccess:dn,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:dn,eventConstraint:dn,eventAllow:dn,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:dn,eventContent:dn,eventDidMount:dn,eventWillUnmount:dn,selectConstraint:dn,selectOverlap:dn,selectAllow:dn,droppable:Boolean,unselectCancel:String,slotLabelFormat:dn,slotLaneClassNames:dn,slotLaneContent:dn,slotLaneDidMount:dn,slotLaneWillUnmount:dn,slotLabelClassNames:dn,slotLabelContent:dn,slotLabelDidMount:dn,slotLabelWillUnmount:dn,dayMaxEvents:dn,dayMaxEventRows:dn,dayMinWidth:Number,slotLabelInterval:ut,allDayText:String,allDayClassNames:dn,allDayContent:dn,allDayDidMount:dn,allDayWillUnmount:dn,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Xt,rerenderDelay:Number,moreLinkText:dn,moreLinkHint:dn,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:dn,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:ut,hiddenDays:dn,fixedWeekCount:Boolean,validRange:dn,visibleRange:dn,titleFormat:dn,eventInteractive:Boolean,noEventsText:String,viewHint:dn,navLinkHint:dn,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:dn,moreLinkClassNames:dn,moreLinkContent:dn,moreLinkDidMount:dn,moreLinkWillUnmount:dn,monthStartFormat:Xt,handleCustomRendering:dn,customRenderingMetaMap:dn,customRenderingReplaces:Boolean},en={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},tn={datesSet:dn,eventsSet:dn,eventAdd:dn,eventChange:dn,eventRemove:dn,windowResize:dn,eventClick:dn,eventMouseEnter:dn,eventMouseLeave:dn,select:dn,unselect:dn,loading:dn,_unmount:dn,_beforeprint:dn,_afterprint:dn,_noEventDrop:dn,_noEventResize:dn,_resize:dn,_scrollRequest:dn},nn={buttonText:dn,buttonHints:dn,views:dn,plugins:dn,initialEvents:dn,events:dn,eventSources:dn},rn={headerToolbar:sn,footerToolbar:sn,buttonText:sn,buttonHints:sn,buttonIcons:sn,dateIncrement:sn,plugins:on,events:on,eventSources:on,resources:on};function sn(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?vn(e,t):e===t}function on(e,t){return Array.isArray(e)&&Array.isArray(t)?bt(e,t):e===t}const an={type:String,component:dn,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:dn,usesMinMaxTime:Boolean,classNames:dn,content:dn,didMount:dn,willUnmount:dn};function ln(e){return fn(e,rn)}function cn(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function dn(e){return e}const{hasOwnProperty:un}=Object.prototype;function fn(e,t){let n={};if(t)for(let r in t)if(t[r]===sn){let t=[];for(let i=e.length-1;i>=0;i-=1){let s=e[i][r];if("object"==typeof s&&s)t.unshift(s);else if(void 0!==s){n[r]=s;break}}t.length&&(n[r]=fn(t))}for(let t=e.length-1;t>=0;t-=1){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function hn(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function pn(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function gn(e){let t={};for(let n of e)t[n]=!0;return t}function mn(e){let t=[];for(let n in e)t.push(e[n]);return t}function vn(e,t){if(e===t)return!0;for(let n in e)if(un.call(e,n)&&!(n in t))return!1;for(let n in t)if(un.call(t,n)&&e[n]!==t[n])return!1;return!0}const bn=/^on[A-Z]/;function yn(e,t){let n=[];for(let r in e)un.call(e,r)&&(r in t||n.push(r));for(let r in t)un.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function An(e,t,n={}){if(e===t)return!0;for(let o in t)if(!(o in e&&(r=e[o],i=t[o],s=n[o],r===i||!0===s||s&&s(r,i))))return!1;var r,i,s;for(let n in e)if(!(n in t))return!1;return!0}let wn={};var En;En=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Mt(e)}markerToArray(e){return Tt(e)}},wn.gregory=En;const Cn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;class Dn{constructor(e){let t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new wn[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.weekTextLong=(null!=e.weekTextLong?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return null===t?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Mt(xt(new Date))}createMarkerMeta(e){if("string"==typeof e)return this.parse(e);let t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Mt(e)),null!==t&&Ot(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null}parse(e){let t=function(e){let t=Cn.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number(`0.${t[12]}`):0));if(Ot(e)){let n=null;return t[13]&&(n=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}(e);if(null===t)return null;let{marker:n}=t,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return It(e)===It(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:(n=this.diffWholeMonths(e,t),null!==n?{unit:"month",value:n}:(n=function(e,t){let n=Dt(e,t);return null!==n&&n%7==0?n/7:null}(e,t),null!==n?{unit:"week",value:n}:(n=Dt(e,t),null!==n?{unit:"day",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t),at(n)?{unit:"hour",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t),at(n)?{unit:"minute",value:n}:(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t),at(n)?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),null!==r)?r/(pt(n)/365):n.months&&(r=this.diffWholeMonths(e,t),null!==r)?r/(pt(n)/30):n.days&&(r=Dt(e,t),null!==r)?r/pt(n):(t.valueOf()-e.valueOf())/gt(n)}startOf(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?_t(e):"hour"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Mt([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){let r=e.getUTCFullYear(),i=St(e,r,t,n);if(i<1)return St(e,r-1,t,n);let s=St(e,r+1,t,n);return s>=1?Math.min(i,s):i}(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=Et(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),Nt(e,n,t.omitTime)}timestampToMarker(e){return"local"===this.timeZone?Mt(xt(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Mt(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)}offsetForMarker(e){return"local"===this.timeZone?-kt(Tt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Tt(e)):null}toDate(e,t){return"local"===this.timeZone?kt(Tt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Tt(e))*60):new Date(e.valueOf()-(t||0))}}class Sn{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if("object"==typeof e&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}}function Rn(e){e();let t=m.debounceRendering,n=[];for(m.debounceRendering=function(e){n.push(e)},K(k(xn,{}),document.createElement("div"));n.length;)n.shift()();m.debounceRendering=t}Sn.prototype.classes={},Sn.prototype.iconClasses={},Sn.prototype.baseIconClass="",Sn.prototype.iconOverridePrefix="";class xn extends H{render(){return k("div",{})}componentDidMount(){this.setState({})}}function kn(e){let t=function(e,t){var n={__c:t="__cC"+C++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,U(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach((e=>{e.context=t.value,e.forceUpdate()}))},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}class Tn{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const Mn=kn({});function On(e,t,n,r,i,s,o,a,l,c,d,u,f){return{dateEnv:i,options:n,pluginHooks:o,emitter:c,dispatch:a,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:s,isRtl:"rtl"===n.direction,addResizeHandler(e){c.on("_resize",e)},removeResizeHandler(e){c.off("_resize",e)},createScrollResponder:e=>new Tn(e,c,ut(n.scrollTime),n.scrollTimeReset),registerInteractiveComponent:u,unregisterInteractiveComponent:f}}class In extends H{shouldComponentUpdate(e,t){return this.debug&&console.log(yn(e,this.props),yn(t,this.state)),!An(this.props,e,this.propEquality)||!An(this.state,t,this.stateEquality)}safeSetState(e){An(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}In.addPropsEquality=function(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t},In.addStateEquality=function(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t},In.contextType=Mn,In.prototype.propEquality={},In.prototype.stateEquality={};class Nn extends In{}function Pn(e,t){"function"==typeof e?e(t):e&&(e.current=t)}Nn.contextType=Mn;class Hn extends Nn{constructor(){super(...arguments),this.id=rt(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&Bn(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&Pn(this.props.elRef,e)}}render(){const{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:s}=e,o=zn(e,[],this.handleEl);let a,l,c=!1,d=[];if(null!=r){const e="function"==typeof r?r(s,k):r;if(!0===e)c=!0;else{const t=e&&"object"==typeof e;t&&"html"in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&"domNodes"in e?d=Array.prototype.slice.call(e.domNodes):(t?b(e):"function"!=typeof e)?a=e:l=e}}else c=!Bn(e.generatorName,n);return c&&i&&(a=i(s)),this.queuedDomNodes=d,this.currentGeneratorMeta=l,k(e.elTag,o,a)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;const{props:n,context:r}=this,{handleCustomRendering:i,customRenderingMetaMap:s}=r.options;if(i){const r=null!==(t=this.currentGeneratorMeta)&&void 0!==t?t:null==s?void 0:s[n.generatorName];r&&i(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:r},n),{elClasses:(n.elClasses||[]).filter(jn)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!bt(e,t)){t.forEach(Qe);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}}function Bn(e,t){var n;return Boolean(t.handleCustomRendering&&e&&(null===(n=t.customRenderingMetaMap)||void 0===n?void 0:n[e]))}function zn(e,t,n){const r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(" ")),e.elStyle&&(r.style=e.elStyle),r}function jn(e){return Boolean(e)}Hn.addPropsEquality({elClasses:bt,elStyle:vn,elAttrs:function(e,t){const n=yn(e,t);for(let e of n)if(!bn.test(e))return!1;return!0},renderProps:vn});const Un=kn(0);class Fn extends H{constructor(){super(...arguments),this.InnerContent=Wn.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(Pn(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,t=function(e,t){const n="function"==typeof e?e(t):e||[];return"string"==typeof n?[n]:n}(e.classNameGenerator,e.renderProps);if(e.children){const n=zn(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?k(e.elTag,n,r):r}return k(Hn,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?null===(t=(e=this.props).didMount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;null===(t=(e=this.props).willUnmount)||void 0===t||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}function Wn(e,t){const n=e.props;return k(Hn,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}Fn.contextType=Un;class Gn extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return k(Fn,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...Ln(e.viewSpec),...e.elClasses||[]],renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount}),(()=>e.children))}}function Ln(e){return[`fc-${e.type}-view`,"fc-view"]}function Vn(e,t){let n,r,i=[],{start:s}=t;for(e.sort(Qn),n=0;n<e.length;n+=1)r=e[n],r.start>s&&i.push({start:s,end:r.start}),r.end>s&&(s=r.end);return s<t.end&&i.push({start:s,end:t.end}),i}function Qn(e,t){return e.start.valueOf()-t.start.valueOf()}function qn(e,t){let{start:n,end:r}=e,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function Zn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function Yn(e){let t=Math.floor(Ct(e.start,e.end))||1,n=_t(e.start);return{start:n,end:wt(n,t)}}function $n(e,t=ut(0)){let n=null,r=null;if(e.end){r=_t(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=gt(t)&&(r=wt(r,1))}return e.start&&(n=_t(e.start),r&&r<=n&&(r=wt(n,1))),{start:n,end:r}}function Jn(e,t,n,r){return"year"===r?ut(n.diffWholeYears(e,t),"year"):"month"===r?ut(n.diffWholeMonths(e,t),"month"):function(e,t){let n=_t(e),r=_t(t);return{years:0,months:0,days:Math.round(Ct(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}(e,t)}function Xn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}class Kn{constructor(e){this.props=e,this.nowDate=Xn(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let r,i,s,o,a,l,{props:c}=this;var d,u,f,h;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(d=e,e=null!=(u=r).start&&d<u.start?u.start:null!=u.end&&d>=u.end?new Date(u.end.valueOf()-1):d),i=this.buildCurrentRangeInfo(e,t),s=/^(year|month|week|day)$/.test(i.unit),o=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,s),o=this.trimHiddenDays(o),a=o,c.showNonCurrentDates||(a=qn(a,i.range)),a=this.adjustActiveRange(a),a=qn(a,r),f=i.range,h=r,l=(null===f.end||null===h.start||f.end>h.start)&&(null===f.start||null===h.end||f.start<h.end),Zn(o,e)||(e=o.start),{currentDate:e,validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:s,activeRange:a,renderRange:o,slotMinTime:c.slotMinTime,slotMaxTime:c.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}}buildValidRange(){let e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let n,{props:r}=this,i=null,s=null,o=null;return r.duration?(i=r.duration,s=r.durationUnit,o=this.buildRangeFromDuration(e,t,i,s)):(n=this.props.dayCount)?(s="day",o=this.buildRangeFromDayCount(e,t,n)):(o=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),s=vt(i).unit,o=this.buildRangeFromDuration(e,t,i,s)),{duration:i,unit:s,range:o}}getFallbackDuration(){return ut({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:s,end:o}=e;return n&&(pt(r)<0&&(s=_t(s),s=t.add(s,r)),pt(i)>1&&(o=_t(o),o=wt(o,-1),o=t.add(o,i))),{start:s,end:o}}buildRangeFromDuration(e,t,n,r){let i,s,o,{dateEnv:a,dateAlignment:l}=this.props;if(!l){let{dateIncrement:e}=this.props;l=e&&gt(e)<gt(n)?vt(e).unit:r}function c(){i=a.startOf(e,l),s=a.add(i,n),o={start:i,end:s}}return pt(n)<=1&&this.isHiddenDay(i)&&(i=this.skipHiddenDays(i,t),i=_t(i)),c(),this.trimHiddenDays(o)||(e=this.skipHiddenDays(e,t),c()),o}buildRangeFromDayCount(e,t,n){let r,{dateEnv:i,dateAlignment:s}=this.props,o=0,a=e;s&&(a=i.startOf(a,s)),a=_t(a),a=this.skipHiddenDays(a,t),r=a;do{r=wt(r,1),this.isHiddenDay(r)||(o+=1)}while(o<n);return{start:a,end:r}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let t,{dateIncrement:n}=this.props;return n||((t=this.props.dateAlignment)?ut(1,t):e||ut({days:1}))}refineRange(e){if(e){let t=function(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),n||r?n&&r&&r<n?null:{start:n,end:r}:null}(e,this.props.dateEnv);return t&&(t=$n(t)),t}return null}initHiddenDays(){let e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e+=1)(n[e]=-1!==t.indexOf(e))||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:t,end:n}=e;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=wt(e,t);return e}}function er(e,t,n,r){return{instanceId:rt(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}function tr(e,t,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:o,instances:a}=e;a=hn(a,(e=>!o[e.defId].recurringDef));for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||(o=n.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let l=nr(n,o,t,r,i.recurringTypes);for(let t of l){let n=er(e,{start:t,end:r.add(t,o)});a[n.instanceId]=n}}}return{defs:o,instances:a}}function nr(e,t,n,r,i){let s=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(s=s.map(_t)),s}const rr={id:String,groupId:String,title:String,url:String,interactive:Boolean},ir={start:dn,end:dn,date:dn,allDay:Boolean},sr=Object.assign(Object.assign(Object.assign({},rr),ir),{extendedProps:dn});function or(e,t,n,r,i=lr(n),s,o){let{refined:a,extra:l}=ar(e,n,i),c=function(e,t){let n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),d=function(e,t,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(e,n);if(s){let{allDay:n}=e;return null==n&&(n=t,null==n&&(n=s.allDayGuess,null==n&&(n=!1))),{allDay:n,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}(a,c,n.dateEnv,n.pluginHooks.recurringTypes);if(d){let e=cr(a,l,t?t.sourceId:"",d.allDay,Boolean(d.duration),n,s);return e.recurringDef={typeId:d.typeId,typeData:d.typeData,duration:d.duration},{def:e,instance:null}}let u=function(e,t,n,r){let i,s,{allDay:o}=e,a=null,l=!1,c=null,d=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(d),i)a=i.marker;else if(!r)return null;return null!=e.end&&(s=n.dateEnv.createMarkerMeta(e.end)),null==o&&(o=null!=t?t:(!i||i.isTimeUnspecified)&&(!s||s.isTimeUnspecified)),o&&a&&(a=_t(a)),s&&(c=s.marker,o&&(c=_t(c)),a&&c<=a&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,o?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:o,hasEnd:l,range:{start:a,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:s?s.forcedTzo:null}}(a,c,n,r);if(u){let e=cr(a,l,t?t.sourceId:"",u.allDay,u.hasEnd,n,s),r=er(e.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function ar(e,t,n=lr(t)){return cn(e,n)}function lr(e){return Object.assign(Object.assign(Object.assign({},gr),sr),e.pluginHooks.eventRefiners)}function cr(e,t,n,r,i,s,o){let a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:(o&&e.id?o[e.id]:"")||rt(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:vr(e,s),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of s.pluginHooks.eventDefMemberAdders)Object.assign(a,t(e));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function dr(e,t,n,r,i,s){let o={defs:{},instances:{}},a=lr(n);for(let l of e){let e=or(l,t,n,r,a,i,s);e&&ur(e,o)}return o}function ur(e,t={defs:{},instances:{}}){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function fr(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function hr(e,t){let n=hn(e.defs,t),r=hn(e.instances,(e=>n[e.defId]));return{defs:n,instances:r}}function pr(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}const gr={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:dn,overlap:dn,allow:dn,className:pr,classNames:pr,color:String,backgroundColor:String,borderColor:String,textColor:String},mr={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function vr(e,t){let n=function(e,t){return Array.isArray(e)?dr(e,null,t,!0):"object"==typeof e&&e?dr([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function br(e){return e.reduce(yr,mr)}function yr(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}const Ar={id:String,defaultAllDay:Boolean,url:String,format:String,events:dn,eventDataTransform:dn,success:dn,failure:dn};function wr(e,t,n=Er(t)){let r;if("string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){let{refined:i,extra:s}=cn(r,n),o=function(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;t-=1){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:rt(),sourceDefId:o.sourceDefId,meta:o.meta,ui:vr(i,t),extendedProps:s}}return null}function Er(e){return Object.assign(Object.assign(Object.assign({},gr),Ar),e.pluginHooks.eventSourceRefiners)}function Cr(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Dr(e,i)),r&&(e=Dr(e,r)),e}function Dr(e,t){let n;if(t){n=[];for(let r of e){let e=t(r);e?n.push(e):null==e&&n.push(r)}}else n=e;return n}function _r(e,t,n){let{defs:r}=e,i=pn(e.instances,(e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})));return{defs:r,instances:i}}function Sr(e,t){return hr(e,(e=>e.sourceId!==t))}class Rr{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)}off(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((e=>e!==n))):delete e[t]}(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}const xr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function kr(e,t,n){let{dateEnv:r,options:i}=n,s=t;return e?(s=_t(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Tr(e,t,n,r){let i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function Mr(e,t,n,r,i){let{dateEnv:s}=i,o=r.standardProps&&!0===r.standardProps.allDay,a=r.standardProps&&!1===r.standardProps.hasEnd,l=Object.assign({},e);return o&&(l.range=Yn(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:s.add(l.range.start,r.datesDelta),end:s.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:s.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:s.add(l.range.end,r.endDelta)}),a&&(l.range={start:l.range.start,end:kr(t.allDay,l.range.start,i)}),t.allDay&&(l.range={start:_t(l.range.start),end:_t(l.range.end)}),l.range.end<l.range.start&&(l.range.end=kr(t.allDay,l.range.start,i)),l}class Or{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Ir{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in ir)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if("id"===e)t=rr[e](t),this.mutate({standardProps:{publicId:t}});else if(e in rr)t=rr[e](t),this.mutate({standardProps:{[e]:t}});else if(e in gr){let n=gr[e](t);n="color"===e?{backgroundColor:t,borderColor:t}:"editable"===e?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=Jn(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:e}):this.mutate({startDelta:e})}}setEnd(e,t={}){let n,{dateEnv:r}=this._context;if((null==e||(n=r.createMarker(e),n))&&this._instance)if(n){let e=Jn(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,n={}){let r,{dateEnv:i}=this._context,s={allDay:n.allDay},o=i.createMarker(e);var a,l;if(o&&(null==t||(r=i.createMarker(t),r))&&this._instance){let e=this._instance.range;!0===n.allDay&&(e=Yn(e));let t=Jn(e.start,o,i,n.granularity);if(r){let o=Jn(e.end,r,i,n.granularity);l=o,(a=t).years===l.years&&a.months===l.months&&a.days===l.days&&a.milliseconds===l.milliseconds?this.mutate({datesDelta:t,standardProps:s}):this.mutate({startDelta:t,endDelta:o,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:t,standardProps:s})}}moveStart(e){let t=ut(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=ut(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=ut(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Xt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let n=this._def,r=this._context,{eventStore:i}=r.getCurrentData(),s=function(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=hr(e,(e=>{return n=t,r=e,Boolean(n.groupId&&n.groupId===r.groupId);var n,r}));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return{defs:{},instances:{}}}(i,t.instanceId);s=function(e,t,n,r){let i=jr(e.defs,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}}),s={defs:{},instances:{}};for(let t in e.defs){let o=e.defs[t];s.defs[t]=Tr(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],a=s.defs[o.defId];s.instances[t]=Mr(o,a,i[o.defId],n,r)}return s}(s,0,e,r);let o=new Ir(r,n,t);this._def=s.defs[n.defId],this._instance=s.instances[t.instanceId],r.dispatch({type:"MERGE_EVENTS",eventStore:s}),r.emitter.trigger("eventChange",{oldEvent:o,event:this,relatedEvents:Pr(s,r,t),revert(){r.dispatch({type:"RESET_EVENTS",eventStore:i})}})}}remove(){let e=this._context,t=Nr(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new Or(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,s={allDay:t.allDay};return t.title&&(s.title=t.title),r&&(s.start=r),i&&(s.end=i),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(s,t.extendedProps):s.extendedProps=t.extendedProps),s}toJSON(){return this.toPlainObject()}}function Nr(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function Pr(e,t,n){let{defs:r,instances:i}=e,s=[],o=n?n.instanceId:"";for(let e in i){let n=i[e],a=r[n.defId];n.instanceId!==o&&s.push(new Ir(t,a,n))}return s}function Hr(e,t,n,r){let i={},s={},o={},a=[],l=[],c=jr(e.defs,t);for(let t in e.defs){let n=e.defs[t];"inverse-background"===c[n.defId].display&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):s[t]=[])}for(let t in e.instances){let o=e.instances[t],d=e.defs[o.defId],u=c[d.defId],f=o.range,h=!d.allDay&&r?$n(f,r):f,p=qn(h,n);p&&("inverse-background"===u.display?d.groupId?i[d.groupId].push(p):s[o.defId].push(p):"none"!==u.display&&("background"===u.display?a:l).push({def:d,ui:u,instance:o,range:p,isStart:h.start&&h.start.valueOf()===p.start.valueOf(),isEnd:h.end&&h.end.valueOf()===p.end.valueOf()}))}for(let e in i){let t=Vn(i[e],n);for(let n of t){let t=o[e],r=c[t.defId];a.push({def:t,ui:r,instance:null,range:n,isStart:!1,isEnd:!1})}}for(let t in s){let r=Vn(s[t],n);for(let n of r)a.push({def:e.defs[t],ui:c[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Br(e,t){e.fcSeg=t}function zr(e){return e.fcSeg||e.parentNode.fcSeg||null}function jr(e,t){return pn(e,(e=>Ur(e,t)))}function Ur(e,t){let n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),br(n)}function Fr(e,t){let n=e.map(Wr);return n.sort(((e,n)=>function(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=it(e,t,n[r]),i)return i;return 0}(e,n,t))),n.map((e=>e._seg))}function Wr(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:e})}function Gr(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:s}=e.eventRange,o=s.startEditable;for(let e of r)o=e(o,i,s,t);return o}function Lr(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function Vr(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function Qr(e,t,n,r,i,s,o){let{dateEnv:a,options:l}=n,{displayEventTime:c,displayEventEnd:d}=l,u=e.eventRange.def,f=e.eventRange.instance;null==c&&(c=!1!==r),null==d&&(d=!1!==i);let h=f.range.start,p=f.range.end,g=s||e.start||e.eventRange.range.start,m=o||e.end||e.eventRange.range.end,v=_t(h).valueOf()===_t(g).valueOf(),b=_t(Et(p,-1)).valueOf()===_t(Et(m,-1)).valueOf();return c&&!u.allDay&&(v||b)?(g=v?h:g,m=b?p:m,d&&u.hasEnd?a.formatRange(g,m,t,{forcedStartTzo:s?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):a.format(g,t,{forcedTzo:s?null:f.forcedStartTzo})):""}function qr(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Zn(t,r.start)}}function Zr(e){let t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function Yr(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function $r(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:o}=t,{eventInteractive:a}=o;return null==a&&(a=n.interactive,null==a&&(a=Boolean(s.hasHandlers("eventClick")))),a?tt((e=>{s.trigger("eventClick",{el:e.target,event:new Ir(t,n,r),jsEvent:e,view:t.viewApi})})):{}}const Jr={start:dn,end:dn,allDay:Boolean};function Xr(e,t,n){return Object.assign(Object.assign({},Kr(e,t,n)),{timeZone:t.timeZone})}function Kr(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}class ei extends Error{constructor(e,t){super(e),this.response=t}}let ti;function ni(){return null==ti&&(ti=function(){if("undefined"==typeof document)return!0;let e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);let t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),ti}class ri extends Nn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{Rn((()=>{this.setState({forPrint:!0})}))},this.handleAfterPrint=()=>{Rn((()=>{this.setState({forPrint:!1})}))}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,s=["fc",n?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return ni()||s.push("fc-liquid-hack"),e.children(s,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class ii{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}const si={};class oi{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering((()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:n.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))}zoomTo(e,t){let n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let t,n,{viewSpecs:r,toolbarConfig:i}=this.getCurrentData(),s=[].concat(i.header?i.header.viewsWithButtons:[],i.footer?i.footer.viewsWithButtons:[]);for(let e in r)s.push(e);for(t=0;t<s.length;t+=1)if(n=r[s[t]],n&&n.singleUnit===e)return n;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Xn(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=ut(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Xt(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Xt(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};let r=this.getCurrentData(),i=function(e,t,n){let r=function(e,t){let{refined:n,extra:r}=cn(e,Jr),i=n.start?t.createMarkerMeta(n.start):null,s=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return null==o&&(o=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:o},r)}(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return r}(n,r.dateEnv,ut({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),function(e,t,n){n.emitter.trigger("select",Object.assign(Object.assign({},function(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));var r,i;return Object.assign(n,(r=e,i=t.dateEnv,Object.assign(Object.assign({},Kr(r.range,i,r.allDay)),{allDay:r.allDay}))),n}(e,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}(i,0,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))}addEvent(e,t){if(e instanceof Ir){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:ur({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n,r=this.getCurrentData();if(t instanceof Or)n=t.internalEventSource;else if("boolean"==typeof t)t&&([n]=mn(r.eventSources));else if(null!=t){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;n=e.internalEventSource}let i=or(e,n,r,!1);if(i){let e=new Ir(r,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:ur(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Nr(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let s=n[i];if(s.publicId===e){if(s.recurringDef)return new Ir(t,s,null);for(let e in r){let n=r[e];if(n.defId===s.defId)return new Ir(t,s,n)}}}return null}getEvents(){let e=this.getCurrentData();return Pr(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new Or(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new Or(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Or)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let n=wr(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new Or(t,n)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=ut(e);t&&this.trigger("_scrollRequest",{time:t})}}function ai(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}const li={defs:{},instances:{}};class ci{constructor(){this.getKeysForEventDefs=Bt(this._getKeysForEventDefs),this.splitDateSelection=Bt(this._splitDateSpan),this.splitEventStore=Bt(this._splitEventStore),this.splitIndividualUi=Bt(this._splitIndividualUi),this.splitEventDrag=Bt(this._splitInteraction),this.splitEventResize=Bt(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),n=this.getKeysForEventDefs(e.eventStore),r=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,n),s=this.splitEventStore(e.eventStore,n),o=this.splitEventDrag(e.eventDrag),a=this.splitEventResize(e.eventResize),l={};this.eventUiBuilders=pn(t,((e,t)=>this.eventUiBuilders[t]||Bt(di)));for(let n in t){let c=t[n],d=s[n]||li,u=this.eventUiBuilders[n];l[n]={businessHours:c.businessHours||e.businessHours,dateSelection:r[n]||null,eventStore:d,eventUiBases:u(e.eventUiBases[""],c.ui,i[n]),eventSelection:d.instances[e.eventSelection]?e.eventSelection:"",eventDrag:o[n]||null,eventResize:a[n]||null}}return l}_splitDateSpan(e){let t={};if(e){let n=this.getKeysForDateSpan(e);for(let r of n)t[r]=e}return t}_getKeysForEventDefs(e){return pn(e.defs,(e=>this.getKeysForEventDef(e)))}_splitEventStore(e,t){let{defs:n,instances:r}=e,i={};for(let e in n)for(let r of t[e])i[r]||(i[r]={defs:{},instances:{}}),i[r].defs[e]=n[e];for(let e in r){let n=r[e];for(let r of t[n.defId])i[r]&&(i[r].instances[e]=n)}return i}_splitIndividualUi(e,t){let n={};for(let r in e)if(r)for(let i of t[r])n[i]||(n[i]={}),n[i][r]=e[r];return n}_splitInteraction(e){let t={};if(e){let n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),s=r=>{t[r]||(t[r]={affectedEvents:n[r]||li,mutatedEvents:i[r]||li,isEvent:e.isEvent})};for(let e in n)s(e);for(let e in i)s(e)}return t}}function di(e,t,n){let r=[];e&&r.push(e),t&&r.push(t);let i={"":br(r)};return n&&Object.assign(i,n),i}function ui(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Zn(r.activeRange,e)),isOther:Boolean(r&&!Zn(r.currentRange,e)),isToday:Boolean(t&&Zn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function fi(e,t){let n=["fc-day",`fc-day-${yt[e.dow]}`];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}const hi=Xt({year:"numeric",month:"long",day:"numeric"}),pi=Xt({week:"long"});function gi(e,t,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:o}=e;let a=i.format(t,"week"===n?pi:hi);if(s.navLinks){let e=i.toDate(t);const l=e=>{let r="day"===n?s.navLinkDayClick:"week"===n?s.navLinkWeekClick:null;"function"==typeof r?r.call(o,i.toDate(t),e):("string"==typeof r&&(n=r),o.zoomTo(t,n))};return Object.assign({title:ot(s.navLinkHint,[a,e],a),"data-navlink":""},r?et(l):{onClick:l})}return{"aria-label":a}}let mi;class vi{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let t,{lefts:n,rights:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}topToIndex(e){let t,{tops:n,bottoms:r}=this,i=n.length;for(t=0;t<i;t+=1)if(e>=n[t]&&e<r[t])return t}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return bi(this.tops||[],e.tops||[])&&bi(this.bottoms||[],e.bottoms||[])&&bi(this.lefts||[],e.lefts||[])&&bi(this.rights||[],e.rights||[])}}function bi(e,t){const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}class yi extends Nn{constructor(){super(...arguments),this.uid=rt()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!qe(e,".fc-event-mirror")}isValidDateDownEl(e){return!(qe(e,".fc-event:not(.fc-bg-event)")||qe(e,".fc-more-link")||qe(e,"a[data-navlink]")||qe(e,".fc-popover"))}}class Ai{constructor(e=(e=>e.thickness||1)){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(-1===this.maxCoord||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(-1===this.maxStackCnt||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){const r=Object.assign(Object.assign({},t),{span:Ci(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;-1===t.lateral?(Di(r,t.level,t.levelCoord),Di(n,t.level,[e])):Di(n[t.level],t.lateral,e),this.stackCnts[Ei(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,s=t.length,o=0,a=-1,l=-1,c=null,d=0;for(let u=0;u<s;u+=1){const s=t[u];if(!r&&s>=o+this.getEntryThickness(e))break;let f,h=n[u],p=_i(h,e.span.start,wi),g=p[0]+p[1];for(;(f=h[g])&&f.span.start<e.span.end;){let e=s+this.getEntryThickness(f);e>o&&(o=e,c=f,a=u,l=g),e===o&&(d=Math.max(d,i[Ei(f)]+1)),g+=1}}let u=0;if(c)for(u=a+1;u<s&&t[u]<o;)u+=1;let f=-1;return u<s&&t[u]===o&&(f=_i(n[u],e.span.end,wi)[0]),{touchingLevel:a,touchingLateral:l,touchingEntry:c,stackCnt:d,levelCoord:o,level:u,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],s=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:s}))}return r}}function wi(e){return e.span.end}function Ei(e){return e.index+":"+e.span.start}function Ci(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function Di(e,t,n){e.splice(t,0,n)}function _i(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),o=n(e[s]);if(t<o)i=s;else{if(!(t>o))return[s,1];r=s+1}}return[r,0]}Boolean;const Si="fc-col-header-cell";function Ri(e){return e.text}class xi extends Nn{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:s,dateProfile:o}=i,a=ui(s,i.todayRange,null,o),l=[Si].concat(fi(a,n)),c=e.format(s,i.dayHeaderFormat),d=!a.isDisabled&&i.colCnt>1?gi(this.context,s):{},u=Object.assign(Object.assign(Object.assign({date:e.toDate(s),view:r},i.extraRenderProps),{text:c}),a);return k(Fn,{elTag:"th",elClasses:l,elAttrs:Object.assign({role:"columnheader",colSpan:i.colSpan,"data-date":a.isDisabled?void 0:Pt(s)},i.extraDataAttrs),renderProps:u,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},(e=>k("div",{className:"fc-scrollgrid-sync-inner"},!a.isDisabled&&k(e,{elTag:"a",elAttrs:d,elClasses:["fc-col-header-cell-cushion",i.isSticky&&"fc-sticky"]}))))}}const ki=Xt({weekday:"long"});class Ti extends Nn{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,s=wt(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},a=t.format(s,e.dayHeaderFormat),l=Object.assign(Object.assign(Object.assign(Object.assign({date:s},o),{view:r}),e.extraRenderProps),{text:a});return k(Fn,{elTag:"th",elClasses:[Si,...fi(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:l,generatorName:"dayHeaderContent",customGenerator:i.dayHeaderContent,defaultGenerator:Ri,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(n=>k("div",{className:"fc-scrollgrid-sync-inner"},k(n,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(s,ki)}}))))}}class Mi extends H{constructor(e,t){super(e,t),this.initialNowDate=Xn(t.options.now,t.dateEnv),this.initialNowQueriedMs=(new Date).valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:t}=this,n=Et(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,ut(1,e.unit)),s=i.valueOf()-n.valueOf();return s=Math.min(864e5,s),{currentState:{nowDate:r,todayRange:Oi(r)},nextState:{nowDate:i,todayRange:Oi(i)},waitMs:s}}setTimeout(){let{nextState:e,waitMs:t}=this.computeTiming();this.timeoutId=setTimeout((()=>{this.setState(e,(()=>{this.setTimeout()}))}),t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}function Oi(e){let t=_t(e);return{start:t,end:wt(t,1)}}Mi.contextType=Mn;class Ii extends Nn{constructor(){super(...arguments),this.createDayHeaderFormatter=Bt(Ni)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return k(Mi,{unit:"day"},((e,o)=>k("tr",{role:"row"},i&&i("day"),t.map((e=>r?k(xi,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:s}):k(Ti,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s}))))))}}function Ni(e,t,n){return e||function(e,t){return Xt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}class Pi{constructor(e,t){let n=e.start,{end:r}=e,i=[],s=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),s.push(n)),n=wt(n,1);this.dates=s,this.indices=i,this.cnt=s.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(wt(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(Ct(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}}class Hi{constructor(e,t){let n,r,i,{dates:s}=e;if(t){for(r=s[0].getUTCDay(),n=1;n<s.length&&s[n].getUTCDay()!==r;n+=1);i=Math.ceil(s.length/n)}else i=1,n=s.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,s=e;for(;s<=i;){let o=Math.floor(s/t),a=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:s%t,lastCol:(a-1)%t,isStart:n.isStart&&s===e,isEnd:n.isEnd&&a-1===i}),s=a}}return r}}class Bi{constructor(){this.sliceBusinessHours=Bt(this._sliceBusinessHours),this.sliceDateSelection=Bt(this._sliceDateSpan),this.sliceEventStore=Bt(this._sliceEventStore),this.sliceEventDrag=Bt(this._sliceInteraction),this.sliceEventResize=Bt(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:s}=e,o=this.sliceEventStore(e.eventStore,s,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,s,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,s,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,s,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:Et(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(tr(e,zi(t,Boolean(n)),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let s=Hr(e,t,zi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let s=Hr(e.mutatedEvents,t,zi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...s){if(!e)return[];let o=zi(t,Boolean(n)),a=qn(e.range,o);if(a){let t=function(e,t,n){let r=ar({editable:!1},n),i=cr(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:Ur(i,t),instance:er(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e=Object.assign(Object.assign({},e),{range:a}),r,i),n=this.sliceRange(e.range,...s);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:wt(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}}function zi(e,t){let n=e.activeRange;return t?n:{start:Et(n.start,e.slotMinTime.milliseconds),end:Et(n.end,e.slotMaxTime.milliseconds-864e5)}}const ji=/^(visible|hidden)$/;class Ui extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),k("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(ji.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(ji.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return ji.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return ji.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class Fi{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,s=!1;null!==e?(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,s=!0):(n[t]-=1,n[t]||(delete r[t],delete this.callbackMap[t],i=!0)),this.masterCallback&&(i&&this.masterCallback(null,String(t)),s&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=t=>{this.handleValue(t,String(e))}),t}collect(e,t,n){return function(e,t=0,n,r=1){let i=[];null==n&&(n=Object.keys(e).length);for(let s=t;s<n;s+=r){let t=e[s];void 0!==t&&i.push(t)}return i}(this.currentMap,e,t,n)}getAll(){return mn(this.currentMap)}}function Wi(e,t){return e.liquid&&t.liquid}function Gi(e,t){return bt(e,t,vn)}function Li(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(k("col",{style:{width:"shrink"===r.width?Vi(t):r.width||"",minWidth:r.minWidth||""}}))}return k("colgroup",{},...n)}function Vi(e){return null==e?4:e}function Qi(e,t){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function qi(e){return k("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Zi(e){let{stickyHeaderDates:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Yi(e){let{stickyFooterScrollbar:t}=e;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}class $i extends Nn{constructor(){super(...arguments),this.processCols=Bt((e=>e),Gi),this.renderMicroColGroup=Bt(Li),this.scrollerRefs=new Fi,this.scrollerElRefs=new Fi(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),s=this.renderMicroColGroup(i,t.shrinkWidth),o=function(e,t){let n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}(e.liquid,n);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let a,l=r.length,c=0,d=[],u=[],f=[];for(;c<l&&"header"===(a=r[c]).type;)d.push(this.renderSection(a,s,!0)),c+=1;for(;c<l&&"body"===(a=r[c]).type;)u.push(this.renderSection(a,s,!1)),c+=1;for(;c<l&&"footer"===(a=r[c]).type;)f.push(this.renderSection(a,s,!0)),c+=1;let h=!ni();const p={role:"rowgroup"};return k("table",{role:"grid",className:o.join(" "),style:{height:e.height}},Boolean(!h&&d.length)&&k("thead",p,...d),Boolean(!h&&u.length)&&k("tbody",p,...u),Boolean(!h&&f.length)&&k("tfoot",p,...f),h&&k("tbody",p,...d,...u,...f))}renderSection(e,t,n){return"outerContent"in e?k(M,{key:e.key},e.outerContent):k("tr",{key:e.key,role:"presentation",className:Qi(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if("outerContent"in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:s,scrollerClientWidths:o,scrollerClientHeights:a}=this.state,l=function(e,t){return null!=t.maxHeight||Wi(e,t)}(i,e),c=Wi(i,e),d=i.liquid?s?"scroll":l?"auto":"hidden":"visible",u=e.key,f=function(e,t,n,r){let{expandRows:i}=n;return"function"==typeof t.content?t.content(n):k("table",{role:"presentation",className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,k(r?"thead":"tbody",{role:"presentation"},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}(e,n,{tableColGroupNode:t,tableMinWidth:"",clientWidth:i.collapsibleWidth||void 0===o[u]?null:o[u],clientHeight:void 0!==a[u]?a[u]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return k(r?"th":"td",{ref:n.elRef,role:"presentation"},k("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},k(Ui,{ref:this.scrollerRefs.createRef(u),elRef:this.scrollerElRefs.createRef(u),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=function(e,t){for(let n of e)if(n.key===t)return n;return null}(this.props.sections,t);n&&Pn(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return function(e){for(let t of e)if("shrink"===t.width)return!0;return!1}(this.props.cols)?function(e){let t=function(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let t=n[e].querySelectorAll(".fc-scrollgrid-shrink");for(let e=0;e<t.length;e+=1)r.push(t[e])}return r}(e),n=0;for(let e of t)n=Math.max(n,lt(e));return Math.ceil(n)}(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=(mi||(mi=function(){let e=document.createElement("div");e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",document.body.appendChild(e);let t=function(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}(e);return document.body.removeChild(e),t}()),mi),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},s={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,a=n.currentMap[o];if(a){let t=a.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),s[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:s}}}$i.addStateEquality({scrollerClientWidths:vn,scrollerClientHeights:vn});class Ji extends Nn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&Br(e,this.props.seg)}}render(){const{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:s}=i,o={event:new Ir(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:s.textColor,backgroundColor:s.backgroundColor,borderColor:s.borderColor,isDraggable:!e.disableDragging&&Gr(r,t),isStartResizable:!e.disableResizing&&Lr(r,t),isEndResizable:!e.disableResizing&&Vr(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return k(Fn,Object.assign({},e,{elRef:this.handleEl,elClasses:[...Zr(o),...r.eventRange.ui.classNames,...e.elClasses||[]],renderProps:o,generatorName:"eventContent",customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Br(this.el,this.props.seg)}}class Xi extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,s=Qr(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:$r(r,t),defaultGenerator:Ki,timeText:s}),((e,t)=>k(M,null,k(e,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:t.textColor}}),Boolean(t.isStartResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(t.isEndResizable)&&k("div",{className:"fc-event-resizer fc-event-resizer-end"}))))}}function Ki(e){return k("div",{className:"fc-event-main-frame"},e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title-container"},k("div",{className:"fc-event-title fc-sticky"},e.event.title||k(M,null," "))))}const es=e=>k(Mn.Consumer,null,(t=>{let{options:n}=t,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return k(Fn,Object.assign({},e,{elTag:e.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))})),ts=Xt({day:"numeric"});class ns extends Nn{constructor(){super(...arguments),this.refineRenderProps=zt(is)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return k(Fn,Object.assign({},e,{elClasses:[...fi(r,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Pt(e.date)}),renderProps:r,generatorName:"dayCellContent",customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount}))}}function rs(e){return Boolean(e.dayCellContent||Bn("dayCellContent",e))}function is(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,s=ui(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:ts):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},s),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}class ss extends Nn{render(){let{props:e}=this,{seg:t}=e;return k(Ji,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:os,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function os(e){let{title:t}=e.event;return t&&k("div",{className:"fc-event-title"},e.event.title)}function as(e){return k("div",{className:`fc-${e}`})}const ls=e=>k(Mn.Consumer,null,(t=>{let{dateEnv:n,options:r}=t,{date:i}=e,s=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,s),date:i};return k(Fn,Object.assign({},e,{renderProps:o,generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:cs,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))}));function cs(e){return e.text}class ds extends Nn{constructor(){super(...arguments),this.state={titleId:Xe()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const t=function(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=["fc-popover",e.getClass("popover")].concat(n.extraClassNames||[]);return function(e,t){var n=k(Re,{__v:e,i:t});return n.containerInfo=t,n}(k("div",Object.assign({},n.extraAttrs,{id:n.id,className:i.join(" "),"aria-labelledby":r.titleId,ref:this.handleRootEl}),k("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},k("span",{className:"fc-popover-title",id:r.titleId},n.title),k("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),k("div",{className:"fc-popover-body "+e.getClass("popoverContent")},n.children)),n.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=function(e){let t=function(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}(e),n=e.getBoundingClientRect();for(let e of t){let t=ai(n,e.getBoundingClientRect());if(!t)return null;n=t}return n}(t);if(i){let s=r.getBoundingClientRect(),o=n?qe(t,".fc-scrollgrid").getBoundingClientRect().top:i.top,a=e?i.right-s.width:i.left;o=Math.max(o,10),a=Math.min(a,document.documentElement.clientWidth-10-s.width),a=Math.max(a,10);let l=r.offsetParent.getBoundingClientRect();!function(e,t){for(let n in t)$e(e,n,t[n])}(r,{top:o-l.top,left:a-l.left})}}}class us extends yi{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:s}=n,o=t.format(r,e.dayPopoverFormat);return k(ns,{elRef:this.handleRootEl,date:r,dateProfile:s,todayRange:i},((t,r,i)=>k(ds,{elRef:i.ref,id:n.id,title:o,extraClassNames:["fc-more-popover"].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},rs(e)&&k(t,{elTag:"div",elClasses:["fc-more-popover-misc"]}),n.children)))}queryHit(e,t,n,r){let{rootEl:i,props:s}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:s.dateProfile,dateSpan:Object.assign({allDay:!s.forceTimed,range:{start:s.startDate,end:s.endDate}},s.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}}class fs extends Nn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:Xe()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&Pn(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=ps(t).start;function s(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new Ir(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof r&&(r=r({date:i,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(s),hiddenSegs:t.hiddenSegs.map(s),jsEvent:e,view:n.viewApi})),r&&"popover"!==r?"string"==typeof r&&n.calendarApi.zoomTo(i,r):this.setState({isPopoverOpen:!0})},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return k(Mn.Consumer,null,(n=>{let{viewApi:r,options:i,calendarApi:s}=n,{moreLinkText:o}=i,{moreCnt:a}=e,l=ps(e),c="function"==typeof o?o.call(s,a):`+${a} ${o}`,d=ot(i.moreLinkHint,[a],c),u={num:a,shortText:`+${a}`,text:c,view:r};return k(M,null,Boolean(e.moreCnt)&&k(Fn,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),et(this.handleClick)),{title:d,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:u,generatorName:"moreLinkContent",customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||hs,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&k(us,{id:t.popoverId,startDate:l.start,endDate:l.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))}))}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=qe(this.linkEl,".fc-view-harness"))}}function hs(e){return e.text}function ps(e){if(e.allDayDate)return{start:e.allDayDate,end:wt(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:gs(t),end:(n=t,n.reduce(vs).eventRange.range.end)};var n}function gs(e){return e.reduce(ms).eventRange.range.start}function ms(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function vs(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}class bs{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),void 0!==this.currentValue&&e(this.currentValue)}}class ys extends bs{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:t}=this;let n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}}const As=[],ws={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Es=Object.assign(Object.assign({},ws),{buttonHints:{prev:"Previous $0",next:"Next $0",today:(e,t)=>"day"===t?"Today":`This ${e}`},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:e=>`Show ${e} more event${1===e?"":"s"}`});function Cs(e){let t=e.length>0?e[0].code:"en",n=As.concat(e),r={en:Es};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function Ds(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){let n=[].concat(e||[]),r=function(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split("-");for(let e=r.length;e>0;e-=1){let n=r.slice(0,e).join("-");if(t[n])return t[n]}}return null}(n,t)||Es;return _s(e,n,r)}(e,t):_s(e.code,[e.code],e)}function _s(e,t,n){let r=fn([ws,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Ss(e){return{id:rt(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}class Rs extends Sn{}function xs(e,t,n,r){if(t[e])return t[e];let i=function(e,t,n,r){let i=n[e],s=r[e],o=e=>i&&null!==i[e]?i[e]:s&&null!==s[e]?s[e]:null,a=o("component"),l=o("superType"),c=null;if(l){if(l===e)throw new Error("Can't have a custom view type that references itself");c=xs(l,t,n,r)}return!a&&c&&(a=c.component),a?{type:e,component:a,defaults:Object.assign(Object.assign({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,r);return i&&(t[e]=i),i}function ks(e){return pn(e,Ts)}function Ts(e){let t="function"==typeof e?{component:e}:e,{component:n}=t;return t.content?n=Ms(t):!n||n.prototype instanceof Nn||(n=Ms(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function Ms(e){return t=>k(Mn.Consumer,null,(n=>k(Fn,{elTag:"div",elClasses:Ln(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount})))}function Os(e,t,n,r){let i=ks(e),s=ks(t.views),o=function(e,t){let n,r={};for(n in e)xs(n,r,e,t);for(n in t)xs(n,r,e,t);return r}(i,s);return pn(o,(e=>function(e,t,n,r,i){let s=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,a="",l="",c={};if(s&&(o=function(e){let t=JSON.stringify(e),n=Is[t];return void 0===n&&(n=ut(e),Is[t]=n),n}(s),o)){let e=vt(o);a=e.unit,1===e.value&&(l=a,c=t[a]?t[a].rawOptions:{})}let d=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null},u=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[l]?n[l]:null};return{type:e.type,component:e.component,duration:o,durationUnit:a,singleUnit:l,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},c),e.overrides),buttonTextOverride:d(r)||d(n)||e.overrides.buttonText,buttonTextDefault:d(i)||e.defaults.buttonText||d(en)||e.type,buttonTitleOverride:u(r)||u(n)||e.overrides.buttonHint,buttonTitleDefault:u(i)||e.defaults.buttonHint||u(en)}}(e,s,t,n,r)))}Rs.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},Rs.prototype.baseIconClass="fc-icon",Rs.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},Rs.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},Rs.prototype.iconOverrideOption="buttonIcons",Rs.prototype.iconOverrideCustomButtonOption="icon",Rs.prototype.iconOverridePrefix="fc-icon-";let Is={};function Ns(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function Ps(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=Hs(i,n,r)),Object.assign(Object.assign({},e),i)}function Hs(e,t,n){return Bs(e,hn(e,(e=>function(e,t,n){return Us(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n))),t,!1,n)}function Bs(e,t,n,r,i){let s={};for(let o in e){let a=e[o];t[o]?s[o]=zs(a,n,r,i):s[o]=a}return s}function zs(e,t,n,r){let{options:i,calendarApi:s}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],a=rt();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},(n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(s,o,n.response)||o),e.success&&(o=e.success.call(s,o,n.response)||o),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:o})}),(n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:n})})),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:a})}function js(e,t){return hn(e,(e=>Us(e,t)))}function Us(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Fs(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Ws(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Gs(e,t){let n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ls(e,t){let n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Vs(e,t,n,r,i){return{header:e.headerToolbar?Qs(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?Qs(e.footerToolbar,e,t,n,r,i):null}}function Qs(e,t,n,r,i,s){let o={},a=[],l=!1;for(let c in e){let d=qs(e[c],t,n,r,i,s);o[c]=d.widgets,a.push(...d.viewsWithButtons),l=l||d.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:l}}function qs(e,t,n,r,i,s){let o="rtl"===t.direction,a=t.customButtons||{},l=n.buttonText||{},c=t.buttonText||{},d=n.buttonHints||{},u=t.buttonHints||{},f=e?e.split(" "):[],h=[],p=!1;return{widgets:f.map((e=>e.split(",").map((e=>{if("title"===e)return p=!0,{buttonName:e};let n,f,g,m,v,b;if(n=a[e])g=e=>{n.click&&n.click.call(e.target,e,e.target)},(m=r.getCustomButtonIconClass(n))||(m=r.getIconClass(e,o))||(v=n.text),b=n.hint||n.text;else if(f=i[e]){h.push(e),g=()=>{s.changeView(e)},(v=f.buttonTextOverride)||(m=r.getIconClass(e,o))||(v=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;b=ot(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(s[e])if(g=()=>{s[e]()},(v=l[e])||(m=r.getIconClass(e,o))||(v=c[e]),"prevYear"===e||"nextYear"===e){let t="prevYear"===e?"prev":"next";b=ot(d[t]||u[t],[c.year||"year","year"],c[e])}else b=t=>ot(d[e]||u[e],[c[t]||t,t],c[e]);return{buttonName:e,buttonClick:g,buttonIcon:m,buttonText:v,buttonHint:b}})))),viewsWithButtons:h,hasTitle:p}}class Zs{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}function Ys(e,t){let n=mn(t.getCurrentData().eventSources);if(1===n.length&&1===e.length&&Array.isArray(n[0]._raw)&&Array.isArray(e[0]))return void t.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:e[0]});let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}const $s=[Ss({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta:e=>Array.isArray(e.events)?e.events:null,fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),Ss({name:"func-event-source",eventSourceDefs:[{parseMeta:e=>"function"==typeof e.events?e.events:null,fetch(e,t,n){const{dateEnv:r}=e.context;!function(e,n,r){let i=!1,s=function(e){i||(i=!0,t({rawEvents:e}))},o=function(e){i||(i=!0,r(e))},a=e(s,o);a&&"function"==typeof a.then&&a.then(s,o)}(e.eventSource.meta.bind(null,Xr(e.range,r)),0,n)}}]}),Ss({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:dn,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:e=>!e.url||"json"!==e.format&&e.format?null:{url:e.url,format:"json",method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam},fetch(e,t,n){const{meta:r}=e.eventSource,i=function(e,t,n){let r,i,s,o,{dateEnv:a,options:l}=n,c={};return r=e.startParam,null==r&&(r=l.startParam),i=e.endParam,null==i&&(i=l.endParam),s=e.timeZoneParam,null==s&&(s=l.timeZoneParam),o="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},Object.assign(c,o),c[r]=a.formatIso(t.start),c[i]=a.formatIso(t.end),"local"!==a.timeZone&&(c[s]=a.timeZone),c}(r,e.range,e.context);(function(e,t,n){const r={method:e=e.toUpperCase()};return"GET"===e?t+=(-1===t.indexOf("?")?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(t,r).then((e=>{if(e.ok)return e.json().then((t=>[t,e]),(()=>{throw new ei("Failure parsing JSON",e)}));throw new ei("Request failed",e)}))})(r.method,r.url,i).then((([e,n])=>{t({rawEvents:e,response:n})}),n)}}]}),Ss({name:"simple-recurring-event",recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let i,s={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null};return e.duration&&(i=e.duration),!i&&e.startTime&&e.endTime&&(n=e.endTime,r=e.startTime,i={years:n.years-r.years,months:n.months-r.months,days:n.days-r.days,milliseconds:n.milliseconds-r.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:i,typeData:s}}var n,r;return null},expand(e,t,n){let r=qn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){let i=e?gn(e):null,s=_t(n.start),o=n.end,a=[];for(;s<o;){let e;i&&!i[s.getUTCDay()]||(e=t?r.add(s,t):s,a.push(e)),s=wt(s,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:dn,startTime:ut,endTime:ut,duration:ut,startRecur:dn,endRecur:dn}}),Ss({name:"change-handler",optionChangeHandlers:{events(e,t){Ys([e],t)},eventSources:Ys}}),Ss({name:"misc",isLoadingFuncs:[e=>Ns(e.eventSources)],propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",Object.assign(Object.assign({},Xr(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){let{emitter:n}=t;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Pr(e,t))}}})];class Js{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Ve(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t,n=[];for(;t=e.shift();)this.runTask(t),n.push(t);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function Xs(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Xt(t.titleFormat||function(e){let{currentRangeUnit:t}=e;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};let n=Dt(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}class Ks{constructor(e){this.computeCurrentViewData=Bt(this._computeCurrentViewData),this.organizeRawLocales=Bt(Cs),this.buildLocale=Bt(Ds),this.buildPluginHooks=function(){let e,t=[],n=[];return(r,i)=>(e&&bt(r,t)&&bt(i,n)||(e=function(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let l of e){const e=l.name,c=n[e];void 0===c?(n[e]=l.id,i(l.deps),a=l,r={premiumReleaseDate:(t=(o=r).premiumReleaseDate,s=a.premiumReleaseDate,void 0===t?s:void 0===s?t:new Date(Math.max(t.valueOf(),s.valueOf()))),reducers:o.reducers.concat(a.reducers),isLoadingFuncs:o.isLoadingFuncs.concat(a.isLoadingFuncs),contextInit:o.contextInit.concat(a.contextInit),eventRefiners:Object.assign(Object.assign({},o.eventRefiners),a.eventRefiners),eventDefMemberAdders:o.eventDefMemberAdders.concat(a.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},o.eventSourceRefiners),a.eventSourceRefiners),isDraggableTransformers:o.isDraggableTransformers.concat(a.isDraggableTransformers),eventDragMutationMassagers:o.eventDragMutationMassagers.concat(a.eventDragMutationMassagers),eventDefMutationAppliers:o.eventDefMutationAppliers.concat(a.eventDefMutationAppliers),dateSelectionTransformers:o.dateSelectionTransformers.concat(a.dateSelectionTransformers),datePointTransforms:o.datePointTransforms.concat(a.datePointTransforms),dateSpanTransforms:o.dateSpanTransforms.concat(a.dateSpanTransforms),views:Object.assign(Object.assign({},o.views),a.views),viewPropsTransformers:o.viewPropsTransformers.concat(a.viewPropsTransformers),isPropsValid:a.isPropsValid||o.isPropsValid,externalDefTransforms:o.externalDefTransforms.concat(a.externalDefTransforms),viewContainerAppends:o.viewContainerAppends.concat(a.viewContainerAppends),eventDropTransformers:o.eventDropTransformers.concat(a.eventDropTransformers),calendarInteractions:o.calendarInteractions.concat(a.calendarInteractions),componentInteractions:o.componentInteractions.concat(a.componentInteractions),themeClasses:Object.assign(Object.assign({},o.themeClasses),a.themeClasses),eventSourceDefs:o.eventSourceDefs.concat(a.eventSourceDefs),cmdFormatter:a.cmdFormatter||o.cmdFormatter,recurringTypes:o.recurringTypes.concat(a.recurringTypes),namedTimeZonedImpl:a.namedTimeZonedImpl||o.namedTimeZonedImpl,initialView:o.initialView||a.initialView,elementDraggingImpl:o.elementDraggingImpl||a.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},o.optionChangeHandlers),a.optionChangeHandlers),scrollGridImpl:a.scrollGridImpl||o.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},o.listenerRefiners),a.listenerRefiners),optionRefiners:Object.assign(Object.assign({},o.optionRefiners),a.optionRefiners),propSetHandlers:Object.assign(Object.assign({},o.propSetHandlers),a.propSetHandlers)}):c!==l.id&&console.warn(`Duplicate plugin '${e}'`)}var t,s,o,a}return e&&i(e),i(t),r}(r,i)),t=r,n=i,e)}(),this.buildDateEnv=Bt(eo),this.buildTheme=Bt(to),this.parseToolbars=Bt(Vs),this.buildViewSpecs=Bt(Os),this.buildDateProfileGenerator=zt(no),this.buildViewApi=Bt(ro),this.buildViewUiProps=zt(oo),this.buildEventUiBySource=Bt(io,vn),this.buildEventUiBases=Bt(so),this.parseContextBusinessHours=zt(lo),this.buildTitle=Bt(Xs),this.emitter=new Rr,this.actionRunner=new Js(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause();let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let s=function(e,t){let n=e.initialDate;return null!=n?t.createMarker(n):Xn(e.now,t)}(n.calendarOptions,n.dateEnv),o=i.dateProfileGenerator.build(s);Zn(o.activeRange,s)||(s=o.currentRange.start);let a={dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let e of n.pluginHooks.contextInit)e(a);let l=function(e,t,n){let r=t?t.activeRange:null;return Ps({},function(e,t){let n=Er(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=wr(e,t,n);r&&i.push(r)}return i}(e,n),r,n)}(n.calendarOptions,o,a),c={dynamicOptionOverrides:t,currentViewType:r,currentDate:s,dateProfile:o,businessHours:this.parseContextBusinessHours(a),eventSources:l,eventUiBases:{},eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},d=Object.assign(Object.assign({},a),c);for(let e of n.pluginHooks.reducers)Object.assign(c,e(null,null,d));ao(c,a)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;void 0===t?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(void 0===t||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=function(e,t){return"SET_OPTION"===t.type?Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue}):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=function(e,t){return"CHANGE_VIEW_TYPE"===t.type&&(e=t.viewType),e}(n.currentViewType,e),a=this.computeCurrentViewData(o,s,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(a.options);let l={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:d}=n;this.data&&this.data.dateProfileGenerator!==a.dateProfileGenerator&&(d=a.dateProfileGenerator.build(c)),c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),d=function(e,t,n,r){let i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":return r.build(t.dateMarker);case"PREV":if(i=r.buildPrev(e,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(e,n),i.isValid)return i}return e}(d,e,c,a.dateProfileGenerator),"PREV"!==e.type&&"NEXT"!==e.type&&Zn(d.currentRange,c)||(c=d.currentRange.start);let u=function(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return Ps(e,t.sources,i,r);case"REMOVE_EVENT_SOURCE":return s=e,o=t.sourceId,hn(s,(e=>e.sourceId!==o));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Hs(e,i,r):e;case"FETCH_EVENT_SOURCES":return Bs(e,t.sourceIds?gn(t.sourceIds):js(e,r),i,t.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}var s,o}(n.eventSources,e,d,l),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,s){if(t&&n===t.latestFetchId){let n=dr(Cr(i,t,s),t,s);return r&&(n=tr(n,r,s)),fr(Sr(e,t.sourceId),n)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"RESET_RAW_EVENTS":return function(e,t,n,r,i){const{defIdMap:s,instanceIdMap:o}=function(e){const{defs:t,instances:n}=e,r={},i={};for(let e in t){const n=t[e],{publicId:i}=n;i&&(r[i]=e)}for(let e in n){const r=t[n[e].defId],{publicId:s}=r;s&&(i[s]=e)}return{defIdMap:r,instanceIdMap:i}}(e);return tr(dr(Cr(n,t,i),t,i,!1,s,o),r,i)}(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=tr(t,n,r)),fr(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return t.eventStore;case"MERGE_EVENTS":return fr(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?tr(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){let{defs:n,instances:r}=e,i={},s={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(s[e]=r[e]);return{defs:i,instances:s}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Sr(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return hr(e,(e=>!e.sourceId));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,u,d,l),h=Ns(u)&&!a.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:p,selectionConfig:g}=this.buildViewUiProps(l),m=this.buildEventUiBySource(u),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:c,dateProfile:d,eventSources:u,eventStore:f,renderableEventStore:h,selectionConfig:g,eventUiBases:this.buildEventUiBases(h.defs,p,m),businessHours:this.parseContextBusinessHours(l),dateSelection:Fs(n.dateSelection,e),eventSelection:Ws(n.eventSelection,e),eventDrag:Gs(n.eventDrag,e),eventResize:Ls(n.eventResize,e)},b=Object.assign(Object.assign({},l),v);for(let t of s.pluginHooks.reducers)Object.assign(v,t(n,e,b));let y=ao(n,l),A=ao(v,l);!y&&A?r.trigger("loading",!0):y&&!A&&r.trigger("loading",!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),s=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,a=n&&n.calendarOptions,l=r.calendarOptions;if(a&&a!==l){a.timeZone!==l.timeZone&&(t.eventSources=s.eventSources=function(e,t,n){let r=t?t.activeRange:null;return Bs(e,js(e,n),r,!0,n)}(s.eventSources,t.dateProfile,s),t.eventStore=s.eventStore=_r(s.eventStore,n.dateEnv,s.dateEnv),t.renderableEventStore=s.renderableEventStore=_r(s.renderableEventStore,n.dateEnv,s.dateEnv));for(let e in o)-1===this.optionsForHandling.indexOf(e)&&a[e]===l[e]||o[e](l[e],s)}this.optionsForHandling=[],e.onData&&e.onData(s)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:s,availableLocaleData:o,extra:a}=this.processRawCalendarOptions(e,t);co(a);let l=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),c=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,s),d=this.buildTheme(r,i),u=this.parseToolbars(r,this.stableOptionOverrides,d,c,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:l,viewSpecs:c,theme:d,toolbarConfig:u,localeDefaults:s,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=ln([en,e,t]),i=this.organizeRawLocales(n),s=i.map,o=this.buildLocale(r||i.defaultCode,s).options,a=this.buildPluginHooks(e.plugins||[],$s),l=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),a.listenerRefiners),a.optionRefiners),c={},d=ln([en,o,e,t]),u={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,p=!1;for(let e in d)-1===this.optionsForRefining.indexOf(e)&&(d[e]===f[e]||rn[e]&&e in f&&rn[e](f[e],d[e]))?u[e]=h[e]:l[e]?(u[e]=l[e](d[e]),p=!0):c[e]=f[e];return p&&(this.currentCalendarOptionsInput=d,this.currentCalendarOptionsRefined=u,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:a,availableLocaleData:i,localeDefaults:o,extra:c}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:s,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return co(o),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let s=ln([en,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),tn),nn),an),t.listenerRefiners),t.optionRefiners),a={},l=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,u={};for(let e in s)s[e]===l[e]||rn[e]&&rn[e](s[e],l[e])?a[e]=c[e]:(s[e]===this.currentCalendarOptionsInput[e]||rn[e]&&rn[e](s[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(a[e]=this.currentCalendarOptionsRefined[e]):o[e]?a[e]=o[e](s[e]):u[e]=s[e],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=a),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:u}}}function eo(e,t,n,r,i,s,o,a){let l=Ds(t||o.defaultCode,o.map);return new Dn({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:a})}function to(e,t){return new(t.themeClasses[e.themeSystem]||Rs)(e)}function no(e){return new(e.dateProfileGeneratorClass||Kn)(e)}function ro(e,t,n){return new Zs(e,t,n)}function io(e){return pn(e,(e=>e.ui))}function so(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function oo(e){let{options:t}=e;return{eventUiSingleBase:vr({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:vr({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ao(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function lo(e){return t=e.options.businessHours,n=e,dr(function(e){let t;return t=!0===e?[{}]:Array.isArray(e)?e.filter((e=>e.daysOfWeek)):"object"==typeof e&&e?[e]:[],t=t.map((e=>Object.assign(Object.assign({},xr),e))),t}(t),null,n);var t,n}function co(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:""))}class uo extends Nn{render(){return k("div",{className:"fc-toolbar-chunk"},...this.props.widgetGroups.map((e=>this.renderWidgetGroup(e))))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let s of e){let{buttonName:e,buttonClick:o,buttonText:a,buttonIcon:l,buttonHint:c}=s;if("title"===e)i=!1,r.push(k("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let i=e===t.activeButton,s=!t.isTodayEnabled&&"today"===e||!t.isPrevEnabled&&"prev"===e||!t.isNextEnabled&&"next"===e,d=[`fc-${e}-button`,n.getClass("button")];i&&d.push(n.getClass("buttonActive")),r.push(k("button",{type:"button",title:"function"==typeof c?c(t.navUnit):c,disabled:s,"aria-pressed":i,className:d.join(" "),onClick:o},a||(l?k("span",{className:l,role:"img"}):"")))}}return r.length>1?k("div",{className:i&&n.getClass("buttonGroup")||""},...r):r[0]}}class fo extends Nn{render(){let e,t,{model:n,extraClassName:r}=this.props,i=!1,s=n.sectionWidgets,o=s.center;return s.left?(i=!0,e=s.left):e=s.start,s.right?(i=!0,t=s.right):t=s.end,k("div",{className:[r||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",o||[]),this.renderSection("end",t||[]))}renderSection(e,t){let{props:n}=this;return k(uo,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}}class ho extends Nn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,Pn(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",s="";return n?null!==t.availableWidth?i=t.availableWidth/n:s=1/n*100+"%":i=e.height||"",k("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:i,paddingBottom:s}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class po extends ii{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=zr(t);if(i&&n.isValidSegDownEl(e.target)){let s=qe(e.target,".fc-event-forced-url"),o=s?s.querySelector("a[href]").href:"";r.emitter.trigger("eventClick",{el:t,event:new Ir(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=Ke(e.el,"click",".fc-event",this.handleSegClick)}}class go extends ii{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{zr(t)&&(this.currentSegEl=t,this.triggerEvent("eventMouseEnter",e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",e,t))},this.removeHoverListeners=function(e,t,n,r){let i;return Ke(e,"mouseover",".fc-event",((e,t)=>{if(t!==i){i=t,n(e,t);let s=e=>{i=null,r(e,t),t.removeEventListener("mouseleave",s)};t.addEventListener("mouseleave",s)}}))}(e.el,0,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,s=zr(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Ir(i,s.eventRange.def,s.eventRange.instance),jsEvent:t,view:i.viewApi})}}class mo extends In{constructor(){super(...arguments),this.buildViewContext=Bt(On),this.buildViewPropTransformers=Bt(bo),this.buildToolbarProps=Bt(vo),this.headerRef={current:null},this.footerRef={current:null},this.interactionsStore={},this.state={viewLabelId:Xe()},this.registerInteractiveComponent=(e,t)=>{let n=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}(e,t),r=[po,go].concat(this.props.pluginHooks.componentInteractions).map((e=>new e(n)));this.interactionsStore[e.uid]=r,si[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete si[e.uid]},this.resizeRunner=new Ve((()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})})),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let e,{props:t}=this,{toolbarConfig:n,options:r}=t,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Xn(t.options.now,t.dateEnv),t.viewTitle),s=!1,o="";t.isHeightAuto||t.forPrint?o="":null!=r.height?s=!0:null!=r.contentHeight?o=r.contentHeight:e=Math.max(r.aspectRatio,.5);let a=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),l=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return k(Mn.Provider,{value:a},n.header&&k(fo,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:l},i)),k(ho,{liquid:s,height:o,aspectRatio:e,labeledById:l},this.renderView(t),this.buildAppendContent()),n.footer&&k(fo,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((t=>new t(e))),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this;return k(M,{},...e.pluginHooks.viewContainerAppends.map((t=>t(e))))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));return k(n.component,Object.assign({},r))}}function vo(e,t,n,r,i,s){let o=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:s,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!Zn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function bo(e){return e.map((e=>new e))}class yo extends oi{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;Rn((()=>{K(k(ri,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},((t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),k(Un.Provider,{value:this.customContentRenderId},k(mo,Object.assign({isHeightAuto:r,forPrint:i},e)))))),this.el)}))}else this.isRendered&&(this.isRendered=!1,K(null,this.el),this.setClassNames([]),this.setHeight(""))},function(e){e.isConnected&&e.getRootNode&&We(e.getRootNode())}(e),this.el=e,this.renderRunner=new Ve(this.handleRenderRequest),new Ks({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){Rn((()=>{super.updateSize()}))}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!bt(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){$e(this.el,"height",e)}}const Ao=parseInt(String(h.version).split(".")[0])<18;class wo extends h.Component{constructor(){super(...arguments),this.elRef=(0,h.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame((()=>{this.doResize()})))}}render(){const e=[];for(const t of this.state.customRenderingMap.values())e.push(h.createElement(Eo,{key:t.id,customRendering:t}));return h.createElement("div",{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;const e=new ys;let t;this.handleCustomRendering=e.handle.bind(e),this.calendar=new yo(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),e.subscribe((e=>{const n=Date.now(),r=!t;(Ao||r||this.isUpdating||this.isUnmounting||n-t<100?Co:p.flushSync)((()=>{this.setState({customRenderingMap:e},(()=>{t=n,r?this.doResize():this.requestResize()}))}))}))}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){void 0!==this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}}wo.act=Co;class Eo extends h.PureComponent{render(){const{customRendering:e}=this.props,{generatorMeta:t}=e,n="function"==typeof t?t(e.renderProps):t;return(0,p.createPortal)(n,e.containerEl)}}function Co(e){e()}class Do extends yi{constructor(){super(...arguments),this.headerElRef={current:null}}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],s=Zi(r.options);return e&&i.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:r.viewSpec},k($i,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");let{props:s,context:o}=this,a=!s.forPrint&&Zi(o.options),l=!s.forPrint&&Yi(o.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:qi}]}),k(Gn,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},k(i,{liquid:!s.isHeightAuto&&!s.forPrint,forPrint:s.forPrint,collapsibleWidth:s.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}}function _o(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function So(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function Ro(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}const xo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function ko(e){let{display:t}=e.eventRange.ui;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}class To extends Nn{render(){let{props:e}=this;return k(Xi,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:xo,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class Mo extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=Qr(r,n.eventTimeFormat||xo,t,!0,e.defaultDisplayEventEnd);return k(Ji,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:$r(e.seg,t),defaultGenerator:Oo,timeText:i,isResizing:!1,isDateSelecting:!1}))}}function Oo(e){return k(M,null,k("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&k("div",{className:"fc-event-time"},e.timeText),k("div",{className:"fc-event-title"},e.event.title||k(M,null," ")))}class Io extends Nn{constructor(){super(...arguments),this.compileSegs=Bt(No)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return k(fs,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return k(M,null,t.map((t=>{let r=t.eventRange.instance.instanceId;return k("div",{className:"fc-daygrid-event-harness",key:r,style:{visibility:n[r]?"hidden":""}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))):k(To,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},qr(t,e.todayRange))))})))}})}}function No(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}const Po=Xt({week:"narrow"});class Ho extends yi{constructor(){super(...arguments),this.rootElRef={current:null},this.state={dayNumberId:Xe()},this.handleRootEl=e=>{Pn(this.rootElRef,e),Pn(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:s}=e,{date:o,dateProfile:a}=t;const l=t.showDayNumber&&function(e,t,n){const{start:r,end:i}=t,s=Et(i,-1),o=n.getYear(r),a=n.getMonth(r),l=n.getYear(s),c=n.getMonth(s);return!(o===l&&a===c)&&Boolean(e.valueOf()===r.valueOf()||1===n.getDay(e)&&e.valueOf()<i.valueOf())}(o,a.currentRange,s);return k(ns,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:Bo,date:o,dateProfile:a,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:l,extraRenderProps:t.extraRenderProps},((s,a)=>k("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&k(ls,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:gi(e,o,"week"),date:o,defaultFormat:Po}),!a.isDisabled&&(t.showDayNumber||rs(i)||t.forceDayTop)?k("div",{className:"fc-daygrid-day-top"},k(s,{elTag:"a",elClasses:["fc-daygrid-day-number",l&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},gi(e,o)),{id:n.dayNumberId})})):t.showDayNumber?k("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},k("a",{className:"fc-daygrid-day-number"}," ")):void 0,k("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,k("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},k(Io,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),k("div",{className:"fc-daygrid-day-bg"},t.bgContent))))}}function Bo(e){return e.dayNumberText||k(M,null," ")}function zo(e){return e.eventRange.instance.instanceId+":"+e.firstCol}function jo(e){return zo(e)+":"+e.lastCol}function Uo(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,s=i.range,o=qn(s,{start:r[t].date,end:wt(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===s.end.valueOf()})}class Fo extends Ai{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[Ei(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){const{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:s,touchingLevel:o,touchingLateral:a}=e;if(this.hiddenConsumes&&s){const e=Ei(s);if(!i[e])if(this.allowReslicing){const e=Object.assign(Object.assign({},s),{span:Ci(s.span,t.span)});i[Ei(e)]=!0,r[o][a]=e,n.push(e),this.splitEntry(s,t,n)}else i[e]=!0,n.push(s)}super.handleInvalidInsertion(e,t,n)}}class Wo extends yi{constructor(){super(...arguments),this.cellElRefs=new Fi,this.frameElRefs=new Fi,this.fgElRefs=new Fi,this.segHarnessRefs=new Fi,this.rootElRef={current:null},this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,s=So(e.businessHourSegs,i),o=So(e.bgEventSegs,i),a=So(this.getHighlightSegs(),i),l=So(this.getMirrorSegs(),i),{singleColPlacements:c,multiColPlacements:d,moreCnts:u,moreMarginTops:f}=function(e,t,n,r,i,s,o){let a=new Fo((t=>{let n=e[t.index].eventRange.instance.instanceId+":"+t.span.start+":"+(t.span.end-1);return i[n]||1}));a.allowReslicing=!0,a.strictOrder=r,!0===t||!0===n?(a.maxCoord=s,a.hiddenConsumes=!0):"number"==typeof t?a.maxStackCnt=t:"number"==typeof n&&(a.maxStackCnt=n,a.hiddenConsumes=!0);let l=[],c=[];for(let t=0;t<e.length;t+=1){let n=e[t],r=jo(n);null!=i[r]?l.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}}):c.push(n)}let d=a.addSegs(l),u=a.toRects(),{singleColPlacements:f,multiColPlacements:h,leftoverMargins:p}=function(e,t,n){let r=function(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}(e,n.length),i=[],s=[],o=[];for(let e=0;e<n.length;e+=1){let a=r[e],l=[],c=0,d=0;for(let r of a){let i=t[r.index];l.push({seg:Uo(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-c}),c=r.levelCoord+r.thickness}let u=[];c=0,d=0;for(let r of a){let i=t[r.index],s=r.span.end-r.span.start>1,o=r.span.start===e;d+=r.levelCoord-c,c=r.levelCoord+r.thickness,s?(d+=r.thickness,o&&u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(u.push({seg:Uo(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:d}),d=0)}i.push(l),s.push(u),o.push(d)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:o}}(u,e,o),g=[],m=[];for(let e of c){h[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)f[t].push({seg:Uo(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)g.push(0);for(let t of d){let n=e[t.index],r=t.span;h[r.start].push({seg:Uo(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)g[e]+=1,f[e].push({seg:Uo(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(p[e]);return{singleColPlacements:f,multiColPlacements:h,moreCnts:g,moreMarginTops:m}}(Fr(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),h=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return k("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map(((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?c[n]:d[n],e.todayRange,h),i=this.renderFgSegs(n,function(e,t){if(!e.length)return[];let n=function(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}(t);return e.map((e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0})))}(l[n],d),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return k(Ho,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&0===n,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:u[n],moreMarginTop:f[n],singlePlacements:c[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:k(M,null,k(M,null,r),k(M,null,i)),bgContent:k(M,null,this.renderFillSegs(a[n],"highlight"),this.renderFillSegs(s[n],"non-business"),this.renderFillSegs(o[n],"bg-event")),minHeight:e.cellMinHeight})})))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!vn(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,s,o){let{context:a}=this,{eventSelection:l}=this.props,{framePositions:c}=this.state,d=1===this.props.cells.length,u=i||s||o,f=[];if(c)for(let e of t){let{seg:t}=e,{instanceId:h}=t.eventRange.instance,p=e.isVisible&&!r[h],g=e.isAbsolute,m="",v="";g&&(a.isRtl?(v=0,m=c.lefts[t.lastCol]-c.lefts[t.firstCol]):(m=0,v=c.rights[t.firstCol]-c.rights[t.lastCol])),f.push(k("div",{className:"fc-daygrid-event-harness"+(g?" fc-daygrid-event-harness-abs":""),key:zo(t),ref:u?null:this.segHarnessRefs.createRef(jo(t)),style:{visibility:p?"":"hidden",marginTop:g?"":e.marginTop,top:g?e.absoluteTop:"",left:m,right:v}},ko(t)?k(Mo,Object.assign({seg:t,isDragging:i,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n))):k(To,Object.assign({seg:t,isDragging:i,isResizing:s,isDateSelecting:o,isSelected:h===l,defaultDisplayEventEnd:d},qr(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,s=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};s.push(k("div",{key:Yr(o.eventRange),className:"fc-daygrid-bg-harness",style:e},"bg-event"===t?k(ss,Object.assign({seg:o},qr(o,r))):as(t)))}return k(M,{},...s)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&null!==t.clientWidth){if(e){let e=t.cells.map((e=>r.currentMap[e.key]));if(e.length){let t=this.rootElRef.current,r=new vi(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new vi(t,e,!0,!1)})}}const i=this.state.segHeights,s=this.querySegHeights(),o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.safeSetState({segHeights:Object.assign(Object.assign({},i),s),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map((t=>e[t.key]))}}Wo.addStateEquality({segHeights:vn});class Go extends yi{constructor(){super(...arguments),this.splitBusinessHourSegs=Bt(_o),this.splitBgEventSegs=Bt(_o),this.splitFgEventSegs=Bt(_o),this.splitDateSelectionSegs=Bt(_o),this.splitEventDrag=Bt(Ro),this.splitEventResize=Bt(Ro),this.rowRefs=new Fi}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),s=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),a=this.splitEventDrag(e.eventDrag,n),l=this.splitEventResize(e.eventResize,n),c=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return k(Mi,{unit:"day"},((t,d)=>k(M,null,e.cells.map(((t,u)=>k(Wo,{ref:this.rowRefs.createRef(u),key:t.length?t[0].date.toISOString():u,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:d,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[u],eventSelection:e.eventSelection,bgEventSegs:i[u].filter(Lo),fgEventSegs:s[u],dateSelectionSegs:o[u],eventDrag:a[u],eventResize:l[u],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(".fc-daygrid-body"):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new vi(this.rootEl,this.rowRefs.collect().map((e=>e.getCellEls()[0])),!1,!0),this.colPositions=new vi(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),s=r.topToIndex(t);if(null!=s&&null!=i){let e=this.props.cells[s][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(s,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(s,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[s],bottom:r.bottoms[s]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:wt(n,1)}}}function Lo(e){return e.eventRange.def.allDay}class Vo extends yi{constructor(){super(...arguments),this.elRef={current:null},this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=!0===n||!0===t;i&&!r&&(i=!1,t=null,n=null);let s=["fc-daygrid-body",i?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",r?"":"fc-daygrid-body-natural"];return k("div",{ref:this.elRef,className:s.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:""}},e.colGroupNode,k("tbody",{role:"presentation"},k(Go,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=function(e,t){let n;var r;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${r=t.currentDate,r.toISOString().match(/^\d{4}-\d{2}/)[0]}-01"]`)),n||(n=e.querySelector(`[data-date="${Pt(t.currentDate)}"]`)),n}(this.elRef.current,this.props.dateProfile);if(e){const t=e.closest(".fc-daygrid-body"),n=t.closest(".fc-scroller"),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}}class Qo extends Bi{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}}class qo extends yi{constructor(){super(...arguments),this.slicer=new Qo,this.tableRef={current:null}}render(){let{props:e,context:t}=this;return k(Vo,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}function Zo(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,/year|month|week/.test(e.currentRangeUnit))}Fe(':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}');var Yo=Ss({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:class extends Do{constructor(){super(...arguments),this.buildDayTableModel=Bt(Zo),this.headerRef={current:null},this.tableRef={current:null}}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&k(Ii,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:1===r.rowCnt}),s=t=>k(qo,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,s,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,s)}},dateProfileGeneratorClass:class extends Kn{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return function(e){let t,{dateEnv:n,currentRange:r}=e,{start:i,end:s}=r;if(e.snapToWeek&&(i=n.startOfWeek(i),t=n.startOfWeek(s),t.valueOf()!==s.valueOf()&&(s=At(t,1))),e.fixedWeekCount){let e=n.startOfWeek(n.startOfMonth(wt(r.end,-1)));s=At(s,6-Math.ceil(Ct(e,s)/7))}return{start:i,end:s}}({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}}},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class $o extends ci{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?"background"===(t=e).ui.display||"inverse-background"===t.ui.display?["timed","allDay"]:["allDay"]:["timed"];var t}}const Jo=Xt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Xo(e){let t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return k(Mn.Consumer,null,(n=>{if(!e.isLabeled)return k("td",{className:t.join(" "),"data-time":e.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,o=null==i.slotLabelFormat?Jo:Array.isArray(i.slotLabelFormat)?Xt(i.slotLabelFormat[0]):Xt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:s,text:r.format(e.date,o)};return k(Fn,{elTag:"td",elClasses:t,elAttrs:{"data-time":e.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:Ko,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(e=>k("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},k(e,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]}))))}))}function Ko(e){return e.text}class ea extends Nn{render(){return this.props.slatMetas.map((e=>k("tr",{key:e.key},k(Xo,Object.assign({},e)))))}}const ta=Xt({week:"short"});class na extends yi{constructor(){super(...arguments),this.allDaySplitter=new $o,this.headerElRef={current:null},this.rootElRef={current:null},this.scrollerElRef={current:null},this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:n}=this.context,{dateProfile:r}=this.props,i=r.renderRange,s=1===Ct(i.start,i.end)?gi(this.context,i.start,"week"):{};return n.weekNumbers&&"day"===e?k(ls,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:i.start,defaultFormat:ta},(e=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},k(e,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:s})))):k("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},k("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:n}=this.context,r={text:t.allDayText,view:n};return k(Fn,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:r,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:ra,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},(t=>k("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",null==e?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},k(t,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]}))))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,n){let{context:r,props:i}=this,s=[],o=Zi(r.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(s.push({type:"body",key:"all-day",chunk:{content:t}}),s.push({type:"body",key:"all-day-divider",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),s.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:r.viewSpec},k($i,{liquid:!i.isHeightAuto&&!i.forPrint,collapsibleWidth:i.forPrint,cols:[{width:"shrink"}],sections:s}))}renderHScrollLayout(e,t,n,r,i,s,o){let a=this.context.pluginHooks.scrollGridImpl;if(!a)throw new Error("No ScrollGrid implementation");let{context:l,props:c}=this,d=!c.forPrint&&Zi(l.options),u=!c.forPrint&&Yi(l.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderHeadAxis("day",e.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:e=>k("tr",{role:"presentation"},this.renderTableRowAxis(e.rowSyncHeights[0]))},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:k("tr",{role:"presentation",className:"fc-scrollgrid-section"},k("td",{colSpan:2,className:"fc-timegrid-divider "+l.theme.getClass("tableCellShaded")}))}));let h=l.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(l.options.expandRows),chunks:[{key:"axis",content:e=>k("div",{className:"fc-timegrid-axis-chunk"},k("table",{"aria-hidden":!0,style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,k("tbody",null,k(ea,{slatMetas:s}))),k("div",{className:"fc-timegrid-now-indicator-container"},k(Mi,{unit:h?"minute":"day"},(e=>{let t=h&&o&&o.safeComputeTop(e);return"number"==typeof t?k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:t},isAxis:!0,date:e}):null}))))},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),u&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:qi},{key:"cols",content:qi}]}),k(Gn,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:l.viewSpec},k(a,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return!0!==e&&!0!==t||(e=void 0,t=5),{dayMaxEvents:e,dayMaxEventRows:t}}}function ra(e){return e.text}class ia{constructor(e,t,n){this.positions=e,this.dateProfile=t,this.slotDuration=n}safeComputeTop(e){let{dateProfile:t}=this;if(Zn(t.currentRange,e)){let n=_t(e),r=e.valueOf()-n.valueOf();if(r>=gt(t.slotMinTime)&&r<gt(t.slotMaxTime))return this.computeTimeTop(ut(r))}return null}computeDateTop(e,t){return t||(t=_t(e)),this.computeTimeTop(ut(e.valueOf()-t.valueOf()))}computeTimeTop(e){let t,n,{positions:r,dateProfile:i}=this,s=r.els.length,o=(e.milliseconds-gt(i.slotMinTime))/gt(this.slotDuration);return o=Math.max(0,o),o=Math.min(s,o),t=Math.floor(o),t=Math.min(t,s-1),n=o-t,r.tops[t]+r.getHeight(t)*n}}class sa extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{slatElRefs:r}=e;return k("tbody",null,e.slatMetas.map(((i,s)=>{let o={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi};return k("tr",{key:i.key,ref:r.createRef(i.key)},e.axis&&k(Xo,Object.assign({},i)),k(Fn,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!i.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":i.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:n.slotLaneContent,classNameGenerator:n.slotLaneClassNames,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount}))})))}}class oa extends Nn{constructor(){super(...arguments),this.rootElRef={current:null},this.slatElRefs=new Fi}render(){let{props:e,context:t}=this;return k("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},k("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,k(sa,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;var n;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new ia(new vi(this.rootElRef.current,(n=this.slatElRefs.currentMap,t.slatMetas.map((e=>n[e.key]))),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function aa(e,t){let n,r=[];for(n=0;n<t;n+=1)r.push([]);if(e)for(n=0;n<e.length;n+=1)r[e[n].col].push(e[n]);return r}function la(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.col].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}class ca extends Nn{render(){let{props:e}=this;return k(fs,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>ya(e.hiddenSegs,e),defaultGenerator:da,forceTimed:!0},(e=>k(e,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]})))}}function da(e){return e.shortText}function ua(e,t){if(!e)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=e,s=r,o=[];for(;s<i;)o.push(t(n,s)),s+=1;return o.sort(fa),[o.map(ha),o[0][1]]}function fa(e,t){return t[1]-e[1]}function ha(e){return e[0]}function pa(e,t){const n={};return(...r)=>{let i=e(...r);return i in n?n[i]:n[i]=t(...r)}}function ga(e,t,n=null,r=0){let i=[];if(n)for(let s=0;s<e.length;s+=1){let o=e[s],a=n.computeDateTop(o.start,t),l=Math.max(a+(r||0),n.computeDateTop(o.end,t));i.push({start:Math.round(a),end:Math.round(l)})}return i}const ma=Xt({hour:"numeric",minute:"2-digit",meridiem:!1});class va extends Nn{render(){return k(Xi,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:ma}))}}class ba extends Nn{constructor(){super(...arguments),this.sortEventSegs=Bt(Fr)}render(){let{props:e,context:t}=this,{options:n}=t,r=n.selectMirror,i=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||r&&e.dateSelectionSegs||[],s=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,n.eventOrder);return k(ns,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},(t=>k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,s,!1,!1,!1)),k("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(i,{},Boolean(e.eventDrag),Boolean(e.eventResize),Boolean(r),"mirror")),k("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),rs(n)&&k(t,{elTag:"div",elClasses:["fc-timegrid-col-misc"]}))))}renderFgSegs(e,t,n,r,i,s){let{props:o}=this;return o.forPrint?ya(e,o):this.renderPositionedFgSegs(e,t,n,r,i,s)}renderPositionedFgSegs(e,t,n,r,i,s){let{eventMaxStack:o,eventShortHeight:a,eventOrderStrict:l,eventMinHeight:c}=this.context.options,{date:d,slatCoords:u,eventSelection:f,todayRange:h,nowDate:p}=this.props,g=n||r||i,m=ga(e,d,u,c),{segPlacements:v,hiddenGroups:b}=function(e,t,n,r){let i=[],s=[];for(let n=0;n<e.length;n+=1){let r=t[n];r?i.push({index:n,thickness:1,span:r}):s.push(e[n])}let{segRects:o,hiddenGroups:a}=function(e,t,n){let r=new Ai;null!=t&&(r.strictOrder=t),null!=n&&(r.maxStackCnt=n);let i=function(e){let t=[];for(let i of e){let e=[],s={span:i.span,entries:[i]};for(let i of t)Ci(i.span,s.span)?s={entries:i.entries.concat(s.entries),span:(n=i.span,r=s.span,{start:Math.min(n.start,r.start),end:Math.max(n.end,r.end)})}:e.push(i);e.push(s),t=e}var n,r;return t}(r.addSegs(e)),s=function(e){const{entriesByLevel:t}=e,n=pa(((e,t)=>e+":"+t),((r,i)=>{let s=function(e,t,n){let{levelCoords:r,entriesByLevel:i}=e,s=i[t][n],o=r[t]+s.thickness,a=r.length,l=t;for(;l<a&&r[l]<o;l+=1);for(;l<a;l+=1){let e,t=i[l],n=_i(t,s.span.start,wi),r=n[0]+n[1],o=r;for(;(e=t[o])&&e.span.start<s.span.end;)o+=1;if(r<o)return{level:l,lateralStart:r,lateralEnd:o}}return null}(e,r,i),o=ua(s,n),a=t[r][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]}));return ua(t.length?{level:0,lateralStart:0,lateralEnd:t[0].length}:null,n)[0]}(r);return s=function(e,t){const n=pa(((e,t,n)=>Ei(e)),((e,t,r)=>{let i,{nextLevelNodes:s,thickness:o}=e,a=o+r,l=o/a,c=[];if(s.length)for(let e of s)if(void 0===i){let r=n(e,t,a);i=r[0],c.push(r[1])}else{let t=n(e,i,0);c.push(t[1])}else i=1;let d=(i-t)*l;return[i-d,Object.assign(Object.assign({},e),{thickness:d,nextLevelNodes:c})]}));return e.map((e=>n(e,0,0)[1]))}(s),{segRects:function(e){let t=[];const n=pa(((e,t,n)=>Ei(e)),((e,n,i)=>{let s=Object.assign(Object.assign({},e),{levelCoord:n,stackDepth:i,stackForward:0});return t.push(s),s.stackForward=r(e.nextLevelNodes,n+e.thickness,i+1)+1}));function r(e,t,r){let i=0;for(let s of e)i=Math.max(n(s,t,r),i);return i}return r(e,0,0),t}(s),hiddenGroups:i}}(i,n,r),l=[];for(let t of o)l.push({seg:e[t.index],rect:t});for(let e of s)l.push({seg:e,rect:null});return{segPlacements:l,hiddenGroups:a}}(e,m,l,o);return k(M,null,this.renderHiddenGroups(b,e),v.map((e=>{let{seg:o,rect:l}=e,c=o.eventRange.instance.instanceId,d=g||Boolean(!t[c]&&l),u=Aa(l&&l.span),m=!g&&l?this.computeSegHStyle(l):{left:0,right:0},v=Boolean(l)&&l.stackForward>0,b=Boolean(l)&&l.span.end-l.span.start<a;return k("div",{className:"fc-timegrid-event-harness"+(v?" fc-timegrid-event-harness-inset":""),key:s||c,style:Object.assign(Object.assign({visibility:d?"":"hidden"},u),m)},k(va,Object.assign({seg:o,isDragging:n,isResizing:r,isDateSelecting:i,isSelected:c===f,isShort:b},qr(o,h,p))))})))}renderHiddenGroups(e,t){let{extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l}=this.props;return k(M,null,e.map((e=>{let c=Aa(e.span),d=(u=e.entries,f=t,u.map((e=>f[e.index])));var u,f;return k(ca,{key:Nt(gs(d)),hiddenSegs:d,top:c.top,bottom:c.bottom,extraDateSpan:n,dateProfile:r,todayRange:i,nowDate:s,eventSelection:o,eventDrag:a,eventResize:l})})))}renderFillSegs(e,t){let{props:n,context:r}=this,i=ga(e,n.date,n.slatCoords,r.options.eventMinHeight).map(((r,i)=>{let s=e[i];return k("div",{key:Yr(s.eventRange),className:"fc-timegrid-bg-harness",style:Aa(r)},"bg-event"===t?k(ss,Object.assign({seg:s},qr(s,n.todayRange,n.nowDate))):as(t))}));return k(M,null,i)}renderNowIndicator(e){let{slatCoords:t,date:n}=this.props;return t?e.map(((e,r)=>k(es,{key:r,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(e.start,n)},isAxis:!1,date:n}))):null}computeSegHStyle(e){let t,n,{isRtl:r,options:i}=this.context,s=i.slotEventOverlap,o=e.levelCoord,a=e.levelCoord+e.thickness;s&&(a=Math.min(1,o+2*(a-o))),r?(t=1-a,n=o):(t=o,n=1-a);let l={zIndex:e.stackDepth+1,left:100*t+"%",right:100*n+"%"};return s&&!e.stackForward&&(l[r?"marginLeft":"marginRight"]=20),l}}function ya(e,{todayRange:t,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let o=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return k(M,null,e.map((e=>{let i=e.eventRange.instance.instanceId;return k("div",{key:i,style:{visibility:o[i]?"hidden":""}},k(va,Object.assign({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:i===r,isShort:!1},qr(e,t,n))))})))}function Aa(e){return e?{top:e.start,bottom:-e.end}:{top:"",bottom:""}}class wa extends Nn{constructor(){super(...arguments),this.splitFgEventSegs=Bt(aa),this.splitBgEventSegs=Bt(aa),this.splitBusinessHourSegs=Bt(aa),this.splitNowIndicatorSegs=Bt(aa),this.splitDateSelectionSegs=Bt(aa),this.splitEventDrag=Bt(la),this.splitEventResize=Bt(la),this.rootElRef={current:null},this.cellElRefs=new Fi}render(){let{props:e,context:t}=this,n=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),r=e.cells.length,i=this.splitFgEventSegs(e.fgEventSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitBusinessHourSegs(e.businessHourSegs,r),a=this.splitNowIndicatorSegs(e.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(e.dateSelectionSegs,r),c=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r);return k("div",{className:"fc-timegrid-cols",ref:this.rootElRef},k("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,k("tbody",{role:"presentation"},k("tr",{role:"row"},e.axis&&k("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},k("div",{className:"fc-timegrid-col-frame"},k("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&k(es,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:n},isAxis:!0,date:e.nowDate})))),e.cells.map(((t,n)=>k(ba,{key:t.key,elRef:this.cellElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,fgEventSegs:i[n],bgEventSegs:s[n],businessHourSegs:o[n],nowIndicatorSegs:a[n],dateSelectionSegs:l[n],eventDrag:c[n],eventResize:d[n],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint})))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;var t;e.onColCoords&&null!==e.clientWidth&&e.onColCoords(new vi(this.rootElRef.current,(t=this.cellElRefs.currentMap,e.cells.map((e=>t[e.key]))),!0,!1))}}class Ea extends yi{constructor(){super(...arguments),this.processSlotOptions=Bt(Ca),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:n}=this.state;if(t&&n){if(e.time){let r=n.computeTimeTop(e.time);r=Math.ceil(r),r&&(r+=1),t(r)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return k("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},k(oa,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),k(wa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:n,options:r}=this.context,{colCoords:i}=this,{dateProfile:s}=this.props,{slatCoords:o}=this.state,{snapDuration:a,snapsPerSlot:l}=this.processSlotOptions(this.props.slotDuration,r.snapDuration),c=i.leftToIndex(e),d=o.positions.topToIndex(t);if(null!=c&&null!=d){let e=this.props.cells[c],r=o.positions.tops[d],u=o.positions.getHeight(d),f=(t-r)/u,h=d*l+Math.floor(f*l),p=this.props.cells[c].date,g=ht(s.slotMinTime,function(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}(a,h)),m=n.add(p,g),v=n.add(m,a);return{dateProfile:s,dateSpan:Object.assign({range:{start:m,end:v},allDay:!1},e.extraDateSpan),dayEl:i.els[c],rect:{left:i.lefts[c],right:i.rights[c],top:r,bottom:r+u},layer:0}}return null}}function Ca(e,t){let n=t||e,r=mt(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}class Da extends Bi{sliceRange(e,t){let n=[];for(let r=0;r<t.length;r+=1){let i=qn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n}}class _a extends yi{constructor(){super(...arguments),this.buildDayRanges=Bt(Sa),this.slicer=new Da,this.timeColsRef={current:null}}render(){let{props:e,context:t}=this,{dateProfile:n,dayTableModel:r}=e,{nowIndicator:i,nextDayThreshold:s}=t.options,o=this.buildDayRanges(r,n,t.dateEnv);return k(Mi,{unit:i?"minute":"day"},((a,l)=>k(Ea,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,n,null,t,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:n,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:r.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:a,nowIndicatorSegs:i&&this.slicer.sliceNowDate(a,n,s,t,o),todayRange:l,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords}))))}}function Sa(e,t,n){let r=[];for(let i of e.headerDates)r.push({start:n.add(i,t.slotMinTime),end:n.add(i,t.slotMaxTime)});return r}const Ra=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function xa(e,t,n,r,i){let s=new Date(0),o=e,a=ut(0),l=n||function(e){let t,n,r;for(t=Ra.length-1;t>=0;t-=1)if(n=ut(Ra[t]),r=mt(n,e),null!==r&&r>1)return n;return e}(r),c=[];for(;gt(o)<gt(t);){let e=i.add(s,o),t=null!==mt(a,l);c.push({date:e,time:o,key:e.toISOString(),isoTimeStr:(d=e,st(d.getUTCHours(),2)+":"+st(d.getUTCMinutes(),2)+":"+st(d.getUTCSeconds(),2)),isLabeled:t}),o=ht(o,r),a=ht(a,r)}var d;return c}function ka(e,t){let n=new Pi(e.renderRange,t);return new Hi(n,!1)}Fe('.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}');var Ta=Ss({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:class extends na{constructor(){super(...arguments),this.buildTimeColsModel=Bt(ka),this.buildSlatMetas=Bt(xa)}render(){let{options:e,dateEnv:t,dateProfileGenerator:n}=this.context,{props:r}=this,{dateProfile:i}=r,s=this.buildTimeColsModel(i,n),o=this.allDaySplitter.splitProps(r),a=this.buildSlatMetas(i.slotMinTime,i.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:l}=e,c=!l,d=l,u=e.dayHeaders&&k(Ii,{dates:s.headerDates,dateProfile:i,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=!1!==e.allDaySlot&&(t=>k(qo,Object.assign({},o.allDay,{dateProfile:i,dayTableModel:s,nextDayThreshold:e.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:r.forPrint},this.getAllDayMaxEventProps()))),h=t=>k(_a,Object.assign({},o.timed,{dayTableModel:s,dateProfile:i,axis:c,slotDuration:e.slotDuration,slatMetas:a,forPrint:r.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return d?this.renderHScrollLayout(u,f,h,s.colCnt,l,a,this.state.slatCoords):this.renderSimpleLayout(u,f,h)}},usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class Ma extends Nn{constructor(){super(...arguments),this.state={textId:Xe()}}render(){let{theme:e,dateEnv:t,options:n,viewApi:r}=this.context,{cellId:i,dayDate:s,todayRange:o}=this.props,{textId:a}=this.state,l=ui(s,o),c=n.listDayFormat?t.format(s,n.listDayFormat):"",d=n.listDaySideFormat?t.format(s,n.listDaySideFormat):"",u=Object.assign({date:t.toDate(s),view:r,textId:a,text:c,sideText:d,navLinkAttrs:gi(this.context,s),sideNavLinkAttrs:gi(this.context,s,"day",!1)},l);return k(Fn,{elTag:"tr",elClasses:["fc-list-day",...fi(l,e)],elAttrs:{"data-date":Pt(s)},renderProps:u,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:Oa,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(t=>k("th",{scope:"colgroup",colSpan:3,id:i,"aria-labelledby":a},k(t,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]}))))}}function Oa(e){return k(M,null,e.text&&k("a",Object.assign({id:e.textId,className:"fc-list-day-text"},e.navLinkAttrs),e.text),e.sideText&&k("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},e.sideNavLinkAttrs),e.sideText))}const Ia=Xt({hour:"numeric",minute:"2-digit",meridiem:"short"});class Na extends Nn{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r,timeHeaderId:i,eventHeaderId:s,dateHeaderId:o}=e,a=n.eventTimeFormat||Ia;return k(Ji,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",r.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>function(e,t){let n=$r(e,t);return k("a",Object.assign({},n),e.eventRange.def.title)}(r,t),seg:r,timeText:"",disableDragging:!0,disableResizing:!0}),((e,n)=>k(M,null,function(e,t,n,r,i){let{options:s}=n;if(!1!==s.displayEventTime){let o,a=e.eventRange.def,l=e.eventRange.instance,c=!1;if(a.allDay?c=!0:function(e){let t=$n(e);return Ct(t.start,t.end)>1}(e.eventRange.range)?e.isStart?o=Qr(e,t,n,null,null,l.range.start,e.end):e.isEnd?o=Qr(e,t,n,null,null,e.start,l.range.end):c=!0:o=Qr(e,t,n),c){let e={text:n.options.allDayText,view:n.viewApi};return k(Fn,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:e,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:Pa,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return k("td",{className:"fc-list-event-time"},o)}return null}(r,a,t,i,o),k("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},k("span",{className:"fc-list-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}})),k(e,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${s} ${o}`}}))))}}function Pa(e){return e.text}function Ha(e){return e.text}function Ba(e){let t=_t(e.renderRange.start),n=e.renderRange.end,r=[],i=[];for(;t<n;)r.push(t),i.push({start:t,end:wt(t,1)}),t=wt(t,1);return{dayDates:r,dayRanges:i}}function za(e){return!1===e?null:Xt(e)}Fe(':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}');var ja=Ss({name:"@fullcalendar/list",optionRefiners:{listDayFormat:za,listDaySideFormat:za,noEventsClassNames:dn,noEventsContent:dn,noEventsDidMount:dn,noEventsWillUnmount:dn},views:{list:{component:class extends yi{constructor(){super(...arguments),this.computeDateVars=Bt(Ba),this.eventStoreToSegs=Bt(this._eventStoreToSegs),this.state={timeHeaderId:Xe(),eventHeaderId:Xe(),dateHeaderIdRoot:Xe()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:n,dayRanges:r}=this.computeDateVars(e.dateProfile),i=this.eventStoreToSegs(e.eventStore,e.eventUiBases,r);return k(Gn,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),!1!==t.options.stickyHeaderDates?"fc-list-sticky":""],viewSpec:t.viewSpec},k(Ui,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},i.length>0?this.renderSegList(i,n):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,n={text:e.noEventsText,view:t};return k(Fn,{elTag:"div",elClasses:["fc-list-empty"],renderProps:n,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:Ha,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},(e=>k(e,{elTag:"div",elClasses:["fc-list-empty-cushion"]})))}renderSegList(e,t){let{theme:n,options:r}=this.context,{timeHeaderId:i,eventHeaderId:s,dateHeaderIdRoot:o}=this.state,a=function(e){let t,n,r=[];for(t=0;t<e.length;t+=1)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return k(Mi,{unit:"day"},((e,l)=>{let c=[];for(let n=0;n<a.length;n+=1){let d=a[n];if(d){let a=Pt(t[n]),u=o+"-"+a;c.push(k(Ma,{key:a,cellId:u,dayDate:t[n],todayRange:l})),d=Fr(d,r.eventOrder);for(let t of d)c.push(k(Na,Object.assign({key:a+":"+t.eventRange.instance.instanceId,seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:i,eventHeaderId:s,dateHeaderId:u},qr(t,l,e))))}}return k("table",{className:"fc-list-table "+n.getClass("table")},k("thead",null,k("tr",null,k("th",{scope:"col",id:i},r.timeHint),k("th",{scope:"col","aria-hidden":!0}),k("th",{scope:"col",id:s},r.eventHint))),k("tbody",null,c))}))}_eventStoreToSegs(e,t,n){return this.eventRangesToSegs(Hr(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)}eventRangesToSegs(e,t){let n=[];for(let r of e)n.push(...this.eventRangeToSegs(r,t));return n}eventRangeToSegs(e,t){let n,r,i,{dateEnv:s}=this.context,{nextDayThreshold:o}=this.context.options,a=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n+=1)if(r=qn(a,t[n]),r&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},c.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<s.add(t[n+1].start,o))){i.end=a.end,i.isEnd=!0;break}return c}},buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});function Ua(e){let{attributes:t,events:n}=e;const r=(0,i.useRef)(null),s="dayGridMonth",[o,a]=(0,i.useState)(""),[l,c]=(0,i.useState)([]),[f,h]=(0,i.useState)(!1),[p,g]=(0,i.useState)(1);(0,i.useEffect)((()=>{if(r.current){const e=t.view||s;r.current.getApi().changeView(e),a(r.current.getApi().view.title)}}),[t.view,t.wraptitles]),(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("piecal/v1/views_array",{duration:t.duration}),method:"GET"}).then((e=>{let t=["eventDataTransform","dateClick","eventClick","eventDidMount","dayCellDidMount","viewDidMount","viewWillUnmount","dayHeaderContent","dayHeaderDidMount"];for(let n in e){let r=e[n];for(let e in r)if(t.includes(e)){let t=r[e],n=new Function("info",t);r[e]=n}delete r.customProps}c(e),h(!0)}))}),[t.duration]);const m=()=>{r.current&&a(r.current.getApi().view.title)};return f?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"piecal-controls fc"},(0,i.createElement)("div",{className:"piecal-controls__view-title","aria-live":"polite",role:"status"},(0,i.createElement)("span",{className:"visually-hidden"},`${o} - current view is ${r.current?.getApi().view.type}`),(0,i.createElement)("span",{"aria-hidden":"true"},o)),(0,i.createElement)("label",{className:"piecal-controls__view-chooser"},"Choose View",(0,i.createElement)("select",{value:r.current?.getApi().view.type,onChange:e=>r.current?.getApi().changeView(e.target.value),disabled:!0},(0,i.createElement)("option",{value:"dayGridMonth"},"View Chooser"))),(0,i.createElement)("div",{className:"piecal-controls__navigation-button-group"},(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__today-button",onClick:()=>{r.current?.getApi().today(),m()}},"Today"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__prev-button",onClick:()=>{r.current?.getApi().prev(),m()},"aria-label":`Previous ${r.current?.getApi().view.type}`},"<"),(0,i.createElement)("button",{className:"fc-button fc-button-primary piecal-controls__next-button",onClick:()=>{r.current?.getApi().next(),m()},"aria-label":`Next ${r.current?.getApi().view.type}`},">"))),(0,i.createElement)("style",{"data-fullcalendar":!0}),(0,i.createElement)("div",{className:"piecal-blockeditor-container",style:{width:"100%"},"data-view":t.view},(0,i.createElement)(wo,{ref:r,plugins:[Yo,Ta,ja],initialView:t.view||s,editable:!1,views:f?l:[],events:n,contentHeight:"auto",locale:t.locale,headerToolbar:!1,validRange:t.hidepastevents?{start:new Date}:void 0}))):(0,i.createElement)("div",null,"Loading calendar...")}const Fa=JSON.parse('{"u2":"piecal/calendar"}');(0,r.registerBlockType)(Fa.u2,{edit:function(e){var t;let{attributes:n,setAttributes:r}=e;const[c,h]=(0,i.useState)([]),[p,g]=(0,i.useState)([]),[m,v]=(0,i.useState)([]),[b,y]=(0,i.useState)([]),[A,w]=(0,i.useState)([]);let E="piecal-wrapper";n.wraptitles&&(E+=" piecal-wrap-event-titles"),"true"===n.widget&&(E+=" piecal-wrapper--widget"),"responsive"===n.widget&&(E+=" piecal-wrapper--responsive-widget"),n.theme&&(E+=" piecal-theme-"+n.theme);const{records:C,hasResolved:D}=(0,l.useEntityRecords)("root","postType",{per_page:-1,visibility:"public",viewable:!0});return(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("/piecal/v1/events",{allAttributes:n}),method:"GET"}).then((e=>{const t=e.map((e=>{var t;return e.rset=JSON.parse(null!==(t=e.rset)&&void 0!==t?t:"{}"),e}));g(t)}))}),[n]),(0,i.useEffect)((()=>{D&&(h(C.filter((e=>e.viewable))),piecalGbVars?.explicitAllowedPostTypes?.length>0?v(C.filter((e=>e.viewable)).filter((e=>piecalGbVars.explicitAllowedPostTypes.includes(e.slug))).map((e=>e.name))):v(C.filter((e=>e.viewable)).map((e=>e.name))))}),[D]),(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("piecal/v1/views"),method:"GET"}).then((e=>{y(e)}))}),[]),(0,i.useEffect)((()=>{d()({path:(0,u.addQueryArgs)("piecal/v1/views_array"),method:"GET"}).then((e=>{w(e)}))}),[]),(0,i.createElement)("div",(0,o.useBlockProps)({className:E}),(0,i.createElement)(o.InspectorControls,null,(0,i.createElement)(a.PanelBody,{title:(0,s.__)("Calendar Settings","piecal"),initialOpen:!0},c.length>0&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.FormTokenField,{label:(0,s.__)("Post Types","piecal"),value:n.type?n.type.map((e=>{const t=c.find((t=>t.slug===e));return t?t.name:e})):[],suggestions:m,__experimentalValidateInput:e=>m.includes(e),onChange:e=>{const t=e.map((e=>{const t=c.find((t=>t.name===e));return t?t.slug:e}));r({type:t})},help:(0,s.__)("Select post types to display in the calendar.","piecal")})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("View","piecal"),value:n.view,help:(0,s.__)("Choose the default calendar view that visitors will see when the page loads.","piecal"),options:b,onChange:e=>r({view:e})})),A[n.view]&&A[n.view].duration&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.TextControl,{label:(0,s.__)("Duration","piecal"),value:null!==(t=n.duration)&&void 0!==t?t:1,help:(0,s.__)("Choose the number of months the calendar view should span, starting from beginning of current month. Minimum of 1, maximum of 24.","piecal"),min:1,onChange:e=>{var t;parseInt(e)<1||""==e?r({duration:1}):parseInt(e)>24?r({duration:24}):r({duration:null!==(t=parseInt(e))&&void 0!==t?t:1})},type:"number"})),(""===n.view||"dayGridMonth"===n.view)&&(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Widget","piecal"),value:n.widget,help:(0,s.__)("Enable widget mode for a more compact calendar suitable for sidebars. 'Responsive' switches to widget mode on mobile only.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("True","piecal"),value:"true"},{label:(0,s.__)("Responsive","piecal"),value:"responsive"}],onChange:e=>r({widget:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Theme","piecal"),value:n.theme,help:(0,s.__)("Choose between light, dark, or adaptive theme. Adaptive will match your visitor's system preferences.","piecal"),options:[{label:(0,s.__)("Default","piecal"),value:""},{label:(0,s.__)("Dark","piecal"),value:"dark"},{label:(0,s.__)("Adaptive","piecal"),value:"adaptive"}],onChange:e=>r({theme:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Wrap Titles","piecal"),checked:n.wraptitles,help:(0,s.__)("When enabled, event titles will wrap to multiple lines instead of being truncated with an ellipsis.","piecal"),onChange:e=>r({wraptitles:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.SelectControl,{label:(0,s.__)("Locale","piecal"),value:n.locale,help:(0,s.__)("Use a locale code to change the language of the calendar. For example, 'en-US' for English (United States).","piecal"),options:f,onChange:e=>r({locale:e})})),(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Hide Timezone","piecal"),checked:n.hidetimezone,help:(0,s.__)("Tick this box to hide the event timezone from the calendar footer.","piecal"),onChange:e=>r({hidetimezone:e})})))),(0,i.createElement)(o.InspectorAdvancedControls,null,(0,i.createElement)(a.PanelRow,null,(0,i.createElement)(a.CheckboxControl,{label:(0,s.__)("Disable Automatic End Dates","piecal"),checked:n.automaticenddates,help:(0,s.__)("By default, events with no end date will automatically end 1 hour after their start time. Disable to show events with no end date.","piecal"),onChange:e=>r({automaticenddates:e})}))),(0,i.createElement)(Ua,{attributes:n,events:p}))}})}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=(t,n,i,s)=>{if(!n){var o=1/0;for(d=0;d<e.length;d++){for(var[n,i,s]=e[d],a=!0,l=0;l<n.length;l++)(!1&s||o>=s)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(a=!1,s<o&&(o=s));if(a){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}s=s||0;for(var d=e.length;d>0&&e[d-1][2]>s;d--)e[d]=e[d-1];e[d]=[n,i,s]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={904:0,832:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var i,s,[o,a,l]=n,c=0;if(o.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(l)var d=l(r)}for(t&&t(n);c<o.length;c++)s=o[c],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return r.O(d)},n=globalThis.webpackChunkpiecalendar=globalThis.webpackChunkpiecalendar||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=r.O(void 0,[832],(()=>r(561)));i=r.O(i)})();
  • pie-calendar/trunk/build/blocks/calendar/render.php

    r3312639 r3351250  
    1818    'automaticenddates' => $attributes['automaticenddates'],
    1919    'featuredimage'     => $attributes['featuredimage'] ? 'true' : 'false',
     20    'duration'          => $attributes['duration'] ?? 1,
    2021    'hidepastevents'    => $attributes['hidepastevents'] ? 'true' : 'false',
    2122);
  • pie-calendar/trunk/css/piecal.css

    r3236286 r3351250  
    5656.piecal-controls.fc .piecal-controls__view-chooser {
    5757    max-width: calc(50% - 8px);
     58}
     59
     60.piecal-controls.fc .piecal-controls__view-chooser select {
     61    border-radius: 0.25em;
     62    padding: 0.5em;
     63    padding-right: 2em;
     64    appearance: none;
     65    -webkit-appearance: none;
     66    -moz-appearance: none;
     67    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%22800px%22%20height%3D%22800px%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M4.29289%208.29289C4.68342%207.90237%205.31658%207.90237%205.70711%208.29289L12%2014.5858L18.2929%208.29289C18.6834%207.90237%2019.3166%207.90237%2019.7071%208.29289C20.0976%208.68342%2020.0976%209.31658%2019.7071%209.70711L12.7071%2016.7071C12.3166%2017.0976%2011.6834%2017.0976%2011.2929%2016.7071L4.29289%209.70711C3.90237%209.31658%203.90237%208.68342%204.29289%208.29289Z%22%20fill%3D%22%23000000%22%2F%3E%0A%3C%2Fsvg%3E");
     68    background-size: 1em;
     69    background-repeat: no-repeat;
     70    background-position: 97% center;
    5871}
    5972
  • pie-calendar/trunk/includes/block.php

    r3312639 r3351250  
    1717    $block_path = PIECAL_DIR . 'build/blocks/event-info/block.json';
    1818    register_block_type( $block_path );
     19
     20    wp_register_style( 'piecal-block-inline-styles', false );
    1921}
    2022add_action( 'init', 'piecal_register_block_type' );
    21 
    22 
    2323
    2424/**
     
    5757
    5858/**
    59  * Register the REST endpoint.
     59 * Register the REST endpoints.
    6060 *
    6161 * @return void
    6262 */
    63 function piecal_register_rest_endpoint() {
     63function piecal_register_rest_endpoints() {
    6464    register_rest_route(
    6565        'piecal/v1',
     
    7373        )
    7474    );
    75 }
    76 add_action( 'rest_api_init', 'piecal_register_rest_endpoint' );
     75
     76    register_rest_route(
     77        'piecal/v1',
     78        '/views',
     79        array(
     80            'methods'             => 'GET',
     81            'callback'            => 'piecal_get_views',
     82            'permission_callback' => function () {
     83                return current_user_can( 'edit_posts' );
     84            },
     85        )
     86    );
     87
     88    register_rest_route(
     89        'piecal/v1',
     90        '/views_array',
     91        array(
     92            'methods'             => 'GET',
     93            'callback'            => 'piecal_get_views_array',
     94            'permission_callback' => function () {
     95                return current_user_can( 'edit_posts' );
     96            },
     97        )
     98    );
     99}
     100add_action( 'rest_api_init', 'piecal_register_rest_endpoints' );
    77101
    78102
     
    137161                'start'  => get_post_meta( $event->ID, '_piecal_start_date', true ),
    138162                'end'    => get_post_meta( $event->ID, '_piecal_end_date', true ),
    139                 'allDay' => get_post_meta(get_the_ID(), '_piecal_is_allday') ? get_post_meta(get_the_ID(), '_piecal_is_allday', true) : "false"
     163                'allDay' => get_post_meta(get_the_ID(), '_piecal_is_allday') ? get_post_meta(get_the_ID(), '_piecal_is_allday', true) : "false",
     164                "details" => str_replace("&amp;", "&", htmlentities(get_the_excerpt(), ENT_QUOTES) ),
     165                "permalink" => get_permalink(),
    140166            );
    141167
     
    153179    return rest_ensure_response( $events );
    154180}
     181
     182function piecal_get_views( $request ) {
     183    require_once PIECAL_DIR . '/includes/utils/Views.php';
     184
     185    $customViews = [
     186        "listUpcoming" => [
     187            "type" => "listMonth",
     188            "duration" => [
     189                "months" => isset( $atts['duration'] ) ? intval( $atts['duration'] ) : 2
     190            ],
     191            "customProps" => [
     192                /* Translators: String for Upcoming view in view picker dropdown. */
     193                "niceName" => __( 'List - Upcoming', 'piecal' )
     194            ]
     195        ]
     196    ];
     197
     198    $customViews = apply_filters( 'piecal_custom_views', $customViews, [] );
     199   
     200    $allowedViews = ['dayGridMonth', 'listMonth', 'timeGridWeek', 'listWeek', 'dayGridWeek', 'listDay'];
     201    $allowedViews = apply_filters('piecal_allowed_views', $allowedViews);
     202   
     203    $viewLabels = [
     204        /* Translators: String for Month - Classic view in view picker dropdown. */
     205        "dayGridMonth" => __( 'Month - Classic', 'piecal' ),
     206        /* Translators: String for Month - List view in view picker dropdown. */
     207        "listMonth" => __( 'Month - List', 'piecal' ),
     208        /* Translators: String for Week - Time Grid view in view picker dropdown. */
     209        "timeGridWeek" => __( 'Week - Time Grid', 'piecal' ),
     210        /* Translators: String for Week - List view in view picker dropdown. */
     211        "listWeek" => __( 'Week - List', 'piecal' ),
     212        /* Translators: String for Week - Day Grid view in view picker dropdown. */
     213        "dayGridWeek" => __( 'Week - Classic', 'piecal' ),
     214        /* Translators: String for Day - List view in view picker dropdown. */
     215        "listDay" => __( 'Day - List', 'piecal' )
     216    ];
     217    $viewLabels = apply_filters('piecal_view_labels', $viewLabels);
     218
     219    $reformattedViewLabels = [];
     220
     221    foreach ($viewLabels as $view => $label) {
     222        $reformattedViewLabels[] = [
     223            'label' => $label,
     224            'value' => $view
     225        ];
     226    }
     227
     228    array_unshift($reformattedViewLabels, [
     229        'label' => __("Default", "piecal"),
     230        'value' => ""
     231    ]);
     232
     233    return rest_ensure_response( $reformattedViewLabels );
     234}
     235
     236function piecal_get_views_array() {
     237    $customViews = [
     238        "listUpcoming" => [
     239            "type" => "listMonth",
     240            "duration" => [
     241                "months" => isset( $_GET['duration'] ) ? intval( $_GET['duration'] ) : 2
     242            ],
     243            "customProps" => [
     244                /* Translators: String for Upcoming view in view picker dropdown. */
     245                "niceName" => __( 'List - Upcoming', 'piecal' )
     246            ]
     247        ]
     248    ];
     249
     250    $atts['duration'] = isset( $_GET['duration'] ) ? intval( $_GET['duration'] ) : 2;
     251    $atts['duration'] = $atts['duration'] > 24 ? 24 : $atts['duration'];
     252    $atts['duration'] = $atts['duration'] < 1 ? 1 : $atts['duration'];
     253
     254    $atts['duration'] = apply_filters( 'piecal_override_view_duration', $atts['duration'] );
     255
     256    $customViews = apply_filters( 'piecal_custom_views', $customViews, $atts );
     257
     258    return rest_ensure_response( $customViews );
     259}
  • pie-calendar/trunk/includes/shortcode.php

    r3283614 r3351250  
    22
    33require_once PIECAL_DIR . '/includes/utils/Scripts.php';
     4require_once PIECAL_DIR . '/includes/utils/Views.php';
    45
    56add_shortcode( 'piecal', 'piecal_render_calendar' );
     
    910    function piecal_render_calendar( $atts ) {
    1011        do_action( 'piecal_render_calendar', $atts );
     12        do_action( 'piecal_inline_styles' );
    1113
    1214        Piecal\Utils\Scripts::loadCoreScriptsAndStyles();
     
    137139        }
    138140
    139         $eventsArray = apply_filters('piecal_events_array_filter', $eventsArray, $rangeStart = null, $rangeEnd = null, $appendOffset);
    140 
    141         remove_filter('excerpt_more', 'piecal_replace_read_more', 99);
    142 
    143         $allowedViews = ['dayGridMonth', 'listMonth', 'timeGridWeek', 'listWeek', 'dayGridWeek', 'listDay'];
    144         $initialView = $atts['view'] ?? 'dayGridMonth';
    145        
    146         if( !in_array($initialView, $allowedViews) ) {
    147             $initialView = 'dayGridMonth';
    148         }
     141    $eventsArray = apply_filters('piecal_events_array_filter', $eventsArray, $rangeStart = null, $rangeEnd = null, $appendOffset);
     142
     143    remove_filter('excerpt_more', 'piecal_replace_read_more', 99);
     144
     145    $duration = isset( $atts['duration'] ) ? intval( $atts['duration'] ) : 2;
     146    $duration = $duration > 24 ? 24 : $duration;
     147    $duration = $duration < 1 ? 1 : $duration;
     148
     149    $atts['duration'] = apply_filters( 'piecal_override_view_duration', $duration );
     150   
     151    $allowedViews = ['dayGridMonth', 'listMonth', 'timeGridWeek', 'listWeek', 'dayGridWeek', 'listDay'];
     152    $allowedViews = apply_filters('piecal_allowed_views', $allowedViews);
     153   
     154    $viewLabels = [
     155        /* Translators: String for Month - Classic view in view picker dropdown. */
     156        "dayGridMonth" => __( 'Month - Classic', 'piecal' ),
     157        /* Translators: String for Month - List view in view picker dropdown. */
     158        "listMonth" => __( 'Month - List', 'piecal' ),
     159        /* Translators: String for Week - Time Grid view in view picker dropdown. */
     160        "timeGridWeek" => __( 'Week - Time Grid', 'piecal' ),
     161        /* Translators: String for Week - List view in view picker dropdown. */
     162        "listWeek" => __( 'Week - List', 'piecal' ),
     163        /* Translators: String for Week - Day Grid view in view picker dropdown. */
     164        "dayGridWeek" => __( 'Week - Day Grid', 'piecal' ),
     165        /* Translators: String for Day - List view in view picker dropdown. */
     166        "listDay" => __( 'Day - List', 'piecal' )
     167    ];
     168    $viewLabels = apply_filters('piecal_view_labels', $viewLabels);
     169
     170    $initialView = $atts['view'] ?? 'dayGridMonth';
     171   
     172    if( !in_array($initialView, $allowedViews) ) {
     173        $initialView = 'dayGridMonth';
     174    }
    149175
    150176    do_action('piecal_before_core_frontend_scripts');
     
    166192
    167193    $wrapperClass = 'piecal-wrapper';
    168     $wrapperViewAttribute = 'dayGridMonth';
     194    $wrapperViewAttribute = $atts['view'] ?? 'dayGridMonth';
    169195
    170196    if( isset( $atts['wraptitles'] ) ) {
     
    172198    }
    173199
    174     if( isset( $atts['theme'] ) ) {
    175         $wrapperClass .= ' piecal-theme-' . $atts['theme'];
     200    $allowedThemes = ['dark',  'adaptive'];
     201
     202    if( isset( $atts['theme'] ) && in_array( $atts['theme'], $allowedThemes ) ) {
     203        $wrapperClass .= ' piecal-theme-' . esc_attr( $atts['theme'] );
    176204    }
    177205
     
    190218    $customCalendarProps = apply_filters('piecal_calendar_object_properties', $customCalendarProps, $eventsArray, $appendOffset, $atts);
    191219
     220    $views = Piecal\Utils\Views::addCustomViews( [] );
     221   
    192222    ob_start();
     223
    193224    ?>
    194225    <script>
     
    199230
    200231            let alreadyExpandedOccurrences = [];
     232
     233            function piecalPrepareCustomViewsForCalendar( views ) {
     234                let supportedEventHandlers = [
     235                    'eventDataTransform',
     236                    'dateClick',
     237                    'eventClick',
     238                    'eventDidMount',
     239                    'dayCellDidMount',
     240                    'viewDidMount',
     241                    'viewWillUnmount',
     242                    'dayHeaderContent',
     243                    'dayHeaderDidMount'
     244                ];
     245
     246                for( let view in views ) {
     247                    let viewProps = views[view];
     248
     249                    for( let prop in viewProps ) {
     250                        if( supportedEventHandlers.includes( prop ) ) {
     251                            let eventHandlerCode = viewProps[prop];
     252
     253                            let handlerFunction = new Function( 'info', eventHandlerCode );
     254
     255                            viewProps[prop] = handlerFunction;
     256                        }
     257                    }
     258
     259                    // Remove customProps since we don't want those output inside the calendar object
     260                    delete viewProps.customProps;
     261
     262                    // Add in the $atts['duration'] value if the view has a duration property.
     263                    if( viewProps.duration ) {
     264                        viewProps.duration = {
     265                            months: <?php echo intval($duration); ?>
     266                        };
     267                    }
     268                }
     269
     270                return views;
     271            }
    201272           
    202273            document.addEventListener('DOMContentLoaded', function() {
     
    213284                    eventTimeFormat: <?php echo json_encode($localeDateStringFormat); ?>,
    214285                    dayHeaderFormat: { weekday: 'long' },
     286                    views: piecalPrepareCustomViewsForCalendar(<?php echo json_encode($views); ?>),
    215287                    eventClick: function( info ) {
    216                         Alpine.store("calendarEngine").eventTitle = info.event._def.title;
    217                         Alpine.store("calendarEngine").eventStart = info.event.start;
    218                         Alpine.store("calendarEngine").eventEnd = info.event.end;
    219                         Alpine.store("calendarEngine").eventDetails = info.event._def.extendedProps.details;
    220                         Alpine.store("calendarEngine").eventUrl = info.event._def.extendedProps.permalink;
    221                         Alpine.store("calendarEngine").eventAllDay = info.event.allDay;
    222                         Alpine.store("calendarEngine").eventType = info.event._def.extendedProps.postType;
    223                         Alpine.store('calendarEngine').showPopover = true;
    224                         Alpine.store('calendarEngine').eventActualEnd = info.event._def.extendedProps.actualEnd;
    225                         Alpine.store('calendarEngine').appendOffset = "<?php echo $appendOffset; ?>";
    226 
    227                         // Always pass through event data via the URL if it's a recurring instance, or if adaptive timezones are enabled.
    228                         // Do not pass through event data via the URL if it's a non-recurring instance and adaptive timezones are disabled.
    229                         if( info.event._def.extendedProps.isRecurringInstance || ( !info.event._def.extendedProps.isRecurringInstance && piecalVars.useAdaptiveTimezones && Alpine.store('calendarEngine').appendOffset ) ) {
    230                             // Construct the URL with parameters
    231                             const baseUrl    = info.event._def.extendedProps.permalink;
    232                             const eventStart = new Date( info.event.start );
    233                             const eventEnd   = new Date( info.event.end );
    234                             const viewerTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
    235 
    236 
    237                             const url        = new URL( baseUrl );
    238                             url.searchParams.append( 'eventstart', Math.floor( eventStart.getTime() / 1000 ) );
    239                             url.searchParams.append( 'eventend', Math.floor( eventEnd.getTime() / 1000 ) );
    240                             url.searchParams.append( 'timezone', viewerTimezone );
    241 
    242                             // Assign the constructed URL to the store
    243                             Alpine.store("calendarEngine").eventUrl = url.toString();
    244                         }
     288                        info = piecalJS.eventClick( info, {
     289                            appendOffset: <?php echo $appendOffset ? 'true' : 'false'; ?>
     290                        } );
    245291
    246292                        <?php do_action( 'piecal_additional_event_click_js' ); ?>
    247 
    248                         if( info.jsEvent.type == "keydown" ) {
    249                             setTimeout( () => {
    250                                 document.querySelector('.piecal-popover__inner > button').focus();
    251                             }, 100);
    252                         }
    253293                    },
    254294                    eventDataTransform: function(event) { 
    255                         // Safely decode encoded HTML entities for output as titles
    256                         let scrubber = document.createElement('textarea');
    257                         scrubber.innerHTML = event.title;
    258                         event.title = scrubber.value;
    259 
    260                         // Extend end date for all day events that span multiple days
    261                         let { actualEnd, end } = piecalUtils.getAlldayMultidayEventEnd( event ) ?? {};
    262 
    263                         if( actualEnd && end ) {   
    264                             event.actualEnd = actualEnd;
    265                             event.end = end;
    266                         }
     295                        event = piecalJS.eventDataTransform( event );
    267296
    268297                        <?php do_action( 'piecal_additional_event_data_transform_js' ); ?>
     
    271300                    },
    272301                    dateClick: function( info ) {
    273                         if( info.jsEvent.target.tagName != 'A' ) return;
    274 
    275                         this.gotoDate(info.dateStr);
    276                         piecalChangeView('listDay');
    277                        
     302                        info = piecalJS.dateClick( info );
    278303
    279304                        <?php do_action( 'piecal_additional_date_click_js' ); ?>
    280305                    },
    281306                    eventDidMount: function( info ) {
    282                         let link = info.el;
    283 
    284                         const locale = info.view.dateEnv.locale.codeArg;
    285 
    286                         const formattedTime = new Intl.DateTimeFormat(locale, {
    287                             hour: 'numeric',
    288                             minute: 'numeric',
    289                             hour12: true
    290                         });
    291 
    292                         const formattedDate = new Intl.DateTimeFormat(locale, {
    293                             day: 'numeric',
    294                             month: 'numeric',
    295                             year: 'numeric'
    296                         });
    297 
    298                         if( link.tagName == 'TR' ) {
    299                             link = info.el.querySelector('a');
    300                         }
    301 
    302                         if( !link || link.tagName != "A" ) return;
    303 
    304                         link.setAttribute('role', 'button');
    305                         link.setAttribute('href', 'javascript:void(0)');
    306 
    307                         if( info.event.allDay ) {
    308                             /* Translators: Text for all-day event description. */
    309                             const allDayDescriptionText = <?php _e("'All-day event'", 'piecal'); ?>;
    310 
    311                             link.setAttribute('aria-label', `${allDayDescriptionText} - ${info.event.title}`);
    312                         }
    313 
    314                         // Handle multi-day event aria label to let screen readers know the event spans multiple days
    315                         if( info.event.end && (info.event.end - info.event.start) > (24 * 60 * 60 * 1000) ) {
    316                            
    317                             const startDate = formattedDate.format(info.event.start);
    318                             const startTime = info.event.allDay ? '' : formattedTime.format(info.event.start);
    319 
    320                             const endDate = formattedDate.format(info.event.end);
    321                             const endTime = info.event.allDay ? '' :formattedTime.format(info.event.end);
    322 
    323                             /* Translators: Text describing span of multi-day event. */
    324                             const spanText = <?php _e("'to'", 'piecal'); ?>;
    325 
    326                             /* Translators: Text for multi-day event description. */
    327                             const multiDayDescriptionText = <?php _e("'Multi-day event running from'", 'piecal'); ?>;
    328 
    329                             /* Translators: Text for multi-day all-day event description. */
    330                             const multiDayAllDayDescriptionText = <?php _e("'Multi-day, all-day event running from'", 'piecal'); ?>;
    331 
    332                             const descriptionText = info.event.allDay ? multiDayAllDayDescriptionText : multiDayDescriptionText;
    333 
    334                             /* Translators: Text describing span of multi-day event. */
    335                             link.setAttribute('aria-label', `${descriptionText} ${startDate} ${startTime} ${spanText} ${endDate} ${endTime} - ${info.event.title}`);
    336                         }
     307                        info = piecalJS.eventDidMount( info );
    337308
    338309                        <?php do_action( 'piecal_additional_event_did_mount_js' ); ?>
    339310                    },
    340311                    dayCellDidMount: function( info ) {
    341                         let dayLink = info.el.querySelector('.fc-daygrid-day-top a');
    342 
    343                         if( !dayLink ) return;
    344 
    345                         dayLink.setAttribute('role', 'button');
    346                         dayLink.setAttribute('href', 'javascript:void(0)');
    347 
    348                         // Prevent double read out of button label
    349                         dayLink.closest('td').removeAttribute('aria-labelledby');
    350                        
    351                         setTimeout( () => {
    352                             if( info.el.querySelector('.fc-daygrid-day-events .fc-daygrid-event-harness') ) {
    353                                 dayLink.setAttribute('aria-label', dayLink.getAttribute('aria-label') + ', has events.');
    354                             }
    355                         }, 100);
    356 
    357                         dayLink.addEventListener('keydown', (event) => {
    358                             if( event.key == "Enter" || event.key == ' ' ) {
    359                                 event.preventDefault();
    360                                 window.calendar.gotoDate(info.date);
    361                                 piecalChangeView('listDay');
    362 
    363                                 setTimeout( () => {
    364                                     let focusTarget = document.querySelector('.fc-list-day-text');
    365                                     focusTarget?.setAttribute('tabindex', '0');
    366                                     focusTarget?.focus();
    367                                 }, 100);
    368                             }
    369                         })
     312                        info = piecalJS.dayCellDidMount( info );
    370313
    371314                        <?php do_action( 'piecal_additional_day_cell_did_mount_js' ); ?>
    372315                    },
    373316                    dayHeaderContent: function( info ) {
    374                         let overriddenDayHeaderViews = ['dayGridMonth', 'timeGridWeek', 'dayGridWeek'];
    375 
    376                         if( overriddenDayHeaderViews.includes(info.view.type) ) {
    377                             return '';
    378                         }
     317                        info = piecalJS.dayHeaderContent( info );
    379318
    380319                        <?php do_action( 'piecal_additional_day_header_content_js' ); ?>
     
    383322                    },
    384323                    dayHeaderDidMount: function( info ) {
    385                         let dayHeaderLink = info.el.querySelector('a');
    386 
    387                         let fullDayName = piecalUtils.getShortenedDayNames(info.text, 'full');
    388                         let shortDayName = piecalUtils.getShortenedDayNames(info.text, 'short');
    389                         let singleLetterDayName = piecalUtils.getShortenedDayNames(info.text, 'single');
    390 
    391                         let shortenableViews = ['dayGridMonth', 'timeGridWeek', 'dayGridWeek'];
    392 
    393                         if( shortenableViews.includes(info.view.type) ) {
    394                             dayHeaderLink.innerHTML = `<span class="piecal-grid-day-header-text piecal-grid-day-header-text--full">${fullDayName}</span>
    395                                                        <span class="piecal-grid-day-header-text piecal-grid-day-header-text--short">${shortDayName}</span>
    396                                                        <span class="piecal-grid-day-header-text piecal-grid-day-header-text--single-letter">${singleLetterDayName}</span>`;
    397                         }
     324                        info = piecalJS.dayHeaderDidMount( info );
    398325
    399326                        <?php do_action( 'piecal_additional_day_header_did_mount_js' ); ?>
     
    408335
    409336            function piecalChangeView( view ) {
     337                piecalCleanView( document.querySelector('.piecal-wrapper').getAttribute('data-view'), view );
    410338                document.querySelector('.piecal-wrapper').setAttribute('data-view', view);
    411339                window.calendar.changeView(view);
     
    413341                Alpine.store('calendarEngine').viewTitle = window.calendar.currentData.viewTitle;
    414342                Alpine.store('calendarEngine').viewSpec = window.calendar.currentData.viewSpec.buttonTextDefault;
     343            }
     344
     345            // This function forces the calendar to re-render events when the view is changed, but only
     346            // when necessary. This prevents artifacts from custom views from persisting between view changes
     347            // when those views have the same or similar types, e.g. listMonth and listUpcoming.
     348            function piecalCleanView( oldView, newView ) {
     349                if( oldView.toLowerCase().includes( 'list' ) && newView.toLowerCase().includes( 'grid' ) ) {
     350                    return false;
     351                }
     352
     353                if( oldView.toLowerCase().includes( 'list' ) && newView.toLowerCase().includes( 'list' ) ) {
     354                    window.calendar.changeView('dayGridMonth');
     355                }
     356
     357                if( oldView.toLowerCase().includes( 'grid' ) && newView.toLowerCase().includes( 'grid' ) ) {
     358                    window.calendar.changeView('listMonth');
     359                }
    415360            }
    416361
     
    506451                    ?>
    507452                    <select x-model="$store.calendarEngine.calendarView" @change="piecalChangeView($store.calendarEngine.calendarView)">
    508                         <option value="dayGridMonth">
    509                             <?php
    510                                 /* Translators: String for Month - Classic view in view picker dropdown. */
    511                                 _e( 'Month - Classic', 'piecal' );
    512                             ?>
    513                         </option>
    514                         <option value="listMonth">
    515                             <?php
    516                                 /* Translators: String for Month - List view in view picker dropdown. */
    517                                 _e( 'Month - List', 'piecal' );
    518                             ?>
    519                         </option>
    520                         <option value="timeGridWeek">
    521                             <?php
    522                                 /* Translators: String for Week - Time Grid view in view picker dropdown. */
    523                                 _e( 'Week - Time Grid', 'piecal' );
    524                             ?>
    525                         </option>
    526                         <option value="listWeek">
    527                             <?php
    528                                 /* Translators: String for Week - List view in view picker dropdown. */
    529                                 _e( 'Week - List', 'piecal' );
    530                             ?>
    531                         </option>
    532                         <option value="dayGridWeek">
    533                             <?php
    534                                 /* Translators: String for Week - Classic view in view picker dropdown. */
    535                                 _e( 'Week - Classic', 'piecal' );
    536                             ?>
    537                         </option>
    538                         <option value="listDay">
    539                             <?php
    540                                 /* Translators: String for Day - Classic view in view picker dropdown. */
    541                                 _e( 'Day', 'piecal' );
    542                             ?>
    543                         </option>
     453                        <?php foreach( $allowedViews as $view ) { ?>
     454                            <option value="<?php echo $view; ?>">
     455                                <?php echo $viewLabels[$view]; ?>
     456                            </option>
     457                        <?php } ?>
    544458                    </select>
    545459                </label>
  • pie-calendar/trunk/includes/utils/Scripts.php

    r3236286 r3351250  
    55class Scripts {
    66    public static function loadCoreScriptsAndStyles() {
    7         self::enqueueBundle( ['alpinefocus', 'alpinejs', 'fullcalendar', 'piecal-utils', 'piecalCSS'] );
     7        self::enqueueBundle( ['alpinefocus', 'alpinejs', 'fullcalendar', 'piecal-utils', 'piecalJS', 'piecalCSS'] );
    88    }
    99   
     
    2424                case 'piecal-utils':
    2525                    wp_enqueue_script('piecal-utils');
     26                break;
     27                case 'piecalJS':
     28                    wp_enqueue_script('piecalJS');
    2629                break;
    2730                case 'alpinejs':
     
    6265            switch( $script ) {
    6366                case 'alpinejs':
    64                     wp_register_script( 'alpinejs', PIECAL_PATH . 'vendor/alpine.3.11.1.js', ['alpinefocus'] );
     67                    wp_register_script( 'alpinejs', PIECAL_PATH . 'vendor/alpine.3.11.1.min.js', ['alpinefocus'] );
    6568                break;
    6669                case 'alpinefocus':
     
    8184                        'useAdaptiveTimezones' => $useAdaptiveTimezones
    8285                    ] );
     86                break;
     87                case 'piecalJS':
     88                    wp_register_script( 'piecalJS', PIECAL_PATH . 'includes/js/piecal.js', array( 'wp-i18n' ), PIECAL_VERSION );
    8389                break;
    8490                case 'piecalCSS':
  • pie-calendar/trunk/languages/piecal.pot

    r3312639 r3351250  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Pie Calendar 1.2.8\n"
     5"Project-Id-Version: Pie Calendar 1.2.9\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pie-calendar\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-06-09T19:46:15+00:00\n"
     12"POT-Creation-Date: 2025-08-27T13:24:40+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    3838#: plugin.php
    3939msgid "https://piecalendar.com/about"
     40msgstr ""
     41
     42#. Translators: String for Upcoming view in view picker dropdown.
     43#: includes/block.php:193
     44#: includes/block.php:245
     45#: includes/utils/Views.php:88
     46msgid "List - Upcoming"
     47msgstr ""
     48
     49#. Translators: String for Month - Classic view in view picker dropdown.
     50#: includes/block.php:205
     51#: includes/shortcode.php:156
     52msgid "Month - Classic"
     53msgstr ""
     54
     55#. Translators: String for Month - List view in view picker dropdown.
     56#: includes/block.php:207
     57#: includes/shortcode.php:158
     58msgid "Month - List"
     59msgstr ""
     60
     61#. Translators: String for Week - Time Grid view in view picker dropdown.
     62#: includes/block.php:209
     63#: includes/shortcode.php:160
     64msgid "Week - Time Grid"
     65msgstr ""
     66
     67#. Translators: String for Week - List view in view picker dropdown.
     68#: includes/block.php:211
     69#: includes/shortcode.php:162
     70msgid "Week - List"
     71msgstr ""
     72
     73#. Translators: String for Week - Day Grid view in view picker dropdown.
     74#: includes/block.php:213
     75msgid "Week - Classic"
     76msgstr ""
     77
     78#. Translators: String for Day - List view in view picker dropdown.
     79#: includes/block.php:215
     80#: includes/shortcode.php:166
     81msgid "Day - List"
     82msgstr ""
     83
     84#: includes/block.php:229
     85#: build/blocks/calendar/index.js:1
     86#: src/blocks/calendar/edit.js:392
     87#: src/blocks/calendar/edit.js:409
     88msgid "Default"
    4089msgstr ""
    4190
     
    85134#. Translators: This string is for displaying the viewer's time zone via the Pie Calendar Info shortcode
    86135#: includes/piecal-info-shortcode.php:37
    87 #: includes/shortcode.php:638
     136#: includes/shortcode.php:552
    88137msgid "Event times are listed in your local time zone: "
    89138msgstr ""
     
    116165msgstr ""
    117166
    118 #: includes/shortcode.php:309
    119 msgid "'All-day event'"
    120 msgstr ""
    121 
    122 #: includes/shortcode.php:324
    123 msgid "'to'"
    124 msgstr ""
    125 
    126 #: includes/shortcode.php:327
    127 msgid "'Multi-day event running from'"
    128 msgstr ""
    129 
    130 #: includes/shortcode.php:330
    131 msgid "'Multi-day, all-day event running from'"
    132 msgstr ""
    133 
    134 #: includes/shortcode.php:486
     167#. Translators: String for Week - Day Grid view in view picker dropdown.
     168#: includes/shortcode.php:164
     169msgid "Week - Day Grid"
     170msgstr ""
     171
     172#: includes/shortcode.php:431
    135173msgid "Skip Calendar"
    136174msgstr ""
    137175
    138 #: includes/shortcode.php:498
     176#: includes/shortcode.php:443
    139177msgid "Back to full month view."
    140178msgstr ""
    141179
    142 #: includes/shortcode.php:500
     180#: includes/shortcode.php:445
    143181msgid "Back To Full Month"
    144182msgstr ""
    145183
    146184#. Translators: Label for calendar view chooser.
     185#: includes/shortcode.php:450
     186msgid "Choose View"
     187msgstr ""
     188
     189#. Translators: Label for close button in Pie Calendar popover.
     190#: includes/shortcode.php:492
     191msgid "Close event details"
     192msgstr ""
     193
     194#. Translators: Label for event start date in Pie Calendar popover.
    147195#: includes/shortcode.php:505
    148 msgid "Choose View"
    149 msgstr ""
    150 
    151 #. Translators: String for Month - Classic view in view picker dropdown.
    152 #: includes/shortcode.php:511
    153 #: build/blocks/calendar/index.js:1
    154 #: src/blocks/calendar/edit.js:280
    155 msgid "Month - Classic"
    156 msgstr ""
    157 
    158 #. Translators: String for Month - List view in view picker dropdown.
    159 #: includes/shortcode.php:517
    160 #: build/blocks/calendar/index.js:1
    161 #: src/blocks/calendar/edit.js:283
    162 msgid "Month - List"
    163 msgstr ""
    164 
    165 #. Translators: String for Week - Time Grid view in view picker dropdown.
    166 #: includes/shortcode.php:523
    167 #: build/blocks/calendar/index.js:1
    168 #: src/blocks/calendar/edit.js:285
    169 msgid "Week - Time Grid"
    170 msgstr ""
    171 
    172 #. Translators: String for Week - List view in view picker dropdown.
    173 #: includes/shortcode.php:529
    174 #: build/blocks/calendar/index.js:1
    175 #: src/blocks/calendar/edit.js:288
    176 msgid "Week - List"
    177 msgstr ""
    178 
    179 #. Translators: String for Week - Classic view in view picker dropdown.
    180 #: includes/shortcode.php:535
    181 #: build/blocks/calendar/index.js:1
    182 #: src/blocks/calendar/edit.js:289
    183 msgid "Week - Classic"
    184 msgstr ""
    185 
    186 #. Translators: String for Day - Classic view in view picker dropdown.
    187 #: includes/shortcode.php:541
    188 #: build/blocks/calendar/index.js:1
    189 #: src/blocks/calendar/edit.js:290
    190 msgid "Day"
    191 msgstr ""
    192 
    193 #. Translators: Label for close button in Pie Calendar popover.
    194 #: includes/shortcode.php:578
    195 msgid "Close event details"
    196 msgstr ""
    197 
    198 #. Translators: Label for event start date in Pie Calendar popover.
    199 #: includes/shortcode.php:591
    200196msgid "Starts"
    201197msgstr ""
    202198
    203199#. Translators: Label for event end date in Pie Calendar popover.
    204 #: includes/shortcode.php:600
     200#: includes/shortcode.php:514
    205201msgid "Ends"
    206202msgstr ""
    207203
    208204#. Translators: Label for "View <Post Type>" in Pie Calendar popover.
    209 #: includes/shortcode.php:619
     205#: includes/shortcode.php:533
    210206msgid "View "
    211207msgstr ""
     
    231227msgstr ""
    232228
    233 #: plugin.php:147
     229#: plugin.php:148
    234230msgid ""
    235231"<p>Pie Calendar has been activated.</p> \n"
     
    247243msgstr ""
    248244
    249 #: plugin.php:237
     245#: plugin.php:245
    250246msgid "Navigate to the Pie Calendar website to purchase the Pro version."
    251247msgstr ""
    252248
    253 #: plugin.php:238
     249#: plugin.php:246
    254250msgid "Upgrade to Pro"
    255251msgstr ""
     
    261257
    262258#: build/blocks/calendar/index.js:1
    263 #: src/blocks/calendar/edit.js:235
     259#: src/blocks/calendar/edit.js:311
    264260msgid "Calendar Settings"
    265261msgstr ""
    266262
    267263#: build/blocks/calendar/index.js:1
    268 #: src/blocks/calendar/edit.js:239
     264#: src/blocks/calendar/edit.js:315
    269265msgid "Post Types"
    270266msgstr ""
    271267
    272268#: build/blocks/calendar/index.js:1
    273 #: src/blocks/calendar/edit.js:261
     269#: src/blocks/calendar/edit.js:337
    274270msgid "Select post types to display in the calendar."
    275271msgstr ""
    276272
    277273#: build/blocks/calendar/index.js:1
    278 #: src/blocks/calendar/edit.js:271
     274#: src/blocks/calendar/edit.js:347
    279275msgid "View"
    280276msgstr ""
    281277
    282278#: build/blocks/calendar/index.js:1
    283 #: src/blocks/calendar/edit.js:273
     279#: src/blocks/calendar/edit.js:349
    284280msgid "Choose the default calendar view that visitors will see when the page loads."
    285281msgstr ""
    286282
    287283#: build/blocks/calendar/index.js:1
    288 #: src/blocks/calendar/edit.js:278
    289 #: src/blocks/calendar/edit.js:305
    290 #: src/blocks/calendar/edit.js:322
    291 msgid "Default"
    292 msgstr ""
    293 
    294 #: build/blocks/calendar/index.js:1
    295 #: src/blocks/calendar/edit.js:298
     284#: src/blocks/calendar/edit.js:360
     285msgid "Duration"
     286msgstr ""
     287
     288#: build/blocks/calendar/index.js:1
     289#: src/blocks/calendar/edit.js:362
     290msgid "Choose the number of months the calendar view should span, starting from beginning of current month. Minimum of 1, maximum of 24."
     291msgstr ""
     292
     293#: build/blocks/calendar/index.js:1
     294#: src/blocks/calendar/edit.js:385
    296295msgid "Widget"
    297296msgstr ""
    298297
    299298#: build/blocks/calendar/index.js:1
    300 #: src/blocks/calendar/edit.js:300
     299#: src/blocks/calendar/edit.js:387
    301300msgid "Enable widget mode for a more compact calendar suitable for sidebars. 'Responsive' switches to widget mode on mobile only."
    302301msgstr ""
    303302
    304303#: build/blocks/calendar/index.js:1
    305 #: src/blocks/calendar/edit.js:306
     304#: src/blocks/calendar/edit.js:393
    306305msgid "True"
    307306msgstr ""
    308307
    309308#: build/blocks/calendar/index.js:1
    310 #: src/blocks/calendar/edit.js:307
     309#: src/blocks/calendar/edit.js:394
    311310msgid "Responsive"
    312311msgstr ""
    313312
    314313#: build/blocks/calendar/index.js:1
    315 #: src/blocks/calendar/edit.js:315
     314#: src/blocks/calendar/edit.js:402
    316315msgid "Theme"
    317316msgstr ""
    318317
    319318#: build/blocks/calendar/index.js:1
    320 #: src/blocks/calendar/edit.js:317
     319#: src/blocks/calendar/edit.js:404
    321320msgid "Choose between light, dark, or adaptive theme. Adaptive will match your visitor's system preferences."
    322321msgstr ""
    323322
    324323#: build/blocks/calendar/index.js:1
    325 #: src/blocks/calendar/edit.js:323
     324#: src/blocks/calendar/edit.js:410
    326325msgid "Dark"
    327326msgstr ""
    328327
    329328#: build/blocks/calendar/index.js:1
    330 #: src/blocks/calendar/edit.js:324
     329#: src/blocks/calendar/edit.js:411
    331330msgid "Adaptive"
    332331msgstr ""
    333332
    334333#: build/blocks/calendar/index.js:1
    335 #: src/blocks/calendar/edit.js:331
     334#: src/blocks/calendar/edit.js:418
    336335msgid "Wrap Titles"
    337336msgstr ""
    338337
    339338#: build/blocks/calendar/index.js:1
    340 #: src/blocks/calendar/edit.js:333
     339#: src/blocks/calendar/edit.js:420
    341340msgid "When enabled, event titles will wrap to multiple lines instead of being truncated with an ellipsis."
    342341msgstr ""
    343342
    344343#: build/blocks/calendar/index.js:1
    345 #: src/blocks/calendar/edit.js:342
     344#: src/blocks/calendar/edit.js:429
    346345msgid "Locale"
    347346msgstr ""
    348347
    349348#: build/blocks/calendar/index.js:1
    350 #: src/blocks/calendar/edit.js:344
     349#: src/blocks/calendar/edit.js:431
    351350msgid "Use a locale code to change the language of the calendar. For example, 'en-US' for English (United States)."
    352351msgstr ""
    353352
    354353#: build/blocks/calendar/index.js:1
    355 #: src/blocks/calendar/edit.js:354
     354#: src/blocks/calendar/edit.js:441
    356355msgid "Hide Timezone"
    357356msgstr ""
    358357
    359358#: build/blocks/calendar/index.js:1
    360 #: src/blocks/calendar/edit.js:356
     359#: src/blocks/calendar/edit.js:443
    361360msgid "Tick this box to hide the event timezone from the calendar footer."
    362361msgstr ""
    363362
    364363#: build/blocks/calendar/index.js:1
    365 #: src/blocks/calendar/edit.js:368
     364#: src/blocks/calendar/edit.js:455
    366365msgid "Disable Automatic End Dates"
    367366msgstr ""
    368367
    369368#: build/blocks/calendar/index.js:1
    370 #: src/blocks/calendar/edit.js:370
     369#: src/blocks/calendar/edit.js:457
    371370msgid "By default, events with no end date will automatically end 1 hour after their start time. Disable to show events with no end date."
    372371msgstr ""
     
    514513msgstr ""
    515514
     515#: includes/js/piecal.js:137
     516msgid "All-day event"
     517msgstr ""
     518
     519#. Translators: Text describing span of multi-day event.
     520#: includes/js/piecal.js:151
     521msgid "to"
     522msgstr ""
     523
     524#. Translators: Text for multi-day event description.
     525#: includes/js/piecal.js:154
     526msgid "Multi-day event running from"
     527msgstr ""
     528
     529#. Translators: Text for multi-day all-day event description.
     530#: includes/js/piecal.js:157
     531msgid "Multi-day, all-day event running from"
     532msgstr ""
     533
    516534#: build/blocks/calendar/block.json
    517535#: src/blocks/calendar/block.json
  • pie-calendar/trunk/plugin.php

    r3312639 r3351250  
    1010 * Plugin URI:        https://piecalendar.com
    1111 * Description:       Turn any post type into a calendar event and display it on a calendar.
    12  * Version:           1.2.8
     12 * Version:           1.2.9
    1313 * Author:            Elijah Mills & Jonathan Jernigan
    1414 * Author URI:        https://piecalendar.com/about
     
    2626}
    2727
    28 define( 'PIECAL_VERSION', '1.2.8' );
     28define( 'PIECAL_VERSION', '1.2.9' );
    2929define( 'PIECAL_PATH', plugin_dir_url( __FILE__ ) );
    3030define( 'PIECAL_DIR', plugin_dir_path( __FILE__ ) );
     
    5050        'fullcalendar-locales',
    5151        'piecal-utils',
     52        'piecalJS',
    5253        'piecalCSS',
    5354        'piecalThemeDarkCSS',
     
    181182            false
    182183        );
     184
     185        // Register piecalJS if not already registered. We need this in the block editor environment.
     186        if ( ! wp_script_is( 'piecalJS', 'registered' ) ) {
     187            wp_register_script( 'piecalJS', PIECAL_PATH . 'includes/js/piecal.js', array( 'wp-i18n' ), PIECAL_VERSION );
     188        }
     189               
     190        wp_enqueue_script('piecalJS');
    183191    }
    184192);
     
    260268/**
    261269 * Set script translations
    262  * This doesn't work yet.
    263  */
    264 // add_action( 'wp_enqueue_scripts', 'piecal_load_js_translations', 100 );
    265 
    266 // function piecal_load_js_translations() {
    267 // wp_set_script_translations(
    268 // 'piecalendar-custom-meta-plugin',
    269 // 'piecal',
    270 // plugin_dir_path( __FILE__ ) . 'languages'
    271 // );
    272 // }
     270 */
     271function piecal_set_script_translations() {
     272    wp_set_script_translations( 'piecalJS', 'piecal', plugin_dir_path( __FILE__ ) . 'languages' );
     273}
     274add_action( 'wp_enqueue_scripts', 'piecal_set_script_translations', 20 );
    273275
    274276/**
     
    322324    return $gmt_final_offset;
    323325}
     326
     327// Custom views API
     328require_once PIECAL_DIR . '/includes/utils/Views.php';
     329add_action( 'init', function() {
     330    Piecal\Utils\Views::addCustomViews( [], [] );
     331});
  • pie-calendar/trunk/readme.txt

    r3312639 r3351250  
    1 === Events Calendar Made Simple – Pie Calendar ===
     1=== WordPress Events Calendar Plugin – Pie Calendar ===
    22Contributors: apexws, spellhammer
    33Tags: events, calendar, event
    44Donate link: https://piecalendar.com
    55Requires at least: 5.9
    6 Tested up to: 6.8.1
     6Tested up to: 6.8.2
    77Requires PHP: 7.4
    8 Stable tag: 1.2.8
     8Stable tag: 1.2.9
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8989
    9090== Changelog ==
     91
     92= 1.2.9 =
     93* New: Custom views API. See our documentation for more information.
     94* New: List - Upcoming view with duration attribute, useful for sites that have fewer events spread out over multiple months to prevent showing an empty calendar.
     95* Security: Fixed Authenticated (Contributor+) Stored-XSS vulnerability related to theme attribute reported to us on August 21st.
     96* Fix: Renamed alpine dependency to indicate it's minified. This may resolve issues with some optimization plugins.
     97* Tweak: Adjusted view chooser dropdown styles.
    9198
    9299= 1.2.8 =
  • pie-calendar/trunk/src/blocks/calendar/block.json

    r3312639 r3351250  
    5858      "default": false
    5959    },
     60    "duration": {
     61      "type": "number",
     62      "default": 1
     63    },
    6064    "hidepastevents": {
    6165      "type": "boolean",
  • pie-calendar/trunk/src/blocks/calendar/edit.js

    r3312639 r3351250  
    2323  CheckboxControl,
    2424  FormTokenField,
     25  TextControl,
    2526} from "@wordpress/components";
    2627import { useEntityRecords } from "@wordpress/core-data";
     
    2930import { addQueryArgs } from "@wordpress/url";
    3031import { SUPPORTED_LOCALES } from "./locales";
     32import { addFilter, applyFilters } from "@wordpress/hooks";
    3133/**
    3234 * Import the full calendar library.
     
    5355  const defaultView = "dayGridMonth";
    5456  const [viewTitle, setViewTitle] = useState('');
     57  const [views, setViews] = useState([]);
     58  const [viewsLoaded, setViewsLoaded] = useState(false); // Add loading state
     59  const [duration, setDuration] = useState(1);
    5560
    5661  useEffect(() => {
     
    6267  }, [attributes.view, attributes.wraptitles]);
    6368
     69  useEffect(() => {
     70    apiFetch({
     71      path: addQueryArgs("piecal/v1/views_array", { duration: attributes.duration } ),
     72      method: "GET",
     73    }).then((views) => {
     74        let supportedEventHandlers = [
     75          'eventDataTransform',
     76          'dateClick',
     77          'eventClick',
     78          'eventDidMount',
     79          'dayCellDidMount',
     80          'viewDidMount',
     81          'viewWillUnmount',
     82          'dayHeaderContent',
     83          'dayHeaderDidMount'
     84      ];
     85
     86      for( let view in views ) {
     87          let viewProps = views[view];
     88
     89          for( let prop in viewProps ) {
     90              if( supportedEventHandlers.includes( prop ) ) {
     91                  let eventHandlerCode = viewProps[prop];
     92
     93                  let handlerFunction = new Function( 'info', eventHandlerCode );
     94
     95                  viewProps[prop] = handlerFunction;
     96              }
     97          }
     98
     99          // Remove customProps since we don't want those output inside the calendar object
     100          delete viewProps.customProps;
     101      }
     102
     103      setViews(views);
     104      setViewsLoaded(true); // Mark views as loaded
     105    });
     106  }, [attributes.duration]);
     107
    64108  const updateTitle = () => {
    65109    if (calendarRef.current) {
     
    67111    }
    68112  };
     113
     114  // Don't render FullCalendar until views are loaded
     115  if (!viewsLoaded) {
     116    return <div>Loading calendar...</div>;
     117  }
    69118
    70119  return (
     
    125174      </div>
    126175      <style data-fullcalendar></style>
     176      <div className="piecal-blockeditor-container" style={{width: '100%'}} data-view={attributes.view}>
    127177      <FullCalendar
    128178        ref={calendarRef}
     
    130180        initialView={attributes.view || defaultView}
    131181        editable={false}
     182        views={viewsLoaded ? views : []}
    132183        events={events}
    133184        contentHeight="auto"
     
    138189        } : undefined}
    139190      />
     191      </div>
    140192    </>
    141193  );
     
    159211  // Add this new state for managing suggestions
    160212  const [suggestions, setSuggestions] = useState([]);
     213
     214  // Add new state for managing views
     215  const [views, setViews] = useState([]);
     216
     217  // Add new state for managing view array
     218  const [viewsArray, setViewsArray] = useState([]);
    161219
    162220  const blockWrapperClass = "piecal-wrapper";
     
    229287    }
    230288  }, [postTypehasResolved]);
     289
     290  useEffect(() => {
     291    apiFetch({
     292      path: addQueryArgs("piecal/v1/views"),
     293      method: "GET",
     294    }).then((views) => {
     295      setViews(views);
     296    });
     297  }, []); // Add empty dependency array to run only once on mount
     298
     299  useEffect(() => {
     300    apiFetch({
     301      path: addQueryArgs("piecal/v1/views_array"),
     302      method: "GET",
     303    }).then((viewsArray) => {
     304      setViewsArray(viewsArray);
     305    });
     306  }, []); // Add empty dependency array to run only once on mount
    231307
    232308  return (
     
    275351                "piecal"
    276352              )}
    277               options={[
    278                 { label: __("Default", "piecal"), value: "" },
    279                 {
    280                   label: __("Month - Classic", "piecal"),
    281                   value: "dayGridMonth",
    282                 },
    283                 { label: __("Month - List", "piecal"), value: "listMonth" },
    284                 {
    285                   label: __("Week - Time Grid", "piecal"),
    286                   value: "timeGridWeek",
    287                 },
    288                 { label: __("Week - List", "piecal"), value: "listWeek" },
    289                 { label: __("Week - Classic", "piecal"), value: "dayGridWeek" },
    290                 { label: __("Day", "piecal"), value: "listDay" },
    291               ]}
     353              options={views}
    292354              onChange={(view) => setAttributes({ view })}
    293355            />
    294356          </PanelRow>
     357          {( viewsArray[attributes.view] && viewsArray[attributes.view].duration ) && ( // Next check if attributes.view in the views Array has a duration property before showing
     358            <PanelRow>
     359              <TextControl
     360                label={__("Duration", "piecal")}
     361                value={attributes.duration ?? 1}
     362                help={__(
     363                  "Choose the number of months the calendar view should span, starting from beginning of current month. Minimum of 1, maximum of 24.",
     364                  "piecal"
     365                )}
     366                min={1}
     367                onChange={(duration) => {
     368                  if( parseInt(duration) < 1 || duration == "" ) {
     369                    setAttributes({ duration: 1 });
     370                    return;
     371                  }
     372                  if( parseInt(duration) > 24 ) {
     373                    setAttributes({ duration: 24 });
     374                    return;
     375                  }
     376                  setAttributes({ duration: parseInt(duration) ?? 1 }) }
     377                }
     378                type={"number"}
     379              />
     380            </PanelRow>
     381          )}
    295382          {(attributes.view === "" || attributes.view === "dayGridMonth") && (
    296383            <PanelRow>
  • pie-calendar/trunk/src/blocks/calendar/render.php

    r3312639 r3351250  
    1818    'automaticenddates' => $attributes['automaticenddates'],
    1919    'featuredimage'     => $attributes['featuredimage'] ? 'true' : 'false',
     20    'duration'          => $attributes['duration'] ?? 1,
    2021    'hidepastevents'    => $attributes['hidepastevents'] ? 'true' : 'false',
    2122);
Note: See TracChangeset for help on using the changeset viewer.