@wavemaker/app-runtime-wm-build 11.7.3-next.26382 → 11.7.3-next.26384
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-runtime-wm-build/package.json +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.js +3 -3
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +3 -3
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +3 -3
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +3 -3
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +2 -2
|
@@ -695,7 +695,7 @@ FullCalendar v5.3.1
|
|
|
695
695
|
Docs & License: https://fullcalendar.io/
|
|
696
696
|
(c) 2020 Adam Shaw
|
|
697
697
|
*/
|
|
698
|
-
var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var o,s,a,l,u,c,d,h={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return y(e,o,t&&t.key,t&&t.ref,null)}function y(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,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function _(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(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?w(e):null}function x(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 x(e)}}function S(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!a++||u!==o.debounceRendering)&&((u=o.debounceRendering)||l)(k)}function k(){for(var e;a=s.length;)e=s.sort((function(e,t){return e.__v.__b-t.__v.__b})),s=[],e.some((function(e){var t,n,r,i,o,s,a;e.__d&&(s=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=m({},o)).__v=r,i=A(a,o,r,t.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(o):s),I(n,o),i!=s&&x(o)))}))}function T(e,t,n,r,i,o,s,a,l){var u,c,d,f,m,v,y,_=n&&n.__k||p,b=_.length;if(a==h&&(a=null!=o?o[0]:b?w(n,0):null),u=0,t.__k=E(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=_[u])||d&&n.key==d.key&&n.type===d.type)_[u]=void 0;else for(c=0;c<b;c++){if((d=_[c])&&n.key==d.key&&n.type===d.type){_[c]=void 0;break}d=null}if(f=A(e,n,d=d||h,r,i,o,s,a,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||f,n)),null!=f){var p;if(null==v&&(v=f),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==d||f!=a||null==f.parentNode){e:if(null==a||a.parentNode!==e)e.appendChild(f),p=null;else{for(m=a,c=0;(m=m.nextSibling)&&c<b;c+=2)if(m==f)break e;e.insertBefore(f,a),p=a}"option"==t.type&&(e.value="")}a=void 0!==p?p:f.nextSibling,"function"==typeof t.type&&(t.__d=a)}else a&&d.__e==a&&a.parentNode!=e&&(a=w(d))}return u++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&g(o[u]);for(u=b;u--;)null!=_[u]&&N(_[u],_[u]);if(y)for(u=0;u<y.length;u++)O(y[u],y[++u],y[++u])}function E(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)E(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?y(null,e,null,null,e):null!=e.__e||null!=e.__c?y(e.type,e.props,e.key,null,e.__v):e):e);return n}function D(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===f.test(t)?n+"px":null==n?"":n}function C(e,t,n,r,i){var o,s,a,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||D(o,l,"");if(n)for(u in n)r&&n[u]===r[u]||D(o,u,n[u])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),a=t.toLowerCase(),t=(a in e?a:t).slice(2),n?(r||e.addEventListener(t,M,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,M,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function M(e){this.l[e.type](o.event?o.event(e):e)}function A(e,t,n,r,i,s,a,l,u){var c,d,h,p,f,g,v,y,w,x,S=t.type;if(void 0!==t.constructor)return null;(c=o.__b)&&c(t);try{e:if("function"==typeof S){if(y=t.props,w=(c=S.contextType)&&r[c.__c],x=c?w?w.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in S&&S.prototype.render?t.__c=d=new S(y,x):(t.__c=d=new b(y,x),d.constructor=S,d.render=R),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=S.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=m({},d.__s)),m(d.__s,S.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,h)null==S.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==S.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,x)||t.__v===n.__v&&!d.__){for(d.props=y,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&a.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}d.context=x,d.props=y,d.state=d.__s,(c=o.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=null!=c&&c.type==_&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=m(m({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),T(e,t,n,r,i,s,a,l,u),d.base=t.__e,d.__h.length&&a.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,i,s,a,u);(c=o.diffed)&&c(t)}catch(e){t.__v=null,o.__e(e,t,n)}return t.__e}function I(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,n,r,i,o,s,a){var l,u,c,d,f,m=n.props,g=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(u=o[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),o=null,a=!1}if(null===t.type)m!==g&&e.data!=g&&(e.data=g);else{if(null!=o&&(o=p.slice.call(e.childNodes)),c=(m=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===h)for(m={},f=0;f<e.attributes.length;f++)m[e.attributes[f].name]=e.attributes[f].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||C(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||C(e,o,t[o],n[o],r)})(e,g,m,i,a),d?t.__k=[]:(t.__k=t.props.children,T(e,t,n,r,"foreignObject"!==t.type&&i,o,s,h,a)),a||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&C(e,"value",l,m.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&C(e,"checked",l,m.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function N(e,t,n){var r,i,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],t,n);null!=i&&g(i)}function R(e,t,n){return this.constructor(e,n)}function P(e,t,n){var r,i,s;o.__&&o.__(e,t),i=(r=n===c)?null:n&&n.__k||t.__k,e=v(_,null,[e]),s=[],A(t,(r?t:n||t).__k=e,i||h,h,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:p.slice.call(t.childNodes),s,n||h,r),I(s,e)}o={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return S(n.__E=n)}catch(t){e=t}throw e}},b.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),S(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},b.prototype.render=_,s=[],a=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=h,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:b,createElement:v,render:P,createRef:function(){return{}},Fragment:_,createContext:function(e){var t=function(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,S(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=o.debounceRendering,t=[];for(o.debounceRendering=function(e){t.push(e)},P(v(F,{}),document.createElement("div"));t.length;)t.shift()();o.debounceRendering=e}};var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(b),j=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),e}();function Y(e){e.parentNode&&e.parentNode.removeChild(e)}function V(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(H(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function H(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function B(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),s=0;s<o.length;s++)r.push(o[s]);return r}var U=/(top|left|right|bottom|width|height)$/i;function z(e,t){for(var n in t)q(e,n,t[n])}function q(e,t,n){null==n?e.style[t]="":"number"==typeof n&&U.test(t)?e.style[t]=n+"px":e.style[t]=n}function W(e){e.preventDefault()}function $(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function G(e,t,n,r){var i=$(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var K=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Z(e,t){var n=function(r){t(r),K.forEach((function(t){e.removeEventListener(t,n)}))};K.forEach((function(t){e.addEventListener(t,n)}))}var X=0;function J(){return String(X++)}function Q(){document.body.classList.add("fc-not-allowed")}function ee(){document.body.classList.remove("fc-not-allowed")}function te(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",W)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",W)}function re(e){e.addEventListener("contextmenu",W)}function ie(e){e.removeEventListener("contextmenu",W)}function oe(e){var 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++)"string"==typeof(n=i[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function se(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(e,t,n){return n.func?n.func(e,t):le(e[n.field],t[n.field])*(n.order||1)}function le(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}function ue(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e,t){return e-t}function de(e){return e%1==0}function he(e){var 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}var pe=["sun","mon","tue","wed","thu","fri","sat"];function fe(e,t){var n=De(e);return n[2]+=7*t,Ce(n)}function me(e,t){var n=De(e);return n[2]+=t,Ce(n)}function ge(e,t){var n=De(e);return n[6]+=t,Ce(n)}function ve(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function _e(e,t){var n=xe(e),r=xe(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function be(e,t){var n=we(e,t);return null!==n&&n%7==0?n/7:null}function we(e,t){return Ae(e)===Ae(t)?Math.round(ye(e,t)):null}function xe(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Se(e,t,n,r){var i=Ce([t,0,1+ke(t,n,r)]),o=xe(e),s=Math.round(ye(i,o));return Math.floor(s/7)+1}function ke(e,t,n){var r=7+t-n;return-(7+Ce([e,0,r]).getUTCDay()-t)%7+r-1}function Te(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ee(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 De(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Ce(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Me(e){return!isNaN(e.valueOf())}function Ae(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:J(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Le=Object.prototype.hasOwnProperty;function Oe(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o--){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Oe(i))}for(o=e.length-1;o>=0;o--){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ne(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pe(e){for(var t={},n=0,r=e;n<r.length;n++)t[r[n]]=!0;return t}function Fe(e){var t=[];for(var n in e)t.push(e[n]);return t}function je(e,t){if(e===t)return!0;for(var n in e)if(Le.call(e,n)&&!(n in t))return!1;for(var n in t)if(Le.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ye(e,t){var n=[];for(var r in e)Le.call(e,r)&&(r in t||n.push(r));for(var r in t)Le.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ve(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!He(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function He(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Be(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o<n;o+=r){var s=e[o];void 0!==s&&i.push(s)}return i}function Ue(e,t,n){var r=n.dateEnv,i=n.pluginHooks,o=n.options,s=e.defs,a=e.instances;for(var l in a=Ne(a,(function(e){return!s[e.defId].recurringDef})),s){var u=s[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,h=ze(u,c,t,r,i.recurringTypes);d<h.length;d++){var p=h[d],f=Ie(l,{start:p,end:r.add(p,c)});a[f.instanceId]=f}}}return{defs:s,instances:a}}function ze(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(xe)),o}var qe=["years","months","days","milliseconds"],We=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function $e(e,t){var n;return"string"==typeof e?function(e){var t=We.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(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?Ge(e):"number"==typeof e?Ge(((n={})[t||"milliseconds"]=e,n)):null}function Ge(e){var 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 Ke(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ze(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Xe(e){return Je(e)/864e5}function Je(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<qe.length;r++){var i=qe[r];if(t[i]){var o=e[i]/t[i];if(!de(o)||null!==n&&n!==o)return null;n=o}else if(e[i])return null}return n}function et(e){var 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 tt(e){return e.toISOString().replace(/T.*$/,"")}function nt(e){return ue(e.getUTCHours(),2)+":"+ue(e.getUTCMinutes(),2)+":"+ue(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ue(i,2)+":"+ue(o,2):"GMT"+n+i+(o?":"+ue(o,2):"")}function it(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function ot(e,t,n){var r,i;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(r){if(!it(r,o)){n&&n(i);var a=e.apply(this,o);t&&t(a,i)||(i=a)}}else i=e.apply(this,o);return r=o,i}}function st(e,t,n){var r,i;return function(o){if(r){if(!je(r,o)){n&&n(i);var s=e.call(this,o);t&&t(s,i)||(i=s)}}else i=e.call(this,o);return r=o,i}}var at={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},lt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ut=/\s*([ap])\.?m\.?/i,ct=/,/g,dt=/\s+/g,ht=/\u200e/g,pt=/UTC|GMT/,ft=function(){function e(e){var t={},n={},r=0;for(var i in e)i in at?(n[i]=e[i],r=Math.max(at[i],r)):(t[i]=e[i],i in lt&&(r=Math.max(lt[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=ot(mt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var i=this.standardDateProps,o=this.extendedSettings,s=function(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:Ae(e)!==Ae(t)?1:0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);var a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=mt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),p=function(e,t,n,r){for(var i=0;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var s=e.substr(0,o);i=o+t.length;for(var a=e.substr(i),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(s===c&&a===d)return{before:s,after:a}}}return null}(l,d,u,h),f=o.separator||r||n.defaultSeparator||"";return p?p.before+d+f+h+p.after:l+f+u},e.prototype.getLargestUnit=function(){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"}},e}();function mt(e,t,n){var i=Object.keys(e).length;return 1===i&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===i&&t.week?function(e){return function(e,t,n,r){var i=[];return"narrow"===r?i.push(t):"short"===r&&i.push(t," "),i.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&i.reverse(),i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=r({},e),t=r({},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";var i,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var s=r({},e);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return function(r){var s=r.marker;return function(e,t,n,r,i){return e=e.replace(ht,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;return e=e.replace(pt,(function(){return n=!0,t})),n||(e+=" "+t),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(ct,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(ut,"").trim():"narrow"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ut,(function(e){return e.toLocaleLowerCase()}))),(e=e.replace(dt," ")).trim()}((i&&!s.getUTCMinutes()?i:o).format(s),r,e,t,n)}}(e,t,n)}function gt(e,t){var 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 vt(e,t,n,r){var i=gt(e,n.calendarSystem);return{date:i,start:i,end:t?gt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var yt=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,vt(e,t,n,r))},e}(),_t=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(vt(e,t,n,r))},e}();function bt(e){return"object"==typeof e&&e?new ft(e):"string"==typeof e?new yt(e):"function"==typeof e?new _t(e):void 0}var wt={navLinkDayClick:At,navLinkWeekClick:At,duration:$e,bootstrapFontAwesome:At,buttonIcons:At,customButtons:At,defaultAllDayEventDuration:$e,defaultTimedEventDuration:$e,nextDayThreshold:$e,scrollTime:$e,slotMinTime:$e,slotMaxTime:$e,dayPopoverFormat:bt,slotDuration:$e,snapDuration:$e,headerToolbar:At,footerToolbar:At,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:bt,dayHeaderClassNames:At,dayHeaderContent:At,dayHeaderDidMount:At,dayHeaderWillUnmount:At,dayCellClassNames:At,dayCellContent:At,dayCellDidMount:At,dayCellWillUnmount:At,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:At,weekNumbers:Boolean,weekNumberClassNames:At,weekNumberContent:At,weekNumberDidMount:At,weekNumberWillUnmount:At,editable:Boolean,viewClassNames:At,viewDidMount:At,viewWillUnmount:At,nowIndicator:Boolean,nowIndicatorClassNames:At,nowIndicatorContent:At,nowIndicatorDidMount:At,nowIndicatorWillUnmount:At,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:At,locale:At,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:At,eventOrder:oe,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:At,contentHeight:At,direction:String,weekNumberFormat:bt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:At,initialDate:At,now:At,eventDataTransform:At,stickyHeaderDates:At,stickyFooterScrollbar:At,viewHeight:At,defaultAllDay:Boolean,eventSourceFailure:At,eventSourceSuccess:At,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:At,eventConstraint:At,eventAllow:At,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:At,eventContent:At,eventDidMount:At,eventWillUnmount:At,selectConstraint:At,selectOverlap:At,selectAllow:At,droppable:Boolean,unselectCancel:String,slotLabelFormat:At,slotLaneClassNames:At,slotLaneContent:At,slotLaneDidMount:At,slotLaneWillUnmount:At,slotLabelClassNames:At,slotLabelContent:At,slotLabelDidMount:At,slotLabelWillUnmount:At,dayMaxEvents:At,dayMaxEventRows:At,dayMinWidth:Number,slotLabelInterval:$e,allDayText:String,allDayClassNames:At,allDayContent:At,allDayDidMount:At,allDayWillUnmount:At,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:bt,rerenderDelay:Number,moreLinkText:At,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:At,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:$e,hiddenDays:At,monthMode:Boolean,fixedWeekCount:Boolean,validRange:At,visibleRange:At,titleFormat:At,noEventsText:String},xt={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",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",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},St={datesSet:At,eventsSet:At,eventAdd:At,eventChange:At,eventRemove:At,windowResize:At,eventClick:At,eventMouseEnter:At,eventMouseLeave:At,select:At,unselect:At,loading:At,_unmount:At,_beforeprint:At,_afterprint:At,_noEventDrop:At,_noEventResize:At,_resize:At,_scrollRequest:At},kt={buttonText:At,views:At,plugins:At,initialEvents:At,events:At,eventSources:At},Tt={headerToolbar:Et,footerToolbar:Et,buttonText:Et,buttonIcons:Et};function Et(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?je(e,t):e===t}var Dt={type:String,component:At,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:At,usesMinMaxTime:Boolean,classNames:At,content:At,didMount:At,willUnmount:At};function Ct(e){return Oe(e,Tt)}function Mt(e,t){var n={},r={};for(var i in t)i in e&&(n[i]=t[i](e[i]));for(var i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function At(e){return e}function It(e,t,n,r){for(var i={defs:{},instances:{}},o=$t(n),s=0,a=e;s<a.length;s++){var l=qt(a[s],t,n,r,o);l&&Lt(l,i)}return i}function Lt(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Ot(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=Rt(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function Nt(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function Rt(e,t){var n=Ne(e.defs,t),r=Ne(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ft={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:At,overlap:At,allow:At,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function jt(e,t){var n=function(e,t){return Array.isArray(e)?It(e,null,t,!0):"object"==typeof e&&e?It([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 Yt(e){return e.reduce(Vt,Ht)}function Vt(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)}}var Ht={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},Ut={start:At,end:At,date:At,allDay:Boolean},zt=r(r(r({},Bt),Ut),{extendedProps:At});function qt(e,t,n,r,i){void 0===i&&(i=$t(n));var o=Wt(e,n,i),s=o.refined,a=o.extra,l=function(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),u=function(e,t,n,r){for(var i=0;i<r.length;i++){var o=r[i].parse(e,n);if(o){var s=e.allDay;return null==s&&null==(s=t)&&null==(s=o.allDayGuess)&&(s=!1),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Gt(s,a,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var i,o,s=e.allDay,a=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(c))a=i.marker;else if(!r)return null;return null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified)),s&&a&&(a=xe(a)),o&&(u=o.marker,s&&(u=xe(u)),a&&u<=a&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:a,end:u},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(s,l,n,r);return d?{def:c=Gt(s,a,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Wt(e,t,n){return void 0===n&&(n=$t(t)),Mt(e,n)}function $t(e){return r(r(r({},Ft),zt),e.pluginHooks.eventRefiners)}function Gt(e,t,n,i,o,s){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:J(),sourceId:n,allDay:i,hasEnd:o,ui:jt(e,s),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=s.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(a,c(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=xe(e.start);return{start:n,end:me(n,t)}}function Zt(e,t){void 0===t&&(t=$e(0));var n=null,r=null;if(e.end){r=xe(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=Je(t)&&(r=me(r,1))}return e.start&&(n=xe(e.start),r&&r<=n&&(r=me(n,1))),{start:n,end:r}}function Xt(e){var t=Zt(e);return ye(t.start,t.end)>1}function Jt(e,t,n,r){return"year"===r?$e(n.diffWholeYears(e,t),"year"):"month"===r?$e(n.diffWholeMonths(e,t),"month"):_e(e,t)}function Qt(e,t){var n,r,i=[],o=t.start;for(e.sort(en),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function en(e,t){return e.start.valueOf()-t.start.valueOf()}function tn(e,t){var n=e.start,r=e.end,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 nn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function on(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function an(e,t,n,r){var i={},o={},s={},a=[],l=[],u=dn(e.defs,t);for(var c in e.defs)"inverse-background"===(p=u[(b=e.defs[c]).defId]).display&&(b.groupId?(i[b.groupId]=[],s[b.groupId]||(s[b.groupId]=b)):o[c]=[]);for(var d in e.instances){var h=e.instances[d],p=u[(b=e.defs[h.defId]).defId],f=h.range,m=!b.allDay&&r?Zt(f,r):f,g=tn(m,n);g&&("inverse-background"===p.display?b.groupId?i[b.groupId].push(g):o[h.defId].push(g):"none"!==p.display&&("background"===p.display?a:l).push({def:b,ui:p,instance:h,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in i)for(var y=0,_=Qt(i[v],n);y<_.length;y++){var b,w=_[y];p=u[(b=s[v]).defId],a.push({def:b,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var c in o)for(var x=0,S=Qt(o[c],n);x<S.length;x++)w=S[x],a.push({def:e.defs[c],ui:u[c],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function ln(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function un(e,t){e.fcSeg=t}function cn(e){return e.fcSeg||e.parentNode.fcSeg||null}function dn(e,t){return Re(e,(function(e){return hn(e,t)}))}function hn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Yt(n)}function pn(e,t){var n=e.map(fn);return n.sort((function(e,n){return se(e,n,t)})),n.map((function(e){return e._seg}))}function fn(e){var t=e.eventRange,n=t.def,i=t.instance?t.instance.range:t.range,o=i.start?i.start.valueOf():0,s=i.end?i.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:o,end:s,duration:s-o,allDay:Number(n.allDay),_seg:e})}function mn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,i=r.def,o=r.ui,s=o.startEditable,a=0,l=n;a<l.length;a++)s=(0,l[a])(s,i,o,t);return s}function gn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function vn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function yn(e,t,n,r,i,o,s){var a=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,h=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==i),u&&!d.allDay&&(e.isStart||e.isEnd)){var p=o||(e.isStart?h.range.start:e.start||e.eventRange.range.start),f=s||(e.isEnd?h.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?a.formatRange(p,f,t,{forcedStartTzo:o?null:h.forcedStartTzo,forcedEndTzo:s?null:h.forcedEndTzo}):a.format(p,t,{forcedTzo:o?null:h.forcedStartTzo})}return""}function _n(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sn(t,r.start)}}function bn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function wn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var xn={start:At,end:At,allDay:Boolean};function Sn(e,t,n){var i=function(e,t){var n=Mt(e,xn),i=n.refined,o=n.extra,s=i.start?t.createMarkerMeta(i.start):null,a=i.end?t.createMarkerMeta(i.end):null,l=i.allDay;return null==l&&(l=s&&s.isTimeUnspecified&&(!a||a.isTimeUnspecified)),r({range:{start:s?s.marker:null,end:a?a.marker:null},allDay:l},o)}(e,t),o=i.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return i}function kn(e,t){return nn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function Tn(e,t,n){return r(r({},En(e,t,n)),{timeZone:t.timeZone})}function En(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Dn(e,t,n){n.emitter.trigger("select",r(r({},Cn(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Cn(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.dateSpanTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,i=t.dateEnv,r(r({},En(n.range,i,n.allDay)),{allDay:n.allDay}))),o}function Mn(e,t,n){var r=n.dateEnv,i=n.options,o=t;return e?(o=xe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function An(e,t,n,r){var i=dn(e.defs,t),o={defs:{},instances:{}};for(var s in e.defs){var a=e.defs[s];o.defs[s]=In(a,i[s],n,r)}for(var l in e.instances){var u=e.instances[l];a=o.defs[u.defId],o.instances[l]=Ln(u,a,i[u.defId],n,r)}return o}function In(e,t,n,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var s=r(r(r({},e),o),{ui:r(r({},e.ui),o.ui)});n.extendedProps&&(s.extendedProps=r(r({},s.extendedProps),n.extendedProps));for(var a=0,l=i.pluginHooks.eventDefMutationAppliers;a<l.length;a++)(0,l[a])(s,n,i);return!s.hasEnd&&i.options.forceEventDuration&&(s.hasEnd=!0),s}function Ln(e,t,n,i,o){var s=o.dateEnv,a=i.standardProps&&!0===i.standardProps.allDay,l=i.standardProps&&!1===i.standardProps.hasEnd,u=r({},e);return a&&(u.range=Kt(u.range)),i.datesDelta&&n.startEditable&&(u.range={start:s.add(u.range.start,i.datesDelta),end:s.add(u.range.end,i.datesDelta)}),i.startDelta&&n.durationEditable&&(u.range={start:s.add(u.range.start,i.startDelta),end:u.range.end}),i.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:s.add(u.range.end,i.endDelta)}),l&&(u.range={start:u.range.start,end:Mn(t.allDay,u.range.start,o)}),t.allDay&&(u.range={start:xe(u.range.start),end:xe(u.range.end)}),u.range.end<u.range.start&&(u.range.end=Mn(t.allDay,u.range.start,o)),u}var On=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),Nn={id:String,defaultAllDay:Boolean,url:String,events:At,eventDataTransform:At,success:At,failure:At};function Rn(e,t,n){var r;if(void 0===n&&(n=Pn(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var i=Mt(r,n),o=i.refined,s=i.extra,a=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:J(),sourceDefId:a.sourceDefId,meta:a.meta,ui:jt(o,t),extendedProps:s}}return null}function Pn(e){return r(r(r({},Ft),Nn),e.pluginHooks.eventSourceRefiners)}function Fn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var jn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,i([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var 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})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),i=r.viewSpecs,o=r.toolbarConfig,s=[].concat(o.viewsWithButtons);for(var a in i)s.push(a);for(t=0;t<s.length;t++)if((n=i[s[t]])&&n.singleUnit===e)return n},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Fn(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=$e(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),bt(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),bt(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),i=Sn(n,r.dateEnv,$e({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Dn(i,null,r))},e.prototype.unselect=function(e){var 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))},e.prototype.addEvent=function(e,t){if(e instanceof Yn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Lt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var i,o=this.getCurrentData();if(t instanceof j)i=t.internalEventSource;else if("boolean"==typeof t)t&&(i=Fe(o.eventSources)[0]);else if(null!=t){var s=this.getEventSourceById(t);if(!s)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=s.internalEventSource}var a=qt(e,i,o,!1);if(a){var l=new Yn(o,a.def,a.def.recurringDef?null:a.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Lt(a)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:Vn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,i=n.instances;for(var o in e=String(e),r){var s=r[o];if(s.publicId===e){if(s.recurringDef)return new Yn(t,s,null);for(var a in i){var l=i[a];if(l.defId===s.defId)return new Yn(t,s,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Hn(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new j(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new j(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof j)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Rn(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new j(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=$e(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Yn=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in Ut)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e in Bt)t=Bt[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Ft){var i=Ft[e](t);"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var i=Jt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var i=Jt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i,o,s=this._context.dateEnv,a={allDay:n.allDay},l=s.createMarker(e);if(l&&(null==t||(r=s.createMarker(t)))&&this._instance){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Jt(u.start,l,s,n.granularity);if(r){var d=Jt(u.end,r,s,n.granularity);o=d,(i=c).years===o.years&&i.months===o.months&&i.days===o.days&&i.milliseconds===o.milliseconds?this.mutate({datesDelta:c,standardProps:a}):this.mutate({startDelta:c,endDelta:d,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:c,standardProps:a})}},e.prototype.moveStart=function(e){var t=$e(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=$e(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=$e(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=bt(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})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,i=this._context,o=Ot(i.getCurrentData().eventStore,n.instanceId);o=An(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);var s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:Hn(o,i,n),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Vn(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new j(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,i=this.startStr,o=this.endStr,s={};return t.title&&(s.title=t.title),i&&(s.start=i),o&&(s.end=o),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?r(s,t.extendedProps):s.extendedProps=t.extendedProps),s},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Vn(e){var t,n,r=e._def,i=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:i?(n={},n[i.instanceId]=i,n):{}}}function Hn(e,t,n){var r=e.defs,i=e.instances,o=[],s=n?n.instanceId:"";for(var a in i){var l=i[a],u=r[l.defId];l.instanceId!==s&&o.push(new Yn(t,u,l))}return o}var Bn,Un={},zn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return Ce(e)},e.prototype.markerToArray=function(e){return De(e)},e}();Bn=zn,Un.gregory=Bn;var qn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Wn(e){var t=qn.exec(e);if(t){var n=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(Me(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var $n=function(){function e(e){var 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 Un[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.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Ce(Te(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var 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=Ce(e)),null!==t&&Me(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Wn(e);if(null===t)return null;var n=t.marker,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}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var 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)},e.prototype.subtract=function(e,t){var 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)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=be(e,t))?{unit:"week",value:n}:null!==(n=we(e,t))?{unit:"day",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Xe(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xe(e)/30}(n):n.days&&null!==(r=we(e,t))?r/Xe(n):(t.valueOf()-e.valueOf())/Je(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?xe(e):"hour"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),i=Se(e,r,t,n);if(i<1)return Se(e,r-1,t,n);var o=Se(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=ge(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Ce(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Ce(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ee(De(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(De(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ee(De(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(De(e))*60):new Date(e.valueOf()-(t||0))},e}(),Gn=[],Kn={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function Zn(e){for(var t=e.length>0?e[0].code:"en",n=Gn.concat(e),r={en:Kn},i=0,o=n;i<o.length;i++){var s=o[i];r[s.code]=s}return{map:r,defaultCode:t}}function Xn(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Kn;return Jn(e,n,r)}(e,t):Jn(e.code,[e.code],e)}function Jn(e,t,n){var r=Oe([Kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Qn(e){var t=Xn(e.locale||"en",Zn([]).map);return new $n(r(r({timeZone:xt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var er,tr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function nr(e,t){return It(function(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return r(r({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ir(e,t){var 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}function or(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function sr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ar(e,t){return{left:e.left-t.left,top:e.top-t.top}}function lr(){return null==er&&(er=function(){if("undefined"==typeof document)return!0;var 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);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),er}var ur={defs:{},instances:{}},cr=function(){function e(){this.getKeysForEventDefs=ot(this._getKeysForEventDefs),this.splitDateSelection=ot(this._splitDateSpan),this.splitEventStore=ot(this._splitEventStore),this.splitIndividualUi=ot(this._splitIndividualUi),this.splitEventDrag=ot(this._splitInteraction),this.splitEventResize=ot(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Re(n,(function(e,n){return t.eventUiBuilders[n]||ot(dr)})),n){var d=n[c],h=s[c]||ur,p=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:p(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++)t[r[n]]=e;return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Re(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var s=0,a=t[o];s<a.length;s++)i[h=a[s]]||(i[h]={defs:{},instances:{}}),i[h].defs[o]=n[o];for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var h;i[h=d[c]]&&(i[h].instances[l]=u)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var s=o[i];n[s]||(n[s]={}),n[s][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||ur,mutatedEvents:i[r]||ur,isEvent:e.isEvent})};for(var s in n)o(s);for(var s in i)o(s)}return t},e}();function dr(e,t,n){var i=[];e&&i.push(e),t&&i.push(t);var o={"":Yt(i)};return n&&r(o,n),o}function hr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!sn(r.activeRange,e)),isOther:Boolean(r&&!sn(r.currentRange,e)),isToday:Boolean(t&&sn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function pr(e,t){var n=["fc-day","fc-day-"+pe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function fr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,gr=null;function vr(){return null===gr&&(gr=function(){var e=document.createElement("div");z(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Y(e),t}()),gr}function yr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=_r(e);return document.body.removeChild(e),t}()),mr}function _r(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function br(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=_r(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return vr()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function wr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():xr(e),i=br(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function xr(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function Sr(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function kr(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}var Tr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],i=this.options&&this.options[e],o=0,s=[].concat(i||[],r);o<s.length;o++){s[o].apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}(),Er=function(){function e(e,t,n,r){this.els=t;var i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),Dr=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),Cr=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return n(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(Dr),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(Dr),Ar=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=r({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();if(Ar.prototype.classes={},Ar.prototype.iconClasses={},Ar.prototype.baseIconClass="",Ar.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ir=FullCalendarVDom.Component,Lr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Nr=FullCalendarVDom.createRef,Rr=FullCalendarVDom.Fragment,Pr=FullCalendarVDom.createContext,Fr=FullCalendarVDom.flushToDom,jr=function(){function e(e,t,n){var i=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){i.queuedRequest=r({},i.queuedRequest||{},e),i.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),Yr=Pr({});function Vr(e,t,n,r,i,o,s,a,l,u,c,d,h){return{dateEnv:i,options:n,pluginHooks:s,emitter:u,dispatch:a,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new jr(e,u,$e(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:h}}var Hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ye(e,this.props),Ye(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Ur,t.addStateEquality=zr,t.contextType=Yr,t}(Ir);Hr.prototype.propEquality={},Hr.prototype.stateEquality={};var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=Yr,t}(Hr);function Ur(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function zr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function qr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Wr(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],s=t(o);s?n.push(s):null==s&&n.push(o)}}else n=e;return n}function $r(e,t){return Rt(e,(function(e){return e.sourceId!==t}))}function Gr(e,t){return Kr({eventDrag:e},t)}function Kr(e,t){var n=t.getCurrentData(),i=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Zr)(i,t)}function Zr(e,t,n,i){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,i){var o=t.getCurrentData(),s=e.eventDrag,a=s.mutatedEvents,l=a.defs,u=a.instances,c=dn(l,s.isEvent?e.eventUiBases:{"":o.selectionConfig});i&&(c=Re(c,i));var d,h,p=(d=e.eventStore,h=s.affectedEvents.instances,{defs:d.defs,instances:Ne(d.instances,(function(e){return!h[e.instanceId]}))}),f=p.defs,m=p.instances,g=dn(f,e.eventUiBases);for(var v in u){var y=u[v],_=y.range,b=c[y.defId],w=l[y.defId];if(!Xr(b.constraints,_,p,e.businessHours,t))return!1;var x=t.options.eventOverlap,S="function"==typeof x?x:null;for(var k in m){var T=m[k];if(rn(_,T.range)){if(!1===g[T.defId].overlap&&s.isEvent)return!1;if(!1===b.overlap)return!1;if(S&&!S(new Yn(t,f[T.defId],T),new Yn(t,w,y)))return!1}}for(var E=o.eventStore,D=0,C=b.allows;D<C.length;D++){var M,A=C[D],I=r(r({},n),{range:y.range,allDay:w.allDay}),L=E.defs[w.defId],O=E.instances[v];if(M=L?new Yn(t,L,O):new Yn(t,w),!A(Cn(I,t),M))return!1}}return!0}(e,t,n,i)||e.dateSelection&&!function(e,t,n,i){var o=e.eventStore,s=o.defs,a=o.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;if(i&&(c=i(c)),!Xr(c.constraints,u,o,e.businessHours,t))return!1;var d=t.options.selectOverlap,h="function"==typeof d?d:null;for(var p in a){var f=a[p];if(rn(u,f.range)){if(!1===c.overlap)return!1;if(h&&!h(new Yn(t,s[f.defId],f),null))return!1}}for(var m=0,g=c.allows;m<g.length;m++){if(!(0,g[m])(Cn(r(r({},n),l),t),null))return!1}return!0}(e,t,n,i))}function Xr(e,t,n,r,i){for(var o=0,s=e;o<s.length;o++)if(!ei(Jr(s[o],t,n,r,i),t))return!1;return!0}function Jr(e,t,n,r,i){return"businessHours"===e?Qr(Ue(r,t,i)):"string"==typeof e?Qr(Rt(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?Qr(Ue(e,t,i)):[]}function Qr(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ei(e,t){for(var n=0,r=e;n<r.length;n++)if(on(r[n],t))return!0;return!1}var ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=J(),t}return n(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.props.dateProfile,n=e.mutatedEvents.instances;if(t)for(var r in n)if(!on(t.validRange,n[r].range))return!1;return Gr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t=this.props.dateProfile;return!(t&&!on(t.validRange,e.range))&&Kr({dateSelection:e},this.context)},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!V(e,".fc-event-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){return!(V(e,".fc-event:not(.fc-bg-event)")||V(e,".fc-daygrid-more-link")||V(e,"a[data-navlink]")||this.isInPopover(e))},t.prototype.isPopover=function(){return!1},t.prototype.isInPopover=function(e){return Boolean(V(e,".fc-popover"))},t}(Br);function ni(e){return{id:J(),deps:e.deps||[],reducers:e.reducers||[],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||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],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,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}var ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);function ii(e,t,n,i){if(t[e])return t[e];var o=function(e,t,n,i){var o=n[e],s=i[e],a=function(e){return o&&null!==o[e]?o[e]:s&&null!==s[e]?s[e]:null},l=a("component"),u=a("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=ii(u,t,n,i)}return!l&&c&&(l=c.component),l?{type:e,component:l,defaults:r(r({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,i);return o&&(t[e]=o),o}ri.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},ri.prototype.baseIconClass="fc-icon",ri.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"},ri.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},ri.prototype.iconOverrideOption="buttonIcons",ri.prototype.iconOverrideCustomButtonOption="icon",ri.prototype.iconOverridePrefix="fc-icon-";var oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.handleRootEl=function(e){qr(t.rootElRef,e),t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Lr(ui,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Lr(ai,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,i){return t.children(r,di(t.classNames,n),e,i)}))}))},t}(Br),si=Pr(0);function ai(e){return Lr(si.Consumer,null,(function(t){return Lr(li,r({renderId:t},e))}))}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Nr(),t}return n(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.renderInnerContent=function(){var e=this.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=hi(t.content,t.hookProps),i=null;if(void 0===r&&(r=hi(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){n=this.customContentInfo={contentKey:o,contentVal:r[o],handler:e[o]()};break}i=n?[]:r}return i},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(Br),ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t}(Br);function ci(){var e,t,n=[];return function(r,i){return t&&je(t,i)&&r===e||(e=r,t=i,n=di(r,i)),n}}function di(e,t){return"function"==typeof e&&(e=e(t)),Pt(e)}function hi(e,t){return"function"==typeof e?e(t,Lr):e}var pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},i=this.normalizeClassNames(n.viewClassNames,r);return Lr(ui,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(i))}))},t}(Br);function fi(e){return Re(e,mi)}function mi(e){var t,n="function"==typeof e?{component:e}:e,i=n.component;return n.content&&(t=n,i=function(e){return Lr(Yr.Consumer,null,(function(n){return Lr(pi,{viewSpec:n.viewSpec},(function(i,o){var s=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Lr(oi,{hookProps:s,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:i},(function(e,t,n,r){return Lr("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:i,rawOptions:n}}function gi(e,t,n,i){var o=fi(e),s=fi(t.views);return Re(function(e,t){var n,r={};for(n in e)ii(n,r,e,t);for(n in t)ii(n,r,e,t);return r}(o,s),(function(e){return function(e,t,n,i,o){var s=e.overrides.duration||e.defaults.duration||i.duration||n.duration,a=null,l="",u="",c={};if(s&&(a=function(e){var t=JSON.stringify(e),n=vi[t];return void 0===n&&(n=$e(e),vi[t]=n),n}(s))){var d=et(a);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var h=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[u]?n[u]:void 0};return{type:e.type,component:e.component,duration:a,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:h(i)||h(n)||e.overrides.buttonText,buttonTextDefault:h(o)||e.defaults.buttonText||h(xt)||e.type}}(e,s,t,n,i)}))}var vi={},yi=function(){function e(e){this.props=e,this.nowDate=Fn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,i,o,s,a,l,u,c,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(c=r).start&&u<c.start?c.start:null!=c.end&&u>=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tn(a,i.range)),a=tn(a=this.adjustActiveRange(a),r),l=rn(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=et(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return $e({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xe(i)<0&&(s=xe(s),s=n.add(s,i)),Xe(o)>1&&(a=me(a=xe(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Je(c)<Je(n)?et(c).unit:r}function d(){i=l.startOf(e,u),o=l.add(i,n),s={start:i,end:o}}return Xe(n)<=1&&this.isHiddenDay(i)&&(i=xe(i=this.skipHiddenDays(i,t))),d(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),d()),s},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.props,o=i.dateEnv,s=i.dateAlignment,a=0,l=e;s&&(l=o.startOf(l,s)),l=xe(l),r=l=this.skipHiddenDays(l,t);do{r=me(r,1),this.isHiddenDay(r)||a++}while(a<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,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},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t;return this.props.dateIncrement||((t=this.props.dateAlignment)?$e(1,t):e||$e({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,i=null,o=null,n.start&&(i=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),i||o?i&&o&&o<i?null:{start:i,end:o}:null);return t&&(t=Zt(t)),t}var n,r,i,o;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=me(e,t);return e},e}();function _i(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function bi(e,t,n,i){for(var o={},s=0,a=t;s<a.length;s++){var l=a[s];o[l.sourceId]=l}return n&&(o=wi(o,n,i)),r(r({},e),o)}function wi(e,t,n){return xi(e,Ne(e,(function(e){return function(e,t,n){return Ti(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,n)}function xi(e,t,n,r){var i={};for(var o in e){var s=e[o];t[o]?i[o]=Si(s,n,r):i[o]=s}return i}function Si(e,t,n){var i=n.options,o=n.calendarApi,s=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=J();return s.fetch({eventSource:e,range:t,context:n},(function(r){var s=r.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,r.xhr)||s),e.success&&(s=e.success.call(o,s,r.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(r){console.warn(r.message,r),i.eventSourceFailure&&i.eventSourceFailure.call(o,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:a})}function ki(e,t){return Ne(e,(function(e){return Ti(e,t)}))}function Ti(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ei(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Di(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Ci(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Mi(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ai(e,t,n,r,i){var o=[];return{headerToolbar:e.headerToolbar?Ii(e.headerToolbar,e,t,n,r,i,o):null,footerToolbar:e.footerToolbar?Ii(e.footerToolbar,e,t,n,r,i,o):null,viewsWithButtons:o}}function Ii(e,t,n,r,i,o,s){return Re(e,(function(e){return function(e,t,n,r,i,o,s){var a="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,h=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(h=r.getCustomButtonIconClass(t))||(h=r.getIconClass(e,a))||(p=t.text)):(n=i[e])?(s.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(h=r.getIconClass(e,a))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=u[e])||(h=r.getIconClass(e,a))||(p=c[e])),{buttonName:e,buttonClick:d,buttonIcon:h,buttonText:p}}))}))}(e,t,n,r,i,o,s)}))}function Li(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Oi(t)}(t,n):o=Oi(n);var s=new XMLHttpRequest;s.open(e,t,!0),"GET"!==e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){if(s.status>=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function Oi(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ni(e,t){for(var n=Fe(t.getCurrentData().eventSources),r=[],i=0,o=e;i<o.length;i++){for(var s=o[i],a=!1,l=0;l<n.length;l++)if(n[l]._raw===s){n.splice(l,1),a=!0;break}a||r.push(s)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var h=0,p=r;h<p.length;h++){var f=p[h];t.calendarApi.addEventSource(f)}}var Ri=[ni({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),ni({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;kr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),ni({eventSourceRefiners:{method:String,extraParams:At,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:function(e){return e.url?{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch:function(e,t,n){var i=e.eventSource.meta,o=function(e,t,n){var i,o,s,a,l=n.dateEnv,u=n.options,c={};return null==(i=e.startParam)&&(i=u.startParam),null==(o=e.endParam)&&(o=u.endParam),null==(s=e.timeZoneParam)&&(s=u.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},r(c,a),c[i]=l.formatIso(t.start),c[o]=l.formatIso(t.end),"local"!==l.timeZone&&(c[s]=l.timeZone),c}(i,e.range,e.context);Li(i.method,i.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),ni({recurringTypes:[{parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={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},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(i=e.endTime,o=e.startTime,r={years:i.years-o.years,months:i.months-o.months,days:i.days-o.days,milliseconds:i.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var i,o;return null},expand:function(e,t,n){var r=tn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){for(var i=e?Pe(e):null,o=xe(n.start),s=n.end,a=[];o<s;){var l=void 0;i&&!i[o.getUTCDay()]||(l=t?r.add(o,t):o,a.push(l)),o=me(o,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:At,startTime:$e,endTime:$e,duration:$e,startRecur:At,endRecur:At}}),ni({optionChangeHandlers:{events:function(e,t){Ni([e],t)},eventSources:Ni}}),ni({contentTypeHandlers:{html:function(){return Pi},domNodes:function(){return Fi}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",r(r({},Tn(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Hn(e,t))}}})];function Pi(e,t){e.innerHTML=t}function Fi(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!it(n,r)){for(var i=0,o=r;i<o.length;i++){var s=o[i];e.appendChild(s)}n.forEach(Y)}}var ji=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;e in n&&((t||--n[e]<=0)&&delete n[e],this.tryDrain())},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),Yi=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new ji(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function Vi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,bt(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=we(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})}var Hi=function(){function e(e){var t=this;this.computeOptionsData=ot(this._computeOptionsData),this.computeCurrentViewData=ot(this._computeCurrentViewData),this.organizeRawLocales=ot(Zn),this.buildLocale=ot(Xn),this.buildPluginHooks=function(){var e,t=[],n=[];return function(i,o){return e&&it(i,t)&&it(o,n)||(e=function(e,t){var n={},i={reducers:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,s=e;t<s.length;t++){var a=s[t];n[a.id]||(n[a.id]=!0,o(a.deps),u=a,i={reducers:(l=i).reducers.concat(u.reducers),contextInit:l.contextInit.concat(u.contextInit),eventRefiners:r(r({},l.eventRefiners),u.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(u.dateSpanTransforms),views:r(r({},l.views),u.views),viewPropsTransformers:l.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(u.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(u.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(u.calendarInteractions),componentInteractions:l.componentInteractions.concat(u.componentInteractions),themeClasses:r(r({},l.themeClasses),u.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||u.initialView,elementDraggingImpl:l.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),u.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),u.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),u.propSetHandlers)})}var l,u}return e&&o(e),o(t),i}(i,o)),t=i,n=o,e}}(),this.buildDateEnv=ot(Bi),this.buildTheme=ot(Ui),this.parseToolbars=ot(Ai),this.buildViewSpecs=ot(gi),this.buildDateProfileGenerator=st(zi),this.buildViewApi=ot(qi),this.buildViewUiProps=st(Gi),this.buildEventUiBySource=ot(Wi,je),this.buildEventUiBases=ot($i),this.parseContextBusinessHours=st(Ki),this.buildTitle=ot(Vi),this.emitter=new Tr,this.actionRunner=new Yi(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},i=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=i.calendarOptions.initialView||i.pluginHooks.initialView,s=this.computeCurrentViewData(o,i,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);var a,l,u,c=(a=i.calendarOptions,l=i.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Fn(a.now,l)),d=s.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p=0,f=i.pluginHooks.contextInit;p<f.length;p++)(0,f[p])(h);for(var m=function(e,t,n){var r=t?t.activeRange:null;return bi({},function(e,t){var n=Pn(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var o=0,s=r;o<s.length;o++){var a=Rn(s[o],t,n);a&&i.push(a)}return i}(e,n),r,n)}(i.calendarOptions,d,h),g={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(h),eventSources:m,eventUiBases:{},loadingLevel:_i(m),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(h).selectionConfig},v=r(r({},h),g),y=0,_=i.pluginHooks.reducers;y<_.length;y++){var b=_[y];r(g,b(null,null,v))}g.loadingLevel&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?r(r({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,i=this.emitter,o=function(e,t){var n;return"SET_OPTION"===t.type?r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),a=function(e,t){return"CHANGE_VIEW_TYPE"===t.type?t.viewType:e}(n.currentViewType,e),l=this.computeCurrentViewData(a,s,t.optionOverrides,o);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(l.options);var u={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},c=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=function(e,t,n,r){var i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!sn(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;case"PREV":if((i=r.buildPrev(e,n)).isValid)return i;break;case"NEXT":if((i=r.buildNext(e,n)).isValid)return i}return e}(d,e,c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var h=function(e,t,n,i){var o,s,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return bi(e,t.sources,a,i);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,Ne(o,(function(e){return e.sourceId!==s}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?wi(e,a,i):e;case"FETCH_EVENT_SOURCES":return xi(e,t.sourceIds?Pe(t.sourceIds):ki(e,i),a,i);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,i){var o,s=e[t];return s&&n===s.latestFetchId?r(r({},e),((o={})[t]=r(r({},s),{isFetching:!1,fetchRange:i}),o)):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}(n.eventSources,e,d,u),p=_i(h),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=It(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wr(e,i)),r&&(e=Wr(e,r)),e}(i,t,o),t,o);return r&&(s=Ue(s,r,o)),Nt($r(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=Ue(t,n,r)),Nt(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Nt(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ue(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $r(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Rt(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,h,d,u),m=p&&!l.options.progressiveEventRendering&&n.renderableEventStore||f,g=this.buildViewUiProps(u),v=g.eventUiSingleBase,y=g.selectionConfig,_=this.buildEventUiBySource(h),b=this.buildEventUiBases(m.defs,v,_),w=n.loadingLevel||0,x=p,S={dynamicOptionOverrides:o,currentViewType:a,currentDate:c,dateProfile:d,eventSources:h,eventStore:f,renderableEventStore:m,selectionConfig:y,eventUiBases:b,loadingLevel:x,businessHours:this.parseContextBusinessHours(u),dateSelection:Ei(n.dateSelection,e),eventSelection:Di(n.eventSelection,e),eventDrag:Ci(n.eventDrag,e),eventResize:Mi(n.eventResize,e)},k=r(r({},u),S),T=0,E=s.pluginHooks.reducers;T<E.length;T++){var D=E[T];r(S,D(n,e,k))}!w&&x?i.trigger("loading",!0):w&&!x&&i.trigger("loading",!1),this.state=S,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,i,o,s,a,l,u,c=this.props,d=this.state,h=this.data,p=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),f=this.computeCurrentViewData(d.currentViewType,p,c.optionOverrides,d.dynamicOptionOverrides),m=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,f.options,p.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p),f),d),g=p.pluginHooks.optionChangeHandlers,v=h&&h.calendarOptions,y=p.calendarOptions;if(v&&v!==y)for(var _ in v.timeZone!==y.timeZone&&(d.eventSources=m.eventSources=(s=m.eventSources,l=m,u=(a=d.dateProfile)?a.activeRange:null,xi(s,ki(s,l),u,l)),d.eventStore=m.eventStore=(e=m.eventStore,t=h.dateEnv,n=m.dateEnv,i=e.defs,o=Re(e.instances,(function(e){var o=i[e.defId];return o.allDay||o.recurringDef?e:r(r({},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})})),{defs:i,instances:o})),g)v[_]!==y[_]&&g[_](y[_],m);c.onData&&c.onData(m)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),i=r.refinedOptions,o=r.pluginHooks,s=r.localeDefaults,a=r.availableLocaleData;Zi(r.extra);var l=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,a,i.defaultRangeSeparator),u=this.buildViewSpecs(o.views,e,t,s),c=this.buildTheme(i,o);return{calendarOptions:i,pluginHooks:o,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(i,e,c,u,n),localeDefaults:s,availableRawLocales:a.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Ct([xt,e,t]),i=n.locales,o=n.locale,s=this.organizeRawLocales(i),a=s.map,l=this.buildLocale(o||s.defaultCode,a).options,u=this.buildPluginHooks(e.plugins||[],Ri),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},wt),St),kt),u.listenerRefiners),u.optionRefiners),d={},h=Ct([xt,l,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,g=!1;for(var v in h)"plugins"!==v&&(h[v]===f[v]||Tt[v]&&v in f&&Tt[v](f[v],h[v])?p[v]=m[v]:c[v]?(p[v]=c[v](h[v]),g=!0):d[v]=f[v]);return g&&(this.currentCalendarOptionsInput=h,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:s,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var i=t.viewSpecs[e];if(!i)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var o=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r),s=o.refinedOptions;return Zi(o.extra),{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,monthMode:s.monthMode,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,i,o){var s=Ct([xt,e.optionDefaults,n,i,e.optionOverrides,o]),a=r(r(r(r(r(r({},wt),St),kt),Dt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,h={};for(var p in s)s[p]===u[p]?l[p]=c[p]:(s[p]===this.currentCalendarOptionsInput[p]?p in this.currentCalendarOptionsRefined&&(l[p]=this.currentCalendarOptionsRefined[p]):a[p]?l[p]=a[p](s[p]):h[p]=s[p],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}},e}();function Bi(e,t,n,r,i,o,s,a){var l=Xn(t||s.defaultCode,s.map);return new $n({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function Ui(e,t){return new(t.themeClasses[e.themeSystem]||ri)(e)}function zi(e){return new(e.dateProfileGeneratorClass||yi)(e)}function qi(e,t,n){return new On(e,t,n)}function Wi(e){return Re(e,(function(e){return e.ui}))}function $i(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function Gi(e){var t=e.options;return{eventUiSingleBase:jt({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:jt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ki(e){return nr(e.options.businessHours,e)}function Zi(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Xi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new Hi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return n(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ir),Ji=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Qi(e){var t;return(t={})[e.component.uid]=e,t}var eo={},to=function(){function e(e,t){this.emitter=new Tr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),no={},ro={startTime:$e,duration:$e,create:Boolean,sourceId:String};function io(e){var t=Mt(e,ro),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Lr("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Lr(so,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Br),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Lr.apply(void 0,i(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,o=[],s=!0,a=0,l=e;a<l.length;a++){var u=l[a],c=u.buttonName,d=u.buttonClick,h=u.buttonText,p=u.buttonIcon;if("title"===c)s=!1,o.push(Lr("h2",{className:"fc-toolbar-title"},t.title));else{var f=p?{"aria-label":c}:{},m=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&m.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;o.push(Lr("button",r({disabled:g,className:m.join(" "),onClick:d,type:"button"},f),h||(p?Lr("span",{className:p}):"")))}}if(o.length>1){var v=s&&n.getClass("buttonGroup")||"";return Lr.apply(void 0,i(["div",{className:v}],o))}return o[0]},t}(Br),ao=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,qr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Lr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Br),lo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=cn(t);if(o&&r.isValidSegDownEl(e.target)){var s=V(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Yn(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=G(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(Ji),uo=function(e){function t(t){var n,r,i,o,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){cn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,".fc-event",r=s.handleSegEnter,i=s.handleSegLeave,G(n,"mouseover",".fc-event",(function(e,t){if(t!==o){o=t,r(e,t);var n=function(e){o=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=cn(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yn(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ji),co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ot(Vr),t.buildViewPropTransformers=ot(po),t.buildToolbarProps=ot(ho),t.handleNavLinkClick=$("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Nr(),t.footerRef=Nr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,n),i=[lo,uo].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,eo[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++)r[n].destroy();delete t.interactionsStore[e.uid],delete eo[e.uid]},t.resizeRunner=new ji((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return n(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,i=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fn(t.options.now,t.dateEnv),t.viewTitle),s=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=i.height?s=!0:null!=i.contentHeight?a=i.contentHeight:e=Math.max(i.aspectRatio,.5);var l=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);return Lr(Yr.Provider,{value:l},n.headerToolbar&&Lr(oo,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},o)),Lr(ao,{liquid:s,height:a,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Lr(oo,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++)t[e].destroy();this.props.emitter.trigger("_unmount")},t.prototype._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,i=n.options,o=n.calendarApi,s=t.getAttribute("data-navlink");s=s?JSON.parse(s):{};var a=r.createMarker(s.date),l=s.type,u="day"===l?i.navLinkDayClick:"week"===l?i.navLinkWeekClick:null;"function"==typeof u?u.call(o,r.toDate(a),e):("string"==typeof u&&(l=u),o.zoomTo(a,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Lr.apply(void 0,i([Rr,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,i={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},o=0,s=this.buildViewPropTransformers(t.viewPropsTransformers);o<s.length;o++){var a=s[o];r(i,a.transform(i,e))}var l=n.component;return Lr(l,r({},i))},t}(Hr);function ho(e,t,n,r,i,o){var s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:s.isValid&&!sn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function po(e){return e.map((function(e){return new e}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return lr()||o.push("fc-liquid-hack"),e.children(o,i,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(Br);function mo(e,t){return bt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var go="fc-col-header-cell",vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,i=e.theme,o=e.viewApi,s=this.props,a=s.date,l=s.dateProfile,u=hr(a,s.todayRange,null,l),c=[go].concat(pr(u,i)),d=t.format(a,s.dayHeaderFormat),h=n.navLinks&&!u.isDisabled&&s.colCnt>1?{"data-navlink":fr(a),tabIndex:0}:{},p=r(r(r({date:t.toDate(a),view:o},s.extraHookProps),{text:d}),u);return Lr(oi,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:_o,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,i){return Lr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(a),colSpan:s.colSpan},s.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Lr("a",r({ref:n,className:["fc-col-header-cell-cushion",s.isSticky?"fc-sticky":""].join(" ")},h),i)))}))},t}(Br),yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,i=t.theme,o=t.viewApi,s=t.options,a=me(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[go].concat(pr(l,i),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=r(r(r(r({date:a},l),{view:o}),e.extraHookProps),{text:c});return Lr(oi,{hookProps:d,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:_o,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(t,n,i,o){return Lr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},Lr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Br);function _o(e){return e.text}var bo=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Fn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=ge(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,$e(1,e.unit)),o=i.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:wo(r)},nextState:{nowDate:i,todayRange:wo(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Yr,t}(Ir);function wo(e){var t=xe(e);return{start:t,end:me(t,1)}}var xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ot(So),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Lr(bo,{unit:"day"},(function(e,t){return Lr("tr",null,o&&o(),n.map((function(e){return i?Lr(vo,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Lr(yo,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Br);function So(e,t,n){return e||mo(t,n)}var ko=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s++,i.push(s),o.push(n)),n=me(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(me(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(ye(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),To=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var i=n.firstIndex,o=n.lastIndex,s=i;s<=o;){var a=Math.floor(s/t),l=Math.min((a+1)*t,o+1);r.push({row:a,firstCol:s%t,lastCol:(l-1)%t,isStart:n.isStart&&s===i,isEnd:n.isEnd&&l-1===o}),s=l}return r},e}(),Eo=function(){function e(){this.sliceBusinessHours=ot(this._sliceBusinessHours),this.sliceDateSelection=ot(this._sliceDateSpan),this.sliceEventStore=ot(this._sliceEventStore),this.sliceEventDrag=ot(this._sliceInteraction),this.sliceEventResize=ot(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var a=e.eventUiBases,l=this.sliceEventStore.apply(this,i([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,i([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,i([e.businessHours,t,n,r],o)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,i([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,i([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,i([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];return e?this._sliceEventStore.apply(this,i([Ue(e,Do(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(e){var s=an(e,t,Do(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(!e)return null;var s=an(e.mutatedEvents,t,Do(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var s=function(e,t,n){var r=Wt({editable:!1},n),i=Gt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:hn(i,t),instance:Ie(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e,t,n),a=this.sliceRange.apply(this,i([e.range],r)),l=0,u=a;l<u.length;l++){u[l].eventRange=s}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.sliceEventRange(o,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:me(n.start,1)});for(var r=this.sliceRange.apply(this,i([n],t)),o=0,s=r;o<s.length;o++){var a=s[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Do(e,t){var n=e.activeRange;return t?n:{start:ge(n.start,e.slotMinTime.milliseconds),end:ge(n.end,e.slotMaxTime.milliseconds-864e5)}}var Co=/^(visible|hidden)$/,Mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),Lr("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)},t.prototype.needsXScrolling=function(){if(Co.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().width>t)return!0;return!1},t.prototype.needsYScrolling=function(){if(Co.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().height>t)return!0;return!1},t.prototype.getXScrollbarWidth=function(){return Co.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Co.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Br),Ao=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):0==--i[n]&&(delete o[n],delete t.callbackMap[n],s=!0),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Be(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Fe(this.currentMap)},e}();function Io(e){for(var t=0,n=0,r=B(e,".fc-scrollgrid-shrink");n<r.length;n++){var i=r[n];t=Math.max(t,he(i))}return Math.ceil(t)}function Lo(e,t){return e.liquid&&t.liquid}function Oo(e,t){return null!=t.maxHeight||Lo(e,t)}function No(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Lr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Lr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Ro(e,t){return it(e,t,je)}function Po(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var s=o[r],a=s.span||1,l=0;l<a;l++)n.push(Lr("col",{style:{width:"shrink"===s.width?Fo(t):s.width||"",minWidth:s.minWidth||""}}));return Lr.apply(void 0,i(["colgroup",{}],n))}function Fo(e){return null==e?4:e}function jo(e){for(var t=0,n=e;t<n.length;t++)if("shrink"===n[t].width)return!0;return!1}function Yo(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Vo(e,t){var 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 Ho(e){return Lr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Bo(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Uo(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=ot((function(e){return e}),Ro),t.renderMicroColGroup=ot(Po),t.scrollerRefs=new Ao,t.scrollerElRefs=new Ao(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(r({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return n(t,e),t.prototype.render=function(){for(var e,t=this.props,n=this.state,r=this.context,o=t.sections||[],s=this.processCols(t.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),l=Yo(t.liquid,r),u=o.length,c=0,d=[],h=[],p=[];c<u&&"header"===(e=o[c]).type;)d.push(this.renderSection(e,c,a)),c++;for(;c<u&&"body"===(e=o[c]).type;)h.push(this.renderSection(e,c,a)),c++;for(;c<u&&"footer"===(e=o[c]).type;)p.push(this.renderSection(e,c,a)),c++;var f=!lr();return Lr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!f&&d.length)&&Lr.apply(void 0,i(["thead",{}],d)),Boolean(!f&&h.length)&&Lr.apply(void 0,i(["tbody",{}],h)),Boolean(!f&&p.length)&&Lr.apply(void 0,i(["tfoot",{}],p)),f&&Lr.apply(void 0,i(["tbody",{}],d,h,p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Lr(Rr,{key:e.key},e.outerContent):Lr("tr",{key:e.key,className:Vo(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,n,e.chunk))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in r)return r.outerContent;var i=this.props,o=this.state,s=o.forceYScrollbars,a=o.scrollerClientWidths,l=o.scrollerClientHeights,u=Oo(i,e),c=Lo(i,e),d=i.liquid?s?"scroll":u?"auto":"hidden":"visible",h=No(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==a[t]?a[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Lr("td",{ref:r.elRef},Lr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Lr(Mo,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);qr(this.props.sections[n].chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return jo(this.props.cols)?Io(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=yr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,i=!1,o={},s={},a=0;a<t;a++){var l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(a=0;a<t;a++){var u=r.currentMap[a];if(u){var c=u.parentNode;o[a]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),s[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}},t}(Br);zo.addStateEquality({scrollerClientWidths:je,scrollerClientHeights:je});var qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,i=r.eventRange,o=i.ui,s={event:new Yn(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&mn(r,t),isStartResizable:!e.disableResizing&&gn(r,t),isEndResizable:!e.disableResizing&&vn(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)},a=bn(s).concat(o.classNames);return Lr(oi,{hookProps:s,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,i){return e.children(t,a.concat(n),r,i,s)}))},t.prototype.componentDidMount=function(){un(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&un(this.elRef.current,t)},t}(Br),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,i=t.options.eventTimeFormat||e.defaultTimeFormat,o=yn(n,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Lr(qo,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$o,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,i,o,s,a){return Lr("a",r({className:e.extraClassNames.concat(i).join(" "),style:{borderColor:a.borderColor,backgroundColor:a.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Lr("div",{className:"fc-event-main",ref:o,style:{color:a.textColor}},s),a.isStartResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-start"}),a.isEndResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Br);function $o(e){return Lr("div",{className:"fc-event-main-frame"},e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title-container"},Lr("div",{className:"fc-event-title fc-sticky"},e.event.title||Lr(Rr,null,"\xa0"))))}var Go=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Lr(oi,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ko=bt({day:"numeric"}),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=st(Jo),t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),i=pr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":tt(e.date)};return Lr(ui,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,i,o,r.isDisabled)}))},t}(Br),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Jo({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Lr(ai,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Br);function Jo(e){var t=e.date,n=e.dateEnv,i=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},i),{dayNumberText:e.showDayNumber?n.format(t,Ko):""}),e.extraProps)}function Qo(e){return Lr("div",{className:"fc-"+e})}var es=function(e){return Lr(qo,{defaultContent:ts,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,i){return Lr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:i.backgroundColor}},r)}))};function ts(e){return e.event.title&&Lr("div",{className:"fc-event-title"},e.event.title)}var ns=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,i=e.date,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),a=n.format(i,o);return Lr(oi,{hookProps:{num:s,text:a,date:i},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:rs,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function rs(e){return e.text}var is=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i.isRendering=!1,i.isRendered=!1,i.currentClassNames=[],i.customContentRenderId=0,i.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":i.renderRunner.tryDrain()}},i.handleData=function(e){i.currentData=e,i.renderRunner.request(e.calendarOptions.rerenderDelay)},i.handleRenderRequest=function(){if(i.isRendering){i.isRendered=!0;var e=i.currentData;Or(Lr(fo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,s){return i.setClassNames(t),i.setHeight(n),Lr(si.Provider,{value:i.customContentRenderId},Lr(co,r({isHeightAuto:o,forPrint:s},e)))})),i.el)}else i.isRendered&&(i.isRendered=!1,Or(null,i.el),i.setClassNames([]),i.setHeight(""));Fr()},i.el=t,i.renderRunner=new ji(i.handleRenderRequest),new Hi({optionOverrides:n,calendarApi:i,onAction:i.handleAction,onData:i.handleData}),i}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId++:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){e.prototype.updateSize.call(this),Fr()},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!it(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var i=r[n];t.remove(i)}for(var o=0,s=e;o<s.length;o++)i=s[o],t.add(i);this.currentClassNames=e}},t.prototype.setHeight=function(e){q(this.el,"height",e)},t}(jn);no.touchMouseIgnoreWait=500;var os=0,ss=0,as=!1,ls=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,os++,setTimeout((function(){os--}),no.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Tr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ss++||window.addEventListener("touchmove",us,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ss||window.removeEventListener("touchmove",us,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!V(n,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))},e.prototype.cleanup=function(){as=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?V(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return os||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(as=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function us(e){as&&e.preventDefault()}var cs=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",z(n,{left:r.left,top:r.top}),Z(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Y(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&z(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),z(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ds=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return n(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(Dr),hs=function(e){function t(t,n){return e.call(this,new Cr(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return wr(this.scrollController.el)},t}(ds),ps=function(e){function t(t){return e.call(this,new Mr,t)||this}return n(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ds),fs="function"==typeof performance?performance.now:Date.now,ms=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=fs();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(fs()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy();this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,i=r-e.distance,o=i*i/(r*r)*this.maxVelocity*t,s=1;switch(e.name){case"left":s=-1;case"right":n.setScrollLeft(n.getScrollLeft()+o*s);break;case"top":s=-1;case"bottom":n.setScrollTop(n.getScrollTop()+o*s)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i],a=s.clientRect,l=e-a.left,u=a.right-e,c=t-a.top,d=a.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new ps(!1):new hs(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t<n.length;t++){var r=n[t];"object"==typeof r?e.push(r):e.push.apply(e,Array.prototype.slice.call(document.querySelectorAll(r)))}return e},e}(),gs=function(e){function t(t,n){var r=e.call(this,t)||this;r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,te(document.body),re(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,i=e.deltaY;n*n+i*i>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,ne(document.body),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new ls(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new cs,r.autoScroller=new ms,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(to),vs=function(){function e(e){this.origRect=xr(e),this.scrollCaches=Sr(e).map((function(e){return new hs(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy()},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n,r={left:e,top:t},i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i];if(void 0,"HTML"!==(n=s.getEventTarget().tagName)&&"BODY"!==n&&!rr(r,s.clientRect))return!1}return!0},e}(),ys=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Tr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;i!==document&&(r=or(r,t=xr(i)));var o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&t){var s=ir(t,o.rect);s&&(r=sr(s))}this.coordAdjust=ar(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&_s(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Re(this.droppableStore,(function(e){return e.component.prepareHits(),new vs(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,i=null;for(var o in n){var s=n[o].component,a=r[o];if(a&&a.isWithinClipping(e,t)){var l=a.computeLeft(),u=a.computeTop(),c=e-l,d=t-u,h=a.origRect,p=h.right-h.left,f=h.bottom-h.top;if(c>=0&&c<p&&d>=0&&d<f){var m=s.queryHit(c,d,p,f),g=s.context.getCurrentData().dateProfile;m&&on(g.activeRange,m.dateSpan.range)&&(!i||m.layer>i.layer)&&(m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function _s(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&kn(e.dateSpan,t.dateSpan)}function bs(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.datePointTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,{date:(i=t.dateEnv).toDate(n.range.start),dateStr:i.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}var ws=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var i=n.hitDragging,o=i.initialHit,s=i.finalHit;if(o&&s&&_s(o,s)){var a=t.context,l=r(r({},bs(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",l)}}},n.dragging=new gs(t.el),n.dragging.autoScroller.isEnabled=!1;var i=n.hitDragging=new ys(n.dragging,Qi(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),xs=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(ce);for(var a={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(a,c)}return a.range={start:s[0],end:s[3]},a.allDay=i.allDay,a}(n.hitDragging.initialHit,e,i.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(o)||(s=!0,o=null)),o?i.dispatch({type:"SELECT_DATES",selection:o}):t||i.dispatch({type:"UNSELECT_DATES"}),s?Q():ee(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(Dn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var i=t.component.context.options,o=n.dragging=new gs(t.el);o.touchScrollAllowed=!1,o.minDistance=i.selectMinDistance||0,o.autoScroller.isEnabled=i.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),Ss=function(e){function t(n){var i=e.call(this,n)||this;i.subjectEl=null,i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingContext=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(e){var t=e.origEvent.target,n=i,r=n.component,o=n.dragging,s=o.mirror,a=r.context.options,l=r.context;i.subjectEl=e.subjectEl;var u=i.subjectSeg=cn(e.subjectEl),c=(i.eventRange=u.eventRange).instance.instanceId;i.relevantEvents=Ot(l.getCurrentData().eventStore,c),o.minDistance=e.isTouch?0:a.eventDragMinDistance,o.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null,s.parentNode=V(t,".fc"),s.revertDuration=a.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");o.setIgnoreMove(!d),i.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},i.handleDragStart=function(e){var t=i.component.context,n=i.eventRange,r=n.instance.instanceId;e.isTouch?r!==i.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:i.subjectEl,event:new Yn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},i.handleHitUpdate=function(e,t){if(i.isDragging){var n=i.relevantEvents,r=i.hitDragging.initialHit,o=i.component.context,s=null,a=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,h=(s=d.context).options;o===s||h.editable&&h.droppable?(a=function(e,t,n){var r=e.dateSpan,i=t.dateSpan,o=r.range.start,s=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=t.component.context.options.allDayMaintainDuration,i.allDay&&(o=xe(o)));var l=Jt(o,s,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(a.allDay=!1);for(var u={datesDelta:l,standardProps:a},c=0,d=n;c<d.length;c++)(0,d[c])(u,e,t);return u}(r,e,s.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=An(n,s.getCurrentData().eventUiBases,a,s),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,a=null,l=null,c.mutatedEvents={defs:{},instances:{}})):s=null}i.displayDrag(s,c),u?Q():ee(),t||(o===s&&_s(r,e)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),i.receivingContext=s,i.validMutation=a,i.mutatedRelevantEvents=l)}},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(e){if(i.isDragging){var t=i.component.context,n=t.viewApi,o=i,s=o.receivingContext,a=o.validMutation,l=i.eventRange.def,u=i.eventRange.instance,c=new Yn(t,l,u),d=i.relevantEvents,h=i.mutatedRelevantEvents,p=i.hitDragging.finalHit;if(i.clearDrag(),t.emitter.trigger("eventDragStop",{el:i.subjectEl,event:c,jsEvent:e.origEvent,view:n}),a){if(s===t){var f=new Yn(t,h.defs[l.defId],u?h.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:h});for(var m={oldEvent:c,event:f,relatedEvents:Hn(h,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},v=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;v<y.length;v++){var _=y[v];r(g,_(a,t))}t.emitter.trigger("eventDrop",r(r(r({},m),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(s){var b={event:c,relatedEvents:Hn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},b),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",b);var w=h.defs[l.defId],x=h.instances[u.instanceId],S=new Yn(s,w,x);s.dispatch({type:"MERGE_EVENTS",eventStore:h});var k={event:S,relatedEvents:Hn(h,s,x),revert:function(){s.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};s.emitter.trigger("eventAdd",k),e.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),s.emitter.trigger("drop",r(r({},bs(p.dateSpan,s)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.component.context.viewApi})),s.emitter.trigger("eventReceive",r(r({},k),{draggedEl:e.subjectEl,view:p.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}i.cleanup()};var o=i.component.context.options,s=i.dragging=new gs(n.el);s.pointer.selector=t.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=o.dragScroll;var a=i.hitDragging=new ys(i.dragging,eo);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Ji),ks=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=cn(n.querySegEl(e)),i=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==i.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Ot(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var i=n.querySegEl(e);n.draggingSegEl=i,n.draggingSeg=cn(i),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:i,event:new Yn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,i){var o=n.component.context,s=n.relevantEvents,a=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,h={affectedEvents:s,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,i,o){for(var s=e.component.context.dateEnv,a=Jt(e.dateSpan.range.start,t.dateSpan.range.start,s,e.component.largeUnit),l={},u=0,c=o;u<c.length;u++){var d=(0,c[u])(e,t);if(!1===d)return null;d&&r(l,d)}if(n){if(s.add(i.start,a)<i.end)return l.startDelta=a,l}else if(s.add(i.end,a)>i.start)return l.endDelta=a,l;return null}(a,e,i.subjectEl.classList.contains("fc-event-resizer-start"),l.range,o.pluginHooks.eventResizeJoinTransforms)),u&&(c=An(s,o.getCurrentData().eventUiBases,u,o),h.mutatedEvents=c,n.component.isInteractionValid(h)||(d=!0,u=null,c=null,h.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:h}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&_s(a,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,i=n.eventRange.def,o=n.eventRange.instance,s=new Yn(t,i,o),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:s,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Yn(t,l.defs[i.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:s,event:u,relatedEvents:Hn(l,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||$e(0),endDelta:n.validMutation.endDelta||$e(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new gs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(Ji),Ts=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!V(r,n),t.matchesEvent=!!V(r,Ss.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ls(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Es={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},Ds=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,i){var o=n.hitDragging.dragging,s=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(s=e.component.context,n.canDropElOnCalendar(i.subjectEl,s)&&(a=function(e,t,n){for(var i=r({},t.leftoverProps),o=0,s=n.pluginHooks.externalDefTransforms;o<s.length;o++){var a=s[o];r(i,a(e,t))}var l=Wt(i,n),u=Gt(l.refined,l.extra,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),c=e.range.start;e.allDay&&t.startTime&&(c=n.dateEnv.add(c,t.startTime));var d=t.duration?n.dateEnv.add(c,t.duration):Mn(e.allDay,c,n);return{def:u,instance:Ie(u.defId,{start:c,end:d})}}(e.dateSpan,n.dragMeta,s),u.mutatedEvents=Lt(a),(l=!Gr(u,s))&&(u.mutatedEvents={defs:{},instances:{}},a=null))),n.displayDrag(s,u),o.setMirrorIsVisible(t||!a||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(o.setMirrorNeedsRevert(!a),n.receivingContext=s,n.droppableEvent=a)},this.handleDragEnd=function(e){var t=n,i=t.receivingContext,o=t.droppableEvent;if(n.clearDrag(),i&&o){var s=n.hitDragging.finalHit,a=s.component.context.viewApi,l=n.dragMeta;if(i.emitter.trigger("drop",r(r({},bs(s.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:a})),l.create){var u=Lt(o);i.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new Yn(i,o.def,o.instance),relatedEvents:[],revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:a})}}n.receivingContext=null,n.droppableEvent=null};var i=this.hitDragging=new ys(e,eo);i.requireInitial=!1,i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta(e)):io((t=function(e,t){var n=no.dataAttrPrefix,r=(n?n+"-":"")+"event";return e.getAttribute("data-"+r)||""}(e))?JSON.parse(t):{create:!1});var t},e.prototype.displayDrag=function(e,t){var n=this.receivingContext;n&&n!==e&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},e.prototype.clearDrag=function(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})},e.prototype.canDropElOnCalendar=function(e,t){var n=t.options.dropAccept;return"function"==typeof n?n.call(t.calendarApi,e):"string"!=typeof n||!n||Boolean(H(e,n))},e}();no.dataAttrPrefix="";var Cs=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,i=r.minDistance,o=r.longPressDelay;t.minDistance=null!=i?i:e.isTouch?0:xt.eventDragMinDistance,t.delay=e.isTouch?null!=o?o:xt.longPressDelay:0},this.handleDragStart=function(e){e.isTouch&&n.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;var r=this.dragging=new gs(e);r.touchScrollAllowed=!1,null!=t.itemSelector&&(r.pointer.selector=t.itemSelector),null!=t.appendTo&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ms=function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new ls(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}},t}(to),As=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ms(n);"string"==typeof t.itemSelector?r.pointer.selector=t.itemSelector:n===document&&(r.pointer.selector="[data-event]"),"string"==typeof t.mirrorSelector&&(r.mirrorSelector=t.mirrorSelector),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Is=ni({componentInteractions:[ws,xs,Ss,ks],calendarInteractions:[Ts],elementDraggingImpl:gs,listenerRefiners:Es}),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Nr(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,i=[],o=Bo(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Lr(pi,{viewSpec:r.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(zo,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var o=this.props,s=this.context,a=!o.forPrint&&Bo(s.options),l=!o.forPrint&&Uo(s.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Ho}]}),Lr(pi,{viewSpec:s.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(i,{liquid:!o.isHeightAuto&&!o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(ti);function Os(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.row].push(s)}return n}function Ns(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.firstCol].push(s)}return n}function Rs(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.row].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}var Ps=bt({week:"narrow"}),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,i=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:i,moreCnt:n.moreCnt,dayEl:t.rootEl,ev:e})}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.viewApi,o=this.props,s=o.date,a=o.dateProfile,l={num:o.moreCnt,text:o.buildMoreLinkText(o.moreCnt),view:i},u=n.navLinks?{"data-navlink":fr(s,"week"),tabIndex:0}:{};return Lr(Zo,{date:s,dateProfile:a,todayRange:o.todayRange,showDayNumber:o.showDayNumber,extraHookProps:o.extraHookProps,elRef:this.handleRootEl},(function(t,i,c,d){return Lr("td",r({ref:t,className:["fc-daygrid-day"].concat(i,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),Lr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:o.innerElRef},o.showWeekNumber&&Lr(ns,{date:s,defaultFormat:Ps},(function(e,t,n,i){return Lr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),i)})),!d&&Lr(Vs,{date:s,dateProfile:a,showDayNumber:o.showDayNumber,forceDayTop:o.forceDayTop,todayRange:o.todayRange,extraHookProps:o.extraHookProps}),Lr("div",{className:"fc-daygrid-day-events",ref:o.fgContentElRef,style:{paddingBottom:o.fgPaddingBottom}},o.fgContent,Boolean(o.moreCnt)&&Lr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:o.moreMarginTop}},Lr(oi,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ys,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,i){return Lr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},i)})))),Lr("div",{className:"fc-daygrid-day-bg"},o.bgContent)))}))},t}(ti);function js(e){return e.dayNumberText}function Ys(e){return e.text}var Vs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":fr(e.date),tabIndex:0}:{};return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:js},(function(n,i){return(i||e.forceDayTop)&&Lr("div",{className:"fc-daygrid-day-top",ref:n},Lr("a",r({className:"fc-daygrid-day-number"},t),i||Lr(Rr,null,"\xa0")))}))},t}(Br),Hs=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Bs(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var Us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Hs,i=yn(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Lr(qo,{seg:e.seg,timeText:i,defaultContent:zs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,i,o){return Lr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(s=e.seg.eventRange.def.url)?{href:s}:{}),o);var s}))},t}(Br);function zs(e){return Lr(Rr,null,Lr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title"},e.event.title||Lr(Rr,null,"\xa0")))}var qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Wo,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Hs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Br);function Ws(e,t,n,i,o,s,a,l){for(var u=[],c=[],d={},h={},p={},f={},m={},g=0;g<a;g++)u.push([]),c.push(0);for(var v=0,y=t=pn(t,l);v<y.length;v++)E(k=y[v],o[k.eventRange.instance.instanceId+":"+k.firstCol]||0);!0===n||!0===i?function(e,t,n,r){Gs(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,s):"number"==typeof n?function(e,t,n,r){Gs(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof i&&function(e,t,n,r){Gs(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,i);for(var _=0;_<a;_++){for(var b=0,w=0,x=0,S=u[_];x<S.length;x++){var k,T=S[x];d[(k=T.seg).eventRange.instance.instanceId]||(h[k.eventRange.instance.instanceId]=T.top,k.firstCol===k.lastCol&&k.isStart&&k.isEnd?(p[k.eventRange.instance.instanceId]=T.top-b,w=0,b=T.bottom):w+=T.bottom-T.top)}w&&(c[_]?f[_]=w:m[_]=w)}function E(e,t){if(!D(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,i=u[n];r<i.length;r++)if(D(e,t,i[r].bottom))return}function D(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var i=0,o=u[r];i<o.length;i++){var s=o[i];if(n<s.bottom&&n+t>s.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var i=u[r],o=0;o<i.length&&n>=i[o].top;)o++;i.splice(o,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var C in o)o[C]||(d[C.split(":")[0]]=!0);return{segsByFirstCol:u.map($s),segsByEachCol:u.map((function(t,n){var i=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.seg)}return t}(t);return function(e,t,n){for(var i={start:t,end:me(t,1)},o=[],s=0,a=e;s<a.length;s++){var l=a[s],u=l.eventRange,c=u.range,d=tn(c,i);d&&o.push(r(r({},l),{firstCol:n,lastCol:n,eventRange:{def:u.def,ui:r(r({},u.ui),{durationEditable:!1}),instance:u.instance,range:d},isStart:l.isStart&&d.start.valueOf()===c.start.valueOf(),isEnd:l.isEnd&&d.end.valueOf()===c.end.valueOf()}))}return o}(i,e[n].date,n)})),segIsHidden:d,segTops:h,segMarginTops:p,moreCnts:c,moreTops:f,paddingBottoms:m}}function $s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];o.seg.firstCol===t&&n.push(o.seg)}return n}function Gs(e,t,n,r,i){for(var o=e.length,s={},a=[],l=0;l<o;l++)a.push([]);for(l=0;l<o;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var h=d[c];i(h,u)?p(h):f(h,u,r),h.top!==h.bottom&&u++}function p(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!s[n]){s[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)a[r].push(e)}}function f(n,r,i){var o=n.seg,s=o.eventRange.instance.instanceId;if(!t[s]){t[s]=!0;for(var l=o.firstCol;l<=o.lastCol;l++){var u=++e[l];if(i&&1===u)for(var c=r-1;a[l].length>c;)f(a[l].pop(),a[l].length,!1)}}}}var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ao,t.frameElRefs=new Ao,t.fgElRefs=new Ao,t.segHarnessRefs=new Ao,t.rootElRef=Nr(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,i=t.cells.length,o=Ns(t.businessHourSegs,i),s=Ns(t.bgEventSegs,i),a=Ns(this.getHighlightSegs(),i),l=Ns(this.getMirrorSegs(),i),u=Ws(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,i,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,h=u.segsByEachCol,p=u.segIsHidden,f=u.segTops,m=u.segMarginTops,g=u.moreCnts,v=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var i=e.renderFgSegs(d[r],p,f,m,y,t.todayRange),u=e.renderFgSegs(l[r],{},f,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Lr(Fs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:g[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:p,moreMarginTop:v[r],segsByEachCol:h[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Lr(Rr,null,Lr(Rr,null,i),Lr(Rr,null,u)),bgContent:Lr(Rr,null,e.renderFillSegs(a[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!je(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,i,o,s,a,l,u){var c=this.context,d=this.props.eventSelection,h=this.state.framePositions,p=1===this.props.cells.length,f=[];if(h)for(var m=0,g=e;m<g.length;m++){var v=g[m],y=v.eventRange.instance.instanceId,_=a||l||u,b=o[y],w=t[y]||b,x=t[y]||_||v.firstCol!==v.lastCol||!v.isStart||!v.isEnd,S=void 0,k=void 0,T=void 0,E=void 0;x?(k=n[y],c.isRtl?(E=0,T=h.lefts[v.lastCol]-h.lefts[v.firstCol]):(T=0,E=h.rights[v.firstCol]-h.rights[v.lastCol])):S=i[y],f.push(Lr("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:y,ref:_?null:this.segHarnessRefs.createRef(y+":"+v.firstCol),style:{visibility:w?"hidden":"",marginTop:S||"",top:k||"",left:T||"",right:E||""}},Bs(v)?Lr(Us,r({seg:v,isDragging:a,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s))):Lr(qs,r({seg:v,isDragging:a,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s)))))}return f},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,o=this.props.todayRange,s=this.state.framePositions,a=[];if(s)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:s.lefts[c.lastCol]-s.lefts[c.firstCol]}:{left:0,right:s.rights[c.firstCol]-s.rights[c.lastCol]};a.push(Lr("div",{key:wn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Lr(es,r({seg:c},_n(c,o))):Qo(t)))}return Lr.apply(void 0,i([Rr,{}],a))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var i=this.rootElRef.current;this.setState({framePositions:new Er(i,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Re(this.segHarnessRefs.currentMap,(function(e){return e.getBoundingClientRect().height}))},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(ti);Ks.addStateEquality({segHeights:je});var Zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new ji(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=t.props.onClose;n&&!t.rootEl.contains(e.target)&&n()},t.handleDocumentScroll=function(){t.repositioner.request(10)},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return n(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Lr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Lr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Lr("span",{className:"fc-popover-title"},t.title),Lr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Lr("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children))},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),document.addEventListener("scroll",this.handleDocumentScroll),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown),document.removeEventListener("scroll",this.handleDocumentScroll)},t.prototype.updateSize=function(){var e=this.props,t=e.alignmentEl,n=e.topAlignmentEl,r=this.rootEl;if(r){var i,o=r.getBoundingClientRect(),s=t.getBoundingClientRect(),a=n?n.getBoundingClientRect().top:s.top;a=Math.min(a,window.innerHeight-o.height-10),a=Math.max(a,10),i=this.context.isRtl?s.right-o.width:s.left,i=Math.min(i,window.innerWidth-o.width-10),z(r,{top:a,left:i=Math.max(i,10)})}},t}(Br),Xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePopoverEl=function(e){t.popoverEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,i=this.props,o=i.date,s=i.hiddenInstances,a=i.todayRange,l=i.dateProfile,u=i.selectedInstanceId,c=n.format(o,t.dayPopoverFormat);return Lr(Zo,{date:o,dateProfile:l,todayRange:a,elRef:this.handlePopoverEl},(function(e,t,n){return Lr(Zs,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:i.onCloseClick,alignmentEl:i.alignmentEl,topAlignmentEl:i.topAlignmentEl},Lr(Xo,{date:o,dateProfile:l,todayRange:a},(function(e,t){return t&&Lr("div",{className:"fc-more-popover-misc",ref:e},t)})),i.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Lr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:s[t]?"hidden":""}},Bs(e)?Lr(Us,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))):Lr(qs,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))))})))}))},t.prototype.queryHit=function(e,t,n,r){var i=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:i,end:me(i,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(ti),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=ot(Os),t.splitBgEventSegs=ot(Os),t.splitFgEventSegs=ot(Os),t.splitDateSelectionSegs=ot(Os),t.splitEventDrag=ot(Rs),t.splitEventResize=ot(Rs),t.buildBuildMoreLinkText=ot(Qs),t.rowRefs=new Ao,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,i=n.dateEnv,o=n.options.moreLinkClick;function s(e){var t=e.eventRange,r=t.def,o=t.instance,s=t.range;return{event:new Yn(n,r,o),start:i.toDate(s.start),end:i.toDate(s.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:e.ev,view:n.viewApi})),o&&"popover"!==o?"string"==typeof o&&n.calendarApi.zoomTo(e.date,o):t.setState({morePopoverState:r(r({},e),{currentFgEventSegs:t.props.fgEventSegs})})},t.handleMorePopoverClose=function(){t.setState({morePopoverState:null})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,i=t.dayMaxEvents,o=t.expandRows,s=this.state.morePopoverState,a=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,a),u=this.splitBgEventSegs(t.bgEventSegs,a),c=this.splitFgEventSegs(t.fgEventSegs,a),d=this.splitDateSelectionSegs(t.dateSelectionSegs,a),h=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=this.buildBuildMoreLinkText(this.context.options.moreLinkText),m=!0===i||!0===r;return m&&!o&&(m=!1,r=null,i=null),Lr("div",{className:["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Lr(bo,{unit:"day"},(function(m,g){return Lr(Rr,null,Lr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Lr("tbody",null,t.cells.map((function(o,s){return Lr(Ks,{ref:e.rowRefs.createRef(s),key:o.length?o[0].date.toISOString():s,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:l[s],eventSelection:t.eventSelection,bgEventSegs:u[s].filter(ea),fgEventSegs:c[s],dateSelectionSegs:d[s],eventDrag:h[s],eventResize:p[s],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:f,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&s&&s.currentFgEventSegs===t.fgEventSegs&&Lr(Xs,{date:s.date,dateProfile:n,segs:s.allSegs,alignmentEl:s.dayEl,topAlignmentEl:1===a?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Er(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Er(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:me(n,1)}},t}(ti);function Qs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ea(e){return e.eventRange.def.allDay}var ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new na,t.tableRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr(Js,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti),na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Eo),ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ot(ia),t.headerRef=Nr(),t.tableRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Lr(xo,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Lr(ta,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(Ls);function ia(e,t){var n=new ko(e.renderRange,t);return new To(n,/year|month|week/.test(e.currentRangeUnit))}var oa=ni({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:ra,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;return/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=fe(i,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=fe(l,6-Math.ceil(ve(a,l)))),{start:a,end:l}},t}(yi)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?ln(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(cr),aa=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(sn(t.currentRange,e)){var n=xe(e),r=e.valueOf()-n.valueOf();if(r>=Je(t.slotMinTime)&&r<Je(t.slotMaxTime))return this.computeTimeTop($e(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=xe(e)),this.computeTimeTop($e(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,i=this.dateProfile,o=this.slatMetas,s=r.els.length,a=o[1].date.valueOf()-o[0].date.valueOf(),l=(e.milliseconds-Je(i.slotMinTime))/a;return l=Math.max(0,l),l=Math.min(s,l),t=Math.floor(l),n=l-(t=Math.min(t,s-1)),r.tops[t]+r.getHeight(t)*n},e}(),la=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.slatElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Lr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Lr(ca,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new aa(new Er(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas))},t}(Br),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,i=e.slatElRefs;return Lr("tbody",null,e.slatMetas.map((function(o,s){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return Lr("tr",{key:o.key,ref:i.createRef(o.key)},e.axis&&Lr(ha,r({},o)),Lr(oi,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Lr("td",{ref:e,className:l.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(Br),da=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function ha(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Lr(Yr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?da:Array.isArray(i.slotLabelFormat)?bt(i.slotLabelFormat[0]):bt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Lr(oi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:pa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Lr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Lr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Lr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}return Lr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function pa(e){return e.text}function fa(e,t,n,r,i){for(var o=new Date(0),s=e,a=$e(0),l=n||function(e){var t,n,r;for(t=la.length-1;t>=0;t--)if(null!==(r=Qe(n=$e(la[t]),e))&&r>1)return n;return e}(r),u=[];Je(s)<Je(t);){var c=i.add(o,s),d=null!==Qe(a,l);u.push({date:c,time:s,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),s=Ke(s,r),a=Ke(a,r)}return u}var ma=bt({week:"short"}),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new sa,t.headerElRef=Nr(),t.rootElRef=Nr(),t.scrollerElRef=Nr(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e){void 0===e&&(e="");var n=t.context.options,i=t.props.dateProfile.renderRange,o=ye(i.start,i.end),s=n.navLinks&&1===o?{"data-navlink":fr(i.start,"week"),tabIndex:0}:{};return n.weekNumbers?Lr(ns,{date:i.start,defaultFormat:ma},(function(t,n,i,o){return Lr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Lr("a",r({ref:i,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},s),o)))})):Lr("th",{className:"fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Lr(oi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Lr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Lr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Bo(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Lr(pi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(zo,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Bo(u.options),h=!c.forPrint&&Uo(u.options),p=[];e&&p.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(p.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),p.push({key:"all-day-divider",type:"body",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var f=u.options.nowIndicator;return p.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Lr("div",{className:"fc-timegrid-axis-chunk"},Lr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Lr("tbody",null,Lr(ya,{slatMetas:o}))),Lr("div",{className:"fc-timegrid-now-indicator-container"},Lr(bo,{unit:f?"minute":"day"},(function(e){var t=f&&s&&s.safeComputeTop(e);return"number"==typeof t?Lr(Go,{isAxis:!0,date:e},(function(e,n,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&p.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ho},{key:"cols",content:Ho}]}),Lr(pi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:p}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(ti);function va(e){return e.text}var ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Lr("tr",{key:e.key},Lr(ha,r({},e)))}))},t}(Br);function _a(e,t){var n,r=[];for(n=0;n<t;n++)r.push([]);if(e)for(n=0;n<e.length;n++)r[e[n].col].push(e[n]);return r}function ba(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.col].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}function wa(e,t,n,r){for(var i=0,o=e;i<o.length;i++){var s=o[i];s.top=n.computeDateTop(s.start,t),s.bottom=Math.max(s.top+(r||0),n.computeDateTop(s.end,t))}}function xa(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)i=e,o=t[r],i.bottom>o.top&&i.top<o.bottom&&n.push(t[r]);var i,o;return n}function Sa(e){var t,n,r=e.forwardSegs,i=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)Sa(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function ka(e,t,n,r){var i,o=e.forwardSegs;if(null==e.forwardCoord)for(o.length?(function(e,t){var n=e.map(Ta),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return se(e,t,r)})),n.map((function(e){return e._seg}))}(o,r),ka(o[0],t+1,n,r),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)ka(o[i],0,e.forwardCoord,r)}function Ta(e){var t=fn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Ea=bt({hour:"numeric",minute:"2-digit",meridiem:!1}),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),Lr(Wo,r({},this.props,{defaultTimeFormat:Ea,extraClassNames:e}))},t}(Br);no.timeGridEventCondensedHeight=30;var Ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.selectMirror,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],o=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr(Zo,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(s,a,l){return Lr("td",r({ref:s,className:["fc-timegrid-col"].concat(a,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,o)),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(i,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Lr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Lr(Ma,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,i){var o=this.props;return o.forPrint?this.renderPrintFgSegs(e):o.slatCoords?this.renderPositionedFgSegs(e,t,n,r,i):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=pn(e,this.context.options.eventOrder)).map((function(e){return Lr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Lr(Da,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},_n(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,i,o){var s=this,a=this.context,l=this.props;return(e=function(e,t,n,r,i){return wa(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++)(c=r[n]).level=null,c.forwardCoord=null,c.backwardCoord=null,c.forwardPressure=null;var i,o=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&xa(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e=pn(e,t));if(function(e){var t,n,r,i,o;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],o=t+1;o<e.length;o++)xa(i,e[o],i.forwardSegs)}(o),i=o[0]){for(var s=0,a=i;s<a.length;s++)Sa(c=a[s]);for(var l=0,u=i;l<u.length;l++){var c;ka(c=u[l],0,0,t)}}return e}(e,i)}(e,l.date,l.slatCoords,a.options.eventMinHeight,a.options.eventOrder)).map((function(e){var a=e.eventRange.instance.instanceId,u=n||i||o?r({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return Lr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:a,style:r({visibility:t[a]?"hidden":""},u)},Lr(Da,r({seg:e,isDragging:n,isResizing:i,isDateSelecting:o,isSelected:a===l.eventSelection,isCondensed:e.bottom-e.top<no.timeGridEventCondensedHeight},_n(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,i=this.context,o=this.props;if(o.slatCoords){wa(e,o.date,o.slatCoords,i.options.eventMinHeight);var s=e.map((function(e){return Lr("div",{key:wn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Lr(es,r({seg:e},_n(e,o.todayRange,o.nowDate))):Qo(t))}));return Lr(Rr,null,s)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Lr(Go,{isAxis:!1,date:r,key:t},(function(t,i,o,s){return Lr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,i=this.context,o=i.isRtl,s=i.options.slotEventOverlap,a=e.backwardCoord,l=e.forwardCoord;s&&(l=Math.min(1,a+2*(l-a))),o?(t=1-l,n=a):(t=a,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return s&&e.forwardPressure&&(u[o?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(Br),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Lr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(Br),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=ot(_a),t.splitBgEventSegs=ot(_a),t.splitBusinessHourSegs=ot(_a),t.splitNowIndicatorSegs=ot(_a),t.splitDateSelectionSegs=ot(_a),t.splitEventDrag=ot(ba),t.splitEventResize=ot(ba),t.rootElRef=Nr(),t.cellElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,i=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitBusinessHourSegs(t.businessHourSegs,r),a=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Lr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Lr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Lr("tbody",null,Lr("tr",null,t.axis&&Lr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Lr(Go,{isAxis:!0,date:t.nowDate},(function(e,t,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},i)}))))),t.cells.map((function(n,r){return Lr(Ca,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:o[r],businessHourSegs:s[r],nowIndicatorSegs:a[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e,t=this.props;t.onColCoords&&null!==t.clientWidth&&t.onColCoords(new Er(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(Br),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=ot(La),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var i=r.computeTimeTop(e.time);(i=Math.ceil(i))&&i++,n(i)}return!0}},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return Lr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Lr(ua,{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}),Lr(Aa,{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}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.positionToHit=function(e,t){var n=this.context,r=n.dateEnv,i=n.options,o=this.colCoords,s=this.props.dateProfile,a=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=o.leftToIndex(e),h=a.positions.topToIndex(t);if(null!=d&&null!=h){var p=a.positions.tops[h],f=a.positions.getHeight(h),m=(t-p)/f,g=h*c+Math.floor(m*c),v=this.props.cells[d].date,y=Ke(s.slotMinTime,Ze(u,g)),_=r.add(v,y);return{col:d,dateSpan:{range:{start:_,end:r.add(_,u)},allDay:!1},dayEl:o.els[d],relativeRect:{left:o.lefts[d],right:o.rights[d],top:p,bottom:p+f}}}},t}(Br);function La(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=ot(Na),t.slicer=new Ra,t.timeColsRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,i=t.dateProfile,o=t.dayTableModel,s=n.options.nowIndicator,a=this.buildDayRanges(o,i,n.dateEnv);return Lr(bo,{unit:s?"minute":"day"},(function(l,u){return Lr(Ia,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,i,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:i,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:s&&e.slicer.sliceNowDate(l,n,a),todayRange:u,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti);function Na(e,t,n){for(var r=[],i=0,o=e.headerDates;i<o.length;i++){var s=o[i];r.push({start:n.add(s,t.slotMinTime),end:n.add(s,t.slotMaxTime)})}return r}var Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=tn(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},t}(Eo),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=ot(Fa),t.buildSlatMetas=ot(fa),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.dateEnv,o=t.dateProfileGenerator,s=this.props,a=s.dateProfile,l=this.buildTimeColsModel(a,o),u=this.allDaySplitter.splitProps(s),c=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,i),d=n.dayMinWidth,h=!d,p=d,f=n.dayHeaders&&Lr(xo,{dates:l.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:h?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return Lr(ta,r({},u.allDay,{dateProfile:a,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:h?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:s.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Lr(Oa,r({},u.timed,{dayTableModel:l,dateProfile:a,axis:h,slotDuration:n.slotDuration,slatMetas:c,forPrint:s.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(f,m,g)},t}(ga);function Fa(e,t){var n=new ko(e.renderRange,t);return new To(n,!1)}var ja=ni({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Pa,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,i=this.context,o=i.theme,s=i.dateEnv,a=i.options,l=i.viewApi,u=hr(t,n),c=a.listDayFormat?s.format(t,a.listDayFormat):"",d=a.listDaySideFormat?s.format(t,a.listDaySideFormat):"",h=a.navLinks?fr(t):null,p=r({date:s.toDate(t),view:l,text:c,sideText:d,navLinkData:h},u),f=["fc-list-day"].concat(pr(u,o));return Lr(oi,{hookProps:p,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Va,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(e,n,r,i){return Lr("tr",{ref:e,className:f.concat(n).join(" "),"data-date":tt(t)},Lr("th",{colSpan:3},Lr("div",{className:"fc-list-day-cushion "+o.getClass("tableCellShaded"),ref:r},i)))}))},t}(Br);function Va(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Lr(Rr,null,e.text&&Lr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Lr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ha=bt({hour:"numeric",minute:"2-digit",meridiem:"short"}),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ha;return Lr(qo,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ua,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,i,o,s,a){return Lr("tr",{className:["fc-list-event",a.event.url?"fc-event-forced-url":""].concat(i).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var i=e.eventRange.def,o=e.eventRange.instance,s=!1,a=void 0;if(i.allDay?s=!0:Xt(e.eventRange.range)?e.isStart?a=yn(e,t,n,null,null,o.range.start,e.end):e.isEnd?a=yn(e,t,n,null,null,e.start,o.range.end):s=!0:a=yn(e,t,n),s){var l={text:n.options.allDayText,view:n.viewApi};return Lr(oi,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:za,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Lr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Lr("td",{className:"fc-list-event-time"},a)}return null}(n,r,t),Lr("td",{className:"fc-list-event-graphic"},Lr("span",{className:"fc-list-event-dot",style:{borderColor:a.borderColor||a.backgroundColor}})),Lr("td",{className:"fc-list-event-title",ref:o},s))}))},t}(Br);function Ua(e){var t=e.event,n=t.url;return Lr("a",r({},n?{href:n}:{}),t.title)}function za(e){return e.text}var qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=ot($a),t.eventStoreToSegs=ot(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],i=this.computeDateVars(t.dateProfile),o=i.dayDates,s=i.dayRanges,a=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return Lr(pi,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,i){return Lr("div",{ref:n,className:r.concat(i).join(" ")},Lr(Mo,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},a.length>0?e.renderSegList(a,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Lr(oi,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Wa,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Lr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Lr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,i=n.theme,o=n.options,s=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Lr(bo,{unit:"day"},(function(e,n){for(var a=[],l=0;l<s.length;l++){var u=s[l];if(u){var c=t[l].toISOString();a.push(Lr(Ya,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,h=u=pn(u,o.eventOrder);d<h.length;d++){var p=h[d];a.push(Lr(Ba,r({key:c+":"+p.eventRange.instance.instanceId,seg:p,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},_n(p,n,e))))}}}return Lr("table",{className:"fc-list-table "+i.getClass("table")},Lr("tbody",null,a))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(an(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,a=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=tn(a,t[n]))&&(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},u.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<o.add(t[n+1].start,s))){i.end=a.end,i.isEnd=!0;break}return u},t}(ti);function Wa(e){return e.text}function $a(e){for(var t=xe(e.renderRange.start),n=e.renderRange.end,r=[],i=[];t<n;)r.push(t),i.push({start:t,end:me(t,1)}),t=me(t,1);return{dayDates:r,dayRanges:i}}function Ga(e){return!1===e?null:bt(e)}var Ka=ni({optionRefiners:{listDayFormat:Ga,listDaySideFormat:Ga,noEventsClassNames:At,noEventsContent:At,noEventsDidMount:At,noEventsWillUnmount:At},views:{list:{component:qa,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"}}}}),Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);Za.prototype.classes={root:"fc-theme-bootstrap",table:"table-bordered",tableCellShaded:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body"},Za.prototype.baseIconClass="fa",Za.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},Za.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},Za.prototype.iconOverrideOption="bootstrapFontAwesome",Za.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",Za.prototype.iconOverridePrefix="fa-";var Xa=ni({themeClasses:{bootstrap:Za}}),Ja=ni({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;return/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var i=e.context,o=i.dateEnv,s=i.options,a=e.eventSource.meta,l=a.googleCalendarApiKey||s.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;return t||(t="https://www.googleapis.com/calendar/v3/calendars"),t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(a),c=a.extraParams,d="function"==typeof c?c():c,h=function(e,t,n,i){var o,s,a;return i.canComputeOffset?(s=i.formatIso(e.start),a=i.formatIso(e.end)):(s=me(e.start,-1).toISOString(),a=me(e.end,1).toISOString()),o=r(r({},n||{}),{key:t,timeMin:s,timeMax:a,singleEvents:!0,maxResults:9999}),"local"!==i.timeZone&&(o.timeZone=i.timeZone),o}(e.range,l,d,o);Li("GET",u,h,(function(e,r){var i,o;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(i=e.items,o=h.timeZone,i.map((function(e){return function(e,t){var n=e.htmlLink||null;return n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}}(e,o)}))),xhr:r})}),(function(e,t){n({message:e,xhr:t})}))}else n({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}}],optionRefiners:{googleCalendarApiKey:String},eventSourceRefiners:{googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,extraParams:At}});return Ri.push(Is,oa,ja,Ka,Xa,Ja),e.BASE_OPTION_DEFAULTS=xt,e.BASE_OPTION_REFINERS=wt,e.BaseComponent=Br,e.BgEvent=es,e.BootstrapTheme=Za,e.Calendar=is,e.CalendarApi=jn,e.CalendarContent=co,e.CalendarDataManager=Hi,e.CalendarDataProvider=Xi,e.CalendarRoot=fo,e.Component=Ir,e.ContentHook=ai,e.CustomContentRenderContext=si,e.DateComponent=ti,e.DateEnv=$n,e.DateProfileGenerator=yi,e.DayCellContent=Xo,e.DayCellRoot=Zo,e.DayGridView=ra,e.DayHeader=xo,e.DaySeriesModel=ko,e.DayTable=ta,e.DayTableModel=To,e.DayTableSlicer=na,e.DayTimeCols=Oa,e.DayTimeColsSlicer=Ra,e.DayTimeColsView=Pa,e.DelayedRunner=ji,e.Draggable=Cs,e.ElementDragging=to,e.ElementScrollController=Cr,e.Emitter=Tr,e.EventApi=Yn,e.EventRoot=qo,e.EventSourceApi=j,e.FeaturefulElementDragging=gs,e.Fragment=Rr,e.Interaction=Ji,e.ListView=qa,e.MountHook=ui,e.NamedTimeZoneImpl=function(e){this.timeZoneName=e},e.NowIndicatorRoot=Go,e.NowTimer=bo,e.PointerDragging=ls,e.PositionCache=Er,e.RefMap=Ao,e.RenderHook=oi,e.ScrollController=Dr,e.ScrollResponder=jr,e.Scroller=Mo,e.SimpleScrollGrid=zo,e.Slicer=Eo,e.Splitter=cr,e.StandardEvent=Wo,e.Table=Js,e.TableDateCell=vo,e.TableDowCell=yo,e.TableView=Ls,e.Theme=Ar,e.ThirdPartyDraggable=As,e.TimeCols=Ia,e.TimeColsSlatsCoords=aa,e.TimeColsView=ga,e.ViewApi=On,e.ViewContextType=Yr,e.ViewRoot=pi,e.WeekNumberRoot=ns,e.WindowScrollController=Mr,e.addDays=me,e.addDurations=Ke,e.addMs=ge,e.addWeeks=fe,e.allowContextMenu=ie,e.allowSelection=ne,e.applyMutationToEventStore=An,e.applyStyle=z,e.applyStyleProp=q,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return Je(e)/6e4},e.asRoughMs=Je,e.asRoughSeconds=function(e){return Je(e)/1e3},e.buildClassNameNormalizer=ci,e.buildDayRanges=Na,e.buildDayTableModel=ia,e.buildEventApis=Hn,e.buildEventRangeKey=wn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var i=t(e[r],r);n[i[0]]=i[1]}return n},e.buildNavLinkData=fr,e.buildSegCompareObj=fn,e.buildSegTimeText=yn,e.buildSlatMetas=fa,e.buildTimeColsModel=Fa,e.collectFromHash=Be,e.combineEventUis=Yt,e.compareByFieldSpec=ae,e.compareByFieldSpecs=se,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=mo,e.computeHeightAndMargins=function(e){return e.getBoundingClientRect().height+function(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(e)},e.computeInnerRect=wr,e.computeRect=xr,e.computeSegDraggable=mn,e.computeSegEndResizable=vn,e.computeSegStartResizable=gn,e.computeShrinkWidth=Io,e.computeSmallestCellWidth=he,e.computeVisibleDayRange=Zt,e.config=no,e.constrainPoint=or,e.createContext=Pr,e.createDuration=$e,e.createElement=Lr,e.createEmptyEventStore=function(){return{defs:{},instances:{}}},e.createEventInstance=Ie,e.createEventUi=jt,e.createFormatter=bt,e.createPlugin=ni,e.createRef=Nr,e.diffDates=Jt,e.diffDayAndTime=_e,e.diffDays=ye,e.diffPoints=ar,e.diffWeeks=ve,e.diffWholeDays=we,e.diffWholeWeeks=be,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=H,e.enableCursor=ee,e.eventTupleToStore=Lt,e.filterEventStoreDefs=Rt,e.filterHash=Ne,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,s=0;s<o.length;s++){var a=o[s];t&&!H(a,t)||r.push(a)}return r},e.findElements=B,e.flexibleCompare=le,e.flushToDom=Fr,e.formatDate=function(e,t){void 0===t&&(t={});var n=Qn(t),r=bt(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=Qn("object"==typeof n&&n?n:{}),i=bt(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:xt.defaultRangeSeparator}):""},e.getAllowYScrolling=Oo,e.getCanVGrowWithinCell=lr,e.getClippingParents=Sr,e.getDateMeta=hr,e.getDayClassNames=pr,e.getDefaultEventEnd=Mn,e.getElSeg=cn,e.getEventClassNames=bn,e.getIsRtlScrollbarOnLeft=vr,e.getRectCenter=sr,e.getRelevantEvents=Ot,e.getScrollGridClassNames=Yo,e.getScrollbarWidths=yr,e.getSectionClassNames=Vo,e.getSectionHasLiquidHeight=Lo,e.getSegMeta=_n,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+pe[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},e.getStickyFooterScrollbar=Uo,e.getStickyHeaderDates=Bo,e.getUnequalProps=Ye,e.globalLocales=Gn,e.globalPlugins=Ri,e.greatestDurationDenominator=et,e.guid=J,e.hasBgRendering=ln,e.hasShrinkWidth=jo,e.identity=At,e.interactionSettingsStore=eo,e.interactionSettingsToStore=Qi,e.intersectRanges=tn,e.intersectRects=ir,e.isArraysEqual=it,e.isColPropsEqual=Ro,e.isDateSpansEqual=kn,e.isInt=de,e.isInteractionValid=Gr,e.isMultiDayRange=Xt,e.isPropsEqual=je,e.isPropsValid=Zr,e.isValidDate=Me,e.listenBySelector=G,e.mapHash=Re,e.memoize=ot,e.memoizeArraylike=function(e,t,n){var r=[],i=[];return function(o){for(var s=r.length,a=o.length,l=0;l<s;l++)if(o[l]){if(!it(r[l],o[l])){n&&n(i[l]);var u=e.apply(this,o[l]);t&&t(u,i[l])||(i[l]=u)}}else n&&n(i[l]);for(;l<a;l++)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},e.memoizeHashlike=function(e,t,n){var r={},i={};return function(o){var s={};for(var a in o)if(i[a])if(it(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);var l=e.apply(this,o[a]);s[a]=t&&t(l,i[a])?i[a]:l}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},e.memoizeObjArg=st,e.mergeEventStores=Nt,e.multiplyDuration=Ze,e.padStart=ue,e.parseBusinessHours=nr,e.parseClassNames=Pt,e.parseDragMeta=io,e.parseEventDef=Gt,e.parseFieldSpecs=oe,e.parseMarker=Wn,e.pointInsideRect=rr,e.preventContextMenu=re,e.preventDefault=W,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=on,e.rangesEqual=nn,e.rangesIntersect=rn,e.refineEventDef=Wt,e.refineProps=Mt,e.removeElement=Y,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.render=Or,e.renderChunkContent=No,e.renderFill=Qo,e.renderMicroColGroup=Po,e.renderScrollShim=Ho,e.requestJson=Li,e.sanitizeShrinkWidth=Fo,e.setElSeg=un,e.setRef=qr,e.sliceEventStore=an,e.sliceEvents=function(e,t){return an(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=pn,e.startOfDay=xe,e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.triggerDateSelect=Dn,e.unpromisify=kr,e.version="5.3.1",e.whenTransitionDone=Z,e.wholeDivideDurations=Qe,e}({});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jsSHA=t()}(this,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};"function"==typeof SuppressedError&&SuppressedError;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="ARRAYBUFFER not supported by this environment",r="UINT8ARRAY not supported by this environment";function i(e,t,n,r){var i,o,s,a=t||[0],l=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(s=i+l)>>>2,a.length<=o&&a.push(0),a[o]|=e[i]<<8*(u+r*(s%4));return{value:a,binLen:8*e.length+n}}function o(e,o,s){switch(o){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,s,a;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(a=(i>>>1)+u)>>>2;l.length<=s;)l.push(0);l[s]|=o<<8*(c+r*(a%4))}return{value:l,binLen:4*e.length+n}}(e,t,n,s)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,s,a,l,u,c,d,h,p=0,f=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(d=-1===i?3:0,a=0;a<e.length;a+=1)for(s=[],128>(o=e.charCodeAt(a))?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(a+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(a)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),l=0;l<s.length;l+=1){for(u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=s[l]<<8*(d+i*(c%4)),p+=1}else for(d=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,a=0;a<e.length;a+=1){for(o=e.charCodeAt(a),!0===h&&(o=(l=255&o)<<8|o>>>8),u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(d+i*(c%4)),p+=2}return{value:f,binLen:8*p+r}}(e,o,t,n,s)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,s,a,l,u,c,d=0,h=n||[0],p=(r=r||0)>>>3,f=-1===i?3:0,m=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(l=e.substr(o,4),a=0,s=0;s<l.length;s+=1)a|=t.indexOf(l.charAt(s))<<18-6*s;for(s=0;s<l.length-1;s+=1){for(u=(c=d+p)>>>2;h.length<=u;)h.push(0);h[u]|=(a>>>16-8*s&255)<<8*(f+i*(c%4)),d+=1}}return{value:h,binLen:8*d+r}}(e,n,r,s)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,s,a,l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=(a=o+u)>>>2,l.length<=s&&l.push(0),l[s]|=i<<8*(c+r*(a%4));return{value:l,binLen:8*e.length+n}}(e,t,n,s)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error(n)}return function(e,t,n){return function(e,t,n,r){return i(new Uint8Array(e),t,n,r)}(e,t,n,s)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error(r)}return function(e,t,n){return i(e,t,n,s)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function s(e,i,o,s){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,s="0123456789abcdef",a="",l=t/8,u=-1===n?3:0;for(i=0;i<l;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+=s.charAt(o>>>4&15)+s.charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,i,o,s)};case"B64":return function(e){return function(e,n,r,i){var o,s,a,l,u,c="",d=n/8,h=-1===r?3:0;for(o=0;o<d;o+=3)for(l=o+1<d?e[o+1>>>2]:0,u=o+2<d?e[o+2>>>2]:0,a=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(l>>>8*(h+r*((o+1)%4))&255)<<8|u>>>8*(h+r*((o+2)%4))&255,s=0;s<4;s+=1)c+=8*o+6*s<=n?t.charAt(a>>>6*(3-s)&63):i.b64Pad;return c}(e,i,o,s)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",s=t/8,a=-1===n?3:0;for(r=0;r<s;r+=1)i=e[r>>>2]>>>8*(a+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,i,o)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error(n)}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),s=new Uint8Array(o),a=-1===n?3:0;for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(a+n*(r%4))&255;return o}(e,i,o)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error(r)}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,s=new Uint8Array(i);for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return s}(e,i,o)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],u=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function c(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function d(e,t){return e>>>t|e<<32-t}function h(e,t){return e>>>t}function p(e,t,n){return e&t^~e&n}function f(e,t,n){return e&t^e&n^t&n}function m(e){return d(e,2)^d(e,13)^d(e,22)}function g(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function v(e,t,n,r){var i=(65535&e)+(65535&t)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16))<<16|65535&i}function y(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function _(e){return d(e,7)^d(e,18)^h(e,3)}function b(e){return d(e,6)^d(e,11)^d(e,25)}function w(e){return"SHA-224"==e?l.slice():u.slice()}function x(e,t){var n,r,i,o,s,l,u,c,w,x,S,k,T=[];for(n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],S=0;S<64;S+=1)T[S]=S<16?e[S]:v(d(k=T[S-2],17)^d(k,19)^h(k,10),T[S-7],_(T[S-15]),T[S-16]),w=y(c,b(s),p(s,l,u),a[S],T[S]),x=g(m(n),f(n,r,i)),c=u,u=l,l=s,s=g(o,w),o=i,i=r,r=n,n=g(w,x);return t[0]=g(n,t[0]),t[1]=g(r,t[1]),t[2]=g(i,t[2]),t[3]=g(o,t[3]),t[4]=g(s,t[4]),t[5]=g(l,t[5]),t[6]=g(u,t[6]),t[7]=g(c,t[7]),t}return function(t){function n(e,n,r){var i=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error("Chosen SHA variant is not supported");var s=r||{};return(i=t.call(this,e,n,r)||this).t=i.i,i.o=!0,i.u=-1,i.h=o(i.v,i.l,i.u),i.p=x,i.A=function(e){return e.slice()},i.U=w,i.T=function(t,n,r,i){return function(e,t,n,r,i){for(var o,s=15+(t+65>>>9<<4),a=t+n;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=4294967295&a,e[s-1]=a/4294967296|0,o=0;o<e.length;o+=16)r=x(e.slice(o,o+16),r);return"SHA-224"===i?[r[0],r[1],r[2],r[3],r[4],r[5],r[6]]:r}(t,n,r,i,e)},i.R=w(e),i.m=512,i.F="SHA-224"===e?224:256,i.g=!1,s.hmacKey&&i.B(function(e,t,n,r){var i="hmacKey must include a value and format";if(!t)throw new Error(i);if(void 0===t.value||!t.format)throw new Error(i);return o(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,i.u)),i}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.v=t,this.l=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.S=e,this.H=[],this.Y=0,this.C=!1,this.I=0,this.L=!1,this.N=[],this.X=[]}return e.prototype.update=function(e){var t,n=0,r=this.m>>>5,i=this.h(e,this.H,this.Y),o=i.binLen,s=i.value,a=o>>>5;for(t=0;t<a;t+=r)n+this.m<=o&&(this.R=this.p(s.slice(t,t+r),this.R),n+=this.m);return this.I+=n,this.H=s.slice(n>>>5),this.Y=o%this.m,this.C=!0,this},e.prototype.getHash=function(e,t){var n,r,i=this.F,o=c(t);if(this.g){if(-1===o.outputLen)throw new Error("Output length must be specified in options");i=o.outputLen}var a=s(e,i,this.u,o);if(this.L&&this.t)return a(this.t(o));for(r=this.T(this.H.slice(),this.Y,this.I,this.A(this.R),i),n=1;n<this.numRounds;n+=1)this.g&&i%32!=0&&(r[r.length-1]&=16777215>>>24-i%32),r=this.T(r,i,0,this.U(this.S),i);return a(r)},e.prototype.setHMACKey=function(e,t,n){if(!this.o)throw new Error("Variant does not support HMAC");if(this.C)throw new Error("Cannot set MAC key after calling update");var r=o(t,(n||{}).encoding||"UTF8",this.u);this.B(r(e))},e.prototype.B=function(e){var t,n=this.m>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.T(e.value,e.binLen,0,this.U(this.S),this.F));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.X[t]=1549556828^e.value[t];this.R=this.p(this.N,this.R),this.I=this.m,this.L=!0},e.prototype.getHMAC=function(e,t){var n=c(t);return s(e,this.F,this.u,n)(this.i())},e.prototype.i=function(){var e;if(!this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.T(this.H.slice(),this.Y,this.I,this.A(this.R),this.F);return e=this.p(this.X,this.U(this.S)),this.T(t,this.F,this.m,e,this.F)},e}())})),
|
|
698
|
+
var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var o,s,a,l,u,c,d,h={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return y(e,o,t&&t.key,t&&t.ref,null)}function y(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,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function _(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(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?w(e):null}function x(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 x(e)}}function S(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!a++||u!==o.debounceRendering)&&((u=o.debounceRendering)||l)(k)}function k(){for(var e;a=s.length;)e=s.sort((function(e,t){return e.__v.__b-t.__v.__b})),s=[],e.some((function(e){var t,n,r,i,o,s,a;e.__d&&(s=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=m({},o)).__v=r,i=A(a,o,r,t.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(o):s),I(n,o),i!=s&&x(o)))}))}function T(e,t,n,r,i,o,s,a,l){var u,c,d,f,m,v,y,_=n&&n.__k||p,b=_.length;if(a==h&&(a=null!=o?o[0]:b?w(n,0):null),u=0,t.__k=E(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=_[u])||d&&n.key==d.key&&n.type===d.type)_[u]=void 0;else for(c=0;c<b;c++){if((d=_[c])&&n.key==d.key&&n.type===d.type){_[c]=void 0;break}d=null}if(f=A(e,n,d=d||h,r,i,o,s,a,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||f,n)),null!=f){var p;if(null==v&&(v=f),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==d||f!=a||null==f.parentNode){e:if(null==a||a.parentNode!==e)e.appendChild(f),p=null;else{for(m=a,c=0;(m=m.nextSibling)&&c<b;c+=2)if(m==f)break e;e.insertBefore(f,a),p=a}"option"==t.type&&(e.value="")}a=void 0!==p?p:f.nextSibling,"function"==typeof t.type&&(t.__d=a)}else a&&d.__e==a&&a.parentNode!=e&&(a=w(d))}return u++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&g(o[u]);for(u=b;u--;)null!=_[u]&&N(_[u],_[u]);if(y)for(u=0;u<y.length;u++)O(y[u],y[++u],y[++u])}function E(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)E(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?y(null,e,null,null,e):null!=e.__e||null!=e.__c?y(e.type,e.props,e.key,null,e.__v):e):e);return n}function D(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===f.test(t)?n+"px":null==n?"":n}function C(e,t,n,r,i){var o,s,a,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||D(o,l,"");if(n)for(u in n)r&&n[u]===r[u]||D(o,u,n[u])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),a=t.toLowerCase(),t=(a in e?a:t).slice(2),n?(r||e.addEventListener(t,M,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,M,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function M(e){this.l[e.type](o.event?o.event(e):e)}function A(e,t,n,r,i,s,a,l,u){var c,d,h,p,f,g,v,y,w,x,S=t.type;if(void 0!==t.constructor)return null;(c=o.__b)&&c(t);try{e:if("function"==typeof S){if(y=t.props,w=(c=S.contextType)&&r[c.__c],x=c?w?w.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in S&&S.prototype.render?t.__c=d=new S(y,x):(t.__c=d=new b(y,x),d.constructor=S,d.render=R),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=S.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=m({},d.__s)),m(d.__s,S.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,h)null==S.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==S.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,x)||t.__v===n.__v&&!d.__){for(d.props=y,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&a.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}d.context=x,d.props=y,d.state=d.__s,(c=o.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=null!=c&&c.type==_&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=m(m({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),T(e,t,n,r,i,s,a,l,u),d.base=t.__e,d.__h.length&&a.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,i,s,a,u);(c=o.diffed)&&c(t)}catch(e){t.__v=null,o.__e(e,t,n)}return t.__e}function I(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,n,r,i,o,s,a){var l,u,c,d,f,m=n.props,g=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(u=o[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),o=null,a=!1}if(null===t.type)m!==g&&e.data!=g&&(e.data=g);else{if(null!=o&&(o=p.slice.call(e.childNodes)),c=(m=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===h)for(m={},f=0;f<e.attributes.length;f++)m[e.attributes[f].name]=e.attributes[f].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||C(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||C(e,o,t[o],n[o],r)})(e,g,m,i,a),d?t.__k=[]:(t.__k=t.props.children,T(e,t,n,r,"foreignObject"!==t.type&&i,o,s,h,a)),a||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&C(e,"value",l,m.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&C(e,"checked",l,m.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function N(e,t,n){var r,i,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],t,n);null!=i&&g(i)}function R(e,t,n){return this.constructor(e,n)}function P(e,t,n){var r,i,s;o.__&&o.__(e,t),i=(r=n===c)?null:n&&n.__k||t.__k,e=v(_,null,[e]),s=[],A(t,(r?t:n||t).__k=e,i||h,h,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:p.slice.call(t.childNodes),s,n||h,r),I(s,e)}o={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return S(n.__E=n)}catch(t){e=t}throw e}},b.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),S(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},b.prototype.render=_,s=[],a=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=h,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:b,createElement:v,render:P,createRef:function(){return{}},Fragment:_,createContext:function(e){var t=function(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,S(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=o.debounceRendering,t=[];for(o.debounceRendering=function(e){t.push(e)},P(v(F,{}),document.createElement("div"));t.length;)t.shift()();o.debounceRendering=e}};var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(b),j=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),e}();function Y(e){e.parentNode&&e.parentNode.removeChild(e)}function V(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(H(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function H(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function B(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),s=0;s<o.length;s++)r.push(o[s]);return r}var U=/(top|left|right|bottom|width|height)$/i;function z(e,t){for(var n in t)q(e,n,t[n])}function q(e,t,n){null==n?e.style[t]="":"number"==typeof n&&U.test(t)?e.style[t]=n+"px":e.style[t]=n}function W(e){e.preventDefault()}function $(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function G(e,t,n,r){var i=$(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var K=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Z(e,t){var n=function(r){t(r),K.forEach((function(t){e.removeEventListener(t,n)}))};K.forEach((function(t){e.addEventListener(t,n)}))}var X=0;function J(){return String(X++)}function Q(){document.body.classList.add("fc-not-allowed")}function ee(){document.body.classList.remove("fc-not-allowed")}function te(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",W)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",W)}function re(e){e.addEventListener("contextmenu",W)}function ie(e){e.removeEventListener("contextmenu",W)}function oe(e){var 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++)"string"==typeof(n=i[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function se(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(e,t,n){return n.func?n.func(e,t):le(e[n.field],t[n.field])*(n.order||1)}function le(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}function ue(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e,t){return e-t}function de(e){return e%1==0}function he(e){var 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}var pe=["sun","mon","tue","wed","thu","fri","sat"];function fe(e,t){var n=De(e);return n[2]+=7*t,Ce(n)}function me(e,t){var n=De(e);return n[2]+=t,Ce(n)}function ge(e,t){var n=De(e);return n[6]+=t,Ce(n)}function ve(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function _e(e,t){var n=xe(e),r=xe(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function be(e,t){var n=we(e,t);return null!==n&&n%7==0?n/7:null}function we(e,t){return Ae(e)===Ae(t)?Math.round(ye(e,t)):null}function xe(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Se(e,t,n,r){var i=Ce([t,0,1+ke(t,n,r)]),o=xe(e),s=Math.round(ye(i,o));return Math.floor(s/7)+1}function ke(e,t,n){var r=7+t-n;return-(7+Ce([e,0,r]).getUTCDay()-t)%7+r-1}function Te(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ee(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 De(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Ce(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Me(e){return!isNaN(e.valueOf())}function Ae(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:J(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Le=Object.prototype.hasOwnProperty;function Oe(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o--){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Oe(i))}for(o=e.length-1;o>=0;o--){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ne(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pe(e){for(var t={},n=0,r=e;n<r.length;n++)t[r[n]]=!0;return t}function Fe(e){var t=[];for(var n in e)t.push(e[n]);return t}function je(e,t){if(e===t)return!0;for(var n in e)if(Le.call(e,n)&&!(n in t))return!1;for(var n in t)if(Le.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ye(e,t){var n=[];for(var r in e)Le.call(e,r)&&(r in t||n.push(r));for(var r in t)Le.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ve(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!He(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function He(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Be(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o<n;o+=r){var s=e[o];void 0!==s&&i.push(s)}return i}function Ue(e,t,n){var r=n.dateEnv,i=n.pluginHooks,o=n.options,s=e.defs,a=e.instances;for(var l in a=Ne(a,(function(e){return!s[e.defId].recurringDef})),s){var u=s[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,h=ze(u,c,t,r,i.recurringTypes);d<h.length;d++){var p=h[d],f=Ie(l,{start:p,end:r.add(p,c)});a[f.instanceId]=f}}}return{defs:s,instances:a}}function ze(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(xe)),o}var qe=["years","months","days","milliseconds"],We=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function $e(e,t){var n;return"string"==typeof e?function(e){var t=We.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(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?Ge(e):"number"==typeof e?Ge(((n={})[t||"milliseconds"]=e,n)):null}function Ge(e){var 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 Ke(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ze(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Xe(e){return Je(e)/864e5}function Je(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<qe.length;r++){var i=qe[r];if(t[i]){var o=e[i]/t[i];if(!de(o)||null!==n&&n!==o)return null;n=o}else if(e[i])return null}return n}function et(e){var 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 tt(e){return e.toISOString().replace(/T.*$/,"")}function nt(e){return ue(e.getUTCHours(),2)+":"+ue(e.getUTCMinutes(),2)+":"+ue(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ue(i,2)+":"+ue(o,2):"GMT"+n+i+(o?":"+ue(o,2):"")}function it(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function ot(e,t,n){var r,i;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(r){if(!it(r,o)){n&&n(i);var a=e.apply(this,o);t&&t(a,i)||(i=a)}}else i=e.apply(this,o);return r=o,i}}function st(e,t,n){var r,i;return function(o){if(r){if(!je(r,o)){n&&n(i);var s=e.call(this,o);t&&t(s,i)||(i=s)}}else i=e.call(this,o);return r=o,i}}var at={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},lt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ut=/\s*([ap])\.?m\.?/i,ct=/,/g,dt=/\s+/g,ht=/\u200e/g,pt=/UTC|GMT/,ft=function(){function e(e){var t={},n={},r=0;for(var i in e)i in at?(n[i]=e[i],r=Math.max(at[i],r)):(t[i]=e[i],i in lt&&(r=Math.max(lt[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=ot(mt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var i=this.standardDateProps,o=this.extendedSettings,s=function(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:Ae(e)!==Ae(t)?1:0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);var a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=mt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),p=function(e,t,n,r){for(var i=0;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var s=e.substr(0,o);i=o+t.length;for(var a=e.substr(i),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(s===c&&a===d)return{before:s,after:a}}}return null}(l,d,u,h),f=o.separator||r||n.defaultSeparator||"";return p?p.before+d+f+h+p.after:l+f+u},e.prototype.getLargestUnit=function(){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"}},e}();function mt(e,t,n){var i=Object.keys(e).length;return 1===i&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===i&&t.week?function(e){return function(e,t,n,r){var i=[];return"narrow"===r?i.push(t):"short"===r&&i.push(t," "),i.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&i.reverse(),i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=r({},e),t=r({},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";var i,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var s=r({},e);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return function(r){var s=r.marker;return function(e,t,n,r,i){return e=e.replace(ht,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;return e=e.replace(pt,(function(){return n=!0,t})),n||(e+=" "+t),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(ct,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(ut,"").trim():"narrow"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ut,(function(e){return e.toLocaleLowerCase()}))),(e=e.replace(dt," ")).trim()}((i&&!s.getUTCMinutes()?i:o).format(s),r,e,t,n)}}(e,t,n)}function gt(e,t){var 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 vt(e,t,n,r){var i=gt(e,n.calendarSystem);return{date:i,start:i,end:t?gt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var yt=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,vt(e,t,n,r))},e}(),_t=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(vt(e,t,n,r))},e}();function bt(e){return"object"==typeof e&&e?new ft(e):"string"==typeof e?new yt(e):"function"==typeof e?new _t(e):void 0}var wt={navLinkDayClick:At,navLinkWeekClick:At,duration:$e,bootstrapFontAwesome:At,buttonIcons:At,customButtons:At,defaultAllDayEventDuration:$e,defaultTimedEventDuration:$e,nextDayThreshold:$e,scrollTime:$e,slotMinTime:$e,slotMaxTime:$e,dayPopoverFormat:bt,slotDuration:$e,snapDuration:$e,headerToolbar:At,footerToolbar:At,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:bt,dayHeaderClassNames:At,dayHeaderContent:At,dayHeaderDidMount:At,dayHeaderWillUnmount:At,dayCellClassNames:At,dayCellContent:At,dayCellDidMount:At,dayCellWillUnmount:At,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:At,weekNumbers:Boolean,weekNumberClassNames:At,weekNumberContent:At,weekNumberDidMount:At,weekNumberWillUnmount:At,editable:Boolean,viewClassNames:At,viewDidMount:At,viewWillUnmount:At,nowIndicator:Boolean,nowIndicatorClassNames:At,nowIndicatorContent:At,nowIndicatorDidMount:At,nowIndicatorWillUnmount:At,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:At,locale:At,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:At,eventOrder:oe,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:At,contentHeight:At,direction:String,weekNumberFormat:bt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:At,initialDate:At,now:At,eventDataTransform:At,stickyHeaderDates:At,stickyFooterScrollbar:At,viewHeight:At,defaultAllDay:Boolean,eventSourceFailure:At,eventSourceSuccess:At,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:At,eventConstraint:At,eventAllow:At,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:At,eventContent:At,eventDidMount:At,eventWillUnmount:At,selectConstraint:At,selectOverlap:At,selectAllow:At,droppable:Boolean,unselectCancel:String,slotLabelFormat:At,slotLaneClassNames:At,slotLaneContent:At,slotLaneDidMount:At,slotLaneWillUnmount:At,slotLabelClassNames:At,slotLabelContent:At,slotLabelDidMount:At,slotLabelWillUnmount:At,dayMaxEvents:At,dayMaxEventRows:At,dayMinWidth:Number,slotLabelInterval:$e,allDayText:String,allDayClassNames:At,allDayContent:At,allDayDidMount:At,allDayWillUnmount:At,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:bt,rerenderDelay:Number,moreLinkText:At,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:At,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:$e,hiddenDays:At,monthMode:Boolean,fixedWeekCount:Boolean,validRange:At,visibleRange:At,titleFormat:At,noEventsText:String},xt={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",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",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},St={datesSet:At,eventsSet:At,eventAdd:At,eventChange:At,eventRemove:At,windowResize:At,eventClick:At,eventMouseEnter:At,eventMouseLeave:At,select:At,unselect:At,loading:At,_unmount:At,_beforeprint:At,_afterprint:At,_noEventDrop:At,_noEventResize:At,_resize:At,_scrollRequest:At},kt={buttonText:At,views:At,plugins:At,initialEvents:At,events:At,eventSources:At},Tt={headerToolbar:Et,footerToolbar:Et,buttonText:Et,buttonIcons:Et};function Et(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?je(e,t):e===t}var Dt={type:String,component:At,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:At,usesMinMaxTime:Boolean,classNames:At,content:At,didMount:At,willUnmount:At};function Ct(e){return Oe(e,Tt)}function Mt(e,t){var n={},r={};for(var i in t)i in e&&(n[i]=t[i](e[i]));for(var i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function At(e){return e}function It(e,t,n,r){for(var i={defs:{},instances:{}},o=$t(n),s=0,a=e;s<a.length;s++){var l=qt(a[s],t,n,r,o);l&&Lt(l,i)}return i}function Lt(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Ot(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=Rt(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function Nt(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function Rt(e,t){var n=Ne(e.defs,t),r=Ne(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ft={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:At,overlap:At,allow:At,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function jt(e,t){var n=function(e,t){return Array.isArray(e)?It(e,null,t,!0):"object"==typeof e&&e?It([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 Yt(e){return e.reduce(Vt,Ht)}function Vt(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)}}var Ht={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},Ut={start:At,end:At,date:At,allDay:Boolean},zt=r(r(r({},Bt),Ut),{extendedProps:At});function qt(e,t,n,r,i){void 0===i&&(i=$t(n));var o=Wt(e,n,i),s=o.refined,a=o.extra,l=function(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),u=function(e,t,n,r){for(var i=0;i<r.length;i++){var o=r[i].parse(e,n);if(o){var s=e.allDay;return null==s&&null==(s=t)&&null==(s=o.allDayGuess)&&(s=!1),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Gt(s,a,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var i,o,s=e.allDay,a=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(c))a=i.marker;else if(!r)return null;return null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified)),s&&a&&(a=xe(a)),o&&(u=o.marker,s&&(u=xe(u)),a&&u<=a&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:a,end:u},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(s,l,n,r);return d?{def:c=Gt(s,a,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Wt(e,t,n){return void 0===n&&(n=$t(t)),Mt(e,n)}function $t(e){return r(r(r({},Ft),zt),e.pluginHooks.eventRefiners)}function Gt(e,t,n,i,o,s){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:J(),sourceId:n,allDay:i,hasEnd:o,ui:jt(e,s),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=s.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(a,c(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=xe(e.start);return{start:n,end:me(n,t)}}function Zt(e,t){void 0===t&&(t=$e(0));var n=null,r=null;if(e.end){r=xe(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=Je(t)&&(r=me(r,1))}return e.start&&(n=xe(e.start),r&&r<=n&&(r=me(n,1))),{start:n,end:r}}function Xt(e){var t=Zt(e);return ye(t.start,t.end)>1}function Jt(e,t,n,r){return"year"===r?$e(n.diffWholeYears(e,t),"year"):"month"===r?$e(n.diffWholeMonths(e,t),"month"):_e(e,t)}function Qt(e,t){var n,r,i=[],o=t.start;for(e.sort(en),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function en(e,t){return e.start.valueOf()-t.start.valueOf()}function tn(e,t){var n=e.start,r=e.end,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 nn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function on(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function an(e,t,n,r){var i={},o={},s={},a=[],l=[],u=dn(e.defs,t);for(var c in e.defs)"inverse-background"===(p=u[(b=e.defs[c]).defId]).display&&(b.groupId?(i[b.groupId]=[],s[b.groupId]||(s[b.groupId]=b)):o[c]=[]);for(var d in e.instances){var h=e.instances[d],p=u[(b=e.defs[h.defId]).defId],f=h.range,m=!b.allDay&&r?Zt(f,r):f,g=tn(m,n);g&&("inverse-background"===p.display?b.groupId?i[b.groupId].push(g):o[h.defId].push(g):"none"!==p.display&&("background"===p.display?a:l).push({def:b,ui:p,instance:h,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in i)for(var y=0,_=Qt(i[v],n);y<_.length;y++){var b,w=_[y];p=u[(b=s[v]).defId],a.push({def:b,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var c in o)for(var x=0,S=Qt(o[c],n);x<S.length;x++)w=S[x],a.push({def:e.defs[c],ui:u[c],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function ln(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function un(e,t){e.fcSeg=t}function cn(e){return e.fcSeg||e.parentNode.fcSeg||null}function dn(e,t){return Re(e,(function(e){return hn(e,t)}))}function hn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Yt(n)}function pn(e,t){var n=e.map(fn);return n.sort((function(e,n){return se(e,n,t)})),n.map((function(e){return e._seg}))}function fn(e){var t=e.eventRange,n=t.def,i=t.instance?t.instance.range:t.range,o=i.start?i.start.valueOf():0,s=i.end?i.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:o,end:s,duration:s-o,allDay:Number(n.allDay),_seg:e})}function mn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,i=r.def,o=r.ui,s=o.startEditable,a=0,l=n;a<l.length;a++)s=(0,l[a])(s,i,o,t);return s}function gn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function vn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function yn(e,t,n,r,i,o,s){var a=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,h=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==i),u&&!d.allDay&&(e.isStart||e.isEnd)){var p=o||(e.isStart?h.range.start:e.start||e.eventRange.range.start),f=s||(e.isEnd?h.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?a.formatRange(p,f,t,{forcedStartTzo:o?null:h.forcedStartTzo,forcedEndTzo:s?null:h.forcedEndTzo}):a.format(p,t,{forcedTzo:o?null:h.forcedStartTzo})}return""}function _n(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sn(t,r.start)}}function bn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function wn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var xn={start:At,end:At,allDay:Boolean};function Sn(e,t,n){var i=function(e,t){var n=Mt(e,xn),i=n.refined,o=n.extra,s=i.start?t.createMarkerMeta(i.start):null,a=i.end?t.createMarkerMeta(i.end):null,l=i.allDay;return null==l&&(l=s&&s.isTimeUnspecified&&(!a||a.isTimeUnspecified)),r({range:{start:s?s.marker:null,end:a?a.marker:null},allDay:l},o)}(e,t),o=i.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return i}function kn(e,t){return nn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function Tn(e,t,n){return r(r({},En(e,t,n)),{timeZone:t.timeZone})}function En(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Dn(e,t,n){n.emitter.trigger("select",r(r({},Cn(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Cn(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.dateSpanTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,i=t.dateEnv,r(r({},En(n.range,i,n.allDay)),{allDay:n.allDay}))),o}function Mn(e,t,n){var r=n.dateEnv,i=n.options,o=t;return e?(o=xe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function An(e,t,n,r){var i=dn(e.defs,t),o={defs:{},instances:{}};for(var s in e.defs){var a=e.defs[s];o.defs[s]=In(a,i[s],n,r)}for(var l in e.instances){var u=e.instances[l];a=o.defs[u.defId],o.instances[l]=Ln(u,a,i[u.defId],n,r)}return o}function In(e,t,n,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var s=r(r(r({},e),o),{ui:r(r({},e.ui),o.ui)});n.extendedProps&&(s.extendedProps=r(r({},s.extendedProps),n.extendedProps));for(var a=0,l=i.pluginHooks.eventDefMutationAppliers;a<l.length;a++)(0,l[a])(s,n,i);return!s.hasEnd&&i.options.forceEventDuration&&(s.hasEnd=!0),s}function Ln(e,t,n,i,o){var s=o.dateEnv,a=i.standardProps&&!0===i.standardProps.allDay,l=i.standardProps&&!1===i.standardProps.hasEnd,u=r({},e);return a&&(u.range=Kt(u.range)),i.datesDelta&&n.startEditable&&(u.range={start:s.add(u.range.start,i.datesDelta),end:s.add(u.range.end,i.datesDelta)}),i.startDelta&&n.durationEditable&&(u.range={start:s.add(u.range.start,i.startDelta),end:u.range.end}),i.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:s.add(u.range.end,i.endDelta)}),l&&(u.range={start:u.range.start,end:Mn(t.allDay,u.range.start,o)}),t.allDay&&(u.range={start:xe(u.range.start),end:xe(u.range.end)}),u.range.end<u.range.start&&(u.range.end=Mn(t.allDay,u.range.start,o)),u}var On=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),Nn={id:String,defaultAllDay:Boolean,url:String,events:At,eventDataTransform:At,success:At,failure:At};function Rn(e,t,n){var r;if(void 0===n&&(n=Pn(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var i=Mt(r,n),o=i.refined,s=i.extra,a=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:J(),sourceDefId:a.sourceDefId,meta:a.meta,ui:jt(o,t),extendedProps:s}}return null}function Pn(e){return r(r(r({},Ft),Nn),e.pluginHooks.eventSourceRefiners)}function Fn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var jn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,i([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var 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})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),i=r.viewSpecs,o=r.toolbarConfig,s=[].concat(o.viewsWithButtons);for(var a in i)s.push(a);for(t=0;t<s.length;t++)if((n=i[s[t]])&&n.singleUnit===e)return n},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Fn(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=$e(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),bt(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),bt(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),i=Sn(n,r.dateEnv,$e({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Dn(i,null,r))},e.prototype.unselect=function(e){var 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))},e.prototype.addEvent=function(e,t){if(e instanceof Yn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Lt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var i,o=this.getCurrentData();if(t instanceof j)i=t.internalEventSource;else if("boolean"==typeof t)t&&(i=Fe(o.eventSources)[0]);else if(null!=t){var s=this.getEventSourceById(t);if(!s)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=s.internalEventSource}var a=qt(e,i,o,!1);if(a){var l=new Yn(o,a.def,a.def.recurringDef?null:a.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Lt(a)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:Vn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,i=n.instances;for(var o in e=String(e),r){var s=r[o];if(s.publicId===e){if(s.recurringDef)return new Yn(t,s,null);for(var a in i){var l=i[a];if(l.defId===s.defId)return new Yn(t,s,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Hn(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new j(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new j(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof j)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Rn(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new j(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=$e(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Yn=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in Ut)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e in Bt)t=Bt[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Ft){var i=Ft[e](t);"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var i=Jt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var i=Jt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i,o,s=this._context.dateEnv,a={allDay:n.allDay},l=s.createMarker(e);if(l&&(null==t||(r=s.createMarker(t)))&&this._instance){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Jt(u.start,l,s,n.granularity);if(r){var d=Jt(u.end,r,s,n.granularity);o=d,(i=c).years===o.years&&i.months===o.months&&i.days===o.days&&i.milliseconds===o.milliseconds?this.mutate({datesDelta:c,standardProps:a}):this.mutate({startDelta:c,endDelta:d,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:c,standardProps:a})}},e.prototype.moveStart=function(e){var t=$e(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=$e(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=$e(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=bt(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})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,i=this._context,o=Ot(i.getCurrentData().eventStore,n.instanceId);o=An(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);var s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:Hn(o,i,n),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Vn(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new j(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,i=this.startStr,o=this.endStr,s={};return t.title&&(s.title=t.title),i&&(s.start=i),o&&(s.end=o),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?r(s,t.extendedProps):s.extendedProps=t.extendedProps),s},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Vn(e){var t,n,r=e._def,i=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:i?(n={},n[i.instanceId]=i,n):{}}}function Hn(e,t,n){var r=e.defs,i=e.instances,o=[],s=n?n.instanceId:"";for(var a in i){var l=i[a],u=r[l.defId];l.instanceId!==s&&o.push(new Yn(t,u,l))}return o}var Bn,Un={},zn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return Ce(e)},e.prototype.markerToArray=function(e){return De(e)},e}();Bn=zn,Un.gregory=Bn;var qn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Wn(e){var t=qn.exec(e);if(t){var n=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(Me(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var $n=function(){function e(e){var 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 Un[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.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Ce(Te(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var 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=Ce(e)),null!==t&&Me(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Wn(e);if(null===t)return null;var n=t.marker,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}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var 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)},e.prototype.subtract=function(e,t){var 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)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=be(e,t))?{unit:"week",value:n}:null!==(n=we(e,t))?{unit:"day",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Xe(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xe(e)/30}(n):n.days&&null!==(r=we(e,t))?r/Xe(n):(t.valueOf()-e.valueOf())/Je(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?xe(e):"hour"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),i=Se(e,r,t,n);if(i<1)return Se(e,r-1,t,n);var o=Se(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=ge(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Ce(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Ce(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ee(De(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(De(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ee(De(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(De(e))*60):new Date(e.valueOf()-(t||0))},e}(),Gn=[],Kn={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function Zn(e){for(var t=e.length>0?e[0].code:"en",n=Gn.concat(e),r={en:Kn},i=0,o=n;i<o.length;i++){var s=o[i];r[s.code]=s}return{map:r,defaultCode:t}}function Xn(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Kn;return Jn(e,n,r)}(e,t):Jn(e.code,[e.code],e)}function Jn(e,t,n){var r=Oe([Kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Qn(e){var t=Xn(e.locale||"en",Zn([]).map);return new $n(r(r({timeZone:xt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var er,tr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function nr(e,t){return It(function(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return r(r({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ir(e,t){var 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}function or(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function sr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ar(e,t){return{left:e.left-t.left,top:e.top-t.top}}function lr(){return null==er&&(er=function(){if("undefined"==typeof document)return!0;var 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);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),er}var ur={defs:{},instances:{}},cr=function(){function e(){this.getKeysForEventDefs=ot(this._getKeysForEventDefs),this.splitDateSelection=ot(this._splitDateSpan),this.splitEventStore=ot(this._splitEventStore),this.splitIndividualUi=ot(this._splitIndividualUi),this.splitEventDrag=ot(this._splitInteraction),this.splitEventResize=ot(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Re(n,(function(e,n){return t.eventUiBuilders[n]||ot(dr)})),n){var d=n[c],h=s[c]||ur,p=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:p(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++)t[r[n]]=e;return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Re(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var s=0,a=t[o];s<a.length;s++)i[h=a[s]]||(i[h]={defs:{},instances:{}}),i[h].defs[o]=n[o];for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var h;i[h=d[c]]&&(i[h].instances[l]=u)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var s=o[i];n[s]||(n[s]={}),n[s][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||ur,mutatedEvents:i[r]||ur,isEvent:e.isEvent})};for(var s in n)o(s);for(var s in i)o(s)}return t},e}();function dr(e,t,n){var i=[];e&&i.push(e),t&&i.push(t);var o={"":Yt(i)};return n&&r(o,n),o}function hr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!sn(r.activeRange,e)),isOther:Boolean(r&&!sn(r.currentRange,e)),isToday:Boolean(t&&sn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function pr(e,t){var n=["fc-day","fc-day-"+pe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function fr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,gr=null;function vr(){return null===gr&&(gr=function(){var e=document.createElement("div");z(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Y(e),t}()),gr}function yr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=_r(e);return document.body.removeChild(e),t}()),mr}function _r(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function br(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=_r(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return vr()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function wr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():xr(e),i=br(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function xr(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function Sr(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function kr(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}var Tr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],i=this.options&&this.options[e],o=0,s=[].concat(i||[],r);o<s.length;o++){s[o].apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}(),Er=function(){function e(e,t,n,r){this.els=t;var i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),Dr=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),Cr=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return n(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(Dr),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(Dr),Ar=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=r({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();if(Ar.prototype.classes={},Ar.prototype.iconClasses={},Ar.prototype.baseIconClass="",Ar.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ir=FullCalendarVDom.Component,Lr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Nr=FullCalendarVDom.createRef,Rr=FullCalendarVDom.Fragment,Pr=FullCalendarVDom.createContext,Fr=FullCalendarVDom.flushToDom,jr=function(){function e(e,t,n){var i=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){i.queuedRequest=r({},i.queuedRequest||{},e),i.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),Yr=Pr({});function Vr(e,t,n,r,i,o,s,a,l,u,c,d,h){return{dateEnv:i,options:n,pluginHooks:s,emitter:u,dispatch:a,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new jr(e,u,$e(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:h}}var Hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ye(e,this.props),Ye(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Ur,t.addStateEquality=zr,t.contextType=Yr,t}(Ir);Hr.prototype.propEquality={},Hr.prototype.stateEquality={};var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=Yr,t}(Hr);function Ur(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function zr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function qr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Wr(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],s=t(o);s?n.push(s):null==s&&n.push(o)}}else n=e;return n}function $r(e,t){return Rt(e,(function(e){return e.sourceId!==t}))}function Gr(e,t){return Kr({eventDrag:e},t)}function Kr(e,t){var n=t.getCurrentData(),i=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Zr)(i,t)}function Zr(e,t,n,i){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,i){var o=t.getCurrentData(),s=e.eventDrag,a=s.mutatedEvents,l=a.defs,u=a.instances,c=dn(l,s.isEvent?e.eventUiBases:{"":o.selectionConfig});i&&(c=Re(c,i));var d,h,p=(d=e.eventStore,h=s.affectedEvents.instances,{defs:d.defs,instances:Ne(d.instances,(function(e){return!h[e.instanceId]}))}),f=p.defs,m=p.instances,g=dn(f,e.eventUiBases);for(var v in u){var y=u[v],_=y.range,b=c[y.defId],w=l[y.defId];if(!Xr(b.constraints,_,p,e.businessHours,t))return!1;var x=t.options.eventOverlap,S="function"==typeof x?x:null;for(var k in m){var T=m[k];if(rn(_,T.range)){if(!1===g[T.defId].overlap&&s.isEvent)return!1;if(!1===b.overlap)return!1;if(S&&!S(new Yn(t,f[T.defId],T),new Yn(t,w,y)))return!1}}for(var E=o.eventStore,D=0,C=b.allows;D<C.length;D++){var M,A=C[D],I=r(r({},n),{range:y.range,allDay:w.allDay}),L=E.defs[w.defId],O=E.instances[v];if(M=L?new Yn(t,L,O):new Yn(t,w),!A(Cn(I,t),M))return!1}}return!0}(e,t,n,i)||e.dateSelection&&!function(e,t,n,i){var o=e.eventStore,s=o.defs,a=o.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;if(i&&(c=i(c)),!Xr(c.constraints,u,o,e.businessHours,t))return!1;var d=t.options.selectOverlap,h="function"==typeof d?d:null;for(var p in a){var f=a[p];if(rn(u,f.range)){if(!1===c.overlap)return!1;if(h&&!h(new Yn(t,s[f.defId],f),null))return!1}}for(var m=0,g=c.allows;m<g.length;m++){if(!(0,g[m])(Cn(r(r({},n),l),t),null))return!1}return!0}(e,t,n,i))}function Xr(e,t,n,r,i){for(var o=0,s=e;o<s.length;o++)if(!ei(Jr(s[o],t,n,r,i),t))return!1;return!0}function Jr(e,t,n,r,i){return"businessHours"===e?Qr(Ue(r,t,i)):"string"==typeof e?Qr(Rt(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?Qr(Ue(e,t,i)):[]}function Qr(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ei(e,t){for(var n=0,r=e;n<r.length;n++)if(on(r[n],t))return!0;return!1}var ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=J(),t}return n(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.props.dateProfile,n=e.mutatedEvents.instances;if(t)for(var r in n)if(!on(t.validRange,n[r].range))return!1;return Gr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t=this.props.dateProfile;return!(t&&!on(t.validRange,e.range))&&Kr({dateSelection:e},this.context)},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!V(e,".fc-event-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){return!(V(e,".fc-event:not(.fc-bg-event)")||V(e,".fc-daygrid-more-link")||V(e,"a[data-navlink]")||this.isInPopover(e))},t.prototype.isPopover=function(){return!1},t.prototype.isInPopover=function(e){return Boolean(V(e,".fc-popover"))},t}(Br);function ni(e){return{id:J(),deps:e.deps||[],reducers:e.reducers||[],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||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],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,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}var ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);function ii(e,t,n,i){if(t[e])return t[e];var o=function(e,t,n,i){var o=n[e],s=i[e],a=function(e){return o&&null!==o[e]?o[e]:s&&null!==s[e]?s[e]:null},l=a("component"),u=a("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=ii(u,t,n,i)}return!l&&c&&(l=c.component),l?{type:e,component:l,defaults:r(r({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,i);return o&&(t[e]=o),o}ri.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},ri.prototype.baseIconClass="fc-icon",ri.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"},ri.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},ri.prototype.iconOverrideOption="buttonIcons",ri.prototype.iconOverrideCustomButtonOption="icon",ri.prototype.iconOverridePrefix="fc-icon-";var oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.handleRootEl=function(e){qr(t.rootElRef,e),t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Lr(ui,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Lr(ai,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,i){return t.children(r,di(t.classNames,n),e,i)}))}))},t}(Br),si=Pr(0);function ai(e){return Lr(si.Consumer,null,(function(t){return Lr(li,r({renderId:t},e))}))}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Nr(),t}return n(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.renderInnerContent=function(){var e=this.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=hi(t.content,t.hookProps),i=null;if(void 0===r&&(r=hi(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){n=this.customContentInfo={contentKey:o,contentVal:r[o],handler:e[o]()};break}i=n?[]:r}return i},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(Br),ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t}(Br);function ci(){var e,t,n=[];return function(r,i){return t&&je(t,i)&&r===e||(e=r,t=i,n=di(r,i)),n}}function di(e,t){return"function"==typeof e&&(e=e(t)),Pt(e)}function hi(e,t){return"function"==typeof e?e(t,Lr):e}var pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},i=this.normalizeClassNames(n.viewClassNames,r);return Lr(ui,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(i))}))},t}(Br);function fi(e){return Re(e,mi)}function mi(e){var t,n="function"==typeof e?{component:e}:e,i=n.component;return n.content&&(t=n,i=function(e){return Lr(Yr.Consumer,null,(function(n){return Lr(pi,{viewSpec:n.viewSpec},(function(i,o){var s=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Lr(oi,{hookProps:s,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:i},(function(e,t,n,r){return Lr("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:i,rawOptions:n}}function gi(e,t,n,i){var o=fi(e),s=fi(t.views);return Re(function(e,t){var n,r={};for(n in e)ii(n,r,e,t);for(n in t)ii(n,r,e,t);return r}(o,s),(function(e){return function(e,t,n,i,o){var s=e.overrides.duration||e.defaults.duration||i.duration||n.duration,a=null,l="",u="",c={};if(s&&(a=function(e){var t=JSON.stringify(e),n=vi[t];return void 0===n&&(n=$e(e),vi[t]=n),n}(s))){var d=et(a);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var h=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[u]?n[u]:void 0};return{type:e.type,component:e.component,duration:a,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:h(i)||h(n)||e.overrides.buttonText,buttonTextDefault:h(o)||e.defaults.buttonText||h(xt)||e.type}}(e,s,t,n,i)}))}var vi={},yi=function(){function e(e){this.props=e,this.nowDate=Fn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,i,o,s,a,l,u,c,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(c=r).start&&u<c.start?c.start:null!=c.end&&u>=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tn(a,i.range)),a=tn(a=this.adjustActiveRange(a),r),l=rn(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=et(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return $e({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xe(i)<0&&(s=xe(s),s=n.add(s,i)),Xe(o)>1&&(a=me(a=xe(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Je(c)<Je(n)?et(c).unit:r}function d(){i=l.startOf(e,u),o=l.add(i,n),s={start:i,end:o}}return Xe(n)<=1&&this.isHiddenDay(i)&&(i=xe(i=this.skipHiddenDays(i,t))),d(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),d()),s},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.props,o=i.dateEnv,s=i.dateAlignment,a=0,l=e;s&&(l=o.startOf(l,s)),l=xe(l),r=l=this.skipHiddenDays(l,t);do{r=me(r,1),this.isHiddenDay(r)||a++}while(a<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,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},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t;return this.props.dateIncrement||((t=this.props.dateAlignment)?$e(1,t):e||$e({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,i=null,o=null,n.start&&(i=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),i||o?i&&o&&o<i?null:{start:i,end:o}:null);return t&&(t=Zt(t)),t}var n,r,i,o;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=me(e,t);return e},e}();function _i(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function bi(e,t,n,i){for(var o={},s=0,a=t;s<a.length;s++){var l=a[s];o[l.sourceId]=l}return n&&(o=wi(o,n,i)),r(r({},e),o)}function wi(e,t,n){return xi(e,Ne(e,(function(e){return function(e,t,n){return Ti(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,n)}function xi(e,t,n,r){var i={};for(var o in e){var s=e[o];t[o]?i[o]=Si(s,n,r):i[o]=s}return i}function Si(e,t,n){var i=n.options,o=n.calendarApi,s=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=J();return s.fetch({eventSource:e,range:t,context:n},(function(r){var s=r.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,r.xhr)||s),e.success&&(s=e.success.call(o,s,r.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(r){console.warn(r.message,r),i.eventSourceFailure&&i.eventSourceFailure.call(o,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:a})}function ki(e,t){return Ne(e,(function(e){return Ti(e,t)}))}function Ti(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ei(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Di(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Ci(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Mi(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ai(e,t,n,r,i){var o=[];return{headerToolbar:e.headerToolbar?Ii(e.headerToolbar,e,t,n,r,i,o):null,footerToolbar:e.footerToolbar?Ii(e.footerToolbar,e,t,n,r,i,o):null,viewsWithButtons:o}}function Ii(e,t,n,r,i,o,s){return Re(e,(function(e){return function(e,t,n,r,i,o,s){var a="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,h=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(h=r.getCustomButtonIconClass(t))||(h=r.getIconClass(e,a))||(p=t.text)):(n=i[e])?(s.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(h=r.getIconClass(e,a))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=u[e])||(h=r.getIconClass(e,a))||(p=c[e])),{buttonName:e,buttonClick:d,buttonIcon:h,buttonText:p}}))}))}(e,t,n,r,i,o,s)}))}function Li(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Oi(t)}(t,n):o=Oi(n);var s=new XMLHttpRequest;s.open(e,t,!0),"GET"!==e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){if(s.status>=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function Oi(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ni(e,t){for(var n=Fe(t.getCurrentData().eventSources),r=[],i=0,o=e;i<o.length;i++){for(var s=o[i],a=!1,l=0;l<n.length;l++)if(n[l]._raw===s){n.splice(l,1),a=!0;break}a||r.push(s)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var h=0,p=r;h<p.length;h++){var f=p[h];t.calendarApi.addEventSource(f)}}var Ri=[ni({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),ni({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;kr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),ni({eventSourceRefiners:{method:String,extraParams:At,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:function(e){return e.url?{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch:function(e,t,n){var i=e.eventSource.meta,o=function(e,t,n){var i,o,s,a,l=n.dateEnv,u=n.options,c={};return null==(i=e.startParam)&&(i=u.startParam),null==(o=e.endParam)&&(o=u.endParam),null==(s=e.timeZoneParam)&&(s=u.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},r(c,a),c[i]=l.formatIso(t.start),c[o]=l.formatIso(t.end),"local"!==l.timeZone&&(c[s]=l.timeZone),c}(i,e.range,e.context);Li(i.method,i.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),ni({recurringTypes:[{parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={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},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(i=e.endTime,o=e.startTime,r={years:i.years-o.years,months:i.months-o.months,days:i.days-o.days,milliseconds:i.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var i,o;return null},expand:function(e,t,n){var r=tn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){for(var i=e?Pe(e):null,o=xe(n.start),s=n.end,a=[];o<s;){var l=void 0;i&&!i[o.getUTCDay()]||(l=t?r.add(o,t):o,a.push(l)),o=me(o,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:At,startTime:$e,endTime:$e,duration:$e,startRecur:At,endRecur:At}}),ni({optionChangeHandlers:{events:function(e,t){Ni([e],t)},eventSources:Ni}}),ni({contentTypeHandlers:{html:function(){return Pi},domNodes:function(){return Fi}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",r(r({},Tn(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Hn(e,t))}}})];function Pi(e,t){e.innerHTML=t}function Fi(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!it(n,r)){for(var i=0,o=r;i<o.length;i++){var s=o[i];e.appendChild(s)}n.forEach(Y)}}var ji=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;e in n&&((t||--n[e]<=0)&&delete n[e],this.tryDrain())},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),Yi=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new ji(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function Vi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,bt(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=we(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})}var Hi=function(){function e(e){var t=this;this.computeOptionsData=ot(this._computeOptionsData),this.computeCurrentViewData=ot(this._computeCurrentViewData),this.organizeRawLocales=ot(Zn),this.buildLocale=ot(Xn),this.buildPluginHooks=function(){var e,t=[],n=[];return function(i,o){return e&&it(i,t)&&it(o,n)||(e=function(e,t){var n={},i={reducers:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,s=e;t<s.length;t++){var a=s[t];n[a.id]||(n[a.id]=!0,o(a.deps),u=a,i={reducers:(l=i).reducers.concat(u.reducers),contextInit:l.contextInit.concat(u.contextInit),eventRefiners:r(r({},l.eventRefiners),u.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(u.dateSpanTransforms),views:r(r({},l.views),u.views),viewPropsTransformers:l.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(u.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(u.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(u.calendarInteractions),componentInteractions:l.componentInteractions.concat(u.componentInteractions),themeClasses:r(r({},l.themeClasses),u.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||u.initialView,elementDraggingImpl:l.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),u.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),u.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),u.propSetHandlers)})}var l,u}return e&&o(e),o(t),i}(i,o)),t=i,n=o,e}}(),this.buildDateEnv=ot(Bi),this.buildTheme=ot(Ui),this.parseToolbars=ot(Ai),this.buildViewSpecs=ot(gi),this.buildDateProfileGenerator=st(zi),this.buildViewApi=ot(qi),this.buildViewUiProps=st(Gi),this.buildEventUiBySource=ot(Wi,je),this.buildEventUiBases=ot($i),this.parseContextBusinessHours=st(Ki),this.buildTitle=ot(Vi),this.emitter=new Tr,this.actionRunner=new Yi(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},i=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=i.calendarOptions.initialView||i.pluginHooks.initialView,s=this.computeCurrentViewData(o,i,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);var a,l,u,c=(a=i.calendarOptions,l=i.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Fn(a.now,l)),d=s.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p=0,f=i.pluginHooks.contextInit;p<f.length;p++)(0,f[p])(h);for(var m=function(e,t,n){var r=t?t.activeRange:null;return bi({},function(e,t){var n=Pn(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var o=0,s=r;o<s.length;o++){var a=Rn(s[o],t,n);a&&i.push(a)}return i}(e,n),r,n)}(i.calendarOptions,d,h),g={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(h),eventSources:m,eventUiBases:{},loadingLevel:_i(m),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(h).selectionConfig},v=r(r({},h),g),y=0,_=i.pluginHooks.reducers;y<_.length;y++){var b=_[y];r(g,b(null,null,v))}g.loadingLevel&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?r(r({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,i=this.emitter,o=function(e,t){var n;return"SET_OPTION"===t.type?r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),a=function(e,t){return"CHANGE_VIEW_TYPE"===t.type?t.viewType:e}(n.currentViewType,e),l=this.computeCurrentViewData(a,s,t.optionOverrides,o);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(l.options);var u={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},c=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=function(e,t,n,r){var i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!sn(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;case"PREV":if((i=r.buildPrev(e,n)).isValid)return i;break;case"NEXT":if((i=r.buildNext(e,n)).isValid)return i}return e}(d,e,c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var h=function(e,t,n,i){var o,s,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return bi(e,t.sources,a,i);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,Ne(o,(function(e){return e.sourceId!==s}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?wi(e,a,i):e;case"FETCH_EVENT_SOURCES":return xi(e,t.sourceIds?Pe(t.sourceIds):ki(e,i),a,i);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,i){var o,s=e[t];return s&&n===s.latestFetchId?r(r({},e),((o={})[t]=r(r({},s),{isFetching:!1,fetchRange:i}),o)):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}(n.eventSources,e,d,u),p=_i(h),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=It(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wr(e,i)),r&&(e=Wr(e,r)),e}(i,t,o),t,o);return r&&(s=Ue(s,r,o)),Nt($r(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=Ue(t,n,r)),Nt(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Nt(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ue(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $r(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Rt(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,h,d,u),m=p&&!l.options.progressiveEventRendering&&n.renderableEventStore||f,g=this.buildViewUiProps(u),v=g.eventUiSingleBase,y=g.selectionConfig,_=this.buildEventUiBySource(h),b=this.buildEventUiBases(m.defs,v,_),w=n.loadingLevel||0,x=p,S={dynamicOptionOverrides:o,currentViewType:a,currentDate:c,dateProfile:d,eventSources:h,eventStore:f,renderableEventStore:m,selectionConfig:y,eventUiBases:b,loadingLevel:x,businessHours:this.parseContextBusinessHours(u),dateSelection:Ei(n.dateSelection,e),eventSelection:Di(n.eventSelection,e),eventDrag:Ci(n.eventDrag,e),eventResize:Mi(n.eventResize,e)},k=r(r({},u),S),T=0,E=s.pluginHooks.reducers;T<E.length;T++){var D=E[T];r(S,D(n,e,k))}!w&&x?i.trigger("loading",!0):w&&!x&&i.trigger("loading",!1),this.state=S,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,i,o,s,a,l,u,c=this.props,d=this.state,h=this.data,p=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),f=this.computeCurrentViewData(d.currentViewType,p,c.optionOverrides,d.dynamicOptionOverrides),m=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,f.options,p.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p),f),d),g=p.pluginHooks.optionChangeHandlers,v=h&&h.calendarOptions,y=p.calendarOptions;if(v&&v!==y)for(var _ in v.timeZone!==y.timeZone&&(d.eventSources=m.eventSources=(s=m.eventSources,l=m,u=(a=d.dateProfile)?a.activeRange:null,xi(s,ki(s,l),u,l)),d.eventStore=m.eventStore=(e=m.eventStore,t=h.dateEnv,n=m.dateEnv,i=e.defs,o=Re(e.instances,(function(e){var o=i[e.defId];return o.allDay||o.recurringDef?e:r(r({},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})})),{defs:i,instances:o})),g)v[_]!==y[_]&&g[_](y[_],m);c.onData&&c.onData(m)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),i=r.refinedOptions,o=r.pluginHooks,s=r.localeDefaults,a=r.availableLocaleData;Zi(r.extra);var l=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,a,i.defaultRangeSeparator),u=this.buildViewSpecs(o.views,e,t,s),c=this.buildTheme(i,o);return{calendarOptions:i,pluginHooks:o,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(i,e,c,u,n),localeDefaults:s,availableRawLocales:a.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Ct([xt,e,t]),i=n.locales,o=n.locale,s=this.organizeRawLocales(i),a=s.map,l=this.buildLocale(o||s.defaultCode,a).options,u=this.buildPluginHooks(e.plugins||[],Ri),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},wt),St),kt),u.listenerRefiners),u.optionRefiners),d={},h=Ct([xt,l,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,g=!1;for(var v in h)"plugins"!==v&&(h[v]===f[v]||Tt[v]&&v in f&&Tt[v](f[v],h[v])?p[v]=m[v]:c[v]?(p[v]=c[v](h[v]),g=!0):d[v]=f[v]);return g&&(this.currentCalendarOptionsInput=h,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:s,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var i=t.viewSpecs[e];if(!i)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var o=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r),s=o.refinedOptions;return Zi(o.extra),{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,monthMode:s.monthMode,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,i,o){var s=Ct([xt,e.optionDefaults,n,i,e.optionOverrides,o]),a=r(r(r(r(r(r({},wt),St),kt),Dt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,h={};for(var p in s)s[p]===u[p]?l[p]=c[p]:(s[p]===this.currentCalendarOptionsInput[p]?p in this.currentCalendarOptionsRefined&&(l[p]=this.currentCalendarOptionsRefined[p]):a[p]?l[p]=a[p](s[p]):h[p]=s[p],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}},e}();function Bi(e,t,n,r,i,o,s,a){var l=Xn(t||s.defaultCode,s.map);return new $n({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function Ui(e,t){return new(t.themeClasses[e.themeSystem]||ri)(e)}function zi(e){return new(e.dateProfileGeneratorClass||yi)(e)}function qi(e,t,n){return new On(e,t,n)}function Wi(e){return Re(e,(function(e){return e.ui}))}function $i(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function Gi(e){var t=e.options;return{eventUiSingleBase:jt({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:jt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ki(e){return nr(e.options.businessHours,e)}function Zi(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Xi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new Hi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return n(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ir),Ji=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Qi(e){var t;return(t={})[e.component.uid]=e,t}var eo={},to=function(){function e(e,t){this.emitter=new Tr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),no={},ro={startTime:$e,duration:$e,create:Boolean,sourceId:String};function io(e){var t=Mt(e,ro),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Lr("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Lr(so,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Br),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Lr.apply(void 0,i(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,o=[],s=!0,a=0,l=e;a<l.length;a++){var u=l[a],c=u.buttonName,d=u.buttonClick,h=u.buttonText,p=u.buttonIcon;if("title"===c)s=!1,o.push(Lr("h2",{className:"fc-toolbar-title"},t.title));else{var f=p?{"aria-label":c}:{},m=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&m.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;o.push(Lr("button",r({disabled:g,className:m.join(" "),onClick:d,type:"button"},f),h||(p?Lr("span",{className:p}):"")))}}if(o.length>1){var v=s&&n.getClass("buttonGroup")||"";return Lr.apply(void 0,i(["div",{className:v}],o))}return o[0]},t}(Br),ao=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,qr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Lr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Br),lo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=cn(t);if(o&&r.isValidSegDownEl(e.target)){var s=V(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Yn(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=G(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(Ji),uo=function(e){function t(t){var n,r,i,o,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){cn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,".fc-event",r=s.handleSegEnter,i=s.handleSegLeave,G(n,"mouseover",".fc-event",(function(e,t){if(t!==o){o=t,r(e,t);var n=function(e){o=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=cn(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yn(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ji),co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ot(Vr),t.buildViewPropTransformers=ot(po),t.buildToolbarProps=ot(ho),t.handleNavLinkClick=$("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Nr(),t.footerRef=Nr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,n),i=[lo,uo].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,eo[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++)r[n].destroy();delete t.interactionsStore[e.uid],delete eo[e.uid]},t.resizeRunner=new ji((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return n(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,i=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fn(t.options.now,t.dateEnv),t.viewTitle),s=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=i.height?s=!0:null!=i.contentHeight?a=i.contentHeight:e=Math.max(i.aspectRatio,.5);var l=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);return Lr(Yr.Provider,{value:l},n.headerToolbar&&Lr(oo,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},o)),Lr(ao,{liquid:s,height:a,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Lr(oo,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++)t[e].destroy();this.props.emitter.trigger("_unmount")},t.prototype._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,i=n.options,o=n.calendarApi,s=t.getAttribute("data-navlink");s=s?JSON.parse(s):{};var a=r.createMarker(s.date),l=s.type,u="day"===l?i.navLinkDayClick:"week"===l?i.navLinkWeekClick:null;"function"==typeof u?u.call(o,r.toDate(a),e):("string"==typeof u&&(l=u),o.zoomTo(a,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Lr.apply(void 0,i([Rr,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,i={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},o=0,s=this.buildViewPropTransformers(t.viewPropsTransformers);o<s.length;o++){var a=s[o];r(i,a.transform(i,e))}var l=n.component;return Lr(l,r({},i))},t}(Hr);function ho(e,t,n,r,i,o){var s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:s.isValid&&!sn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function po(e){return e.map((function(e){return new e}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return lr()||o.push("fc-liquid-hack"),e.children(o,i,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(Br);function mo(e,t){return bt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var go="fc-col-header-cell",vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,i=e.theme,o=e.viewApi,s=this.props,a=s.date,l=s.dateProfile,u=hr(a,s.todayRange,null,l),c=[go].concat(pr(u,i)),d=t.format(a,s.dayHeaderFormat),h=n.navLinks&&!u.isDisabled&&s.colCnt>1?{"data-navlink":fr(a),tabIndex:0}:{},p=r(r(r({date:t.toDate(a),view:o},s.extraHookProps),{text:d}),u);return Lr(oi,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:_o,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,i){return Lr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(a),colSpan:s.colSpan},s.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Lr("a",r({ref:n,className:["fc-col-header-cell-cushion",s.isSticky?"fc-sticky":""].join(" ")},h),i)))}))},t}(Br),yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,i=t.theme,o=t.viewApi,s=t.options,a=me(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[go].concat(pr(l,i),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=r(r(r(r({date:a},l),{view:o}),e.extraHookProps),{text:c});return Lr(oi,{hookProps:d,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:_o,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(t,n,i,o){return Lr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},Lr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Br);function _o(e){return e.text}var bo=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Fn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=ge(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,$e(1,e.unit)),o=i.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:wo(r)},nextState:{nowDate:i,todayRange:wo(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Yr,t}(Ir);function wo(e){var t=xe(e);return{start:t,end:me(t,1)}}var xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ot(So),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Lr(bo,{unit:"day"},(function(e,t){return Lr("tr",null,o&&o(),n.map((function(e){return i?Lr(vo,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Lr(yo,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Br);function So(e,t,n){return e||mo(t,n)}var ko=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s++,i.push(s),o.push(n)),n=me(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(me(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(ye(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),To=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var i=n.firstIndex,o=n.lastIndex,s=i;s<=o;){var a=Math.floor(s/t),l=Math.min((a+1)*t,o+1);r.push({row:a,firstCol:s%t,lastCol:(l-1)%t,isStart:n.isStart&&s===i,isEnd:n.isEnd&&l-1===o}),s=l}return r},e}(),Eo=function(){function e(){this.sliceBusinessHours=ot(this._sliceBusinessHours),this.sliceDateSelection=ot(this._sliceDateSpan),this.sliceEventStore=ot(this._sliceEventStore),this.sliceEventDrag=ot(this._sliceInteraction),this.sliceEventResize=ot(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var a=e.eventUiBases,l=this.sliceEventStore.apply(this,i([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,i([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,i([e.businessHours,t,n,r],o)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,i([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,i([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,i([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];return e?this._sliceEventStore.apply(this,i([Ue(e,Do(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(e){var s=an(e,t,Do(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(!e)return null;var s=an(e.mutatedEvents,t,Do(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var s=function(e,t,n){var r=Wt({editable:!1},n),i=Gt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:hn(i,t),instance:Ie(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e,t,n),a=this.sliceRange.apply(this,i([e.range],r)),l=0,u=a;l<u.length;l++){u[l].eventRange=s}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.sliceEventRange(o,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:me(n.start,1)});for(var r=this.sliceRange.apply(this,i([n],t)),o=0,s=r;o<s.length;o++){var a=s[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Do(e,t){var n=e.activeRange;return t?n:{start:ge(n.start,e.slotMinTime.milliseconds),end:ge(n.end,e.slotMaxTime.milliseconds-864e5)}}var Co=/^(visible|hidden)$/,Mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),Lr("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)},t.prototype.needsXScrolling=function(){if(Co.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().width>t)return!0;return!1},t.prototype.needsYScrolling=function(){if(Co.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().height>t)return!0;return!1},t.prototype.getXScrollbarWidth=function(){return Co.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Co.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Br),Ao=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):0==--i[n]&&(delete o[n],delete t.callbackMap[n],s=!0),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Be(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Fe(this.currentMap)},e}();function Io(e){for(var t=0,n=0,r=B(e,".fc-scrollgrid-shrink");n<r.length;n++){var i=r[n];t=Math.max(t,he(i))}return Math.ceil(t)}function Lo(e,t){return e.liquid&&t.liquid}function Oo(e,t){return null!=t.maxHeight||Lo(e,t)}function No(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Lr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Lr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Ro(e,t){return it(e,t,je)}function Po(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var s=o[r],a=s.span||1,l=0;l<a;l++)n.push(Lr("col",{style:{width:"shrink"===s.width?Fo(t):s.width||"",minWidth:s.minWidth||""}}));return Lr.apply(void 0,i(["colgroup",{}],n))}function Fo(e){return null==e?4:e}function jo(e){for(var t=0,n=e;t<n.length;t++)if("shrink"===n[t].width)return!0;return!1}function Yo(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Vo(e,t){var 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 Ho(e){return Lr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Bo(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Uo(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=ot((function(e){return e}),Ro),t.renderMicroColGroup=ot(Po),t.scrollerRefs=new Ao,t.scrollerElRefs=new Ao(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(r({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return n(t,e),t.prototype.render=function(){for(var e,t=this.props,n=this.state,r=this.context,o=t.sections||[],s=this.processCols(t.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),l=Yo(t.liquid,r),u=o.length,c=0,d=[],h=[],p=[];c<u&&"header"===(e=o[c]).type;)d.push(this.renderSection(e,c,a)),c++;for(;c<u&&"body"===(e=o[c]).type;)h.push(this.renderSection(e,c,a)),c++;for(;c<u&&"footer"===(e=o[c]).type;)p.push(this.renderSection(e,c,a)),c++;var f=!lr();return Lr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!f&&d.length)&&Lr.apply(void 0,i(["thead",{}],d)),Boolean(!f&&h.length)&&Lr.apply(void 0,i(["tbody",{}],h)),Boolean(!f&&p.length)&&Lr.apply(void 0,i(["tfoot",{}],p)),f&&Lr.apply(void 0,i(["tbody",{}],d,h,p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Lr(Rr,{key:e.key},e.outerContent):Lr("tr",{key:e.key,className:Vo(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,n,e.chunk))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in r)return r.outerContent;var i=this.props,o=this.state,s=o.forceYScrollbars,a=o.scrollerClientWidths,l=o.scrollerClientHeights,u=Oo(i,e),c=Lo(i,e),d=i.liquid?s?"scroll":u?"auto":"hidden":"visible",h=No(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==a[t]?a[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Lr("td",{ref:r.elRef},Lr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Lr(Mo,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);qr(this.props.sections[n].chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return jo(this.props.cols)?Io(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=yr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,i=!1,o={},s={},a=0;a<t;a++){var l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(a=0;a<t;a++){var u=r.currentMap[a];if(u){var c=u.parentNode;o[a]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),s[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}},t}(Br);zo.addStateEquality({scrollerClientWidths:je,scrollerClientHeights:je});var qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,i=r.eventRange,o=i.ui,s={event:new Yn(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&mn(r,t),isStartResizable:!e.disableResizing&&gn(r,t),isEndResizable:!e.disableResizing&&vn(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)},a=bn(s).concat(o.classNames);return Lr(oi,{hookProps:s,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,i){return e.children(t,a.concat(n),r,i,s)}))},t.prototype.componentDidMount=function(){un(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&un(this.elRef.current,t)},t}(Br),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,i=t.options.eventTimeFormat||e.defaultTimeFormat,o=yn(n,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Lr(qo,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$o,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,i,o,s,a){return Lr("a",r({className:e.extraClassNames.concat(i).join(" "),style:{borderColor:a.borderColor,backgroundColor:a.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Lr("div",{className:"fc-event-main",ref:o,style:{color:a.textColor}},s),a.isStartResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-start"}),a.isEndResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Br);function $o(e){return Lr("div",{className:"fc-event-main-frame"},e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title-container"},Lr("div",{className:"fc-event-title fc-sticky"},e.event.title||Lr(Rr,null,"\xa0"))))}var Go=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Lr(oi,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ko=bt({day:"numeric"}),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=st(Jo),t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),i=pr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":tt(e.date)};return Lr(ui,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,i,o,r.isDisabled)}))},t}(Br),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Jo({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Lr(ai,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Br);function Jo(e){var t=e.date,n=e.dateEnv,i=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},i),{dayNumberText:e.showDayNumber?n.format(t,Ko):""}),e.extraProps)}function Qo(e){return Lr("div",{className:"fc-"+e})}var es=function(e){return Lr(qo,{defaultContent:ts,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,i){return Lr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:i.backgroundColor}},r)}))};function ts(e){return e.event.title&&Lr("div",{className:"fc-event-title"},e.event.title)}var ns=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,i=e.date,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),a=n.format(i,o);return Lr(oi,{hookProps:{num:s,text:a,date:i},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:rs,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function rs(e){return e.text}var is=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i.isRendering=!1,i.isRendered=!1,i.currentClassNames=[],i.customContentRenderId=0,i.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":i.renderRunner.tryDrain()}},i.handleData=function(e){i.currentData=e,i.renderRunner.request(e.calendarOptions.rerenderDelay)},i.handleRenderRequest=function(){if(i.isRendering){i.isRendered=!0;var e=i.currentData;Or(Lr(fo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,s){return i.setClassNames(t),i.setHeight(n),Lr(si.Provider,{value:i.customContentRenderId},Lr(co,r({isHeightAuto:o,forPrint:s},e)))})),i.el)}else i.isRendered&&(i.isRendered=!1,Or(null,i.el),i.setClassNames([]),i.setHeight(""));Fr()},i.el=t,i.renderRunner=new ji(i.handleRenderRequest),new Hi({optionOverrides:n,calendarApi:i,onAction:i.handleAction,onData:i.handleData}),i}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId++:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){e.prototype.updateSize.call(this),Fr()},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!it(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var i=r[n];t.remove(i)}for(var o=0,s=e;o<s.length;o++)i=s[o],t.add(i);this.currentClassNames=e}},t.prototype.setHeight=function(e){q(this.el,"height",e)},t}(jn);no.touchMouseIgnoreWait=500;var os=0,ss=0,as=!1,ls=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,os++,setTimeout((function(){os--}),no.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Tr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ss++||window.addEventListener("touchmove",us,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ss||window.removeEventListener("touchmove",us,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!V(n,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))},e.prototype.cleanup=function(){as=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?V(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return os||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(as=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function us(e){as&&e.preventDefault()}var cs=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",z(n,{left:r.left,top:r.top}),Z(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Y(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&z(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),z(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ds=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return n(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(Dr),hs=function(e){function t(t,n){return e.call(this,new Cr(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return wr(this.scrollController.el)},t}(ds),ps=function(e){function t(t){return e.call(this,new Mr,t)||this}return n(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ds),fs="function"==typeof performance?performance.now:Date.now,ms=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=fs();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(fs()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy();this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,i=r-e.distance,o=i*i/(r*r)*this.maxVelocity*t,s=1;switch(e.name){case"left":s=-1;case"right":n.setScrollLeft(n.getScrollLeft()+o*s);break;case"top":s=-1;case"bottom":n.setScrollTop(n.getScrollTop()+o*s)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i],a=s.clientRect,l=e-a.left,u=a.right-e,c=t-a.top,d=a.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new ps(!1):new hs(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t<n.length;t++){var r=n[t];"object"==typeof r?e.push(r):e.push.apply(e,Array.prototype.slice.call(document.querySelectorAll(r)))}return e},e}(),gs=function(e){function t(t,n){var r=e.call(this,t)||this;r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,te(document.body),re(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,i=e.deltaY;n*n+i*i>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,ne(document.body),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new ls(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new cs,r.autoScroller=new ms,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(to),vs=function(){function e(e){this.origRect=xr(e),this.scrollCaches=Sr(e).map((function(e){return new hs(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy()},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n,r={left:e,top:t},i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i];if(void 0,"HTML"!==(n=s.getEventTarget().tagName)&&"BODY"!==n&&!rr(r,s.clientRect))return!1}return!0},e}(),ys=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Tr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;i!==document&&(r=or(r,t=xr(i)));var o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&t){var s=ir(t,o.rect);s&&(r=sr(s))}this.coordAdjust=ar(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&_s(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Re(this.droppableStore,(function(e){return e.component.prepareHits(),new vs(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,i=null;for(var o in n){var s=n[o].component,a=r[o];if(a&&a.isWithinClipping(e,t)){var l=a.computeLeft(),u=a.computeTop(),c=e-l,d=t-u,h=a.origRect,p=h.right-h.left,f=h.bottom-h.top;if(c>=0&&c<p&&d>=0&&d<f){var m=s.queryHit(c,d,p,f),g=s.context.getCurrentData().dateProfile;m&&on(g.activeRange,m.dateSpan.range)&&(!i||m.layer>i.layer)&&(m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function _s(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&kn(e.dateSpan,t.dateSpan)}function bs(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.datePointTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,{date:(i=t.dateEnv).toDate(n.range.start),dateStr:i.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}var ws=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var i=n.hitDragging,o=i.initialHit,s=i.finalHit;if(o&&s&&_s(o,s)){var a=t.context,l=r(r({},bs(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",l)}}},n.dragging=new gs(t.el),n.dragging.autoScroller.isEnabled=!1;var i=n.hitDragging=new ys(n.dragging,Qi(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),xs=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(ce);for(var a={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(a,c)}return a.range={start:s[0],end:s[3]},a.allDay=i.allDay,a}(n.hitDragging.initialHit,e,i.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(o)||(s=!0,o=null)),o?i.dispatch({type:"SELECT_DATES",selection:o}):t||i.dispatch({type:"UNSELECT_DATES"}),s?Q():ee(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(Dn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var i=t.component.context.options,o=n.dragging=new gs(t.el);o.touchScrollAllowed=!1,o.minDistance=i.selectMinDistance||0,o.autoScroller.isEnabled=i.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),Ss=function(e){function t(n){var i=e.call(this,n)||this;i.subjectEl=null,i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingContext=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(e){var t=e.origEvent.target,n=i,r=n.component,o=n.dragging,s=o.mirror,a=r.context.options,l=r.context;i.subjectEl=e.subjectEl;var u=i.subjectSeg=cn(e.subjectEl),c=(i.eventRange=u.eventRange).instance.instanceId;i.relevantEvents=Ot(l.getCurrentData().eventStore,c),o.minDistance=e.isTouch?0:a.eventDragMinDistance,o.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null,s.parentNode=V(t,".fc"),s.revertDuration=a.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");o.setIgnoreMove(!d),i.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},i.handleDragStart=function(e){var t=i.component.context,n=i.eventRange,r=n.instance.instanceId;e.isTouch?r!==i.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:i.subjectEl,event:new Yn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},i.handleHitUpdate=function(e,t){if(i.isDragging){var n=i.relevantEvents,r=i.hitDragging.initialHit,o=i.component.context,s=null,a=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,h=(s=d.context).options;o===s||h.editable&&h.droppable?(a=function(e,t,n){var r=e.dateSpan,i=t.dateSpan,o=r.range.start,s=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=t.component.context.options.allDayMaintainDuration,i.allDay&&(o=xe(o)));var l=Jt(o,s,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(a.allDay=!1);for(var u={datesDelta:l,standardProps:a},c=0,d=n;c<d.length;c++)(0,d[c])(u,e,t);return u}(r,e,s.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=An(n,s.getCurrentData().eventUiBases,a,s),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,a=null,l=null,c.mutatedEvents={defs:{},instances:{}})):s=null}i.displayDrag(s,c),u?Q():ee(),t||(o===s&&_s(r,e)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),i.receivingContext=s,i.validMutation=a,i.mutatedRelevantEvents=l)}},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(e){if(i.isDragging){var t=i.component.context,n=t.viewApi,o=i,s=o.receivingContext,a=o.validMutation,l=i.eventRange.def,u=i.eventRange.instance,c=new Yn(t,l,u),d=i.relevantEvents,h=i.mutatedRelevantEvents,p=i.hitDragging.finalHit;if(i.clearDrag(),t.emitter.trigger("eventDragStop",{el:i.subjectEl,event:c,jsEvent:e.origEvent,view:n}),a){if(s===t){var f=new Yn(t,h.defs[l.defId],u?h.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:h});for(var m={oldEvent:c,event:f,relatedEvents:Hn(h,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},v=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;v<y.length;v++){var _=y[v];r(g,_(a,t))}t.emitter.trigger("eventDrop",r(r(r({},m),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(s){var b={event:c,relatedEvents:Hn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},b),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",b);var w=h.defs[l.defId],x=h.instances[u.instanceId],S=new Yn(s,w,x);s.dispatch({type:"MERGE_EVENTS",eventStore:h});var k={event:S,relatedEvents:Hn(h,s,x),revert:function(){s.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};s.emitter.trigger("eventAdd",k),e.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),s.emitter.trigger("drop",r(r({},bs(p.dateSpan,s)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.component.context.viewApi})),s.emitter.trigger("eventReceive",r(r({},k),{draggedEl:e.subjectEl,view:p.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}i.cleanup()};var o=i.component.context.options,s=i.dragging=new gs(n.el);s.pointer.selector=t.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=o.dragScroll;var a=i.hitDragging=new ys(i.dragging,eo);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Ji),ks=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=cn(n.querySegEl(e)),i=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==i.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Ot(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var i=n.querySegEl(e);n.draggingSegEl=i,n.draggingSeg=cn(i),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:i,event:new Yn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,i){var o=n.component.context,s=n.relevantEvents,a=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,h={affectedEvents:s,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,i,o){for(var s=e.component.context.dateEnv,a=Jt(e.dateSpan.range.start,t.dateSpan.range.start,s,e.component.largeUnit),l={},u=0,c=o;u<c.length;u++){var d=(0,c[u])(e,t);if(!1===d)return null;d&&r(l,d)}if(n){if(s.add(i.start,a)<i.end)return l.startDelta=a,l}else if(s.add(i.end,a)>i.start)return l.endDelta=a,l;return null}(a,e,i.subjectEl.classList.contains("fc-event-resizer-start"),l.range,o.pluginHooks.eventResizeJoinTransforms)),u&&(c=An(s,o.getCurrentData().eventUiBases,u,o),h.mutatedEvents=c,n.component.isInteractionValid(h)||(d=!0,u=null,c=null,h.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:h}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&_s(a,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,i=n.eventRange.def,o=n.eventRange.instance,s=new Yn(t,i,o),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:s,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Yn(t,l.defs[i.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:s,event:u,relatedEvents:Hn(l,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||$e(0),endDelta:n.validMutation.endDelta||$e(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new gs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(Ji),Ts=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!V(r,n),t.matchesEvent=!!V(r,Ss.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ls(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Es={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},Ds=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,i){var o=n.hitDragging.dragging,s=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(s=e.component.context,n.canDropElOnCalendar(i.subjectEl,s)&&(a=function(e,t,n){for(var i=r({},t.leftoverProps),o=0,s=n.pluginHooks.externalDefTransforms;o<s.length;o++){var a=s[o];r(i,a(e,t))}var l=Wt(i,n),u=Gt(l.refined,l.extra,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),c=e.range.start;e.allDay&&t.startTime&&(c=n.dateEnv.add(c,t.startTime));var d=t.duration?n.dateEnv.add(c,t.duration):Mn(e.allDay,c,n);return{def:u,instance:Ie(u.defId,{start:c,end:d})}}(e.dateSpan,n.dragMeta,s),u.mutatedEvents=Lt(a),(l=!Gr(u,s))&&(u.mutatedEvents={defs:{},instances:{}},a=null))),n.displayDrag(s,u),o.setMirrorIsVisible(t||!a||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(o.setMirrorNeedsRevert(!a),n.receivingContext=s,n.droppableEvent=a)},this.handleDragEnd=function(e){var t=n,i=t.receivingContext,o=t.droppableEvent;if(n.clearDrag(),i&&o){var s=n.hitDragging.finalHit,a=s.component.context.viewApi,l=n.dragMeta;if(i.emitter.trigger("drop",r(r({},bs(s.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:a})),l.create){var u=Lt(o);i.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new Yn(i,o.def,o.instance),relatedEvents:[],revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:a})}}n.receivingContext=null,n.droppableEvent=null};var i=this.hitDragging=new ys(e,eo);i.requireInitial=!1,i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta(e)):io((t=function(e,t){var n=no.dataAttrPrefix,r=(n?n+"-":"")+"event";return e.getAttribute("data-"+r)||""}(e))?JSON.parse(t):{create:!1});var t},e.prototype.displayDrag=function(e,t){var n=this.receivingContext;n&&n!==e&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},e.prototype.clearDrag=function(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})},e.prototype.canDropElOnCalendar=function(e,t){var n=t.options.dropAccept;return"function"==typeof n?n.call(t.calendarApi,e):"string"!=typeof n||!n||Boolean(H(e,n))},e}();no.dataAttrPrefix="";var Cs=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,i=r.minDistance,o=r.longPressDelay;t.minDistance=null!=i?i:e.isTouch?0:xt.eventDragMinDistance,t.delay=e.isTouch?null!=o?o:xt.longPressDelay:0},this.handleDragStart=function(e){e.isTouch&&n.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;var r=this.dragging=new gs(e);r.touchScrollAllowed=!1,null!=t.itemSelector&&(r.pointer.selector=t.itemSelector),null!=t.appendTo&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ms=function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new ls(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}},t}(to),As=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ms(n);"string"==typeof t.itemSelector?r.pointer.selector=t.itemSelector:n===document&&(r.pointer.selector="[data-event]"),"string"==typeof t.mirrorSelector&&(r.mirrorSelector=t.mirrorSelector),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Is=ni({componentInteractions:[ws,xs,Ss,ks],calendarInteractions:[Ts],elementDraggingImpl:gs,listenerRefiners:Es}),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Nr(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,i=[],o=Bo(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Lr(pi,{viewSpec:r.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(zo,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var o=this.props,s=this.context,a=!o.forPrint&&Bo(s.options),l=!o.forPrint&&Uo(s.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Ho}]}),Lr(pi,{viewSpec:s.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(i,{liquid:!o.isHeightAuto&&!o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(ti);function Os(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.row].push(s)}return n}function Ns(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.firstCol].push(s)}return n}function Rs(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.row].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}var Ps=bt({week:"narrow"}),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,i=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:i,moreCnt:n.moreCnt,dayEl:t.rootEl,ev:e})}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.viewApi,o=this.props,s=o.date,a=o.dateProfile,l={num:o.moreCnt,text:o.buildMoreLinkText(o.moreCnt),view:i},u=n.navLinks?{"data-navlink":fr(s,"week"),tabIndex:0}:{};return Lr(Zo,{date:s,dateProfile:a,todayRange:o.todayRange,showDayNumber:o.showDayNumber,extraHookProps:o.extraHookProps,elRef:this.handleRootEl},(function(t,i,c,d){return Lr("td",r({ref:t,className:["fc-daygrid-day"].concat(i,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),Lr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:o.innerElRef},o.showWeekNumber&&Lr(ns,{date:s,defaultFormat:Ps},(function(e,t,n,i){return Lr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),i)})),!d&&Lr(Vs,{date:s,dateProfile:a,showDayNumber:o.showDayNumber,forceDayTop:o.forceDayTop,todayRange:o.todayRange,extraHookProps:o.extraHookProps}),Lr("div",{className:"fc-daygrid-day-events",ref:o.fgContentElRef,style:{paddingBottom:o.fgPaddingBottom}},o.fgContent,Boolean(o.moreCnt)&&Lr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:o.moreMarginTop}},Lr(oi,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ys,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,i){return Lr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},i)})))),Lr("div",{className:"fc-daygrid-day-bg"},o.bgContent)))}))},t}(ti);function js(e){return e.dayNumberText}function Ys(e){return e.text}var Vs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":fr(e.date),tabIndex:0}:{};return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:js},(function(n,i){return(i||e.forceDayTop)&&Lr("div",{className:"fc-daygrid-day-top",ref:n},Lr("a",r({className:"fc-daygrid-day-number"},t),i||Lr(Rr,null,"\xa0")))}))},t}(Br),Hs=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Bs(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var Us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Hs,i=yn(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Lr(qo,{seg:e.seg,timeText:i,defaultContent:zs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,i,o){return Lr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(s=e.seg.eventRange.def.url)?{href:s}:{}),o);var s}))},t}(Br);function zs(e){return Lr(Rr,null,Lr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title"},e.event.title||Lr(Rr,null,"\xa0")))}var qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Wo,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Hs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Br);function Ws(e,t,n,i,o,s,a,l){for(var u=[],c=[],d={},h={},p={},f={},m={},g=0;g<a;g++)u.push([]),c.push(0);for(var v=0,y=t=pn(t,l);v<y.length;v++)E(k=y[v],o[k.eventRange.instance.instanceId+":"+k.firstCol]||0);!0===n||!0===i?function(e,t,n,r){Gs(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,s):"number"==typeof n?function(e,t,n,r){Gs(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof i&&function(e,t,n,r){Gs(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,i);for(var _=0;_<a;_++){for(var b=0,w=0,x=0,S=u[_];x<S.length;x++){var k,T=S[x];d[(k=T.seg).eventRange.instance.instanceId]||(h[k.eventRange.instance.instanceId]=T.top,k.firstCol===k.lastCol&&k.isStart&&k.isEnd?(p[k.eventRange.instance.instanceId]=T.top-b,w=0,b=T.bottom):w+=T.bottom-T.top)}w&&(c[_]?f[_]=w:m[_]=w)}function E(e,t){if(!D(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,i=u[n];r<i.length;r++)if(D(e,t,i[r].bottom))return}function D(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var i=0,o=u[r];i<o.length;i++){var s=o[i];if(n<s.bottom&&n+t>s.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var i=u[r],o=0;o<i.length&&n>=i[o].top;)o++;i.splice(o,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var C in o)o[C]||(d[C.split(":")[0]]=!0);return{segsByFirstCol:u.map($s),segsByEachCol:u.map((function(t,n){var i=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.seg)}return t}(t);return function(e,t,n){for(var i={start:t,end:me(t,1)},o=[],s=0,a=e;s<a.length;s++){var l=a[s],u=l.eventRange,c=u.range,d=tn(c,i);d&&o.push(r(r({},l),{firstCol:n,lastCol:n,eventRange:{def:u.def,ui:r(r({},u.ui),{durationEditable:!1}),instance:u.instance,range:d},isStart:l.isStart&&d.start.valueOf()===c.start.valueOf(),isEnd:l.isEnd&&d.end.valueOf()===c.end.valueOf()}))}return o}(i,e[n].date,n)})),segIsHidden:d,segTops:h,segMarginTops:p,moreCnts:c,moreTops:f,paddingBottoms:m}}function $s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];o.seg.firstCol===t&&n.push(o.seg)}return n}function Gs(e,t,n,r,i){for(var o=e.length,s={},a=[],l=0;l<o;l++)a.push([]);for(l=0;l<o;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var h=d[c];i(h,u)?p(h):f(h,u,r),h.top!==h.bottom&&u++}function p(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!s[n]){s[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)a[r].push(e)}}function f(n,r,i){var o=n.seg,s=o.eventRange.instance.instanceId;if(!t[s]){t[s]=!0;for(var l=o.firstCol;l<=o.lastCol;l++){var u=++e[l];if(i&&1===u)for(var c=r-1;a[l].length>c;)f(a[l].pop(),a[l].length,!1)}}}}var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ao,t.frameElRefs=new Ao,t.fgElRefs=new Ao,t.segHarnessRefs=new Ao,t.rootElRef=Nr(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,i=t.cells.length,o=Ns(t.businessHourSegs,i),s=Ns(t.bgEventSegs,i),a=Ns(this.getHighlightSegs(),i),l=Ns(this.getMirrorSegs(),i),u=Ws(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,i,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,h=u.segsByEachCol,p=u.segIsHidden,f=u.segTops,m=u.segMarginTops,g=u.moreCnts,v=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var i=e.renderFgSegs(d[r],p,f,m,y,t.todayRange),u=e.renderFgSegs(l[r],{},f,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Lr(Fs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:g[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:p,moreMarginTop:v[r],segsByEachCol:h[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Lr(Rr,null,Lr(Rr,null,i),Lr(Rr,null,u)),bgContent:Lr(Rr,null,e.renderFillSegs(a[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!je(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,i,o,s,a,l,u){var c=this.context,d=this.props.eventSelection,h=this.state.framePositions,p=1===this.props.cells.length,f=[];if(h)for(var m=0,g=e;m<g.length;m++){var v=g[m],y=v.eventRange.instance.instanceId,_=a||l||u,b=o[y],w=t[y]||b,x=t[y]||_||v.firstCol!==v.lastCol||!v.isStart||!v.isEnd,S=void 0,k=void 0,T=void 0,E=void 0;x?(k=n[y],c.isRtl?(E=0,T=h.lefts[v.lastCol]-h.lefts[v.firstCol]):(T=0,E=h.rights[v.firstCol]-h.rights[v.lastCol])):S=i[y],f.push(Lr("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:y,ref:_?null:this.segHarnessRefs.createRef(y+":"+v.firstCol),style:{visibility:w?"hidden":"",marginTop:S||"",top:k||"",left:T||"",right:E||""}},Bs(v)?Lr(Us,r({seg:v,isDragging:a,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s))):Lr(qs,r({seg:v,isDragging:a,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s)))))}return f},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,o=this.props.todayRange,s=this.state.framePositions,a=[];if(s)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:s.lefts[c.lastCol]-s.lefts[c.firstCol]}:{left:0,right:s.rights[c.firstCol]-s.rights[c.lastCol]};a.push(Lr("div",{key:wn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Lr(es,r({seg:c},_n(c,o))):Qo(t)))}return Lr.apply(void 0,i([Rr,{}],a))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var i=this.rootElRef.current;this.setState({framePositions:new Er(i,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Re(this.segHarnessRefs.currentMap,(function(e){return e.getBoundingClientRect().height}))},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(ti);Ks.addStateEquality({segHeights:je});var Zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new ji(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=t.props.onClose;n&&!t.rootEl.contains(e.target)&&n()},t.handleDocumentScroll=function(){t.repositioner.request(10)},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return n(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Lr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Lr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Lr("span",{className:"fc-popover-title"},t.title),Lr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Lr("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children))},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),document.addEventListener("scroll",this.handleDocumentScroll),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown),document.removeEventListener("scroll",this.handleDocumentScroll)},t.prototype.updateSize=function(){var e=this.props,t=e.alignmentEl,n=e.topAlignmentEl,r=this.rootEl;if(r){var i,o=r.getBoundingClientRect(),s=t.getBoundingClientRect(),a=n?n.getBoundingClientRect().top:s.top;a=Math.min(a,window.innerHeight-o.height-10),a=Math.max(a,10),i=this.context.isRtl?s.right-o.width:s.left,i=Math.min(i,window.innerWidth-o.width-10),z(r,{top:a,left:i=Math.max(i,10)})}},t}(Br),Xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePopoverEl=function(e){t.popoverEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,i=this.props,o=i.date,s=i.hiddenInstances,a=i.todayRange,l=i.dateProfile,u=i.selectedInstanceId,c=n.format(o,t.dayPopoverFormat);return Lr(Zo,{date:o,dateProfile:l,todayRange:a,elRef:this.handlePopoverEl},(function(e,t,n){return Lr(Zs,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:i.onCloseClick,alignmentEl:i.alignmentEl,topAlignmentEl:i.topAlignmentEl},Lr(Xo,{date:o,dateProfile:l,todayRange:a},(function(e,t){return t&&Lr("div",{className:"fc-more-popover-misc",ref:e},t)})),i.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Lr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:s[t]?"hidden":""}},Bs(e)?Lr(Us,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))):Lr(qs,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))))})))}))},t.prototype.queryHit=function(e,t,n,r){var i=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:i,end:me(i,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(ti),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=ot(Os),t.splitBgEventSegs=ot(Os),t.splitFgEventSegs=ot(Os),t.splitDateSelectionSegs=ot(Os),t.splitEventDrag=ot(Rs),t.splitEventResize=ot(Rs),t.buildBuildMoreLinkText=ot(Qs),t.rowRefs=new Ao,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,i=n.dateEnv,o=n.options.moreLinkClick;function s(e){var t=e.eventRange,r=t.def,o=t.instance,s=t.range;return{event:new Yn(n,r,o),start:i.toDate(s.start),end:i.toDate(s.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:e.ev,view:n.viewApi})),o&&"popover"!==o?"string"==typeof o&&n.calendarApi.zoomTo(e.date,o):t.setState({morePopoverState:r(r({},e),{currentFgEventSegs:t.props.fgEventSegs})})},t.handleMorePopoverClose=function(){t.setState({morePopoverState:null})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,i=t.dayMaxEvents,o=t.expandRows,s=this.state.morePopoverState,a=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,a),u=this.splitBgEventSegs(t.bgEventSegs,a),c=this.splitFgEventSegs(t.fgEventSegs,a),d=this.splitDateSelectionSegs(t.dateSelectionSegs,a),h=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=this.buildBuildMoreLinkText(this.context.options.moreLinkText),m=!0===i||!0===r;return m&&!o&&(m=!1,r=null,i=null),Lr("div",{className:["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Lr(bo,{unit:"day"},(function(m,g){return Lr(Rr,null,Lr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Lr("tbody",null,t.cells.map((function(o,s){return Lr(Ks,{ref:e.rowRefs.createRef(s),key:o.length?o[0].date.toISOString():s,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:l[s],eventSelection:t.eventSelection,bgEventSegs:u[s].filter(ea),fgEventSegs:c[s],dateSelectionSegs:d[s],eventDrag:h[s],eventResize:p[s],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:f,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&s&&s.currentFgEventSegs===t.fgEventSegs&&Lr(Xs,{date:s.date,dateProfile:n,segs:s.allSegs,alignmentEl:s.dayEl,topAlignmentEl:1===a?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Er(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Er(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:me(n,1)}},t}(ti);function Qs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ea(e){return e.eventRange.def.allDay}var ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new na,t.tableRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr(Js,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti),na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Eo),ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ot(ia),t.headerRef=Nr(),t.tableRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Lr(xo,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Lr(ta,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(Ls);function ia(e,t){var n=new ko(e.renderRange,t);return new To(n,/year|month|week/.test(e.currentRangeUnit))}var oa=ni({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:ra,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;return/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=fe(i,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=fe(l,6-Math.ceil(ve(a,l)))),{start:a,end:l}},t}(yi)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?ln(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(cr),aa=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(sn(t.currentRange,e)){var n=xe(e),r=e.valueOf()-n.valueOf();if(r>=Je(t.slotMinTime)&&r<Je(t.slotMaxTime))return this.computeTimeTop($e(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=xe(e)),this.computeTimeTop($e(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,i=this.dateProfile,o=this.slatMetas,s=r.els.length,a=o[1].date.valueOf()-o[0].date.valueOf(),l=(e.milliseconds-Je(i.slotMinTime))/a;return l=Math.max(0,l),l=Math.min(s,l),t=Math.floor(l),n=l-(t=Math.min(t,s-1)),r.tops[t]+r.getHeight(t)*n},e}(),la=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.slatElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Lr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Lr(ca,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new aa(new Er(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas))},t}(Br),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,i=e.slatElRefs;return Lr("tbody",null,e.slatMetas.map((function(o,s){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return Lr("tr",{key:o.key,ref:i.createRef(o.key)},e.axis&&Lr(ha,r({},o)),Lr(oi,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Lr("td",{ref:e,className:l.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(Br),da=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function ha(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Lr(Yr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?da:Array.isArray(i.slotLabelFormat)?bt(i.slotLabelFormat[0]):bt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Lr(oi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:pa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Lr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Lr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Lr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}return Lr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function pa(e){return e.text}function fa(e,t,n,r,i){for(var o=new Date(0),s=e,a=$e(0),l=n||function(e){var t,n,r;for(t=la.length-1;t>=0;t--)if(null!==(r=Qe(n=$e(la[t]),e))&&r>1)return n;return e}(r),u=[];Je(s)<Je(t);){var c=i.add(o,s),d=null!==Qe(a,l);u.push({date:c,time:s,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),s=Ke(s,r),a=Ke(a,r)}return u}var ma=bt({week:"short"}),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new sa,t.headerElRef=Nr(),t.rootElRef=Nr(),t.scrollerElRef=Nr(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e){void 0===e&&(e="");var n=t.context.options,i=t.props.dateProfile.renderRange,o=ye(i.start,i.end),s=n.navLinks&&1===o?{"data-navlink":fr(i.start,"week"),tabIndex:0}:{};return n.weekNumbers?Lr(ns,{date:i.start,defaultFormat:ma},(function(t,n,i,o){return Lr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Lr("a",r({ref:i,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},s),o)))})):Lr("th",{className:"fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Lr(oi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Lr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Lr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Bo(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Lr(pi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(zo,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Bo(u.options),h=!c.forPrint&&Uo(u.options),p=[];e&&p.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(p.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),p.push({key:"all-day-divider",type:"body",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var f=u.options.nowIndicator;return p.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Lr("div",{className:"fc-timegrid-axis-chunk"},Lr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Lr("tbody",null,Lr(ya,{slatMetas:o}))),Lr("div",{className:"fc-timegrid-now-indicator-container"},Lr(bo,{unit:f?"minute":"day"},(function(e){var t=f&&s&&s.safeComputeTop(e);return"number"==typeof t?Lr(Go,{isAxis:!0,date:e},(function(e,n,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&p.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ho},{key:"cols",content:Ho}]}),Lr(pi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:p}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(ti);function va(e){return e.text}var ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Lr("tr",{key:e.key},Lr(ha,r({},e)))}))},t}(Br);function _a(e,t){var n,r=[];for(n=0;n<t;n++)r.push([]);if(e)for(n=0;n<e.length;n++)r[e[n].col].push(e[n]);return r}function ba(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.col].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}function wa(e,t,n,r){for(var i=0,o=e;i<o.length;i++){var s=o[i];s.top=n.computeDateTop(s.start,t),s.bottom=Math.max(s.top+(r||0),n.computeDateTop(s.end,t))}}function xa(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)i=e,o=t[r],i.bottom>o.top&&i.top<o.bottom&&n.push(t[r]);var i,o;return n}function Sa(e){var t,n,r=e.forwardSegs,i=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)Sa(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function ka(e,t,n,r){var i,o=e.forwardSegs;if(null==e.forwardCoord)for(o.length?(function(e,t){var n=e.map(Ta),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return se(e,t,r)})),n.map((function(e){return e._seg}))}(o,r),ka(o[0],t+1,n,r),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)ka(o[i],0,e.forwardCoord,r)}function Ta(e){var t=fn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Ea=bt({hour:"numeric",minute:"2-digit",meridiem:!1}),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),Lr(Wo,r({},this.props,{defaultTimeFormat:Ea,extraClassNames:e}))},t}(Br);no.timeGridEventCondensedHeight=30;var Ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.selectMirror,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],o=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr(Zo,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(s,a,l){return Lr("td",r({ref:s,className:["fc-timegrid-col"].concat(a,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,o)),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(i,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Lr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Lr(Ma,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,i){var o=this.props;return o.forPrint?this.renderPrintFgSegs(e):o.slatCoords?this.renderPositionedFgSegs(e,t,n,r,i):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=pn(e,this.context.options.eventOrder)).map((function(e){return Lr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Lr(Da,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},_n(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,i,o){var s=this,a=this.context,l=this.props;return(e=function(e,t,n,r,i){return wa(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++)(c=r[n]).level=null,c.forwardCoord=null,c.backwardCoord=null,c.forwardPressure=null;var i,o=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&xa(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e=pn(e,t));if(function(e){var t,n,r,i,o;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],o=t+1;o<e.length;o++)xa(i,e[o],i.forwardSegs)}(o),i=o[0]){for(var s=0,a=i;s<a.length;s++)Sa(c=a[s]);for(var l=0,u=i;l<u.length;l++){var c;ka(c=u[l],0,0,t)}}return e}(e,i)}(e,l.date,l.slatCoords,a.options.eventMinHeight,a.options.eventOrder)).map((function(e){var a=e.eventRange.instance.instanceId,u=n||i||o?r({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return Lr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:a,style:r({visibility:t[a]?"hidden":""},u)},Lr(Da,r({seg:e,isDragging:n,isResizing:i,isDateSelecting:o,isSelected:a===l.eventSelection,isCondensed:e.bottom-e.top<no.timeGridEventCondensedHeight},_n(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,i=this.context,o=this.props;if(o.slatCoords){wa(e,o.date,o.slatCoords,i.options.eventMinHeight);var s=e.map((function(e){return Lr("div",{key:wn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Lr(es,r({seg:e},_n(e,o.todayRange,o.nowDate))):Qo(t))}));return Lr(Rr,null,s)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Lr(Go,{isAxis:!1,date:r,key:t},(function(t,i,o,s){return Lr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,i=this.context,o=i.isRtl,s=i.options.slotEventOverlap,a=e.backwardCoord,l=e.forwardCoord;s&&(l=Math.min(1,a+2*(l-a))),o?(t=1-l,n=a):(t=a,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return s&&e.forwardPressure&&(u[o?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(Br),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Lr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(Br),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=ot(_a),t.splitBgEventSegs=ot(_a),t.splitBusinessHourSegs=ot(_a),t.splitNowIndicatorSegs=ot(_a),t.splitDateSelectionSegs=ot(_a),t.splitEventDrag=ot(ba),t.splitEventResize=ot(ba),t.rootElRef=Nr(),t.cellElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,i=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitBusinessHourSegs(t.businessHourSegs,r),a=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Lr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Lr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Lr("tbody",null,Lr("tr",null,t.axis&&Lr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Lr(Go,{isAxis:!0,date:t.nowDate},(function(e,t,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},i)}))))),t.cells.map((function(n,r){return Lr(Ca,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:o[r],businessHourSegs:s[r],nowIndicatorSegs:a[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e,t=this.props;t.onColCoords&&null!==t.clientWidth&&t.onColCoords(new Er(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(Br),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=ot(La),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var i=r.computeTimeTop(e.time);(i=Math.ceil(i))&&i++,n(i)}return!0}},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return Lr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Lr(ua,{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}),Lr(Aa,{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}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.positionToHit=function(e,t){var n=this.context,r=n.dateEnv,i=n.options,o=this.colCoords,s=this.props.dateProfile,a=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=o.leftToIndex(e),h=a.positions.topToIndex(t);if(null!=d&&null!=h){var p=a.positions.tops[h],f=a.positions.getHeight(h),m=(t-p)/f,g=h*c+Math.floor(m*c),v=this.props.cells[d].date,y=Ke(s.slotMinTime,Ze(u,g)),_=r.add(v,y);return{col:d,dateSpan:{range:{start:_,end:r.add(_,u)},allDay:!1},dayEl:o.els[d],relativeRect:{left:o.lefts[d],right:o.rights[d],top:p,bottom:p+f}}}},t}(Br);function La(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=ot(Na),t.slicer=new Ra,t.timeColsRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,i=t.dateProfile,o=t.dayTableModel,s=n.options.nowIndicator,a=this.buildDayRanges(o,i,n.dateEnv);return Lr(bo,{unit:s?"minute":"day"},(function(l,u){return Lr(Ia,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,i,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:i,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:s&&e.slicer.sliceNowDate(l,n,a),todayRange:u,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti);function Na(e,t,n){for(var r=[],i=0,o=e.headerDates;i<o.length;i++){var s=o[i];r.push({start:n.add(s,t.slotMinTime),end:n.add(s,t.slotMaxTime)})}return r}var Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=tn(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},t}(Eo),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=ot(Fa),t.buildSlatMetas=ot(fa),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.dateEnv,o=t.dateProfileGenerator,s=this.props,a=s.dateProfile,l=this.buildTimeColsModel(a,o),u=this.allDaySplitter.splitProps(s),c=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,i),d=n.dayMinWidth,h=!d,p=d,f=n.dayHeaders&&Lr(xo,{dates:l.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:h?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return Lr(ta,r({},u.allDay,{dateProfile:a,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:h?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:s.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Lr(Oa,r({},u.timed,{dayTableModel:l,dateProfile:a,axis:h,slotDuration:n.slotDuration,slatMetas:c,forPrint:s.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(f,m,g)},t}(ga);function Fa(e,t){var n=new ko(e.renderRange,t);return new To(n,!1)}var ja=ni({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Pa,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,i=this.context,o=i.theme,s=i.dateEnv,a=i.options,l=i.viewApi,u=hr(t,n),c=a.listDayFormat?s.format(t,a.listDayFormat):"",d=a.listDaySideFormat?s.format(t,a.listDaySideFormat):"",h=a.navLinks?fr(t):null,p=r({date:s.toDate(t),view:l,text:c,sideText:d,navLinkData:h},u),f=["fc-list-day"].concat(pr(u,o));return Lr(oi,{hookProps:p,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Va,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(e,n,r,i){return Lr("tr",{ref:e,className:f.concat(n).join(" "),"data-date":tt(t)},Lr("th",{colSpan:3},Lr("div",{className:"fc-list-day-cushion "+o.getClass("tableCellShaded"),ref:r},i)))}))},t}(Br);function Va(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Lr(Rr,null,e.text&&Lr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Lr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ha=bt({hour:"numeric",minute:"2-digit",meridiem:"short"}),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ha;return Lr(qo,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ua,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,i,o,s,a){return Lr("tr",{className:["fc-list-event",a.event.url?"fc-event-forced-url":""].concat(i).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var i=e.eventRange.def,o=e.eventRange.instance,s=!1,a=void 0;if(i.allDay?s=!0:Xt(e.eventRange.range)?e.isStart?a=yn(e,t,n,null,null,o.range.start,e.end):e.isEnd?a=yn(e,t,n,null,null,e.start,o.range.end):s=!0:a=yn(e,t,n),s){var l={text:n.options.allDayText,view:n.viewApi};return Lr(oi,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:za,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Lr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Lr("td",{className:"fc-list-event-time"},a)}return null}(n,r,t),Lr("td",{className:"fc-list-event-graphic"},Lr("span",{className:"fc-list-event-dot",style:{borderColor:a.borderColor||a.backgroundColor}})),Lr("td",{className:"fc-list-event-title",ref:o},s))}))},t}(Br);function Ua(e){var t=e.event,n=t.url;return Lr("a",r({},n?{href:n}:{}),t.title)}function za(e){return e.text}var qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=ot($a),t.eventStoreToSegs=ot(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],i=this.computeDateVars(t.dateProfile),o=i.dayDates,s=i.dayRanges,a=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return Lr(pi,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,i){return Lr("div",{ref:n,className:r.concat(i).join(" ")},Lr(Mo,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},a.length>0?e.renderSegList(a,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Lr(oi,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Wa,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Lr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Lr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,i=n.theme,o=n.options,s=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Lr(bo,{unit:"day"},(function(e,n){for(var a=[],l=0;l<s.length;l++){var u=s[l];if(u){var c=t[l].toISOString();a.push(Lr(Ya,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,h=u=pn(u,o.eventOrder);d<h.length;d++){var p=h[d];a.push(Lr(Ba,r({key:c+":"+p.eventRange.instance.instanceId,seg:p,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},_n(p,n,e))))}}}return Lr("table",{className:"fc-list-table "+i.getClass("table")},Lr("tbody",null,a))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(an(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,a=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=tn(a,t[n]))&&(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},u.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<o.add(t[n+1].start,s))){i.end=a.end,i.isEnd=!0;break}return u},t}(ti);function Wa(e){return e.text}function $a(e){for(var t=xe(e.renderRange.start),n=e.renderRange.end,r=[],i=[];t<n;)r.push(t),i.push({start:t,end:me(t,1)}),t=me(t,1);return{dayDates:r,dayRanges:i}}function Ga(e){return!1===e?null:bt(e)}var Ka=ni({optionRefiners:{listDayFormat:Ga,listDaySideFormat:Ga,noEventsClassNames:At,noEventsContent:At,noEventsDidMount:At,noEventsWillUnmount:At},views:{list:{component:qa,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"}}}}),Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);Za.prototype.classes={root:"fc-theme-bootstrap",table:"table-bordered",tableCellShaded:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body"},Za.prototype.baseIconClass="fa",Za.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},Za.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},Za.prototype.iconOverrideOption="bootstrapFontAwesome",Za.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",Za.prototype.iconOverridePrefix="fa-";var Xa=ni({themeClasses:{bootstrap:Za}}),Ja=ni({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;return/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var i=e.context,o=i.dateEnv,s=i.options,a=e.eventSource.meta,l=a.googleCalendarApiKey||s.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;return t||(t="https://www.googleapis.com/calendar/v3/calendars"),t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(a),c=a.extraParams,d="function"==typeof c?c():c,h=function(e,t,n,i){var o,s,a;return i.canComputeOffset?(s=i.formatIso(e.start),a=i.formatIso(e.end)):(s=me(e.start,-1).toISOString(),a=me(e.end,1).toISOString()),o=r(r({},n||{}),{key:t,timeMin:s,timeMax:a,singleEvents:!0,maxResults:9999}),"local"!==i.timeZone&&(o.timeZone=i.timeZone),o}(e.range,l,d,o);Li("GET",u,h,(function(e,r){var i,o;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(i=e.items,o=h.timeZone,i.map((function(e){return function(e,t){var n=e.htmlLink||null;return n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}}(e,o)}))),xhr:r})}),(function(e,t){n({message:e,xhr:t})}))}else n({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}}],optionRefiners:{googleCalendarApiKey:String},eventSourceRefiners:{googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,extraParams:At}});return Ri.push(Is,oa,ja,Ka,Xa,Ja),e.BASE_OPTION_DEFAULTS=xt,e.BASE_OPTION_REFINERS=wt,e.BaseComponent=Br,e.BgEvent=es,e.BootstrapTheme=Za,e.Calendar=is,e.CalendarApi=jn,e.CalendarContent=co,e.CalendarDataManager=Hi,e.CalendarDataProvider=Xi,e.CalendarRoot=fo,e.Component=Ir,e.ContentHook=ai,e.CustomContentRenderContext=si,e.DateComponent=ti,e.DateEnv=$n,e.DateProfileGenerator=yi,e.DayCellContent=Xo,e.DayCellRoot=Zo,e.DayGridView=ra,e.DayHeader=xo,e.DaySeriesModel=ko,e.DayTable=ta,e.DayTableModel=To,e.DayTableSlicer=na,e.DayTimeCols=Oa,e.DayTimeColsSlicer=Ra,e.DayTimeColsView=Pa,e.DelayedRunner=ji,e.Draggable=Cs,e.ElementDragging=to,e.ElementScrollController=Cr,e.Emitter=Tr,e.EventApi=Yn,e.EventRoot=qo,e.EventSourceApi=j,e.FeaturefulElementDragging=gs,e.Fragment=Rr,e.Interaction=Ji,e.ListView=qa,e.MountHook=ui,e.NamedTimeZoneImpl=function(e){this.timeZoneName=e},e.NowIndicatorRoot=Go,e.NowTimer=bo,e.PointerDragging=ls,e.PositionCache=Er,e.RefMap=Ao,e.RenderHook=oi,e.ScrollController=Dr,e.ScrollResponder=jr,e.Scroller=Mo,e.SimpleScrollGrid=zo,e.Slicer=Eo,e.Splitter=cr,e.StandardEvent=Wo,e.Table=Js,e.TableDateCell=vo,e.TableDowCell=yo,e.TableView=Ls,e.Theme=Ar,e.ThirdPartyDraggable=As,e.TimeCols=Ia,e.TimeColsSlatsCoords=aa,e.TimeColsView=ga,e.ViewApi=On,e.ViewContextType=Yr,e.ViewRoot=pi,e.WeekNumberRoot=ns,e.WindowScrollController=Mr,e.addDays=me,e.addDurations=Ke,e.addMs=ge,e.addWeeks=fe,e.allowContextMenu=ie,e.allowSelection=ne,e.applyMutationToEventStore=An,e.applyStyle=z,e.applyStyleProp=q,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return Je(e)/6e4},e.asRoughMs=Je,e.asRoughSeconds=function(e){return Je(e)/1e3},e.buildClassNameNormalizer=ci,e.buildDayRanges=Na,e.buildDayTableModel=ia,e.buildEventApis=Hn,e.buildEventRangeKey=wn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var i=t(e[r],r);n[i[0]]=i[1]}return n},e.buildNavLinkData=fr,e.buildSegCompareObj=fn,e.buildSegTimeText=yn,e.buildSlatMetas=fa,e.buildTimeColsModel=Fa,e.collectFromHash=Be,e.combineEventUis=Yt,e.compareByFieldSpec=ae,e.compareByFieldSpecs=se,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=mo,e.computeHeightAndMargins=function(e){return e.getBoundingClientRect().height+function(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(e)},e.computeInnerRect=wr,e.computeRect=xr,e.computeSegDraggable=mn,e.computeSegEndResizable=vn,e.computeSegStartResizable=gn,e.computeShrinkWidth=Io,e.computeSmallestCellWidth=he,e.computeVisibleDayRange=Zt,e.config=no,e.constrainPoint=or,e.createContext=Pr,e.createDuration=$e,e.createElement=Lr,e.createEmptyEventStore=function(){return{defs:{},instances:{}}},e.createEventInstance=Ie,e.createEventUi=jt,e.createFormatter=bt,e.createPlugin=ni,e.createRef=Nr,e.diffDates=Jt,e.diffDayAndTime=_e,e.diffDays=ye,e.diffPoints=ar,e.diffWeeks=ve,e.diffWholeDays=we,e.diffWholeWeeks=be,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=H,e.enableCursor=ee,e.eventTupleToStore=Lt,e.filterEventStoreDefs=Rt,e.filterHash=Ne,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,s=0;s<o.length;s++){var a=o[s];t&&!H(a,t)||r.push(a)}return r},e.findElements=B,e.flexibleCompare=le,e.flushToDom=Fr,e.formatDate=function(e,t){void 0===t&&(t={});var n=Qn(t),r=bt(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=Qn("object"==typeof n&&n?n:{}),i=bt(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:xt.defaultRangeSeparator}):""},e.getAllowYScrolling=Oo,e.getCanVGrowWithinCell=lr,e.getClippingParents=Sr,e.getDateMeta=hr,e.getDayClassNames=pr,e.getDefaultEventEnd=Mn,e.getElSeg=cn,e.getEventClassNames=bn,e.getIsRtlScrollbarOnLeft=vr,e.getRectCenter=sr,e.getRelevantEvents=Ot,e.getScrollGridClassNames=Yo,e.getScrollbarWidths=yr,e.getSectionClassNames=Vo,e.getSectionHasLiquidHeight=Lo,e.getSegMeta=_n,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+pe[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},e.getStickyFooterScrollbar=Uo,e.getStickyHeaderDates=Bo,e.getUnequalProps=Ye,e.globalLocales=Gn,e.globalPlugins=Ri,e.greatestDurationDenominator=et,e.guid=J,e.hasBgRendering=ln,e.hasShrinkWidth=jo,e.identity=At,e.interactionSettingsStore=eo,e.interactionSettingsToStore=Qi,e.intersectRanges=tn,e.intersectRects=ir,e.isArraysEqual=it,e.isColPropsEqual=Ro,e.isDateSpansEqual=kn,e.isInt=de,e.isInteractionValid=Gr,e.isMultiDayRange=Xt,e.isPropsEqual=je,e.isPropsValid=Zr,e.isValidDate=Me,e.listenBySelector=G,e.mapHash=Re,e.memoize=ot,e.memoizeArraylike=function(e,t,n){var r=[],i=[];return function(o){for(var s=r.length,a=o.length,l=0;l<s;l++)if(o[l]){if(!it(r[l],o[l])){n&&n(i[l]);var u=e.apply(this,o[l]);t&&t(u,i[l])||(i[l]=u)}}else n&&n(i[l]);for(;l<a;l++)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},e.memoizeHashlike=function(e,t,n){var r={},i={};return function(o){var s={};for(var a in o)if(i[a])if(it(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);var l=e.apply(this,o[a]);s[a]=t&&t(l,i[a])?i[a]:l}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},e.memoizeObjArg=st,e.mergeEventStores=Nt,e.multiplyDuration=Ze,e.padStart=ue,e.parseBusinessHours=nr,e.parseClassNames=Pt,e.parseDragMeta=io,e.parseEventDef=Gt,e.parseFieldSpecs=oe,e.parseMarker=Wn,e.pointInsideRect=rr,e.preventContextMenu=re,e.preventDefault=W,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=on,e.rangesEqual=nn,e.rangesIntersect=rn,e.refineEventDef=Wt,e.refineProps=Mt,e.removeElement=Y,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.render=Or,e.renderChunkContent=No,e.renderFill=Qo,e.renderMicroColGroup=Po,e.renderScrollShim=Ho,e.requestJson=Li,e.sanitizeShrinkWidth=Fo,e.setElSeg=un,e.setRef=qr,e.sliceEventStore=an,e.sliceEvents=function(e,t){return an(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=pn,e.startOfDay=xe,e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.triggerDateSelect=Dn,e.unpromisify=kr,e.version="5.3.1",e.whenTransitionDone=Z,e.wholeDivideDurations=Qe,e}({});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).jsSHA=t()}(this,(function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,s,a=t||[0],l=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(s=i+l)>>>2,a.length<=o&&a.push(0),a[o]|=e[i]<<8*(u+r*(s%4));return{value:a,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,s,a;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(a=(i>>>1)+u)>>>2;l.length<=s;)l.push(0);l[s]|=o<<8*(c+r*(a%4))}return{value:l,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,s,a,l,u,c,d,h,p=0,f=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(d=-1===i?3:0,a=0;a<e.length;a+=1)for(s=[],128>(o=e.charCodeAt(a))?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(a+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(a)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),l=0;l<s.length;l+=1){for(u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=s[l]<<8*(d+i*(c%4)),p+=1}else for(d=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,a=0;a<e.length;a+=1){for(o=e.charCodeAt(a),!0===h&&(o=(l=255&o)<<8|o>>>8),u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(d+i*(c%4)),p+=2}return{value:f,binLen:8*p+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,s,a,l,u,c,d=0,h=n||[0],p=(r=r||0)>>>3,f=-1===i?3:0,m=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(l=e.substr(o,4),a=0,s=0;s<l.length;s+=1)a|=t.indexOf(l.charAt(s))<<18-6*s;for(s=0;s<l.length-1;s+=1){for(u=(c=d+p)>>>2;h.length<=u;)h.push(0);h[u]|=(a>>>16-8*s&255)<<8*(f+i*(c%4)),d+=1}}return{value:h,binLen:8*d+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,s,a,l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=(a=o+u)>>>2,l.length<=s&&l.push(0),l[s]|=i<<8*(c+r*(a%4));return{value:l,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,s="",a=t/8,l=-1===n?3:0;for(i=0;i<a;i+=1)o=e[i>>>2]>>>8*(l+n*(i%4)),s+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,s,a,l,u,c="",d=n/8,h=-1===r?3:0;for(o=0;o<d;o+=3)for(l=o+1<d?e[o+1>>>2]:0,u=o+2<d?e[o+2>>>2]:0,a=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(l>>>8*(h+r*((o+1)%4))&255)<<8|u>>>8*(h+r*((o+2)%4))&255,s=0;s<4;s+=1)c+=8*o+6*s<=n?t.charAt(a>>>6*(3-s)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",s=t/8,a=-1===n?3:0;for(r=0;r<s;r+=1)i=e[r>>>2]>>>8*(a+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),s=new Uint8Array(o),a=-1===n?3:0;for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(a+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,s=new Uint8Array(i);for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return s}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],a=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function l(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function u(e,t){return e>>>t|e<<32-t}function c(e,t){return e>>>t}function d(e,t,n){return e&t^~e&n}function h(e,t,n){return e&t^e&n^t&n}function p(e){return u(e,2)^u(e,13)^u(e,22)}function f(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function m(e,t,n,r){var i=(65535&e)+(65535&t)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16))<<16|65535&i}function g(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function v(e){return u(e,7)^u(e,18)^c(e,3)}function y(e){return u(e,6)^u(e,11)^u(e,25)}function _(e){return"SHA-224"==e?s.slice():a.slice()}function b(e,t){var n,r,i,s,a,l,_,b,w,x,S,k,T=[];for(n=t[0],r=t[1],i=t[2],s=t[3],a=t[4],l=t[5],_=t[6],b=t[7],S=0;S<64;S+=1)T[S]=S<16?e[S]:m(u(k=T[S-2],17)^u(k,19)^c(k,10),T[S-7],v(T[S-15]),T[S-16]),w=g(b,y(a),d(a,l,_),o[S],T[S]),x=f(p(n),h(n,r,i)),b=_,_=l,l=a,a=f(s,w),s=i,i=r,r=n,n=f(w,x);return t[0]=f(n,t[0]),t[1]=f(r,t[1]),t[2]=f(i,t[2]),t[3]=f(s,t[3]),t[4]=f(a,t[4]),t[5]=f(l,t[5]),t[6]=f(_,t[6]),t[7]=f(b,t[7]),t}return function(t){function n(e,n,i){var o=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error("Chosen SHA variant is not supported");var s=i||{};return(o=t.call(this,e,n,i)||this).t=o.i,o.o=!0,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=b,o.p=function(e){return e.slice()},o.l=_,o.R=function(t,n,r,i){return function(e,t,n,r,i){for(var o,s=15+(t+65>>>9<<4),a=t+n;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=4294967295&a,e[s-1]=a/4294967296|0,o=0;o<e.length;o+=16)r=b(e.slice(o,o+16),r);return"SHA-224"===i?[r[0],r[1],r[2],r[3],r[4],r[5],r[6]]:r}(t,n,r,i,e)},o.U=_(e),o.T=512,o.m="SHA-224"===e?224:256,o.F=!1,s.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.H=0,this.S=!1,this.I=0,this.C=!1,this.L=[],this.N=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.H),o=i.binLen,s=i.value,a=o>>>5;for(t=0;t<a;t+=r)n+this.T<=o&&(this.U=this.A(s.slice(t,t+r),this.U),n+=this.T);this.I+=n,this.Y=s.slice(n>>>5),this.H=o%this.T,this.S=!0},e.prototype.getHash=function(e,t){var n,r,o=this.m,s=l(t);if(this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");o=s.outputLen}var a=i(e,o,this.u,s);if(this.C&&this.t)return a(this.t(s));for(r=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),o),n=1;n<this.numRounds;n+=1)this.F&&o%32!=0&&(r[r.length-1]&=16777215>>>24-o%32),r=this.R(r,o,0,this.l(this.g),o);return a(r)},e.prototype.setHMACKey=function(e,t,n){if(!this.o)throw new Error("Variant does not support HMAC");if(this.S)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.C)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.L[t]=909522486^e.value[t],this.N[t]=1549556828^e.value[t];this.U=this.A(this.L,this.U),this.I=this.T,this.C=!0},e.prototype.getHMAC=function(e,t){var n=l(t);return i(e,this.m,this.u,n)(this.i())},e.prototype.i=function(){var e;if(!this.C)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),this.m);return e=this.A(this.N,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())})),
|
|
699
699
|
/*!
|
|
700
700
|
*
|
|
701
701
|
* Super simple wysiwyg editor v0.8.18
|
|
@@ -1796,7 +1796,7 @@ function(e,t){var n,r,i;!function(o,s){"use strict";r=[],void 0===(i="function"=
|
|
|
1796
1796
|
*/
|
|
1797
1797
|
function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.tabbable,r=e.tabbable={};t(r),r.noConflict=function(){return e.tabbable=n,r}}())}(this,(function(e){"use strict";var t=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=t.join(","),r="undefined"==typeof Element,i=r?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,o=!r&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},s=function e(t,n){var r;void 0===n&&(n=!0);var i=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===i||"true"===i||n&&t&&e(t.parentNode)},a=function(e,t,r){if(s(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(n));return t&&i.call(e,n)&&o.unshift(e),o=o.filter(r)},l=function e(t,r,o){for(var a=[],l=Array.from(t);l.length;){var u=l.shift();if(!s(u,!1))if("SLOT"===u.tagName){var c=u.assignedElements(),d=e(c.length?c:u.children,!0,o);o.flatten?a.push.apply(a,d):a.push({scopeParent:u,candidates:d})}else{i.call(u,n)&&o.filter(u)&&(r||!t.includes(u))&&a.push(u);var h=u.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(u),p=!s(h,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(u));if(h&&p){var f=e(!0===h?u.children:h.children,!0,o);o.flatten?a.push.apply(a,f):a.push({scopeParent:u,candidates:f})}else l.unshift.apply(l,u.children)}}return a},u=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},c=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!u(e)?0:e.tabIndex},d=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},h=function(e){return"INPUT"===e.tagName},p=function(e){return function(e){return h(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||o(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!i||i===e}(e)},f=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},m=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var s=i.call(e,"details>summary:first-of-type")?e.parentElement:e;if(i.call(s,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return f(e)}else{if("function"==typeof r){for(var a=e;e;){var l=e.parentElement,u=o(e);if(l&&!l.shadowRoot&&!0===r(l))return f(e);e=e.assignedSlot?e.assignedSlot:l||u===e.ownerDocument?l:u.host}e=a}if(function(e){var t,n,r,i,s=e&&o(e),a=null===(t=s)||void 0===t?void 0:t.host,l=!1;if(s&&s!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!l&&a;){var u,c,d;l=!(null===(c=a=null===(u=s=o(a))||void 0===u?void 0:u.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(a))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},g=function(e,t){return!(t.disabled||s(t)||function(e){return h(e)&&"hidden"===e.type}(t)||m(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!i.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},v=function(e,t){return!(p(t)||c(t)<0||!g(e,t))},y=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},_=function e(t){var n=[],r=[];return t.forEach((function(t,i){var o=!!t.scopeParent,s=o?t.scopeParent:t,a=function(e,t){var n=c(e);return n<0&&t&&!u(e)?0:n}(s,o),l=o?e(t.candidates):s;0===a?o?n.push.apply(n,l):n.push(s):r.push({documentOrder:i,tabIndex:a,item:t,isScope:o,content:l})})),r.sort(d).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},b=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:g.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a(e,t.includeContainer,g.bind(null,t))},e.getTabIndex=c,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==i.call(e,b)&&g(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==i.call(e,n)&&v(t,e)},e.tabbable=function(e,t){var n;return n=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:v.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:y}):a(e,t.includeContainer,v.bind(null,t)),_(n)},Object.defineProperty(e,"__esModule",{value:!0})})),
|
|
1798
1798
|
/*!
|
|
1799
|
-
* @wavemaker/focus-trap 1.0.
|
|
1799
|
+
* @wavemaker/focus-trap 1.0.0
|
|
1800
1800
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
1801
1801
|
*/
|
|
1802
|
-
function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define(["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.focusTrap,r=e.focusTrap={};t(r,e.tabbable),r.noConflict=function(){return e.focusTrap=n,r}}())}(this,(function(e,t){"use strict";function n(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var o=function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)},s=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()},a=function(e){return"Tab"===e.key||9===e.keyCode},l=function(e){return a(e)&&!e.shiftKey},u=function(e){return a(e)&&e.shiftKey},c=function(e){return setTimeout(e,0)},d=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},p=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},f=[];e.createFocusTrap=function(e,n){var r,m=(null==n?void 0:n.document)||document,g=(null==n?void 0:n.trapStack)||f,v=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:l,isKeyBackward:u},n),y={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},_=function(e,t,n){return e&&void 0!==e[t]?e[t]:v[n||t]},b=function(e){return y.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},w=function(e){var t=v[e];if("function"==typeof t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t=t.apply(void 0,r)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var o=t;if("string"==typeof t&&!(o=m.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return o},x=function(){var e=w("initialFocus");if(!1===e)return!1;if(void 0===e)if(b(m.activeElement)>=0)e=m.activeElement;else{var t=y.tabbableGroups[0];e=t&&t.firstTabbableNode||w("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},S=function(){if(y.containerGroups=y.containers.map((function(e){var n=t.tabbable(e,v.tabbableOptions),r=t.focusable(e,v.tabbableOptions);return{container:e,tabbableNodes:n,focusableNodes:r,firstTabbableNode:n.length>0?n[0]:null,lastTabbableNode:n.length>0?n[n.length-1]:null,nextTabbableNode:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=r.findIndex((function(t){return t===e}));if(!(i<0))return n?r.slice(i+1).find((function(e){return t.isTabbable(e,v.tabbableOptions)})):r.slice(0,i).reverse().find((function(e){return t.isTabbable(e,v.tabbableOptions)}))}}})),y.tabbableGroups=y.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),y.tabbableGroups.length<=0&&!w("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},k=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!v.preventScroll}),y.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(x()))},T=function(e){var t=w("setReturnFocus",e);return t||!1!==t&&e},E=function(e){var n=p(e);b(n)>=0||(h(v.clickOutsideDeactivates,e)?r.deactivate({returnFocus:v.returnFocusOnDeactivate&&!t.isFocusable(n,v.tabbableOptions)}):h(v.allowOutsideClick,e)||e.preventDefault())},D=function(e){var t=p(e),n=b(t)>=0;if(n||t instanceof Document)n&&(y.mostRecentlyFocusedNode=t);else{if(y.containers[0].nextSibling)return;e.stopImmediatePropagation(),k(y.mostRecentlyFocusedNode||x())}},C=function(e){if(!(n=e,"Escape"!==n.key&&"Esc"!==n.key&&27!==n.keyCode||!1===h(v.escapeDeactivates,e)))return e.preventDefault(),void r.deactivate();var n;(v.isKeyForward(e)||v.isKeyBackward(e))&&function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=p(e);S();var i=null;if(y.tabbableGroups.length>0){var o=b(r),s=o>=0?y.containerGroups[o]:void 0;if(o<0)i=n?y.tabbableGroups[y.tabbableGroups.length-1].lastTabbableNode:y.tabbableGroups[0].firstTabbableNode;else if(n){var l=d(y.tabbableGroups,(function(e){var t=e.firstTabbableNode;return r===t}));if(l<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r,!1))&&(l=o),l>=0){var u=0===l?y.tabbableGroups.length-1:l-1;i=y.tabbableGroups[u].lastTabbableNode}else a(e)||(i=s.nextTabbableNode(r,!1))}else{var c=d(y.tabbableGroups,(function(e){var t=e.lastTabbableNode;return r===t}));if(c<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r))&&(c=o),c>=0){var h=c===y.tabbableGroups.length-1?0:c+1;i=y.tabbableGroups[h].firstTabbableNode}else a(e)||(i=s.nextTabbableNode(r))}}else i=w("fallbackFocus");i&&(a(e)&&e.preventDefault(),k(i))}(e,v.isKeyBackward(e))},M=function(e){var t=p(e);b(t)>=0||h(v.clickOutsideDeactivates,e)||h(v.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},A=function(){if(y.active)return o(g,r),y.delayInitialFocusTimer=v.delayInitialFocus?c((function(){k(x())})):k(x()),m.addEventListener("focusin",D,!0),m.addEventListener("mousedown",E,{capture:!0,passive:!1}),m.addEventListener("touchstart",E,{capture:!0,passive:!1}),m.addEventListener("click",M,{capture:!0,passive:!1}),m.addEventListener("keydown",C,{capture:!0,passive:!1}),r},I=function(){if(y.active)return m.removeEventListener("focusin",D,!0),m.removeEventListener("mousedown",E,!0),m.removeEventListener("touchstart",E,!0),m.removeEventListener("click",M,!0),m.removeEventListener("keydown",C,!0),r};return(r={get active(){return y.active},get paused(){return y.paused},activate:function(e){if(y.active)return this;var t=_(e,"onActivate"),n=_(e,"onPostActivate"),r=_(e,"checkCanFocusTrap");r||S(),y.active=!0,y.paused=!1,y.nodeFocusedBeforeActivation=m.activeElement,t&&t();var i=function(){r&&S(),A(),n&&n()};return r?(r(y.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!y.active)return this;var t=i({onDeactivate:v.onDeactivate,onPostDeactivate:v.onPostDeactivate,checkCanReturnFocus:v.checkCanReturnFocus},e);clearTimeout(y.delayInitialFocusTimer),y.delayInitialFocusTimer=void 0,I(),y.active=!1,y.paused=!1,s(g,r);var n=_(t,"onDeactivate"),o=_(t,"onPostDeactivate"),a=_(t,"checkCanReturnFocus"),l=_(t,"returnFocus","returnFocusOnDeactivate");n&&n();var u=function(){c((function(){l&&k(T(y.nodeFocusedBeforeActivation)),o&&o()}))};return l&&a?(a(T(y.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return y.paused||!y.active||(y.paused=!0,I()),this},unpause:function(){return y.paused&&y.active?(y.paused=!1,S(),A(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return y.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),y.active&&S(),this}}).updateContainerElements(e),r},Object.defineProperty(e,"__esModule",{value:!0})})),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nodeClasses:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},render:{name:null,title:null},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),data.nodeChildren(e,t,[]),t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(e){var t=e.treeObj,n=consts.event;t.bind(n.NODECREATED,(function(t,n,r){tools.apply(e.callback.onNodeCreated,[t,n,r])})),t.bind(n.CLICK,(function(t,n,r,i,o){tools.apply(e.callback.onClick,[n,r,i,o])})),t.bind(n.EXPAND,(function(t,n,r){tools.apply(e.callback.onExpand,[t,n,r])})),t.bind(n.COLLAPSE,(function(t,n,r){tools.apply(e.callback.onCollapse,[t,n,r])})),t.bind(n.ASYNC_SUCCESS,(function(t,n,r,i){tools.apply(e.callback.onAsyncSuccess,[t,n,r,i])})),t.bind(n.ASYNC_ERROR,(function(t,n,r,i,o,s){tools.apply(e.callback.onAsyncError,[t,n,r,i,o,s])})),t.bind(n.REMOVE,(function(t,n,r){tools.apply(e.callback.onRemove,[t,n,r])})),t.bind(n.SELECTED,(function(t,n,r){tools.apply(e.callback.onSelected,[n,r])})),t.bind(n.UNSELECTED,(function(t,n,r){tools.apply(e.callback.onUnSelected,[n,r])}))},_unbindEvent=function(e){var t=e.treeObj,n=consts.event;t.unbind(n.NODECREATED).unbind(n.CLICK).unbind(n.EXPAND).unbind(n.COLLAPSE).unbind(n.ASYNC_SUCCESS).unbind(n.ASYNC_ERROR).unbind(n.REMOVE).unbind(n.SELECTED).unbind(n.UNSELECTED)},_eventProxy=function(e){var t=e.target,n=data.getSetting(e.data.treeId),r="",i=null,o="",s="",a=null,l=null,u=null;if(tools.eqs(e.type,"mousedown")?s="mousedown":tools.eqs(e.type,"mouseup")?s="mouseup":tools.eqs(e.type,"contextmenu")?s="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(r=tools.getNodeMainDom(t).id,o="switchNode"):(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="clickNode"):tools.eqs(e.type,"dblclick")&&(s="dblclick",(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="switchNode")),s.length>0&&0==r.length&&(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id),r.length>0)switch(i=data.getNodeCache(n,r),o){case"switchNode":data.nodeIsParent(n,i)&&(tools.eqs(e.type,"click")||tools.eqs(e.type,"dblclick")&&tools.apply(n.view.dblClickExpand,[n.treeId,i],n.view.dblClickExpand))?a=handler.onSwitchNode:o="";break;case"clickNode":a=handler.onClickNode}switch(s){case"mousedown":l=handler.onZTreeMousedown;break;case"mouseup":l=handler.onZTreeMouseup;break;case"dblclick":l=handler.onZTreeDblclick;break;case"contextmenu":l=handler.onZTreeContextmenu}return{stop:!1,node:i,nodeEventType:o,nodeEventCallback:a,treeEventType:s,treeEventCallback:l}},_initNode=function(e,t,n,r,i,o,s){if(n){var a=data.getRoot(e),l=data.nodeChildren(e,n);n.level=t,n.tId=e.treeId+"_"+ ++a.zId,n.parentTId=r?r.tId:null,n.open="string"==typeof n.open?tools.eqs(n.open,"true"):!!n.open;var u=data.nodeIsParent(e,n);tools.isArray(l)?(data.nodeIsParent(e,n,!0),n.zAsync=!0):(u=data.nodeIsParent(e,n,u),n.open=!(!u||e.async.enable)&&n.open,n.zAsync=!u),n.isFirstNode=i,n.isLastNode=o,n.getParentNode=function(){return data.getNodeCache(e,n.parentTId)},n.getPreNode=function(){return data.getPreNode(e,n)},n.getNextNode=function(){return data.getNextNode(e,n)},n.getIndex=function(){return data.getNodeIndex(e,n)},n.getPath=function(){return data.getNodePath(e,n)},n.isAjaxing=!1,data.fixPIdKeyValue(e,n)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(e,t){data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=t},getNodeCacheId:function(e){return e.substring(e.lastIndexOf("_")+1)},addAfterA:function(e){_init.afterA.push(e)},addBeforeA:function(e){_init.beforeA.push(e)},addInnerAfterA:function(e){_init.innerAfterA.push(e)},addInnerBeforeA:function(e){_init.innerBeforeA.push(e)},addInitBind:function(e){_init.bind.push(e)},addInitUnBind:function(e){_init.unbind.push(e)},addInitCache:function(e){_init.caches.push(e)},addInitNode:function(e){_init.nodes.push(e)},addInitProxy:function(e,t){t?_init.proxys.splice(0,0,e):_init.proxys.push(e)},addInitRoot:function(e){_init.roots.push(e)},addNodesData:function(e,t,n,r){var i,o=data.nodeChildren(e,t);o?n>=o.length&&(n=-1):(o=data.nodeChildren(e,t,[]),n=-1),o.length>0&&0===n?(o[0].isFirstNode=!1,view.setNodeLineIcos(e,o[0])):o.length>0&&n<0&&(o[o.length-1].isLastNode=!1,view.setNodeLineIcos(e,o[o.length-1])),data.nodeIsParent(e,t,!0),n<0?data.nodeChildren(e,t,o.concat(r)):(i=[n,0].concat(r),o.splice.apply(o,i))},addSelectedNode:function(e,t){var n=data.getRoot(e);data.isSelectedNode(e,t)||n.curSelectedList.push(t)},addCreatedNode:function(e,t){(e.callback.onNodeCreated||e.view.addDiyDom)&&data.getRoot(e).createdNodes.push(t)},addZTreeTools:function(e){_init.zTreeTools.push(e)},exSetting:function(e){$.extend(!0,_setting,e)},fixPIdKeyValue:function(e,t){e.data.simpleData.enable&&(t[e.data.simpleData.pIdKey]=t.parentTId?t.getParentNode()[e.data.simpleData.idKey]:e.data.simpleData.rootPId)},getAfterA:function(e,t,n){for(var r=0,i=_init.afterA.length;r<i;r++)_init.afterA[r].apply(this,arguments)},getBeforeA:function(e,t,n){for(var r=0,i=_init.beforeA.length;r<i;r++)_init.beforeA[r].apply(this,arguments)},getInnerAfterA:function(e,t,n){for(var r=0,i=_init.innerAfterA.length;r<i;r++)_init.innerAfterA[r].apply(this,arguments)},getInnerBeforeA:function(e,t,n){for(var r=0,i=_init.innerBeforeA.length;r<i;r++)_init.innerBeforeA[r].apply(this,arguments)},getCache:function(e){return caches[e.treeId]},getNodeIndex:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i;return-1},getNextNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i==o?null:r[i+1];return null},getNodeByParam:function(e,t,n,r){if(!t||!n)return null;for(var i=0,o=t.length;i<o;i++){var s=t[i];if(s[n]==r)return t[i];var a=data.nodeChildren(e,s),l=data.getNodeByParam(e,a,n,r);if(l)return l}return null},getNodeCache:function(e,t){if(!t)return null;var n=caches[e.treeId].nodes[data.getNodeCacheId(t)];return n||null},getNodePath:function(e,t){return t?((n=t.parentTId?t.getParentNode().getPath():[])&&n.push(t),n):null;var n},getNodes:function(e){return data.nodeChildren(e,data.getRoot(e))},getNodesByParam:function(e,t,n,r){if(!t||!n)return[];for(var i=[],o=0,s=t.length;o<s;o++){var a=t[o];a[n]==r&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParam(e,l,n,r))}return i},getNodesByParamFuzzy:function(e,t,n,r){if(!t||!n)return[];var i=[];r=r.toLowerCase();for(var o=0,s=t.length;o<s;o++){var a=t[o];"string"==typeof a[n]&&t[o][n].toLowerCase().indexOf(r)>-1&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParamFuzzy(e,l,n,r))}return i},getNodesByFilter:function(e,t,n,r,i){if(!t)return r?null:[];for(var o=r?null:[],s=0,a=t.length;s<a;s++){var l=t[s];if(tools.apply(n,[l,i],!1)){if(r)return l;o.push(l)}var u=data.nodeChildren(e,l),c=data.getNodesByFilter(e,u,n,r,i);if(r&&c)return c;o=r?c:o.concat(c)}return o},getPreNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length;i<o;i++)if(r[i]===t)return 0==i?null:r[i-1];return null},getRoot:function(e){return e?roots[e.treeId]:null},getRoots:function(){return roots},getSetting:function(e){return settings[e]},getSettings:function(){return settings},getZTreeTools:function(e){var t=this.getRoot(this.getSetting(e));return t?t.treeTools:null},initCache:function(e){for(var t=0,n=_init.caches.length;t<n;t++)_init.caches[t].apply(this,arguments)},initNode:function(e,t,n,r,i,o){for(var s=0,a=_init.nodes.length;s<a;s++)_init.nodes[s].apply(this,arguments)},initRoot:function(e){for(var t=0,n=_init.roots.length;t<n;t++)_init.roots[t].apply(this,arguments)},isSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)if(t===n.curSelectedList[r])return!0;return!1},nodeChildren:function(e,t,n){if(!t)return null;var r=e.data.key.children;return void 0!==n&&(t[r]=n),t[r]},nodeIsParent:function(e,t,n){if(!t)return!1;var r=e.data.key.isParent;return void 0!==n?("string"==typeof n&&(n=tools.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=tools.eqs(t[r],"true"):t[r]=!!t[r],t[r]},nodeName:function(e,t,n){var r=e.data.key.name;void 0!==n&&(t[r]=n);var i=""+t[r];return"function"==typeof e.data.render.name?e.data.render.name.call(this,i,t):i},nodeTitle:function(e,t){var n=""+t[""===e.data.key.title?e.data.key.name:e.data.key.title];return"function"==typeof e.data.render.title?e.data.render.title.call(this,n,t):n},removeNodeCache:function(e,t){var n=data.nodeChildren(e,t);if(n)for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=null},removeSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)t!==n.curSelectedList[r]&&data.getNodeCache(e,n.curSelectedList[r].tId)||(n.curSelectedList.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,t]),r--,i--)},setCache:function(e,t){caches[e.treeId]=t},setRoot:function(e,t){roots[e.treeId]=t},setZTreeTools:function(e,t){for(var n=0,r=_init.zTreeTools.length;n<r;n++)_init.zTreeTools[n].apply(this,arguments)},transformToArrayFormat:function(e,t){if(!t)return[];var n=[];if(tools.isArray(t))for(var r=0,i=t.length;r<i;r++){o(t[r])}else o(t);return n;function o(t){n.push(t);var r=data.nodeChildren(e,t);r&&(n=n.concat(data.transformToArrayFormat(e,r)))}},transformTozTreeFormat:function(e,t){var n,r,i=e.data.simpleData.idKey,o=e.data.simpleData.pIdKey;if(!i||""==i||!t)return[];if(tools.isArray(t)){var s=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n][i]]=t[n];for(n=0,r=t.length;n<r;n++){var l=a[t[n][o]];if(l&&t[n][i]!=t[n][o]){var u=data.nodeChildren(e,l);u||(u=data.nodeChildren(e,l,[])),u.push(t[n])}else s.push(t[n])}return s}return[t]}},event={bindEvent:function(e){for(var t=0,n=_init.bind.length;t<n;t++)_init.bind[t].apply(this,arguments)},unbindEvent:function(e){for(var t=0,n=_init.unbind.length;t<n;t++)_init.unbind[t].apply(this,arguments)},bindTree:function(e){var t={treeId:e.treeId},n=e.treeObj;e.view.txtSelectedEnable||n.bind("selectstart",handler.onSelectStart).css({"-moz-user-select":"-moz-none"}),n.bind("click",t,event.proxy),n.bind("dblclick",t,event.proxy),n.bind("mouseover",t,event.proxy),n.bind("mouseout",t,event.proxy),n.bind("mousedown",t,event.proxy),n.bind("mouseup",t,event.proxy),n.bind("contextmenu",t,event.proxy)},unbindTree:function(e){e.treeObj.unbind("selectstart",handler.onSelectStart).unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(e){for(var t=[],n=0,r=_init.proxys.length;n<r;n++){var i=_init.proxys[n].apply(this,arguments);if(t.push(i),i.stop)break}return t},proxy:function(e){var t=data.getSetting(e.data.treeId);if(!tools.uCanDo(t,e))return!0;for(var n=event.doProxy(e),r=!0,i=0,o=n.length;i<o;i++){var s=n[i];s.nodeEventCallback&&(!0,r=s.nodeEventCallback.apply(s,[e,s.node])&&r),s.treeEventCallback&&(!0,r=s.treeEventCallback.apply(s,[e,s.node])&&r)}return r}},handler={onSwitchNode:function(e,t){var n=data.getSetting(e.data.treeId);if(t.open){if(0==tools.apply(n.callback.beforeCollapse,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}else{if(0==tools.apply(n.callback.beforeExpand,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}return!0},onClickNode:function(e,t){var n=data.getSetting(e.data.treeId),r=n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&data.isSelectedNode(n,t)?0:n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&n.view.selectedMulti?2:1;return 0==tools.apply(n.callback.beforeClick,[n.treeId,t,r],!0)||(0===r?view.cancelPreSelectedNode(n,t):view.selectNode(n,t,2===r),n.treeObj.trigger(consts.event.CLICK,[e,n.treeId,t,r])),!0},onZTreeMousedown:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseDown,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseDown,[e,n.treeId,t]),!0},onZTreeMouseup:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseUp,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseUp,[e,n.treeId,t]),!0},onZTreeDblclick:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeDblClick,[n.treeId,t],!0)&&tools.apply(n.callback.onDblClick,[e,n.treeId,t]),!0},onZTreeContextmenu:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeRightClick,[n.treeId,t],!0)&&tools.apply(n.callback.onRightClick,[e,n.treeId,t]),"function"!=typeof n.callback.onRightClick},onSelectStart:function(e){var t=e.originalEvent.srcElement.nodeName.toLowerCase();return"input"===t||"textarea"===t}},tools={apply:function(e,t,n){return"function"==typeof e?e.apply(zt,t||[]):n},canAsync:function(e,t){var n=data.nodeChildren(e,t),r=data.nodeIsParent(e,t);return e.async.enable&&t&&r&&!(t.zAsync||n&&n.length>0)},clone:function(e){if(null===e)return null;var t=tools.isArray(e)?[]:{};for(var n in e)t[n]=e[n]instanceof Date?new Date(e[n].getTime()):"object"==typeof e[n]?tools.clone(e[n]):e[n];return t},eqs:function(e,t){return e.toLowerCase()===t.toLowerCase()},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isElement:function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},$:function(e,t,n){return t&&"string"!=typeof t&&(n=t,t=""),"string"==typeof e?$(e,n?n.treeObj.get(0).ownerDocument:null):$("#"+e.tId+t,n?n.treeObj:null)},getMDom:function(e,t,n){if(!t)return null;for(;t&&t.id!==e.treeId;){for(var r=0,i=n.length;t.tagName&&r<i;r++)if(tools.eqs(t.tagName,n[r].tagName)&&null!==t.getAttribute(n[r].attrName))return t;t=t.parentNode}return null},getNodeMainDom:function(e){return $(e).parent("li").get(0)||$(e).parentsUntil("li").parent().get(0)},isChildOrSelf:function(e,t){return $(e).closest("#"+t).length>0},uCanDo:function(e,t){return!0}},view={addNodes:function(e,t,n,r,i){var o=data.nodeIsParent(e,t);if(!e.data.keep.leaf||!t||o)if(tools.isArray(r)||(r=[r]),e.data.simpleData.enable&&(r=data.transformTozTreeFormat(e,r)),t){var s=$$(t,consts.id.SWITCH,e),a=$$(t,consts.id.ICON,e),l=$$(t,consts.id.UL,e);t.open||(view.replaceSwitchClass(t,s,consts.folder.CLOSE),view.replaceIcoClass(t,a,consts.folder.CLOSE),t.open=!1,l.css({display:"none"})),data.addNodesData(e,t,n,r),view.createNodes(e,t.level+1,r,t,n),i||view.expandCollapseParentNode(e,t,!0)}else data.addNodesData(e,data.getRoot(e),n,r),view.createNodes(e,0,r,null,n)},appendNodes:function(e,t,n,r,i,o,s){if(!n)return[];var a,l,u=[],c=r||data.getRoot(e),d=data.nodeChildren(e,c);(!d||i>=d.length-n.length)&&(i=-1);for(var h=0,p=n.length;h<p;h++){var f=n[h];o&&(a=(0===i||d.length==n.length)&&0==h,l=i<0&&h==n.length-1,data.initNode(e,t,f,r,a,l,s),data.addNodeCache(e,f));var m=data.nodeIsParent(e,f),g=[],v=data.nodeChildren(e,f);v&&v.length>0&&(g=view.appendNodes(e,t+1,v,f,-1,o,s&&f.open)),s&&(view.makeDOMNodeMainBefore(u,e,f),view.makeDOMNodeLine(u,e,f),data.getBeforeA(e,f,u),view.makeDOMNodeNameBefore(u,e,f),data.getInnerBeforeA(e,f,u),view.makeDOMNodeIcon(u,e,f),data.getInnerAfterA(e,f,u),view.makeDOMNodeNameAfter(u,e,f),data.getAfterA(e,f,u),m&&f.open&&view.makeUlHtml(e,f,u,g.join("")),view.makeDOMNodeMainAfter(u,e,f),data.addCreatedNode(e,f))}return u},appendParentULDom:function(e,t){var n=[],r=$$(t,e);!r.get(0)&&t.parentTId&&(view.appendParentULDom(e,t.getParentNode()),r=$$(t,e));var i=$$(t,consts.id.UL,e);i.get(0)&&i.remove();var o=data.nodeChildren(e,t),s=view.appendNodes(e,t.level+1,o,t,-1,!1,!0);view.makeUlHtml(e,t,n,s.join("")),r.append(n.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l,isParent=data.nodeIsParent(setting,node);if(node&&!isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"",class:consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={},autoParam=tools.apply(setting.async.autoParam,[setting.treeId,node],setting.async.autoParam);for(i=0,l=autoParam.length;node&&i<l;i++){var pKey=autoParam[i].split("="),spKey=pKey;pKey.length>1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}var otherParam=tools.apply(setting.async.otherParam,[setting.treeId,node],setting.async.otherParam);if(tools.isArray(otherParam))for(i=0,l=otherParam.length;i<l;i+=2)tmpParam[otherParam[i]]=otherParam[i+1];else for(var p in otherParam)tmpParam[p]=otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:setting.async.contentType.indexOf("application/json")>-1?JSON.stringify(tmpParam):tmpParam,dataType:setting.async.dataType,headers:setting.async.headers,xhrFields:setting.async.xhrFields,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(e){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,-1,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,-1,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(e,t,n){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,e,t,n]))}}),!0},cancelPreSelectedNode:function(e,t,n){var r,i,o=data.getRoot(e).curSelectedList;for(r=o.length-1;r>=0;r--)if(t===(i=o[r])||!t&&(!n||n!==i)){if($$(i,consts.id.A,e).removeClass(consts.node.CURSELECTED),t){data.removeSelectedNode(e,t);break}o.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,i])}},createNodeCallback:function(e){if(e.callback.onNodeCreated||e.view.addDiyDom)for(var t=data.getRoot(e);t.createdNodes.length>0;){var n=t.createdNodes.shift();tools.apply(e.view.addDiyDom,[e.treeId,n]),e.callback.onNodeCreated&&e.treeObj.trigger(consts.event.NODECREATED,[e.treeId,n])}},createNodes:function(e,t,n,r,i){if(n&&0!=n.length){var o=data.getRoot(e),s=!r||r.open||!!$$(data.nodeChildren(e,r)[0],e).get(0);o.createdNodes=[];var a,l,u=view.appendNodes(e,t,n,r,i,!0,s);if(r){var c=$$(r,consts.id.UL,e);c.get(0)&&(a=c)}else a=e.treeObj;a&&(i>=0&&(l=a.children()[i]),i>=0&&l?$(l).before(u.join("")):a.append(u.join(""))),view.createNodeCallback(e)}},destroy:function(e){e&&(data.initCache(e),data.initRoot(e),event.unbindTree(e),event.unbindEvent(e),e.treeObj.empty(),delete settings[e.treeId])},expandCollapseNode:function(e,t,n,r,i){var o,s=data.getRoot(e);if(t){var a=data.nodeChildren(e,t),l=data.nodeIsParent(e,t);if(s.expandTriggerFlag&&(o=i,i=function(){o&&o(),t.open?e.treeObj.trigger(consts.event.EXPAND,[e.treeId,t]):e.treeObj.trigger(consts.event.COLLAPSE,[e.treeId,t])},s.expandTriggerFlag=!1),!t.open&&l&&(!$$(t,consts.id.UL,e).get(0)||a&&a.length>0&&!$$(a[0],e).get(0))&&(view.appendParentULDom(e,t),view.createNodeCallback(e)),t.open!=n){var u=$$(t,consts.id.UL,e),c=$$(t,consts.id.SWITCH,e),d=$$(t,consts.id.ICON,e);l?(t.open=!t.open,t.iconOpen&&t.iconClose&&d.attr("style",view.makeNodeIcoStyle(e,t)),t.open?(view.replaceSwitchClass(t,c,consts.folder.OPEN),view.replaceIcoClass(t,d,consts.folder.OPEN),0==r||""==e.view.expandSpeed?(u.show(),tools.apply(i,[])):a&&a.length>0?u.slideDown(e.view.expandSpeed,i):(u.show(),tools.apply(i,[]))):(view.replaceSwitchClass(t,c,consts.folder.CLOSE),view.replaceIcoClass(t,d,consts.folder.CLOSE),0!=r&&""!=e.view.expandSpeed&&a&&a.length>0?u.slideUp(e.view.expandSpeed,i):(u.hide(),tools.apply(i,[])))):tools.apply(i,[])}else tools.apply(i,[])}else tools.apply(i,[])},expandCollapseParentNode:function(e,t,n,r,i){t&&(t.parentTId?(view.expandCollapseNode(e,t,n,r),t.parentTId&&view.expandCollapseParentNode(e,t.getParentNode(),n,r,i)):view.expandCollapseNode(e,t,n,r,i))},expandCollapseSonNode:function(e,t,n,r,i){var o=data.getRoot(e),s=t?data.nodeChildren(e,t):data.nodeChildren(e,o),a=!t&&r,l=data.getRoot(e).expandTriggerFlag;if(data.getRoot(e).expandTriggerFlag=!1,s)for(var u=0,c=s.length;u<c;u++)s[u]&&view.expandCollapseSonNode(e,s[u],n,a);data.getRoot(e).expandTriggerFlag=l,view.expandCollapseNode(e,t,n,r,i)},isSelectedNode:function(e,t){if(!t)return!1;var n,r=data.getRoot(e).curSelectedList;for(n=r.length-1;n>=0;n--)if(t===r[n])return!0;return!1},makeDOMNodeIcon:function(e,t,n){var r=data.nodeName(t,n),i=t.view.nameIsHTML?r:r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");e.push("<span id='",n.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(t,n),"' style='",view.makeNodeIcoStyle(t,n),"'></span><span id='",n.tId,consts.id.SPAN,"' class='",consts.className.NAME,"'>",i,"</span>")},makeDOMNodeLine:function(e,t,n){e.push("<span id='",n.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(t,n),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(e,t,n){e.push("</li>")},makeDOMNodeMainBefore:function(e,t,n){e.push("<li id='",n.tId,"' class='",consts.className.LEVEL,n.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(e,t,n){e.push("</a>")},makeDOMNodeNameBefore:function(e,t,n){var r=data.nodeTitle(t,n),i=view.makeNodeUrl(t,n),o=view.makeNodeFontCss(t,n),s=view.makeNodeClasses(t,n),a=[];for(var l in o)a.push(l,":",o[l],";");e.push("<a id='",n.tId,consts.id.A,"' class='",consts.className.LEVEL,n.level,s.add?" "+s.add.join(" "):"","' treeNode",consts.id.A,n.click?' onclick="'+n.click+'"':"",null!=i&&i.length>0?" href='"+i+"'":""," target='",view.makeNodeTarget(n),"' style='",a.join(""),"'"),tools.apply(t.view.showTitle,[t.treeId,n],t.view.showTitle)&&r&&e.push("title='",r.replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var n=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return n&&"function"!=typeof n?n:{}},makeNodeClasses:function(e,t){var n=tools.apply(e.view.nodeClasses,[e.treeId,t],e.view.nodeClasses);return n&&"function"!=typeof n?n:{add:[],remove:[]}},makeNodeIcoClass:function(e,t){var n=["ico"];if(!t.isAjaxing){var r=data.nodeIsParent(e,t);n[0]=(t.iconSkin?t.iconSkin+"_":"")+n[0],r?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU)}return consts.className.BUTTON+" "+n.join("_")},makeNodeIcoStyle:function(e,t){var n=[];if(!t.isAjaxing){var r=data.nodeIsParent(e,t)&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t[e.data.key.icon];r&&n.push("background:url(",r,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("display:none;")}return n.join("")},makeNodeLineClass:function(e,t){var n=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?n.push(consts.line.ROOT):0==t.level&&t.isFirstNode?n.push(consts.line.ROOTS):t.isLastNode?n.push(consts.line.BOTTOM):n.push(consts.line.CENTER):n.push(consts.line.NOLINE),data.nodeIsParent(e,t)?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+n.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var n=e.data.key.url;return t[n]?t[n]:null},makeUlHtml:function(e,t,n,r){n.push("<ul id='",t.tId,consts.id.UL,"' class='",consts.className.LEVEL,t.level," ",view.makeUlLineClass(e,t),"' style='display:",t.open?"block":"none","'>"),n.push(r),n.push("</ul>")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var n=data.nodeChildren(e,t);if(n){for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);if(data.removeSelectedNode(e),delete t[e.data.key.children],e.data.keep.parent)$$(t,consts.id.UL,e).empty();else{data.nodeIsParent(e,t,!1),t.open=!1;var o=$$(t,consts.id.SWITCH,e),s=$$(t,consts.id.ICON,e);view.replaceSwitchClass(t,o,consts.folder.DOCU),view.replaceIcoClass(t,s,consts.folder.DOCU),$$(t,consts.id.UL,e).remove()}}}},scrollIntoView:function(e,t){if(t)if("undefined"!=typeof Element&&"undefined"!=typeof HTMLElement)Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){"use strict";function t(e,t){return{start:e,length:t,end:e+t}}function n(t,n){return!1===e||n.start<t.end&&t.start<n.end?Math.max(t.end-n.length,Math.min(n.start,t.start)):(t.start+t.end-n.length)/2}function r(e,t){return{x:e,y:t,translate:function(n,i){return r(e+n,t+i)}}}function i(e,t){for(;e;)t=t.translate(e.offsetLeft,e.offsetTop),e=e.offsetParent;return t}for(var o,s=i(this,r(0,0)),a=r(this.offsetWidth,this.offsetHeight),l=this.parentNode;l instanceof HTMLElement;)o=i(l,r(l.clientLeft,l.clientTop)),l.scrollLeft=n(t(s.x-o.x,a.x),t(l.scrollLeft,l.clientWidth)),l.scrollTop=n(t(s.y-o.y,a.y),t(l.scrollTop,l.clientHeight)),s=s.translate(-l.scrollLeft,-l.scrollTop),l=l.parentNode}),t.scrollIntoViewIfNeeded();else{var n=e.treeObj.get(0).getBoundingClientRect(),r=t.getBoundingClientRect();(r.top<n.top||r.bottom>n.bottom||r.right>n.right||r.left<n.left)&&t.scrollIntoView()}},setFirstNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[0].isFirstNode=!0)},setLastNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[n.length-1].isLastNode=!0)},removeNode:function(e,t){var n=data.getRoot(e),r=t.parentTId?t.getParentNode():n;if(t.isFirstNode=!1,t.isLastNode=!1,t.getPreNode=function(){return null},t.getNextNode=function(){return null},data.getNodeCache(e,t.tId)){$$(t,e).remove(),data.removeNodeCache(e,t),data.removeSelectedNode(e,t);for(var i=data.nodeChildren(e,r),o=0,s=i.length;o<s;o++)if(i[o].tId==t.tId){i.splice(o,1);break}view.setFirstNode(e,r),view.setLastNode(e,r);var a,l,u,c=i.length;if(e.data.keep.parent||0!=c){if(e.view.showLine&&c>0){var d=i[c-1];if(a=$$(d,consts.id.UL,e),l=$$(d,consts.id.SWITCH,e),u=$$(d,consts.id.ICON,e),r==n)if(1==i.length)view.replaceSwitchClass(d,l,consts.line.ROOT);else{var h=$$(i[0],consts.id.SWITCH,e);view.replaceSwitchClass(i[0],h,consts.line.ROOTS),view.replaceSwitchClass(d,l,consts.line.BOTTOM)}else view.replaceSwitchClass(d,l,consts.line.BOTTOM);a.removeClass(consts.line.LINE)}}else data.nodeIsParent(e,r,!1),r.open=!1,delete r[e.data.key.children],a=$$(r,consts.id.UL,e),l=$$(r,consts.id.SWITCH,e),u=$$(r,consts.id.ICON,e),view.replaceSwitchClass(r,l,consts.folder.DOCU),view.replaceIcoClass(r,u,consts.folder.DOCU),a.css("display","none")}},replaceIcoClass:function(e,t,n){if(t&&!e.isAjaxing){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[i.length-1]=n}t.attr("class",i.join("_"))}}},replaceSwitchClass:function(e,t,n){if(t){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:i[0]=view.makeNodeLineClassEx(e)+n;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[1]=n}t.attr("class",i.join("_")),n!==consts.folder.DOCU?t.removeAttr("disabled"):t.attr("disabled","disabled")}}},selectNode:function(e,t,n){n||view.cancelPreSelectedNode(e,null,t),$$(t,consts.id.A,e).addClass(consts.node.CURSELECTED),data.addSelectedNode(e,t),e.treeObj.trigger(consts.event.SELECTED,[e.treeId,t])},setNodeFontCss:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeFontCss(e,t);r&&n.css(r)},setNodeClasses:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeClasses(e,t);"add"in r&&r.add.length&&n.addClass(r.add.join(" ")),"remove"in r&&r.remove.length&&n.removeClass(r.remove.join(" "))},setNodeLineIcos:function(e,t){if(t){var n=$$(t,consts.id.SWITCH,e),r=$$(t,consts.id.UL,e),i=$$(t,consts.id.ICON,e),o=view.makeUlLineClass(e,t);0==o.length?r.removeClass(consts.line.LINE):r.addClass(o),n.attr("class",view.makeNodeLineClass(e,t)),data.nodeIsParent(e,t)?n.removeAttr("disabled"):n.attr("disabled","disabled"),i.removeAttr("style"),i.attr("style",view.makeNodeIcoStyle(e,t)),i.attr("class",view.makeNodeIcoClass(e,t))}},setNodeName:function(e,t){var n=data.nodeTitle(e,t),r=$$(t,consts.id.SPAN,e);(r.empty(),e.view.nameIsHTML?r.html(data.nodeName(e,t)):r.text(data.nodeName(e,t)),tools.apply(e.view.showTitle,[e.treeId,t],e.view.showTitle))&&$$(t,consts.id.A,e).attr("title",n||"")},setNodeTarget:function(e,t){$$(t,consts.id.A,e).attr("target",view.makeNodeTarget(t))},setNodeUrl:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeUrl(e,t);null==r||0==r.length?n.removeAttr("href"):n.attr("href",r)},switchNode:function(e,t){if(t.open||!tools.canAsync(e,t))view.expandCollapseNode(e,t,!t.open);else if(e.async.enable){if(!view.asyncNode(e,t))return void view.expandCollapseNode(e,t,!t.open)}else t&&view.expandCollapseNode(e,t,!t.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(e){var t=data.getZTreeTools(e);return t||null},destroy:function(e){if(e&&e.length>0)view.destroy(data.getSetting(e));else for(var t in settings)view.destroy(settings[t])},init:function(e,t,n){var r=tools.clone(_setting);$.extend(!0,r,t),r.treeId=e.attr("id"),r.treeObj=e,r.treeObj.empty(),settings[r.treeId]=r,void 0===document.body.style.maxHeight&&(r.view.expandSpeed=""),data.initRoot(r);var i=data.getRoot(r);n=n?tools.clone(tools.isArray(n)?n:[n]):[],r.data.simpleData.enable?data.nodeChildren(r,i,data.transformTozTreeFormat(r,n)):data.nodeChildren(r,i,n),data.initCache(r),event.unbindTree(r),event.bindTree(r),event.unbindEvent(r),event.bindEvent(r);var o={setting:r,addNodes:function(e,t,n,i){e||(e=null);var o=data.nodeIsParent(r,e);if(e&&!o&&r.data.keep.leaf)return null;var s=parseInt(t,10);if(isNaN(s)?(i=!!n,n=t,t=-1):t=s,!n)return null;var a=tools.clone(tools.isArray(n)?n:[n]);function l(){view.addNodes(r,e,t,a,1==i)}return tools.canAsync(r,e)?view.asyncNode(r,e,i,l):l(),a},cancelSelectedNode:function(e){view.cancelPreSelectedNode(r,e)},destroy:function(){view.destroy(r)},expandAll:function(e){return e=!!e,view.expandCollapseSonNode(r,null,e,!0),e},expandNode:function(e,t,n,i,o){return e&&data.nodeIsParent(r,e)?(!0!==t&&!1!==t&&(t=!e.open),(o=!!o)&&t&&0==tools.apply(r.callback.beforeExpand,[r.treeId,e],!0)||o&&!t&&0==tools.apply(r.callback.beforeCollapse,[r.treeId,e],!0)?null:(t&&e.parentTId&&view.expandCollapseParentNode(r,e.getParentNode(),t,!1),t!==e.open||n?(data.getRoot(r).expandTriggerFlag=o,!tools.canAsync(r,e)&&n?view.expandCollapseSonNode(r,e,t,!0,s):(e.open=!t,view.switchNode(this.setting,e),s()),t):null)):null;function s(){var t=$$(e,consts.id.A,r).get(0);t&&!1!==i&&view.scrollIntoView(r,t)}},getNodes:function(){return data.getNodes(r)},getNodeByParam:function(e,t,n){return e?data.getNodeByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodeByTId:function(e){return data.getNodeCache(r,e)},getNodesByParam:function(e,t,n){return e?data.getNodesByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByParamFuzzy:function(e,t,n){return e?data.getNodesByParamFuzzy(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByFilter:function(e,t,n,i){return t=!!t,e&&"function"==typeof e?data.getNodesByFilter(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t,i):t?null:[]},getNodeIndex:function(e){if(!e)return null;for(var t=e.parentTId?e.getParentNode():data.getRoot(r),n=data.nodeChildren(r,t),i=0,o=n.length;i<o;i++)if(n[i]==e)return i;return-1},getSelectedNodes:function(){for(var e=[],t=data.getRoot(r).curSelectedList,n=0,i=t.length;n<i;n++)e.push(t[n]);return e},isSelectedNode:function(e){return data.isSelectedNode(r,e)},reAsyncChildNodesPromise:function(e,t,n){return new Promise((function(r,i){try{o.reAsyncChildNodes(e,t,n,(function(){r(e)}))}catch(e){i(e)}}))},reAsyncChildNodes:function(e,t,n,i){if(this.setting.async.enable){var o=!e;if(o&&(e=data.getRoot(r)),"refresh"==t){for(var s=data.nodeChildren(r,e),a=0,l=s?s.length:0;a<l;a++)data.removeNodeCache(r,s[a]);if(data.removeSelectedNode(r),data.nodeChildren(r,e,[]),o)this.setting.treeObj.empty();else $$(e,consts.id.UL,r).empty()}view.asyncNode(this.setting,o?null:e,!!n,i)}},refresh:function(){this.setting.treeObj.empty();var e=data.getRoot(r),t=data.nodeChildren(r,e);data.initRoot(r),data.nodeChildren(r,e,t),data.initCache(r),view.createNodes(r,0,data.nodeChildren(r,e),null,-1)},removeChildNodes:function(e){if(!e)return null;var t=data.nodeChildren(r,e);return view.removeChildNodes(r,e),t||null},removeNode:function(e,t){e&&((t=!!t)&&0==tools.apply(r.callback.beforeRemove,[r.treeId,e],!0)||(view.removeNode(r,e),t&&this.setting.treeObj.trigger(consts.event.REMOVE,[r.treeId,e])))},selectNode:function(e,t,n){if(e&&tools.uCanDo(r)){if(t=r.view.selectedMulti&&t,e.parentTId)view.expandCollapseParentNode(r,e.getParentNode(),!0,!1,(function(){if(n)return;var t=$$(e,r).get(0);view.scrollIntoView(r,t)}));else if(!n)try{$$(e,r).focus().blur()}catch(e){}view.selectNode(r,e,t)}},transformTozTreeNodes:function(e){return data.transformTozTreeFormat(r,e)},transformToArray:function(e){return data.transformToArrayFormat(r,e)},updateNode:function(e,t){e&&($$(e,r).get(0)&&tools.uCanDo(r)&&(view.setNodeName(r,e),view.setNodeTarget(r,e),view.setNodeUrl(r,e),view.setNodeLineIcos(r,e),view.setNodeFontCss(r,e),view.setNodeClasses(r,e)))}};i.treeTools=o,data.setZTreeTools(r,o);var s=data.nodeChildren(r,i);return s&&s.length>0?view.createNodes(r,0,s,null,-1):r.async.enable&&r.async.url&&""!==r.async.url&&view.asyncNode(r),o}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(e){var t={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},n={check:{enable:!1,autoCheckTrigger:!1,chkStyle:t.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:t.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},r={onCheckNode:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId);if(0==s.apply(n.callback.beforeCheck,[n.treeId,t],!0))return!0;var r=u.nodeChecked(n,t);u.nodeChecked(n,t,!r),l.checkNodeRelation(n,t);var i=c(t,a.id.CHECK,n);return l.setChkClass(n,i,t),l.repairParentChkClassWithSelf(n,t),n.treeObj.trigger(a.event.CHECK,[e,n.treeId,t]),!0},onMouseoverCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!0,l.setChkClass(n,r,t),!0},onMouseoutCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!1,l.setChkClass(n,r,t),!0}},i={tools:{},view:{checkNodeRelation:function(e,t){var n,r,i,o=a.radio,s=u.nodeChecked(e,t);if(e.check.chkStyle==o.STYLE){var d=u.getRadioCheckedList(e);if(s)if(e.check.radioType==o.TYPE_ALL){for(r=d.length-1;r>=0;r--){n=d[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),d.splice(r,1),l.setChkClass(e,c(n,a.id.CHECK,e),n),n.parentTId!=t.parentTId&&l.repairParentChkClassWithSelf(e,n))}d.push(t)}else{var h=t.parentTId?t.getParentNode():u.getRoot(e);for(r=0,i=(p=u.nodeChildren(e,h)).length;r<i;r++){n=p[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),l.setChkClass(e,c(n,a.id.CHECK,e),n))}}else if(e.check.radioType==o.TYPE_ALL)for(r=0,i=d.length;r<i;r++)if(t==d[r]){d.splice(r,1);break}}else{var p=u.nodeChildren(e,t);s&&(!p||0==p.length||e.check.chkboxType.Y.indexOf("s")>-1)&&l.setSonNodeCheckBox(e,t,!0),s||p&&0!=p.length&&!(e.check.chkboxType.N.indexOf("s")>-1)||l.setSonNodeCheckBox(e,t,!1),s&&e.check.chkboxType.Y.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!0),!s&&e.check.chkboxType.N.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!1)}},makeChkClass:function(e,t){var n=a.checkbox,r=a.radio,i="",o=u.nodeChecked(e,t);i=!0===t.chkDisabled?n.DISABLED:t.halfCheck?n.PART:e.check.chkStyle==r.STYLE?t.check_Child_State<1?n.FULL:n.PART:o?2===t.check_Child_State||-1===t.check_Child_State?n.FULL:n.PART:t.check_Child_State<1?n.FULL:n.PART;var s=e.check.chkStyle+"_"+(o?n.TRUE:n.FALSE)+"_"+i;return s=t.check_Focus&&!0!==t.chkDisabled?s+"_"+n.FOCUS:s,a.className.BUTTON+" "+n.DEFAULT+" "+s},repairAllChk:function(e,t){if(e.check.enable&&e.check.chkStyle===a.checkbox.STYLE)for(var n=u.getRoot(e),r=u.nodeChildren(e,n),i=0,o=r.length;i<o;i++){var s=r[i];!0!==s.nocheck&&!0!==s.chkDisabled&&u.nodeChecked(e,s,t),l.setSonNodeCheckBox(e,s,t)}},repairChkClass:function(e,t){if(t&&(u.makeChkFlag(e,t),!0!==t.nocheck)){var n=c(t,a.id.CHECK,e);l.setChkClass(e,n,t)}},repairParentChkClass:function(e,t){if(t&&t.parentTId){var n=t.getParentNode();l.repairChkClass(e,n),l.repairParentChkClass(e,n)}},repairParentChkClassWithSelf:function(e,t){if(t){var n=u.nodeChildren(e,t);n&&n.length>0?l.repairParentChkClass(e,n[0]):l.repairParentChkClass(e,t)}},repairSonChkDisabled:function(e,t,n,r){if(t){t.chkDisabled!=n&&(t.chkDisabled=n),l.repairChkClass(e,t);var i=u.nodeChildren(e,t);if(i&&r)for(var o=0,s=i.length;o<s;o++){var a=i[o];l.repairSonChkDisabled(e,a,n,r)}}},repairParentChkDisabled:function(e,t,n,r){t&&(t.chkDisabled!=n&&r&&(t.chkDisabled=n),l.repairChkClass(e,t),l.repairParentChkDisabled(e,t.getParentNode(),n,r))},setChkClass:function(e,t,n){t&&(!0===n.nocheck?t.hide():t.show(),t.attr("class",l.makeChkClass(e,n)))},setParentNodeCheckBox:function(e,t,n,r){var i=c(t,a.id.CHECK,e);if(r||(r=t),u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled&&(u.nodeChecked(e,t,n),l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t])),t.parentTId){var o=!0;if(!n)for(var s=u.nodeChildren(e,t.getParentNode()),d=0,h=s.length;d<h;d++){var p=s[d],f=u.nodeChecked(e,p);if(!0!==p.nocheck&&!0!==p.chkDisabled&&f||(!0===p.nocheck||!0===p.chkDisabled)&&p.check_Child_State>0){o=!1;break}}o&&l.setParentNodeCheckBox(e,t.getParentNode(),n,r)}},setSonNodeCheckBox:function(e,t,n,r){if(t){var i=c(t,a.id.CHECK,e);r||(r=t);var o=!1,s=u.nodeChildren(e,t);if(s)for(var d=0,h=s.length;d<h;d++){var p=s[d];l.setSonNodeCheckBox(e,p,n,r),!0===p.chkDisabled&&(o=!0)}t!=u.getRoot(e)&&!0!==t.chkDisabled&&(o&&!0!==t.nocheck&&u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled?(u.nodeChecked(e,t,n),o||(t.check_Child_State=s&&s.length>0?n?2:0:-1)):t.check_Child_State=-1,l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&!0!==t.nocheck&&!0!==t.chkDisabled&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t]))}}},event:{},data:{getRadioCheckedList:function(e){for(var t=u.getRoot(e).radioCheckedList,n=0,r=t.length;n<r;n++)u.getNodeCache(e,t[n].tId)||(t.splice(n,1),n--,r--);return t},getCheckStatus:function(e,t){if(!e.check.enable||t.nocheck||t.chkDisabled)return null;var n=u.nodeChecked(e,t);return{checked:n,half:t.halfCheck?t.halfCheck:e.check.chkStyle==a.radio.STYLE?2===t.check_Child_State:n?t.check_Child_State>-1&&t.check_Child_State<2:t.check_Child_State>0}},getTreeCheckedNodes:function(e,t,n,r){if(!t)return[];var i=n&&e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL;r=r||[];for(var o=0,s=t.length;o<s;o++){var l=t[o],c=u.nodeChildren(e,l),d=u.nodeChecked(e,l);if(!0!==l.nocheck&&!0!==l.chkDisabled&&d==n&&(r.push(l),i))break;if(u.getTreeCheckedNodes(e,c,n,r),i&&r.length>0)break}return r},getTreeChangeCheckedNodes:function(e,t,n){if(!t)return[];n=n||[];for(var r=0,i=t.length;r<i;r++){var o=t[r],s=u.nodeChildren(e,o),a=u.nodeChecked(e,o);!0!==o.nocheck&&!0!==o.chkDisabled&&a!=o.checkedOld&&n.push(o),u.getTreeChangeCheckedNodes(e,s,n)}return n},makeChkFlag:function(e,t){if(t){var n=-1,r=u.nodeChildren(e,t);if(r)for(var i=0,o=r.length;i<o;i++){var s=r[i],l=u.nodeChecked(e,s),c=-1;if(e.check.chkStyle==a.radio.STYLE){if(2==(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck||l||s.check_Child_State>0?2:0)){n=2;break}0==c&&(n=0)}else if(e.check.chkStyle==a.checkbox.STYLE){if(1===(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck?1:l?-1===s.check_Child_State||2===s.check_Child_State?2:1:s.check_Child_State>0?1:0)){n=1;break}if(2===c&&n>-1&&i>0&&c!==n){n=1;break}if(2===n&&c>-1&&c<2){n=1;break}c>-1&&(n=c)}}t.check_Child_State=n}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.nodeChecked=function(e,t,n){if(!t)return!1;var r=e.data.key.checked;return void 0!==n?("string"==typeof n&&(n=s.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=s.eqs(t[r],"true"):t[r]=!!t[r],t[r]},u.exSetting(n),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.CHECK,(function(t,n,r,i){t.srcEvent=n,s.apply(e.callback.onCheck,[t,r,i])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.CHECK)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,l){if(n){var c=u.nodeChecked(e,n);if(n.checkedOld=c,"string"==typeof n.nocheck&&(n.nocheck=s.eqs(n.nocheck,"true")),n.nocheck=!!n.nocheck||e.check.nocheckInherit&&r&&!!r.nocheck,"string"==typeof n.chkDisabled&&(n.chkDisabled=s.eqs(n.chkDisabled,"true")),n.chkDisabled=!!n.chkDisabled||e.check.chkDisabledInherit&&r&&!!r.chkDisabled,"string"==typeof n.halfCheck&&(n.halfCheck=s.eqs(n.halfCheck,"true")),n.halfCheck=!!n.halfCheck,n.check_Child_State=-1,n.check_Focus=!1,n.getCheckStatus=function(){return u.getCheckStatus(e,n)},e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL&&c)u.getRoot(e).radioCheckedList.push(n)}})),u.addInitProxy((function(e){var t=e.target,n=u.getSetting(e.data.treeId),i="",o=null,l="",c=null;if(s.eqs(e.type,"mouseover")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoverCheck"):s.eqs(e.type,"mouseout")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoutCheck"):s.eqs(e.type,"click")&&n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="checkNode"),i.length>0)switch(o=u.getNodeCache(n,i),l){case"checkNode":c=r.onCheckNode;break;case"mouseoverCheck":c=r.onMouseoverCheck;break;case"mouseoutCheck":c=r.onMouseoutCheck}return{stop:"checkNode"===l,node:o,nodeEventType:l,nodeEventCallback:c,treeEventType:"",treeEventCallback:null}}),!0),u.addInitRoot((function(e){u.getRoot(e).radioCheckedList=[]})),u.addBeforeA((function(e,t,n){e.check.enable&&(u.makeChkFlag(e,t),n.push("<span ID='",t.tId,a.id.CHECK,"' class='",l.makeChkClass(e,t),"' treeNode",a.id.CHECK,!0===t.nocheck?" style='display:none;'":"","></span>"))})),u.addZTreeTools((function(e,t){t.checkNode=function(t,n,r,i){var o=u.nodeChecked(e,t);if(!0!==t.chkDisabled&&(!0!==n&&!1!==n&&(n=!o),i=!!i,(o!==n||r)&&(!i||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,t],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&!0!==t.nocheck)){u.nodeChecked(e,t,n);var d=c(t,a.id.CHECK,this.setting);(r||this.setting.check.chkStyle===a.radio.STYLE)&&l.checkNodeRelation(this.setting,t),l.setChkClass(this.setting,d,t),l.repairParentChkClassWithSelf(this.setting,t),i&&this.setting.treeObj.trigger(a.event.CHECK,[null,this.setting.treeId,t])}},t.checkAllNodes=function(e){l.repairAllChk(this.setting,!!e)},t.getCheckedNodes=function(t){t=!1!==t;var n=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeCheckedNodes(this.setting,n,t)},t.getChangeCheckedNodes=function(){var t=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeChangeCheckedNodes(this.setting,t)},t.setChkDisabled=function(e,t,n,r){t=!!t,n=!!n,r=!!r,l.repairSonChkDisabled(this.setting,e,t,r),l.repairParentChkDisabled(this.setting,e.getParentNode(),t,n)};var n=t.updateNode;t.updateNode=function(e,r){if((n&&n.apply(t,arguments),e&&this.setting.check.enable)&&(c(e,this.setting).get(0)&&s.uCanDo(this.setting))){var i=c(e,a.id.CHECK,this.setting);1!=r&&this.setting.check.chkStyle!==a.radio.STYLE||l.checkNodeRelation(this.setting,e),l.setChkClass(this.setting,i,e),l.repairParentChkClassWithSelf(this.setting,e)}}}));var d=l.createNodes;l.createNodes=function(e,t,n,r,i){d&&d.apply(l,arguments),n&&l.repairParentChkClassWithSelf(e,r)};var h=l.removeNode;l.removeNode=function(e,t){var n=t.getParentNode();h&&h.apply(l,arguments),t&&n&&(l.repairChkClass(e,n),l.repairParentChkClass(e,n))};var p=l.appendNodes;l.appendNodes=function(e,t,n,r,i,o,s){var a="";return p&&(a=p.apply(l,arguments)),r&&u.makeChkFlag(e,r),a}}(jQuery),function(e){var t={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},n={onHoverOverNode:function(e,t){var r=u.getSetting(e.data.treeId),i=u.getRoot(r);i.curHoverNode!=t&&n.onHoverOutNode(e),i.curHoverNode=t,l.addHoverDom(r,t)},onHoverOutNode:function(e,t){var n=u.getSetting(e.data.treeId),r=u.getRoot(n);r.curHoverNode&&!u.isSelectedNode(n,r.curHoverNode)&&(l.removeTreeDom(n,r.curHoverNode),r.curHoverNode=null)},onMousedownNode:function(n,r){var i,o,d=u.getSetting(n.data.treeId),h=u.getRoot(d),p=u.getRoots();if(2==n.button||!d.edit.enable||!d.edit.drag.isCopy&&!d.edit.drag.isMove)return!0;var f=n.target,m=u.getRoot(d).curSelectedList,g=[];if(u.isSelectedNode(d,r))for(i=0,o=m.length;i<o;i++){if(m[i].editNameFlag&&s.eqs(f.tagName,"input")&&null!==f.getAttribute("treeNode"+a.id.INPUT))return!0;if(g.push(m[i]),g[0].parentTId!==m[i].parentTId){g=[r];break}}else g=[r];l.editNodeBlur=!0,l.cancelCurEditNode(d);var v,y,_,b,w,x=e(d.treeObj.get(0).ownerDocument),S=e(d.treeObj.get(0).ownerDocument.body),k=!1,T=d,E=d,D=null,C=null,M=null,A=a.move.TYPE_INNER,I=n.clientX,L=n.clientY,O=(new Date).getTime();function N(n){if(0==h.dragFlag&&Math.abs(I-n.clientX)<d.edit.drag.minMoveSize&&Math.abs(L-n.clientY)<d.edit.drag.minMoveSize)return!0;var r,i,o,f,m;if(S.css("cursor","pointer"),0==h.dragFlag){if(0==s.apply(d.callback.beforeDrag,[d.treeId,g],!0))return R(n),!0;for(r=0,i=g.length;r<i;r++)0==r&&(h.dragNodeShowBefore=[]),o=g[r],u.nodeIsParent(d,o)&&o.open?(l.expandCollapseNode(d,o,!o.open),h.dragNodeShowBefore[o.tId]=!0):h.dragNodeShowBefore[o.tId]=!1;h.dragFlag=1,p.showHoverDom=!1,s.showIfameMask(d,!0);var E=!0,N=-1;if(g.length>1){var P=g[0].parentTId?u.nodeChildren(d,g[0].getParentNode()):u.getNodes(d);for(m=[],r=0,i=P.length;r<i;r++)if(void 0!==h.dragNodeShowBefore[P[r].tId]&&(E&&N>-1&&N+1!==r&&(E=!1),m.push(P[r]),N=r),g.length===m.length){g=m;break}}for(E&&(b=g[0].getPreNode(),w=g[g.length-1].getNextNode()),v=c("<ul class='zTreeDragUL'></ul>",d),r=0,i=g.length;r<i;r++)(o=g[r]).editNameFlag=!1,l.selectNode(d,o,r>0),l.removeTreeDom(d,o),r>d.edit.drag.maxShowNodeNum-1||((f=c("<li id='"+o.tId+"_tmp'></li>",d)).append(c(o,a.id.A,d).clone()),f.css("padding","0"),f.children("#"+o.tId+a.id.A).removeClass(a.node.CURSELECTED),v.append(f),r==d.edit.drag.maxShowNodeNum-1&&(f=c("<li id='"+o.tId+"_moretmp'><a> ... </a></li>",d),v.append(f)));v.attr("id",g[0].tId+a.id.UL+"_tmp"),v.addClass(d.treeObj.attr("class")),v.appendTo(S),(y=c("<span class='tmpzTreeMove_arrow'></span>",d)).attr("id","zTreeMove_arrow_tmp"),y.appendTo(S),d.treeObj.trigger(a.event.DRAG,[n,d.treeId,g])}if(1==h.dragFlag){if(_&&y.attr("id")==n.target.id&&M&&n.clientX+x.scrollLeft()+2>e("#"+M+a.id.A,_).offset().left){var F=e("#"+M+a.id.A,_);n.target=F.length>0?F.get(0):n.target}else _&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER));_=null,M=null,k=!1,T=d;var j=u.getSettings();for(var Y in j)j[Y].treeId&&j[Y].edit.enable&&j[Y].treeId!=d.treeId&&(n.target.id==j[Y].treeId||e(n.target).parents("#"+j[Y].treeId).length>0)&&(k=!0,T=j[Y]);var V=x.scrollTop(),H=x.scrollLeft(),B=T.treeObj.offset(),U=T.treeObj.get(0).scrollHeight,z=T.treeObj.get(0).scrollWidth,q=n.clientY+V-B.top,W=T.treeObj.height()+B.top-n.clientY-V,$=n.clientX+H-B.left,G=T.treeObj.width()+B.left-n.clientX-H,K=q<d.edit.drag.borderMax&&q>d.edit.drag.borderMin,Z=W<d.edit.drag.borderMax&&W>d.edit.drag.borderMin,X=$<d.edit.drag.borderMax&&$>d.edit.drag.borderMin,J=G<d.edit.drag.borderMax&&G>d.edit.drag.borderMin,Q=q>d.edit.drag.borderMin&&W>d.edit.drag.borderMin&&$>d.edit.drag.borderMin&&G>d.edit.drag.borderMin,ee=K&&T.treeObj.scrollTop()<=0,te=Z&&T.treeObj.scrollTop()+T.treeObj.height()+10>=U,ne=X&&T.treeObj.scrollLeft()<=0,re=J&&T.treeObj.scrollLeft()+T.treeObj.width()+10>=z;if(n.target&&s.isChildOrSelf(n.target,T.treeId)){for(var ie=n.target;ie&&ie.tagName&&!s.eqs(ie.tagName,"li")&&ie.id!=T.treeId;)ie=ie.parentNode;var oe=!0;for(r=0,i=g.length;r<i;r++){if(o=g[r],ie.id===o.tId){oe=!1;break}if(c(o,d).find("#"+ie.id).length>0){oe=!1;break}}oe&&n.target&&s.isChildOrSelf(n.target,ie.id+a.id.A)&&(_=e(ie),M=ie.id)}o=g[0],Q&&s.isChildOrSelf(n.target,T.treeId)&&(!_&&(n.target.id==T.treeId||ee||te||ne||re)&&(k||!k&&o.parentTId)&&(_=T.treeObj),K?T.treeObj.scrollTop(T.treeObj.scrollTop()-10):Z&&T.treeObj.scrollTop(T.treeObj.scrollTop()+10),X?T.treeObj.scrollLeft(T.treeObj.scrollLeft()-10):J&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+10),_&&_!=T.treeObj&&_.offset().left<T.treeObj.offset().left&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+_.offset().left-T.treeObj.offset().left)),v.css({top:n.clientY+V+3+"px",left:n.clientX+H+3+"px"});var se=0,ae=0;if(_&&_.attr("id")!=T.treeId){var le=null==M?null:u.getNodeCache(T,M),ue=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy,ce=!(!b||M!==b.tId),de=!(!w||M!==w.tId),he=o.parentTId&&o.parentTId==M,pe=(ue||!de)&&s.apply(T.edit.drag.prev,[T.treeId,g,le],!!T.edit.drag.prev),fe=(ue||!ce)&&s.apply(T.edit.drag.next,[T.treeId,g,le],!!T.edit.drag.next),me=(ue||!he)&&!(T.data.keep.leaf&&!u.nodeIsParent(d,le))&&s.apply(T.edit.drag.inner,[T.treeId,g,le],!!T.edit.drag.inner);function ge(){_=null,M="",A=a.move.TYPE_INNER,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null)}if(pe||fe||me){var ve=e("#"+M+a.id.A,_),ye=le.isLastNode?null:e("#"+le.getNextNode().tId+a.id.A,_.next()),_e=ve.offset().top,be=ve.offset().left,we=pe?me?.25:fe?.5:1:-1,xe=fe?me?.75:pe?.5:0:-1,Se=(n.clientY+V-_e)/ve.height();if((1==we||Se<=we&&Se>=-.2)&&pe?(se=1-y.width(),ae=_e-y.height()/2,A=a.move.TYPE_PREV):(0==xe||Se>=xe&&Se<=1.2)&&fe?(se=1-y.width(),ae=null==ye||u.nodeIsParent(d,le)&&le.open?_e+ve.height()-y.height()/2:ye.offset().top-y.height()/2,A=a.move.TYPE_NEXT):me?(se=5-y.width(),ae=_e,A=a.move.TYPE_INNER):ge(),_&&(y.css({display:"block",top:ae+"px",left:be+se+"px"}),ve.addClass(a.node.TMPTARGET_NODE+"_"+A),D==M&&C==A||(O=(new Date).getTime()),le&&u.nodeIsParent(d,le)&&A==a.move.TYPE_INNER)){var ke=!0;window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==le.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===le.tId&&(ke=!1),ke&&(window.zTreeMoveTimer=setTimeout((function(){A==a.move.TYPE_INNER&&le&&u.nodeIsParent(d,le)&&!le.open&&(new Date).getTime()-O>T.edit.drag.autoOpenTime&&s.apply(T.callback.beforeDragOpen,[T.treeId,le],!0)&&(l.switchNode(T,le),T.edit.drag.autoExpandTrigger&&T.treeObj.trigger(a.event.EXPAND,[T.treeId,le]))}),T.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=le.tId)}}else ge()}else A=a.move.TYPE_INNER,_&&s.apply(T.edit.drag.inner,[T.treeId,g,null],!!T.edit.drag.inner)?_.addClass(a.node.TMPTARGET_TREE):_=null,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null);D=M,C=A,d.treeObj.trigger(a.event.DRAGMOVE,[n,d.treeId,g])}return!1}function R(n){if(window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null),D=null,C=null,x.unbind("mousemove",N),x.unbind("mouseup",R),x.unbind("selectstart",P),S.css("cursor",""),_&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER)),s.showIfameMask(d,!1),p.showHoverDom=!0,0!=h.dragFlag){var r,i,o;for(h.dragFlag=0,r=0,i=g.length;r<i;r++)o=g[r],u.nodeIsParent(d,o)&&h.dragNodeShowBefore[o.tId]&&!o.open&&(l.expandCollapseNode(d,o,!o.open),delete h.dragNodeShowBefore[o.tId]);v&&v.remove(),y&&y.remove();var f=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy;if(!f&&_&&M&&g[0].parentTId&&M==g[0].parentTId&&A==a.move.TYPE_INNER&&(_=null),_){var m=null==M?null:u.getNodeCache(T,M);if(0==s.apply(d.callback.beforeDrop,[T.treeId,g,m,A,f],!0))return void l.selectNodes(E,g);var b=f?s.clone(g):g;function w(){if(k){if(!f)for(var e=0,t=g.length;e<t;e++)l.removeNode(d,g[e]);A==a.move.TYPE_INNER?l.addNodes(T,m,-1,b):l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b)}else if(f&&A==a.move.TYPE_INNER)l.addNodes(T,m,-1,b);else if(f)l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b);else if(A!=a.move.TYPE_NEXT)for(e=0,t=b.length;e<t;e++)l.moveNode(T,m,b[e],A,!1);else for(e=-1,t=b.length-1;e<t;t--)l.moveNode(T,m,b[t],A,!1);l.selectNodes(T,b);var r=c(b[0],d).get(0);l.scrollIntoView(d,r),d.treeObj.trigger(a.event.DROP,[n,T.treeId,b,m,A,f])}A==a.move.TYPE_INNER&&s.canAsync(T,m)?l.asyncNode(T,m,!1,w):w()}else l.selectNodes(E,g),d.treeObj.trigger(a.event.DROP,[n,d.treeId,g,null,null,null])}}function P(){return!1}return s.uCanDo(d)&&x.bind("mousemove",N),x.bind("mouseup",R),x.bind("selectstart",P),!0}},r={addEditBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.EDIT,e).length>0)&&s.apply(e.edit.showRenameBtn,[e.treeId,t],e.edit.showRenameBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" edit' id='"+t.tId+a.id.EDIT+"' title='"+s.apply(e.edit.renameTitle,[e.treeId,t],e.edit.renameTitle)+"' treeNode"+a.id.EDIT+" style='display:none;'></span>";n.append(r),c(t,a.id.EDIT,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeEditName,[e.treeId,t],!0))&&(l.editNode(e,t),!1)})).show()}},addRemoveBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.REMOVE,e).length>0)&&s.apply(e.edit.showRemoveBtn,[e.treeId,t],e.edit.showRemoveBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" remove' id='"+t.tId+a.id.REMOVE+"' title='"+s.apply(e.edit.removeTitle,[e.treeId,t],e.edit.removeTitle)+"' treeNode"+a.id.REMOVE+" style='display:none;'></span>";n.append(r),c(t,a.id.REMOVE,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeRemove,[e.treeId,t],!0))&&(l.removeNode(e,t),e.treeObj.trigger(a.event.REMOVE,[e.treeId,t]),!1)})).bind("mousedown",(function(e){return!0})).show()}},addHoverDom:function(e,t){u.getRoots().showHoverDom&&(t.isHover=!0,e.edit.enable&&(l.addEditBtn(e,t),l.addRemoveBtn(e,t)),s.apply(e.view.addHoverDom,[e.treeId,t]))},cancelCurEditNode:function(e,t,n){var r=u.getRoot(e),i=r.curEditNode;if(i){var o=r.curEditInput,d=t||(n?u.nodeName(e,i):o.val());if(!1===s.apply(e.callback.beforeRename,[e.treeId,i,d,n],!0))return!1;u.nodeName(e,i,d),c(i,a.id.A,e).removeClass(a.node.CURSELECTED_EDIT),o.unbind(),l.setNodeName(e,i),i.editNameFlag=!1,r.curEditNode=null,r.curEditInput=null,l.selectNode(e,i,!1),e.treeObj.trigger(a.event.RENAME,[e.treeId,i,n])}return r.noSelection=!0,!0},editNode:function(e,t){var n=u.getRoot(e);if(l.editNodeBlur=!1,u.isSelectedNode(e,t)&&n.curEditNode==t&&t.editNameFlag)setTimeout((function(){s.inputFocus(n.curEditInput)}),0);else{t.editNameFlag=!0,l.removeTreeDom(e,t),l.cancelCurEditNode(e),l.selectNode(e,t,!1),c(t,a.id.SPAN,e).html("<input type=text class='rename' id='"+t.tId+a.id.INPUT+"' treeNode"+a.id.INPUT+" >");var r=c(t,a.id.INPUT,e);r.attr("value",u.nodeName(e,t)),e.edit.editNameSelectAll?s.inputSelect(r):s.inputFocus(r),r.bind("blur",(function(t){l.editNodeBlur||l.cancelCurEditNode(e)})).bind("keydown",(function(t){"13"==t.keyCode?(l.editNodeBlur=!0,l.cancelCurEditNode(e)):"27"==t.keyCode&&l.cancelCurEditNode(e,null,!0)})).bind("click",(function(e){return!1})).bind("dblclick",(function(e){return!1})),c(t,a.id.A,e).addClass(a.node.CURSELECTED_EDIT),n.curEditInput=r,n.noSelection=!1,n.curEditNode=t}},moveNode:function(e,t,n,r,i,o){var s=u.getRoot(e);if(t!=n&&(!e.data.keep.leaf||!t||u.nodeIsParent(e,t)||r!=a.move.TYPE_INNER)){var d=n.parentTId?n.getParentNode():s,h=null===t||t==s;h&&null===t&&(t=s),h&&(r=a.move.TYPE_INNER);var p,f,m=t.parentTId?t.getParentNode():s;if(r!=a.move.TYPE_PREV&&r!=a.move.TYPE_NEXT&&(r=a.move.TYPE_INNER),r==a.move.TYPE_INNER&&(h?n.parentTId=null:(u.nodeIsParent(e,t)||(u.nodeIsParent(e,t,!0),t.open=!!t.open,l.setNodeLineIcos(e,t)),n.parentTId=t.tId)),h)f=p=e.treeObj;else{if(o||r!=a.move.TYPE_INNER?o||l.expandCollapseNode(e,t.getParentNode(),!0,!1):l.expandCollapseNode(e,t,!0,!1),p=c(t,e),f=c(t,a.id.UL,e),p.get(0)&&!f.get(0)){var g=[];l.makeUlHtml(e,t,g,""),p.append(g.join(""))}f=c(t,a.id.UL,e)}var v=c(n,e);v.get(0)?p.get(0)||v.remove():v=l.appendNodes(e,n.level,[n],null,-1,!1,!0).join(""),f.get(0)&&r==a.move.TYPE_INNER?f.append(v):p.get(0)&&r==a.move.TYPE_PREV?p.before(v):p.get(0)&&r==a.move.TYPE_NEXT&&p.after(v);var y,_,b=-1,w=0,x=null,S=null,k=n.level,T=u.nodeChildren(e,d),E=u.nodeChildren(e,m),D=u.nodeChildren(e,t);if(n.isFirstNode)b=0,T.length>1&&((x=T[1]).isFirstNode=!0);else if(n.isLastNode)(x=T[(b=T.length-1)-1]).isLastNode=!0;else for(y=0,_=T.length;y<_;y++)if(T[y].tId==n.tId){b=y;break}if(b>=0&&T.splice(b,1),r!=a.move.TYPE_INNER)for(y=0,_=E.length;y<_;y++)E[y].tId==t.tId&&(w=y);if(r==a.move.TYPE_INNER?(D||(D=u.nodeChildren(e,t,[])),D.length>0&&((S=D[D.length-1]).isLastNode=!1),D.splice(D.length,0,n),n.isLastNode=!0,n.isFirstNode=1==D.length):t.isFirstNode&&r==a.move.TYPE_PREV?(E.splice(w,0,n),(S=t).isFirstNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!0,n.isLastNode=!1):t.isLastNode&&r==a.move.TYPE_NEXT?(E.splice(w+1,0,n),(S=t).isLastNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!0):(r==a.move.TYPE_PREV?E.splice(w,0,n):E.splice(w+1,0,n),n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!1),u.fixPIdKeyValue(e,n),u.setSonNodeLevel(e,n.getParentNode(),n),l.setNodeLineIcos(e,n),l.repairNodeLevelClass(e,n,k),!e.data.keep.parent&&T.length<1){u.nodeIsParent(e,d,!1),d.open=!1;var C=c(d,a.id.UL,e),M=c(d,a.id.SWITCH,e),A=c(d,a.id.ICON,e);l.replaceSwitchClass(d,M,a.folder.DOCU),l.replaceIcoClass(d,A,a.folder.DOCU),C.css("display","none")}else x&&l.setNodeLineIcos(e,x);S&&l.setNodeLineIcos(e,S),e.check&&e.check.enable&&l.repairChkClass&&(l.repairChkClass(e,d),l.repairParentChkClassWithSelf(e,d),d!=n.parent&&l.repairParentChkClassWithSelf(e,n)),o||l.expandCollapseParentNode(e,n.getParentNode(),!0,i)}},removeEditBtn:function(e,t){c(t,a.id.EDIT,e).unbind().remove()},removeRemoveBtn:function(e,t){c(t,a.id.REMOVE,e).unbind().remove()},removeTreeDom:function(e,t){t.isHover=!1,l.removeEditBtn(e,t),l.removeRemoveBtn(e,t),s.apply(e.view.removeHoverDom,[e.treeId,t])},repairNodeLevelClass:function(e,t,n){if(n!==t.level){var r=c(t,e),i=c(t,a.id.A,e),o=c(t,a.id.UL,e),s=a.className.LEVEL+n,l=a.className.LEVEL+t.level;r.removeClass(s),r.addClass(l),i.removeClass(s),i.addClass(l),o.removeClass(s),o.addClass(l)}},selectNodes:function(e,t){for(var n=0,r=t.length;n<r;n++)l.selectNode(e,t[n],n>0)}},i={tools:{getAbs:function(e){var t=e.getBoundingClientRect(),n=document.body.scrollTop+document.documentElement.scrollTop,r=document.body.scrollLeft+document.documentElement.scrollLeft;return[t.left+r,t.top+n]},inputFocus:function(e){e.get(0)&&(e.focus(),s.setCursorPosition(e.get(0),e.val().length))},inputSelect:function(e){e.get(0)&&(e.focus(),e.select())},setCursorPosition:function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},showIfameMask:function(e,t){for(var n=u.getRoot(e);n.dragMaskList.length>0;)n.dragMaskList[0].remove(),n.dragMaskList.shift();if(t)for(var r=c("iframe",e),i=0,o=r.length;i<o;i++){var a=r.get(i),l=s.getAbs(a),d=c("<div id='zTreeMask_"+i+"' class='zTreeMask' style='top:"+l[1]+"px; left:"+l[0]+"px; width:"+a.offsetWidth+"px; height:"+a.offsetHeight+"px;'></div>",e);d.appendTo(c("body",e)),n.dragMaskList.push(d)}}},view:r,event:{},data:{setSonNodeLevel:function(e,t,n){if(n){var r=u.nodeChildren(e,n),i=n.level;if(n.level=t?t.level+1:0,l.repairNodeLevelClass(e,n,i),r)for(var o=0,s=r.length;o<s;o++)r[o]&&u.setSonNodeLevel(e,n,r[o])}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDragMove:null,onDrop:null,onRename:null}}),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.RENAME,(function(t,n,r,i){s.apply(e.callback.onRename,[t,n,r,i])})),t.bind(n.DRAG,(function(t,n,r,i){s.apply(e.callback.onDrag,[n,r,i])})),t.bind(n.DRAGMOVE,(function(t,n,r,i){s.apply(e.callback.onDragMove,[n,r,i])})),t.bind(n.DROP,(function(t,n,r,i,o,a,l){s.apply(e.callback.onDrop,[n,r,i,o,a,l])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.RENAME),t.unbind(n.DRAG),t.unbind(n.DRAGMOVE),t.unbind(n.DROP)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,s){n&&(n.isHover=!1,n.editNameFlag=!1)})),u.addInitProxy((function(e){var t=e.target,r=u.getSetting(e.data.treeId),i=e.relatedTarget,o="",l=null,c="",d=null,h=null;if(s.eqs(e.type,"mouseover")?(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="hoverOverNode"):s.eqs(e.type,"mouseout")?(h=s.getMDom(r,i,[{tagName:"a",attrName:"treeNode"+a.id.A}]))||(o="remove",c="hoverOutNode"):s.eqs(e.type,"mousedown")&&(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="mousedownNode"),o.length>0)switch(l=u.getNodeCache(r,o),c){case"mousedownNode":d=n.onMousedownNode;break;case"hoverOverNode":d=n.onHoverOverNode;break;case"hoverOutNode":d=n.onHoverOutNode}return{stop:!1,node:l,nodeEventType:c,nodeEventCallback:d,treeEventType:"",treeEventCallback:null}})),u.addInitRoot((function(e){var t=u.getRoot(e),n=u.getRoots();t.curEditNode=null,t.curEditInput=null,t.curHoverNode=null,t.dragFlag=0,t.dragNodeShowBefore=[],t.dragMaskList=new Array,n.showHoverDom=!0})),u.addZTreeTools((function(e,t){t.cancelEditName=function(e){u.getRoot(this.setting).curEditNode&&l.cancelCurEditNode(this.setting,e||null,!0)},t.copyNode=function(t,n,r,i){if(!n)return null;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;var c=this,d=s.clone(n);if(t||(t=null,r=a.move.TYPE_INNER),r==a.move.TYPE_INNER){function h(){l.addNodes(c.setting,t,-1,[d],i)}s.canAsync(this.setting,t)?l.asyncNode(this.setting,t,i,h):h()}else l.addNodes(this.setting,t.parentNode,-1,[d],i),l.moveNode(this.setting,t,d,r,!1,i);return d},t.editName=function(e){e&&e.tId&&e===u.getNodeCache(this.setting,e.tId)&&(e.parentTId&&l.expandCollapseParentNode(this.setting,e.getParentNode(),!0),l.editNode(this.setting,e))},t.moveNode=function(t,n,r,i){if(!n)return n;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;if(t&&(n.parentTId==t.tId&&r==a.move.TYPE_INNER||c(n,this.setting).find("#"+t.tId).length>0))return null;t||(t=null);var d=this;function h(){l.moveNode(d.setting,t,n,r,!1,i)}return s.canAsync(this.setting,t)&&r===a.move.TYPE_INNER?l.asyncNode(this.setting,t,i,h):h(),n},t.setEditable=function(e){return this.setting.edit.enable=e,this.refresh()}}));var d=l.cancelPreSelectedNode;l.cancelPreSelectedNode=function(e,t){for(var n=u.getRoot(e).curSelectedList,r=0,i=n.length;r<i&&(t&&t!==n[r]||(l.removeTreeDom(e,n[r]),!t));r++);d&&d.apply(l,arguments)};var h=l.createNodes;l.createNodes=function(e,t,n,r,i){h&&h.apply(l,arguments),n&&l.repairParentChkClassWithSelf&&l.repairParentChkClassWithSelf(e,r)};var p=l.makeNodeUrl;l.makeNodeUrl=function(e,t){return e.edit.enable?null:p.apply(l,arguments)};var f=l.removeNode;l.removeNode=function(e,t){var n=u.getRoot(e);n.curEditNode===t&&(n.curEditNode=null),f&&f.apply(l,arguments)};var m=l.selectNode;l.selectNode=function(e,t,n){var r=u.getRoot(e);return(!u.isSelectedNode(e,t)||r.curEditNode!=t||!t.editNameFlag)&&(m&&m.apply(l,arguments),l.addHoverDom(e,t),!0)};var g=s.uCanDo;s.uCanDo=function(e,t){var n=u.getRoot(e);return!(!t||!(s.eqs(t.type,"mouseover")||s.eqs(t.type,"mouseout")||s.eqs(t.type,"mousedown")||s.eqs(t.type,"mouseup")))||(n.curEditNode&&(l.editNodeBlur=!1,n.curEditInput.focus()),!n.curEditNode&&(!g||g.apply(l,arguments)))}}(jQuery),function(e){e.fn.zTreeKeyboardNavigationDestroy=function(){},e.fn.zTreeKeyboardNavigation=function(t,n,r=null,i){("string"==typeof n||n instanceof String)&&(n=e(n));var o=t.getNodes();if(o){var s=function(){(r=t.getSelectedNodes())&&r.length&&e("#"+r[0].tId).focus()};e.fn.zTreeKeyboardNavigationDestroy(),e.fn.zTreeKeyboardNavigationDestroy=function(){e(n).off("keydown")},e.fn.changeTreeIcons=function(){let t=e(".app-tree li span.button.switch");e(t).map(((t,n)=>{e(n).addClass(i),e(n).on("click",(function(t){setTimeout((()=>{e(n).addClass(i)}),0)}))}))},e(n).on("keydown",(function(n){var r=t.getSelectedNodes(),i=r.length?r[0]:null,a=function(){t.selectNode(o[0],!1,!0)},l=function(){var e=t.transformToArray(o);t.selectNode(e[e.length-1])};switch(n.keyCode){case 32:return void(i&&i.isParent&&(t.expandNode(i,!i.open,!0,!0),e.fn.changeTreeIcons()));case 36:a();break;case 35:l();break;case 33:case 34:break;case 37:!function(){if(i){var e=i.getParentNode(),n=i.getPreNode();if(e||n)if(n){if(n.isParent){for(;n&&n.isParent&&n.open&&n.children;)n=n.children[n.children.length-1];return void t.selectNode(n)}t.selectNode(n)}else e&&t.selectNode(e,!1,!0)}}();break;case 38:!function(){var e;if(i){if(!(e=i.getPreNode()))return}else l();e&&t.selectNode(e)}();break;case 39:!function(){if(i)if(i.isParent&&i.open&&i.children)t.selectNode(i.children[0]);else if(n=i.getNextNode())t.selectNode(n);else for(var e=i;e=e.getParentNode();){var n;if(n=e.getNextNode()){t.selectNode(n);break}}}();break;case 40:!function(){var e;if(i){if(!(e=i.getNextNode()))return}else a();e&&t.selectNode(e)}();break;default:if(!function(e){if(!Array.from({length:26},((e,t)=>t+65)).includes(95&e))return!1;var n=t.transformToArray(o);if(!(n=n.filter((t=>"accesskey"in t&&t.accesskey.length&&(95&t.accesskey.charCodeAt(0))==e))).length)return!1;var r=t.getSelectedNodes();return!!r.length&&r[0]!=n[0]&&(t.selectNode(n[0]),!0)}(95&n.keyCode))return}s()})),r&&r.length?(t.selectNode(r[0]),s()):e(n).trigger({type:"keydown",which:36,keyCode:36})}}}(jQuery);
|
|
1802
|
+
function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define(["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.focusTrap,r=e.focusTrap={};t(r,e.tabbable),r.noConflict=function(){return e.focusTrap=n,r}}())}(this,(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n.pause()}var r=e.indexOf(t);-1===r||e.splice(r,1),e.push(t)},s=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()},a=function(e){return"Tab"===e.key||9===e.keyCode},l=function(e){return a(e)&&!e.shiftKey},u=function(e){return a(e)&&e.shiftKey},c=function(e){return setTimeout(e,0)},d=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},p=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},f=[];e.createFocusTrap=function(e,n){var i,m=(null==n?void 0:n.document)||document,g=(null==n?void 0:n.trapStack)||f,v=r({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:l,isKeyBackward:u},n),y={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},_=function(e,t,n){return e&&void 0!==e[t]?e[t]:v[n||t]},b=function(e){return y.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},w=function(e){var t=v[e];if("function"==typeof t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t=t.apply(void 0,r)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var o=t;if("string"==typeof t&&!(o=m.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return o},x=function(){var e=w("initialFocus");if(!1===e)return!1;if(void 0===e)if(b(m.activeElement)>=0)e=m.activeElement;else{var t=y.tabbableGroups[0];e=t&&t.firstTabbableNode||w("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},S=function(){if(y.containerGroups=y.containers.map((function(e){var n=t.tabbable(e,v.tabbableOptions),r=t.focusable(e,v.tabbableOptions);return{container:e,tabbableNodes:n,focusableNodes:r,firstTabbableNode:n.length>0?n[0]:null,lastTabbableNode:n.length>0?n[n.length-1]:null,nextTabbableNode:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=r.findIndex((function(t){return t===e}));if(!(i<0))return n?r.slice(i+1).find((function(e){return t.isTabbable(e,v.tabbableOptions)})):r.slice(0,i).reverse().find((function(e){return t.isTabbable(e,v.tabbableOptions)}))}}})),y.tabbableGroups=y.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),y.tabbableGroups.length<=0&&!w("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},k=function e(t){!1!==t&&t!==m.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!v.preventScroll}),y.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(x()))},T=function(e){var t=w("setReturnFocus",e);return t||!1!==t&&e},E=function(e){var n=p(e);b(n)>=0||(h(v.clickOutsideDeactivates,e)?i.deactivate({returnFocus:v.returnFocusOnDeactivate&&!t.isFocusable(n,v.tabbableOptions)}):h(v.allowOutsideClick,e)||e.preventDefault())},D=function(e){var t=p(e),n=b(t)>=0;if(n||t instanceof Document)n&&(y.mostRecentlyFocusedNode=t);else{if(y.containers[0].nextSibling)return;e.stopImmediatePropagation(),k(y.mostRecentlyFocusedNode||x())}},C=function(e){if(!(n=e,"Escape"!==n.key&&"Esc"!==n.key&&27!==n.keyCode||!1===h(v.escapeDeactivates,e)))return e.preventDefault(),void i.deactivate();var n;(v.isKeyForward(e)||v.isKeyBackward(e))&&function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=p(e);S();var i=null;if(y.tabbableGroups.length>0){var o=b(r),s=o>=0?y.containerGroups[o]:void 0;if(o<0)i=n?y.tabbableGroups[y.tabbableGroups.length-1].lastTabbableNode:y.tabbableGroups[0].firstTabbableNode;else if(n){var l=d(y.tabbableGroups,(function(e){var t=e.firstTabbableNode;return r===t}));if(l<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r,!1))&&(l=o),l>=0){var u=0===l?y.tabbableGroups.length-1:l-1;i=y.tabbableGroups[u].lastTabbableNode}else a(e)||(i=s.nextTabbableNode(r,!1))}else{var c=d(y.tabbableGroups,(function(e){var t=e.lastTabbableNode;return r===t}));if(c<0&&(s.container===r||t.isFocusable(r,v.tabbableOptions)&&!t.isTabbable(r,v.tabbableOptions)&&!s.nextTabbableNode(r))&&(c=o),c>=0){var h=c===y.tabbableGroups.length-1?0:c+1;i=y.tabbableGroups[h].firstTabbableNode}else a(e)||(i=s.nextTabbableNode(r))}}else i=w("fallbackFocus");i&&(a(e)&&e.preventDefault(),k(i))}(e,v.isKeyBackward(e))},M=function(e){var t=p(e);b(t)>=0||h(v.clickOutsideDeactivates,e)||h(v.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},A=function(){if(y.active)return o(g,i),y.delayInitialFocusTimer=v.delayInitialFocus?c((function(){k(x())})):k(x()),m.addEventListener("focusin",D,!0),m.addEventListener("mousedown",E,{capture:!0,passive:!1}),m.addEventListener("touchstart",E,{capture:!0,passive:!1}),m.addEventListener("click",M,{capture:!0,passive:!1}),m.addEventListener("keydown",C,{capture:!0,passive:!1}),i},I=function(){if(y.active)return m.removeEventListener("focusin",D,!0),m.removeEventListener("mousedown",E,!0),m.removeEventListener("touchstart",E,!0),m.removeEventListener("click",M,!0),m.removeEventListener("keydown",C,!0),i};return(i={get active(){return y.active},get paused(){return y.paused},activate:function(e){if(y.active)return this;var t=_(e,"onActivate"),n=_(e,"onPostActivate"),r=_(e,"checkCanFocusTrap");r||S(),y.active=!0,y.paused=!1,y.nodeFocusedBeforeActivation=m.activeElement,t&&t();var i=function(){r&&S(),A(),n&&n()};return r?(r(y.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!y.active)return this;var t=r({onDeactivate:v.onDeactivate,onPostDeactivate:v.onPostDeactivate,checkCanReturnFocus:v.checkCanReturnFocus},e);clearTimeout(y.delayInitialFocusTimer),y.delayInitialFocusTimer=void 0,I(),y.active=!1,y.paused=!1,s(g,i);var n=_(t,"onDeactivate"),o=_(t,"onPostDeactivate"),a=_(t,"checkCanReturnFocus"),l=_(t,"returnFocus","returnFocusOnDeactivate");n&&n();var u=function(){c((function(){l&&k(T(y.nodeFocusedBeforeActivation)),o&&o()}))};return l&&a?(a(T(y.nodeFocusedBeforeActivation)).then(u,u),this):(u(),this)},pause:function(){return y.paused||!y.active||(y.paused=!0,I()),this},unpause:function(){return y.paused&&y.active?(y.paused=!1,S(),A(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return y.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),y.active&&S(),this}}).updateContainerElements(e),i},Object.defineProperty(e,"__esModule",{value:!0})})),function($){var settings={},roots={},caches={},_consts={className:{BUTTON:"button",LEVEL:"level",ICO_LOADING:"ico_loading",SWITCH:"switch",NAME:"node_name"},event:{NODECREATED:"ztree_nodeCreated",CLICK:"ztree_click",EXPAND:"ztree_expand",COLLAPSE:"ztree_collapse",ASYNC_SUCCESS:"ztree_async_success",ASYNC_ERROR:"ztree_async_error",REMOVE:"ztree_remove",SELECTED:"ztree_selected",UNSELECTED:"ztree_unselected"},id:{A:"_a",ICON:"_ico",SPAN:"_span",SWITCH:"_switch",UL:"_ul"},line:{ROOT:"root",ROOTS:"roots",CENTER:"center",BOTTOM:"bottom",NOLINE:"noline",LINE:"line"},folder:{OPEN:"open",CLOSE:"close",DOCU:"docu"},node:{CURSELECTED:"curSelectedNode"}},_setting={treeId:"",treeObj:null,view:{addDiyDom:null,autoCancelSelected:!0,dblClickExpand:!0,expandSpeed:"fast",fontCss:{},nodeClasses:{},nameIsHTML:!1,selectedMulti:!0,showIcon:!0,showLine:!0,showTitle:!0,txtSelectedEnable:!1},data:{key:{isParent:"isParent",children:"children",name:"name",title:"",url:"url",icon:"icon"},render:{name:null,title:null},simpleData:{enable:!1,idKey:"id",pIdKey:"pId",rootPId:null},keep:{parent:!1,leaf:!1}},async:{enable:!1,contentType:"application/x-www-form-urlencoded",type:"post",dataType:"text",headers:{},xhrFields:{},url:"",autoParam:[],otherParam:[],dataFilter:null},callback:{beforeAsync:null,beforeClick:null,beforeDblClick:null,beforeRightClick:null,beforeMouseDown:null,beforeMouseUp:null,beforeExpand:null,beforeCollapse:null,beforeRemove:null,onAsyncError:null,onAsyncSuccess:null,onNodeCreated:null,onClick:null,onDblClick:null,onRightClick:null,onMouseDown:null,onMouseUp:null,onExpand:null,onCollapse:null,onRemove:null}},_initRoot=function(e){var t=data.getRoot(e);t||(t={},data.setRoot(e,t)),data.nodeChildren(e,t,[]),t.expandTriggerFlag=!1,t.curSelectedList=[],t.noSelection=!0,t.createdNodes=[],t.zId=0,t._ver=(new Date).getTime()},_initCache=function(e){var t=data.getCache(e);t||(t={},data.setCache(e,t)),t.nodes=[],t.doms=[]},_bindEvent=function(e){var t=e.treeObj,n=consts.event;t.bind(n.NODECREATED,(function(t,n,r){tools.apply(e.callback.onNodeCreated,[t,n,r])})),t.bind(n.CLICK,(function(t,n,r,i,o){tools.apply(e.callback.onClick,[n,r,i,o])})),t.bind(n.EXPAND,(function(t,n,r){tools.apply(e.callback.onExpand,[t,n,r])})),t.bind(n.COLLAPSE,(function(t,n,r){tools.apply(e.callback.onCollapse,[t,n,r])})),t.bind(n.ASYNC_SUCCESS,(function(t,n,r,i){tools.apply(e.callback.onAsyncSuccess,[t,n,r,i])})),t.bind(n.ASYNC_ERROR,(function(t,n,r,i,o,s){tools.apply(e.callback.onAsyncError,[t,n,r,i,o,s])})),t.bind(n.REMOVE,(function(t,n,r){tools.apply(e.callback.onRemove,[t,n,r])})),t.bind(n.SELECTED,(function(t,n,r){tools.apply(e.callback.onSelected,[n,r])})),t.bind(n.UNSELECTED,(function(t,n,r){tools.apply(e.callback.onUnSelected,[n,r])}))},_unbindEvent=function(e){var t=e.treeObj,n=consts.event;t.unbind(n.NODECREATED).unbind(n.CLICK).unbind(n.EXPAND).unbind(n.COLLAPSE).unbind(n.ASYNC_SUCCESS).unbind(n.ASYNC_ERROR).unbind(n.REMOVE).unbind(n.SELECTED).unbind(n.UNSELECTED)},_eventProxy=function(e){var t=e.target,n=data.getSetting(e.data.treeId),r="",i=null,o="",s="",a=null,l=null,u=null;if(tools.eqs(e.type,"mousedown")?s="mousedown":tools.eqs(e.type,"mouseup")?s="mouseup":tools.eqs(e.type,"contextmenu")?s="contextmenu":tools.eqs(e.type,"click")?tools.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+consts.id.SWITCH)?(r=tools.getNodeMainDom(t).id,o="switchNode"):(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="clickNode"):tools.eqs(e.type,"dblclick")&&(s="dblclick",(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id,o="switchNode")),s.length>0&&0==r.length&&(u=tools.getMDom(n,t,[{tagName:"a",attrName:"treeNode"+consts.id.A}]))&&(r=tools.getNodeMainDom(u).id),r.length>0)switch(i=data.getNodeCache(n,r),o){case"switchNode":data.nodeIsParent(n,i)&&(tools.eqs(e.type,"click")||tools.eqs(e.type,"dblclick")&&tools.apply(n.view.dblClickExpand,[n.treeId,i],n.view.dblClickExpand))?a=handler.onSwitchNode:o="";break;case"clickNode":a=handler.onClickNode}switch(s){case"mousedown":l=handler.onZTreeMousedown;break;case"mouseup":l=handler.onZTreeMouseup;break;case"dblclick":l=handler.onZTreeDblclick;break;case"contextmenu":l=handler.onZTreeContextmenu}return{stop:!1,node:i,nodeEventType:o,nodeEventCallback:a,treeEventType:s,treeEventCallback:l}},_initNode=function(e,t,n,r,i,o,s){if(n){var a=data.getRoot(e),l=data.nodeChildren(e,n);n.level=t,n.tId=e.treeId+"_"+ ++a.zId,n.parentTId=r?r.tId:null,n.open="string"==typeof n.open?tools.eqs(n.open,"true"):!!n.open;var u=data.nodeIsParent(e,n);tools.isArray(l)?(data.nodeIsParent(e,n,!0),n.zAsync=!0):(u=data.nodeIsParent(e,n,u),n.open=!(!u||e.async.enable)&&n.open,n.zAsync=!u),n.isFirstNode=i,n.isLastNode=o,n.getParentNode=function(){return data.getNodeCache(e,n.parentTId)},n.getPreNode=function(){return data.getPreNode(e,n)},n.getNextNode=function(){return data.getNextNode(e,n)},n.getIndex=function(){return data.getNodeIndex(e,n)},n.getPath=function(){return data.getNodePath(e,n)},n.isAjaxing=!1,data.fixPIdKeyValue(e,n)}},_init={bind:[_bindEvent],unbind:[_unbindEvent],caches:[_initCache],nodes:[_initNode],proxys:[_eventProxy],roots:[_initRoot],beforeA:[],afterA:[],innerBeforeA:[],innerAfterA:[],zTreeTools:[]},data={addNodeCache:function(e,t){data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=t},getNodeCacheId:function(e){return e.substring(e.lastIndexOf("_")+1)},addAfterA:function(e){_init.afterA.push(e)},addBeforeA:function(e){_init.beforeA.push(e)},addInnerAfterA:function(e){_init.innerAfterA.push(e)},addInnerBeforeA:function(e){_init.innerBeforeA.push(e)},addInitBind:function(e){_init.bind.push(e)},addInitUnBind:function(e){_init.unbind.push(e)},addInitCache:function(e){_init.caches.push(e)},addInitNode:function(e){_init.nodes.push(e)},addInitProxy:function(e,t){t?_init.proxys.splice(0,0,e):_init.proxys.push(e)},addInitRoot:function(e){_init.roots.push(e)},addNodesData:function(e,t,n,r){var i,o=data.nodeChildren(e,t);o?n>=o.length&&(n=-1):(o=data.nodeChildren(e,t,[]),n=-1),o.length>0&&0===n?(o[0].isFirstNode=!1,view.setNodeLineIcos(e,o[0])):o.length>0&&n<0&&(o[o.length-1].isLastNode=!1,view.setNodeLineIcos(e,o[o.length-1])),data.nodeIsParent(e,t,!0),n<0?data.nodeChildren(e,t,o.concat(r)):(i=[n,0].concat(r),o.splice.apply(o,i))},addSelectedNode:function(e,t){var n=data.getRoot(e);data.isSelectedNode(e,t)||n.curSelectedList.push(t)},addCreatedNode:function(e,t){(e.callback.onNodeCreated||e.view.addDiyDom)&&data.getRoot(e).createdNodes.push(t)},addZTreeTools:function(e){_init.zTreeTools.push(e)},exSetting:function(e){$.extend(!0,_setting,e)},fixPIdKeyValue:function(e,t){e.data.simpleData.enable&&(t[e.data.simpleData.pIdKey]=t.parentTId?t.getParentNode()[e.data.simpleData.idKey]:e.data.simpleData.rootPId)},getAfterA:function(e,t,n){for(var r=0,i=_init.afterA.length;r<i;r++)_init.afterA[r].apply(this,arguments)},getBeforeA:function(e,t,n){for(var r=0,i=_init.beforeA.length;r<i;r++)_init.beforeA[r].apply(this,arguments)},getInnerAfterA:function(e,t,n){for(var r=0,i=_init.innerAfterA.length;r<i;r++)_init.innerAfterA[r].apply(this,arguments)},getInnerBeforeA:function(e,t,n){for(var r=0,i=_init.innerBeforeA.length;r<i;r++)_init.innerBeforeA[r].apply(this,arguments)},getCache:function(e){return caches[e.treeId]},getNodeIndex:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i;return-1},getNextNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length-1;i<=o;i++)if(r[i]===t)return i==o?null:r[i+1];return null},getNodeByParam:function(e,t,n,r){if(!t||!n)return null;for(var i=0,o=t.length;i<o;i++){var s=t[i];if(s[n]==r)return t[i];var a=data.nodeChildren(e,s),l=data.getNodeByParam(e,a,n,r);if(l)return l}return null},getNodeCache:function(e,t){if(!t)return null;var n=caches[e.treeId].nodes[data.getNodeCacheId(t)];return n||null},getNodePath:function(e,t){return t?((n=t.parentTId?t.getParentNode().getPath():[])&&n.push(t),n):null;var n},getNodes:function(e){return data.nodeChildren(e,data.getRoot(e))},getNodesByParam:function(e,t,n,r){if(!t||!n)return[];for(var i=[],o=0,s=t.length;o<s;o++){var a=t[o];a[n]==r&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParam(e,l,n,r))}return i},getNodesByParamFuzzy:function(e,t,n,r){if(!t||!n)return[];var i=[];r=r.toLowerCase();for(var o=0,s=t.length;o<s;o++){var a=t[o];"string"==typeof a[n]&&t[o][n].toLowerCase().indexOf(r)>-1&&i.push(a);var l=data.nodeChildren(e,a);i=i.concat(data.getNodesByParamFuzzy(e,l,n,r))}return i},getNodesByFilter:function(e,t,n,r,i){if(!t)return r?null:[];for(var o=r?null:[],s=0,a=t.length;s<a;s++){var l=t[s];if(tools.apply(n,[l,i],!1)){if(r)return l;o.push(l)}var u=data.nodeChildren(e,l),c=data.getNodesByFilter(e,u,n,r,i);if(r&&c)return c;o=r?c:o.concat(c)}return o},getPreNode:function(e,t){if(!t)return null;for(var n=t.parentTId?t.getParentNode():data.getRoot(e),r=data.nodeChildren(e,n),i=0,o=r.length;i<o;i++)if(r[i]===t)return 0==i?null:r[i-1];return null},getRoot:function(e){return e?roots[e.treeId]:null},getRoots:function(){return roots},getSetting:function(e){return settings[e]},getSettings:function(){return settings},getZTreeTools:function(e){var t=this.getRoot(this.getSetting(e));return t?t.treeTools:null},initCache:function(e){for(var t=0,n=_init.caches.length;t<n;t++)_init.caches[t].apply(this,arguments)},initNode:function(e,t,n,r,i,o){for(var s=0,a=_init.nodes.length;s<a;s++)_init.nodes[s].apply(this,arguments)},initRoot:function(e){for(var t=0,n=_init.roots.length;t<n;t++)_init.roots[t].apply(this,arguments)},isSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)if(t===n.curSelectedList[r])return!0;return!1},nodeChildren:function(e,t,n){if(!t)return null;var r=e.data.key.children;return void 0!==n&&(t[r]=n),t[r]},nodeIsParent:function(e,t,n){if(!t)return!1;var r=e.data.key.isParent;return void 0!==n?("string"==typeof n&&(n=tools.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=tools.eqs(t[r],"true"):t[r]=!!t[r],t[r]},nodeName:function(e,t,n){var r=e.data.key.name;void 0!==n&&(t[r]=n);var i=""+t[r];return"function"==typeof e.data.render.name?e.data.render.name.call(this,i,t):i},nodeTitle:function(e,t){var n=""+t[""===e.data.key.title?e.data.key.name:e.data.key.title];return"function"==typeof e.data.render.title?e.data.render.title.call(this,n,t):n},removeNodeCache:function(e,t){var n=data.nodeChildren(e,t);if(n)for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);data.getCache(e).nodes[data.getNodeCacheId(t.tId)]=null},removeSelectedNode:function(e,t){for(var n=data.getRoot(e),r=0,i=n.curSelectedList.length;r<i;r++)t!==n.curSelectedList[r]&&data.getNodeCache(e,n.curSelectedList[r].tId)||(n.curSelectedList.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,t]),r--,i--)},setCache:function(e,t){caches[e.treeId]=t},setRoot:function(e,t){roots[e.treeId]=t},setZTreeTools:function(e,t){for(var n=0,r=_init.zTreeTools.length;n<r;n++)_init.zTreeTools[n].apply(this,arguments)},transformToArrayFormat:function(e,t){if(!t)return[];var n=[];if(tools.isArray(t))for(var r=0,i=t.length;r<i;r++){o(t[r])}else o(t);return n;function o(t){n.push(t);var r=data.nodeChildren(e,t);r&&(n=n.concat(data.transformToArrayFormat(e,r)))}},transformTozTreeFormat:function(e,t){var n,r,i=e.data.simpleData.idKey,o=e.data.simpleData.pIdKey;if(!i||""==i||!t)return[];if(tools.isArray(t)){var s=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n][i]]=t[n];for(n=0,r=t.length;n<r;n++){var l=a[t[n][o]];if(l&&t[n][i]!=t[n][o]){var u=data.nodeChildren(e,l);u||(u=data.nodeChildren(e,l,[])),u.push(t[n])}else s.push(t[n])}return s}return[t]}},event={bindEvent:function(e){for(var t=0,n=_init.bind.length;t<n;t++)_init.bind[t].apply(this,arguments)},unbindEvent:function(e){for(var t=0,n=_init.unbind.length;t<n;t++)_init.unbind[t].apply(this,arguments)},bindTree:function(e){var t={treeId:e.treeId},n=e.treeObj;e.view.txtSelectedEnable||n.bind("selectstart",handler.onSelectStart).css({"-moz-user-select":"-moz-none"}),n.bind("click",t,event.proxy),n.bind("dblclick",t,event.proxy),n.bind("mouseover",t,event.proxy),n.bind("mouseout",t,event.proxy),n.bind("mousedown",t,event.proxy),n.bind("mouseup",t,event.proxy),n.bind("contextmenu",t,event.proxy)},unbindTree:function(e){e.treeObj.unbind("selectstart",handler.onSelectStart).unbind("click",event.proxy).unbind("dblclick",event.proxy).unbind("mouseover",event.proxy).unbind("mouseout",event.proxy).unbind("mousedown",event.proxy).unbind("mouseup",event.proxy).unbind("contextmenu",event.proxy)},doProxy:function(e){for(var t=[],n=0,r=_init.proxys.length;n<r;n++){var i=_init.proxys[n].apply(this,arguments);if(t.push(i),i.stop)break}return t},proxy:function(e){var t=data.getSetting(e.data.treeId);if(!tools.uCanDo(t,e))return!0;for(var n=event.doProxy(e),r=!0,i=0,o=n.length;i<o;i++){var s=n[i];s.nodeEventCallback&&(!0,r=s.nodeEventCallback.apply(s,[e,s.node])&&r),s.treeEventCallback&&(!0,r=s.treeEventCallback.apply(s,[e,s.node])&&r)}return r}},handler={onSwitchNode:function(e,t){var n=data.getSetting(e.data.treeId);if(t.open){if(0==tools.apply(n.callback.beforeCollapse,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}else{if(0==tools.apply(n.callback.beforeExpand,[n.treeId,t],!0))return!0;data.getRoot(n).expandTriggerFlag=!0,view.switchNode(n,t)}return!0},onClickNode:function(e,t){var n=data.getSetting(e.data.treeId),r=n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&data.isSelectedNode(n,t)?0:n.view.autoCancelSelected&&(e.ctrlKey||e.metaKey)&&n.view.selectedMulti?2:1;return 0==tools.apply(n.callback.beforeClick,[n.treeId,t,r],!0)||(0===r?view.cancelPreSelectedNode(n,t):view.selectNode(n,t,2===r),n.treeObj.trigger(consts.event.CLICK,[e,n.treeId,t,r])),!0},onZTreeMousedown:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseDown,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseDown,[e,n.treeId,t]),!0},onZTreeMouseup:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeMouseUp,[n.treeId,t],!0)&&tools.apply(n.callback.onMouseUp,[e,n.treeId,t]),!0},onZTreeDblclick:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeDblClick,[n.treeId,t],!0)&&tools.apply(n.callback.onDblClick,[e,n.treeId,t]),!0},onZTreeContextmenu:function(e,t){var n=data.getSetting(e.data.treeId);return tools.apply(n.callback.beforeRightClick,[n.treeId,t],!0)&&tools.apply(n.callback.onRightClick,[e,n.treeId,t]),"function"!=typeof n.callback.onRightClick},onSelectStart:function(e){var t=e.originalEvent.srcElement.nodeName.toLowerCase();return"input"===t||"textarea"===t}},tools={apply:function(e,t,n){return"function"==typeof e?e.apply(zt,t||[]):n},canAsync:function(e,t){var n=data.nodeChildren(e,t),r=data.nodeIsParent(e,t);return e.async.enable&&t&&r&&!(t.zAsync||n&&n.length>0)},clone:function(e){if(null===e)return null;var t=tools.isArray(e)?[]:{};for(var n in e)t[n]=e[n]instanceof Date?new Date(e[n].getTime()):"object"==typeof e[n]?tools.clone(e[n]):e[n];return t},eqs:function(e,t){return e.toLowerCase()===t.toLowerCase()},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isElement:function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName},$:function(e,t,n){return t&&"string"!=typeof t&&(n=t,t=""),"string"==typeof e?$(e,n?n.treeObj.get(0).ownerDocument:null):$("#"+e.tId+t,n?n.treeObj:null)},getMDom:function(e,t,n){if(!t)return null;for(;t&&t.id!==e.treeId;){for(var r=0,i=n.length;t.tagName&&r<i;r++)if(tools.eqs(t.tagName,n[r].tagName)&&null!==t.getAttribute(n[r].attrName))return t;t=t.parentNode}return null},getNodeMainDom:function(e){return $(e).parent("li").get(0)||$(e).parentsUntil("li").parent().get(0)},isChildOrSelf:function(e,t){return $(e).closest("#"+t).length>0},uCanDo:function(e,t){return!0}},view={addNodes:function(e,t,n,r,i){var o=data.nodeIsParent(e,t);if(!e.data.keep.leaf||!t||o)if(tools.isArray(r)||(r=[r]),e.data.simpleData.enable&&(r=data.transformTozTreeFormat(e,r)),t){var s=$$(t,consts.id.SWITCH,e),a=$$(t,consts.id.ICON,e),l=$$(t,consts.id.UL,e);t.open||(view.replaceSwitchClass(t,s,consts.folder.CLOSE),view.replaceIcoClass(t,a,consts.folder.CLOSE),t.open=!1,l.css({display:"none"})),data.addNodesData(e,t,n,r),view.createNodes(e,t.level+1,r,t,n),i||view.expandCollapseParentNode(e,t,!0)}else data.addNodesData(e,data.getRoot(e),n,r),view.createNodes(e,0,r,null,n)},appendNodes:function(e,t,n,r,i,o,s){if(!n)return[];var a,l,u=[],c=r||data.getRoot(e),d=data.nodeChildren(e,c);(!d||i>=d.length-n.length)&&(i=-1);for(var h=0,p=n.length;h<p;h++){var f=n[h];o&&(a=(0===i||d.length==n.length)&&0==h,l=i<0&&h==n.length-1,data.initNode(e,t,f,r,a,l,s),data.addNodeCache(e,f));var m=data.nodeIsParent(e,f),g=[],v=data.nodeChildren(e,f);v&&v.length>0&&(g=view.appendNodes(e,t+1,v,f,-1,o,s&&f.open)),s&&(view.makeDOMNodeMainBefore(u,e,f),view.makeDOMNodeLine(u,e,f),data.getBeforeA(e,f,u),view.makeDOMNodeNameBefore(u,e,f),data.getInnerBeforeA(e,f,u),view.makeDOMNodeIcon(u,e,f),data.getInnerAfterA(e,f,u),view.makeDOMNodeNameAfter(u,e,f),data.getAfterA(e,f,u),m&&f.open&&view.makeUlHtml(e,f,u,g.join("")),view.makeDOMNodeMainAfter(u,e,f),data.addCreatedNode(e,f))}return u},appendParentULDom:function(e,t){var n=[],r=$$(t,e);!r.get(0)&&t.parentTId&&(view.appendParentULDom(e,t.getParentNode()),r=$$(t,e));var i=$$(t,consts.id.UL,e);i.get(0)&&i.remove();var o=data.nodeChildren(e,t),s=view.appendNodes(e,t.level+1,o,t,-1,!1,!0);view.makeUlHtml(e,t,n,s.join("")),r.append(n.join(""))},asyncNode:function(setting,node,isSilent,callback){var i,l,isParent=data.nodeIsParent(setting,node);if(node&&!isParent)return tools.apply(callback),!1;if(node&&node.isAjaxing)return!1;if(0==tools.apply(setting.callback.beforeAsync,[setting.treeId,node],!0))return tools.apply(callback),!1;if(node){node.isAjaxing=!0;var icoObj=$$(node,consts.id.ICON,setting);icoObj.attr({style:"",class:consts.className.BUTTON+" "+consts.className.ICO_LOADING})}var tmpParam={},autoParam=tools.apply(setting.async.autoParam,[setting.treeId,node],setting.async.autoParam);for(i=0,l=autoParam.length;node&&i<l;i++){var pKey=autoParam[i].split("="),spKey=pKey;pKey.length>1&&(spKey=pKey[1],pKey=pKey[0]),tmpParam[spKey]=node[pKey]}var otherParam=tools.apply(setting.async.otherParam,[setting.treeId,node],setting.async.otherParam);if(tools.isArray(otherParam))for(i=0,l=otherParam.length;i<l;i+=2)tmpParam[otherParam[i]]=otherParam[i+1];else for(var p in otherParam)tmpParam[p]=otherParam[p];var _tmpV=data.getRoot(setting)._ver;return $.ajax({contentType:setting.async.contentType,cache:!1,type:setting.async.type,url:tools.apply(setting.async.url,[setting.treeId,node],setting.async.url),data:setting.async.contentType.indexOf("application/json")>-1?JSON.stringify(tmpParam):tmpParam,dataType:setting.async.dataType,headers:setting.async.headers,xhrFields:setting.async.xhrFields,success:function(msg){if(_tmpV==data.getRoot(setting)._ver){var newNodes=[];try{newNodes=msg&&0!=msg.length?"string"==typeof msg?eval("("+msg+")"):msg:[]}catch(e){newNodes=msg}node&&(node.isAjaxing=null,node.zAsync=!0),view.setNodeLineIcos(setting,node),newNodes&&""!==newNodes?(newNodes=tools.apply(setting.async.dataFilter,[setting.treeId,node,newNodes],newNodes),view.addNodes(setting,node,-1,newNodes?tools.clone(newNodes):[],!!isSilent)):view.addNodes(setting,node,-1,[],!!isSilent),setting.treeObj.trigger(consts.event.ASYNC_SUCCESS,[setting.treeId,node,msg]),tools.apply(callback)}},error:function(e,t,n){_tmpV==data.getRoot(setting)._ver&&(node&&(node.isAjaxing=null),view.setNodeLineIcos(setting,node),setting.treeObj.trigger(consts.event.ASYNC_ERROR,[setting.treeId,node,e,t,n]))}}),!0},cancelPreSelectedNode:function(e,t,n){var r,i,o=data.getRoot(e).curSelectedList;for(r=o.length-1;r>=0;r--)if(t===(i=o[r])||!t&&(!n||n!==i)){if($$(i,consts.id.A,e).removeClass(consts.node.CURSELECTED),t){data.removeSelectedNode(e,t);break}o.splice(r,1),e.treeObj.trigger(consts.event.UNSELECTED,[e.treeId,i])}},createNodeCallback:function(e){if(e.callback.onNodeCreated||e.view.addDiyDom)for(var t=data.getRoot(e);t.createdNodes.length>0;){var n=t.createdNodes.shift();tools.apply(e.view.addDiyDom,[e.treeId,n]),e.callback.onNodeCreated&&e.treeObj.trigger(consts.event.NODECREATED,[e.treeId,n])}},createNodes:function(e,t,n,r,i){if(n&&0!=n.length){var o=data.getRoot(e),s=!r||r.open||!!$$(data.nodeChildren(e,r)[0],e).get(0);o.createdNodes=[];var a,l,u=view.appendNodes(e,t,n,r,i,!0,s);if(r){var c=$$(r,consts.id.UL,e);c.get(0)&&(a=c)}else a=e.treeObj;a&&(i>=0&&(l=a.children()[i]),i>=0&&l?$(l).before(u.join("")):a.append(u.join(""))),view.createNodeCallback(e)}},destroy:function(e){e&&(data.initCache(e),data.initRoot(e),event.unbindTree(e),event.unbindEvent(e),e.treeObj.empty(),delete settings[e.treeId])},expandCollapseNode:function(e,t,n,r,i){var o,s=data.getRoot(e);if(t){var a=data.nodeChildren(e,t),l=data.nodeIsParent(e,t);if(s.expandTriggerFlag&&(o=i,i=function(){o&&o(),t.open?e.treeObj.trigger(consts.event.EXPAND,[e.treeId,t]):e.treeObj.trigger(consts.event.COLLAPSE,[e.treeId,t])},s.expandTriggerFlag=!1),!t.open&&l&&(!$$(t,consts.id.UL,e).get(0)||a&&a.length>0&&!$$(a[0],e).get(0))&&(view.appendParentULDom(e,t),view.createNodeCallback(e)),t.open!=n){var u=$$(t,consts.id.UL,e),c=$$(t,consts.id.SWITCH,e),d=$$(t,consts.id.ICON,e);l?(t.open=!t.open,t.iconOpen&&t.iconClose&&d.attr("style",view.makeNodeIcoStyle(e,t)),t.open?(view.replaceSwitchClass(t,c,consts.folder.OPEN),view.replaceIcoClass(t,d,consts.folder.OPEN),0==r||""==e.view.expandSpeed?(u.show(),tools.apply(i,[])):a&&a.length>0?u.slideDown(e.view.expandSpeed,i):(u.show(),tools.apply(i,[]))):(view.replaceSwitchClass(t,c,consts.folder.CLOSE),view.replaceIcoClass(t,d,consts.folder.CLOSE),0!=r&&""!=e.view.expandSpeed&&a&&a.length>0?u.slideUp(e.view.expandSpeed,i):(u.hide(),tools.apply(i,[])))):tools.apply(i,[])}else tools.apply(i,[])}else tools.apply(i,[])},expandCollapseParentNode:function(e,t,n,r,i){t&&(t.parentTId?(view.expandCollapseNode(e,t,n,r),t.parentTId&&view.expandCollapseParentNode(e,t.getParentNode(),n,r,i)):view.expandCollapseNode(e,t,n,r,i))},expandCollapseSonNode:function(e,t,n,r,i){var o=data.getRoot(e),s=t?data.nodeChildren(e,t):data.nodeChildren(e,o),a=!t&&r,l=data.getRoot(e).expandTriggerFlag;if(data.getRoot(e).expandTriggerFlag=!1,s)for(var u=0,c=s.length;u<c;u++)s[u]&&view.expandCollapseSonNode(e,s[u],n,a);data.getRoot(e).expandTriggerFlag=l,view.expandCollapseNode(e,t,n,r,i)},isSelectedNode:function(e,t){if(!t)return!1;var n,r=data.getRoot(e).curSelectedList;for(n=r.length-1;n>=0;n--)if(t===r[n])return!0;return!1},makeDOMNodeIcon:function(e,t,n){var r=data.nodeName(t,n),i=t.view.nameIsHTML?r:r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");e.push("<span id='",n.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(t,n),"' style='",view.makeNodeIcoStyle(t,n),"'></span><span id='",n.tId,consts.id.SPAN,"' class='",consts.className.NAME,"'>",i,"</span>")},makeDOMNodeLine:function(e,t,n){e.push("<span id='",n.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(t,n),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(e,t,n){e.push("</li>")},makeDOMNodeMainBefore:function(e,t,n){e.push("<li id='",n.tId,"' class='",consts.className.LEVEL,n.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(e,t,n){e.push("</a>")},makeDOMNodeNameBefore:function(e,t,n){var r=data.nodeTitle(t,n),i=view.makeNodeUrl(t,n),o=view.makeNodeFontCss(t,n),s=view.makeNodeClasses(t,n),a=[];for(var l in o)a.push(l,":",o[l],";");e.push("<a id='",n.tId,consts.id.A,"' class='",consts.className.LEVEL,n.level,s.add?" "+s.add.join(" "):"","' treeNode",consts.id.A,n.click?' onclick="'+n.click+'"':"",null!=i&&i.length>0?" href='"+i+"'":""," target='",view.makeNodeTarget(n),"' style='",a.join(""),"'"),tools.apply(t.view.showTitle,[t.treeId,n],t.view.showTitle)&&r&&e.push("title='",r.replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),"'"),e.push(">")},makeNodeFontCss:function(e,t){var n=tools.apply(e.view.fontCss,[e.treeId,t],e.view.fontCss);return n&&"function"!=typeof n?n:{}},makeNodeClasses:function(e,t){var n=tools.apply(e.view.nodeClasses,[e.treeId,t],e.view.nodeClasses);return n&&"function"!=typeof n?n:{add:[],remove:[]}},makeNodeIcoClass:function(e,t){var n=["ico"];if(!t.isAjaxing){var r=data.nodeIsParent(e,t);n[0]=(t.iconSkin?t.iconSkin+"_":"")+n[0],r?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU)}return consts.className.BUTTON+" "+n.join("_")},makeNodeIcoStyle:function(e,t){var n=[];if(!t.isAjaxing){var r=data.nodeIsParent(e,t)&&t.iconOpen&&t.iconClose?t.open?t.iconOpen:t.iconClose:t[e.data.key.icon];r&&n.push("background:url(",r,") 0 0 no-repeat;"),0!=e.view.showIcon&&tools.apply(e.view.showIcon,[e.treeId,t],!0)||n.push("display:none;")}return n.join("")},makeNodeLineClass:function(e,t){var n=[];return e.view.showLine?0==t.level&&t.isFirstNode&&t.isLastNode?n.push(consts.line.ROOT):0==t.level&&t.isFirstNode?n.push(consts.line.ROOTS):t.isLastNode?n.push(consts.line.BOTTOM):n.push(consts.line.CENTER):n.push(consts.line.NOLINE),data.nodeIsParent(e,t)?n.push(t.open?consts.folder.OPEN:consts.folder.CLOSE):n.push(consts.folder.DOCU),view.makeNodeLineClassEx(t)+n.join("_")},makeNodeLineClassEx:function(e){return consts.className.BUTTON+" "+consts.className.LEVEL+e.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(e){return e.target||"_blank"},makeNodeUrl:function(e,t){var n=e.data.key.url;return t[n]?t[n]:null},makeUlHtml:function(e,t,n,r){n.push("<ul id='",t.tId,consts.id.UL,"' class='",consts.className.LEVEL,t.level," ",view.makeUlLineClass(e,t),"' style='display:",t.open?"block":"none","'>"),n.push(r),n.push("</ul>")},makeUlLineClass:function(e,t){return e.view.showLine&&!t.isLastNode?consts.line.LINE:""},removeChildNodes:function(e,t){if(t){var n=data.nodeChildren(e,t);if(n){for(var r=0,i=n.length;r<i;r++)data.removeNodeCache(e,n[r]);if(data.removeSelectedNode(e),delete t[e.data.key.children],e.data.keep.parent)$$(t,consts.id.UL,e).empty();else{data.nodeIsParent(e,t,!1),t.open=!1;var o=$$(t,consts.id.SWITCH,e),s=$$(t,consts.id.ICON,e);view.replaceSwitchClass(t,o,consts.folder.DOCU),view.replaceIcoClass(t,s,consts.folder.DOCU),$$(t,consts.id.UL,e).remove()}}}},scrollIntoView:function(e,t){if(t)if("undefined"!=typeof Element&&"undefined"!=typeof HTMLElement)Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){"use strict";function t(e,t){return{start:e,length:t,end:e+t}}function n(t,n){return!1===e||n.start<t.end&&t.start<n.end?Math.max(t.end-n.length,Math.min(n.start,t.start)):(t.start+t.end-n.length)/2}function r(e,t){return{x:e,y:t,translate:function(n,i){return r(e+n,t+i)}}}function i(e,t){for(;e;)t=t.translate(e.offsetLeft,e.offsetTop),e=e.offsetParent;return t}for(var o,s=i(this,r(0,0)),a=r(this.offsetWidth,this.offsetHeight),l=this.parentNode;l instanceof HTMLElement;)o=i(l,r(l.clientLeft,l.clientTop)),l.scrollLeft=n(t(s.x-o.x,a.x),t(l.scrollLeft,l.clientWidth)),l.scrollTop=n(t(s.y-o.y,a.y),t(l.scrollTop,l.clientHeight)),s=s.translate(-l.scrollLeft,-l.scrollTop),l=l.parentNode}),t.scrollIntoViewIfNeeded();else{var n=e.treeObj.get(0).getBoundingClientRect(),r=t.getBoundingClientRect();(r.top<n.top||r.bottom>n.bottom||r.right>n.right||r.left<n.left)&&t.scrollIntoView()}},setFirstNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[0].isFirstNode=!0)},setLastNode:function(e,t){var n=data.nodeChildren(e,t);n.length>0&&(n[n.length-1].isLastNode=!0)},removeNode:function(e,t){var n=data.getRoot(e),r=t.parentTId?t.getParentNode():n;if(t.isFirstNode=!1,t.isLastNode=!1,t.getPreNode=function(){return null},t.getNextNode=function(){return null},data.getNodeCache(e,t.tId)){$$(t,e).remove(),data.removeNodeCache(e,t),data.removeSelectedNode(e,t);for(var i=data.nodeChildren(e,r),o=0,s=i.length;o<s;o++)if(i[o].tId==t.tId){i.splice(o,1);break}view.setFirstNode(e,r),view.setLastNode(e,r);var a,l,u,c=i.length;if(e.data.keep.parent||0!=c){if(e.view.showLine&&c>0){var d=i[c-1];if(a=$$(d,consts.id.UL,e),l=$$(d,consts.id.SWITCH,e),u=$$(d,consts.id.ICON,e),r==n)if(1==i.length)view.replaceSwitchClass(d,l,consts.line.ROOT);else{var h=$$(i[0],consts.id.SWITCH,e);view.replaceSwitchClass(i[0],h,consts.line.ROOTS),view.replaceSwitchClass(d,l,consts.line.BOTTOM)}else view.replaceSwitchClass(d,l,consts.line.BOTTOM);a.removeClass(consts.line.LINE)}}else data.nodeIsParent(e,r,!1),r.open=!1,delete r[e.data.key.children],a=$$(r,consts.id.UL,e),l=$$(r,consts.id.SWITCH,e),u=$$(r,consts.id.ICON,e),view.replaceSwitchClass(r,l,consts.folder.DOCU),view.replaceIcoClass(r,u,consts.folder.DOCU),a.css("display","none")}},replaceIcoClass:function(e,t,n){if(t&&!e.isAjaxing){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[i.length-1]=n}t.attr("class",i.join("_"))}}},replaceSwitchClass:function(e,t,n){if(t){var r=t.attr("class");if(null!=r){var i=r.split("_");switch(n){case consts.line.ROOT:case consts.line.ROOTS:case consts.line.CENTER:case consts.line.BOTTOM:case consts.line.NOLINE:i[0]=view.makeNodeLineClassEx(e)+n;break;case consts.folder.OPEN:case consts.folder.CLOSE:case consts.folder.DOCU:i[1]=n}t.attr("class",i.join("_")),n!==consts.folder.DOCU?t.removeAttr("disabled"):t.attr("disabled","disabled")}}},selectNode:function(e,t,n){n||view.cancelPreSelectedNode(e,null,t),$$(t,consts.id.A,e).addClass(consts.node.CURSELECTED),data.addSelectedNode(e,t),e.treeObj.trigger(consts.event.SELECTED,[e.treeId,t])},setNodeFontCss:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeFontCss(e,t);r&&n.css(r)},setNodeClasses:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeClasses(e,t);"add"in r&&r.add.length&&n.addClass(r.add.join(" ")),"remove"in r&&r.remove.length&&n.removeClass(r.remove.join(" "))},setNodeLineIcos:function(e,t){if(t){var n=$$(t,consts.id.SWITCH,e),r=$$(t,consts.id.UL,e),i=$$(t,consts.id.ICON,e),o=view.makeUlLineClass(e,t);0==o.length?r.removeClass(consts.line.LINE):r.addClass(o),n.attr("class",view.makeNodeLineClass(e,t)),data.nodeIsParent(e,t)?n.removeAttr("disabled"):n.attr("disabled","disabled"),i.removeAttr("style"),i.attr("style",view.makeNodeIcoStyle(e,t)),i.attr("class",view.makeNodeIcoClass(e,t))}},setNodeName:function(e,t){var n=data.nodeTitle(e,t),r=$$(t,consts.id.SPAN,e);(r.empty(),e.view.nameIsHTML?r.html(data.nodeName(e,t)):r.text(data.nodeName(e,t)),tools.apply(e.view.showTitle,[e.treeId,t],e.view.showTitle))&&$$(t,consts.id.A,e).attr("title",n||"")},setNodeTarget:function(e,t){$$(t,consts.id.A,e).attr("target",view.makeNodeTarget(t))},setNodeUrl:function(e,t){var n=$$(t,consts.id.A,e),r=view.makeNodeUrl(e,t);null==r||0==r.length?n.removeAttr("href"):n.attr("href",r)},switchNode:function(e,t){if(t.open||!tools.canAsync(e,t))view.expandCollapseNode(e,t,!t.open);else if(e.async.enable){if(!view.asyncNode(e,t))return void view.expandCollapseNode(e,t,!t.open)}else t&&view.expandCollapseNode(e,t,!t.open)}};$.fn.zTree={consts:_consts,_z:{tools:tools,view:view,event:event,data:data},getZTreeObj:function(e){var t=data.getZTreeTools(e);return t||null},destroy:function(e){if(e&&e.length>0)view.destroy(data.getSetting(e));else for(var t in settings)view.destroy(settings[t])},init:function(e,t,n){var r=tools.clone(_setting);$.extend(!0,r,t),r.treeId=e.attr("id"),r.treeObj=e,r.treeObj.empty(),settings[r.treeId]=r,void 0===document.body.style.maxHeight&&(r.view.expandSpeed=""),data.initRoot(r);var i=data.getRoot(r);n=n?tools.clone(tools.isArray(n)?n:[n]):[],r.data.simpleData.enable?data.nodeChildren(r,i,data.transformTozTreeFormat(r,n)):data.nodeChildren(r,i,n),data.initCache(r),event.unbindTree(r),event.bindTree(r),event.unbindEvent(r),event.bindEvent(r);var o={setting:r,addNodes:function(e,t,n,i){e||(e=null);var o=data.nodeIsParent(r,e);if(e&&!o&&r.data.keep.leaf)return null;var s=parseInt(t,10);if(isNaN(s)?(i=!!n,n=t,t=-1):t=s,!n)return null;var a=tools.clone(tools.isArray(n)?n:[n]);function l(){view.addNodes(r,e,t,a,1==i)}return tools.canAsync(r,e)?view.asyncNode(r,e,i,l):l(),a},cancelSelectedNode:function(e){view.cancelPreSelectedNode(r,e)},destroy:function(){view.destroy(r)},expandAll:function(e){return e=!!e,view.expandCollapseSonNode(r,null,e,!0),e},expandNode:function(e,t,n,i,o){return e&&data.nodeIsParent(r,e)?(!0!==t&&!1!==t&&(t=!e.open),(o=!!o)&&t&&0==tools.apply(r.callback.beforeExpand,[r.treeId,e],!0)||o&&!t&&0==tools.apply(r.callback.beforeCollapse,[r.treeId,e],!0)?null:(t&&e.parentTId&&view.expandCollapseParentNode(r,e.getParentNode(),t,!1),t!==e.open||n?(data.getRoot(r).expandTriggerFlag=o,!tools.canAsync(r,e)&&n?view.expandCollapseSonNode(r,e,t,!0,s):(e.open=!t,view.switchNode(this.setting,e),s()),t):null)):null;function s(){var t=$$(e,consts.id.A,r).get(0);t&&!1!==i&&view.scrollIntoView(r,t)}},getNodes:function(){return data.getNodes(r)},getNodeByParam:function(e,t,n){return e?data.getNodeByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodeByTId:function(e){return data.getNodeCache(r,e)},getNodesByParam:function(e,t,n){return e?data.getNodesByParam(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByParamFuzzy:function(e,t,n){return e?data.getNodesByParamFuzzy(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t):null},getNodesByFilter:function(e,t,n,i){return t=!!t,e&&"function"==typeof e?data.getNodesByFilter(r,n?data.nodeChildren(r,n):data.getNodes(r),e,t,i):t?null:[]},getNodeIndex:function(e){if(!e)return null;for(var t=e.parentTId?e.getParentNode():data.getRoot(r),n=data.nodeChildren(r,t),i=0,o=n.length;i<o;i++)if(n[i]==e)return i;return-1},getSelectedNodes:function(){for(var e=[],t=data.getRoot(r).curSelectedList,n=0,i=t.length;n<i;n++)e.push(t[n]);return e},isSelectedNode:function(e){return data.isSelectedNode(r,e)},reAsyncChildNodesPromise:function(e,t,n){return new Promise((function(r,i){try{o.reAsyncChildNodes(e,t,n,(function(){r(e)}))}catch(e){i(e)}}))},reAsyncChildNodes:function(e,t,n,i){if(this.setting.async.enable){var o=!e;if(o&&(e=data.getRoot(r)),"refresh"==t){for(var s=data.nodeChildren(r,e),a=0,l=s?s.length:0;a<l;a++)data.removeNodeCache(r,s[a]);if(data.removeSelectedNode(r),data.nodeChildren(r,e,[]),o)this.setting.treeObj.empty();else $$(e,consts.id.UL,r).empty()}view.asyncNode(this.setting,o?null:e,!!n,i)}},refresh:function(){this.setting.treeObj.empty();var e=data.getRoot(r),t=data.nodeChildren(r,e);data.initRoot(r),data.nodeChildren(r,e,t),data.initCache(r),view.createNodes(r,0,data.nodeChildren(r,e),null,-1)},removeChildNodes:function(e){if(!e)return null;var t=data.nodeChildren(r,e);return view.removeChildNodes(r,e),t||null},removeNode:function(e,t){e&&((t=!!t)&&0==tools.apply(r.callback.beforeRemove,[r.treeId,e],!0)||(view.removeNode(r,e),t&&this.setting.treeObj.trigger(consts.event.REMOVE,[r.treeId,e])))},selectNode:function(e,t,n){if(e&&tools.uCanDo(r)){if(t=r.view.selectedMulti&&t,e.parentTId)view.expandCollapseParentNode(r,e.getParentNode(),!0,!1,(function(){if(n)return;var t=$$(e,r).get(0);view.scrollIntoView(r,t)}));else if(!n)try{$$(e,r).focus().blur()}catch(e){}view.selectNode(r,e,t)}},transformTozTreeNodes:function(e){return data.transformTozTreeFormat(r,e)},transformToArray:function(e){return data.transformToArrayFormat(r,e)},updateNode:function(e,t){e&&($$(e,r).get(0)&&tools.uCanDo(r)&&(view.setNodeName(r,e),view.setNodeTarget(r,e),view.setNodeUrl(r,e),view.setNodeLineIcos(r,e),view.setNodeFontCss(r,e),view.setNodeClasses(r,e)))}};i.treeTools=o,data.setZTreeTools(r,o);var s=data.nodeChildren(r,i);return s&&s.length>0?view.createNodes(r,0,s,null,-1):r.async.enable&&r.async.url&&""!==r.async.url&&view.asyncNode(r),o}};var zt=$.fn.zTree,$$=tools.$,consts=zt.consts}(jQuery),function(e){var t={event:{CHECK:"ztree_check"},id:{CHECK:"_check"},checkbox:{STYLE:"checkbox",DEFAULT:"chk",DISABLED:"disable",FALSE:"false",TRUE:"true",FULL:"full",PART:"part",FOCUS:"focus"},radio:{STYLE:"radio",TYPE_ALL:"all",TYPE_LEVEL:"level"}},n={check:{enable:!1,autoCheckTrigger:!1,chkStyle:t.checkbox.STYLE,nocheckInherit:!1,chkDisabledInherit:!1,radioType:t.radio.TYPE_LEVEL,chkboxType:{Y:"ps",N:"ps"}},data:{key:{checked:"checked"}},callback:{beforeCheck:null,onCheck:null}},r={onCheckNode:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId);if(0==s.apply(n.callback.beforeCheck,[n.treeId,t],!0))return!0;var r=u.nodeChecked(n,t);u.nodeChecked(n,t,!r),l.checkNodeRelation(n,t);var i=c(t,a.id.CHECK,n);return l.setChkClass(n,i,t),l.repairParentChkClassWithSelf(n,t),n.treeObj.trigger(a.event.CHECK,[e,n.treeId,t]),!0},onMouseoverCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!0,l.setChkClass(n,r,t),!0},onMouseoutCheck:function(e,t){if(!0===t.chkDisabled)return!1;var n=u.getSetting(e.data.treeId),r=c(t,a.id.CHECK,n);return t.check_Focus=!1,l.setChkClass(n,r,t),!0}},i={tools:{},view:{checkNodeRelation:function(e,t){var n,r,i,o=a.radio,s=u.nodeChecked(e,t);if(e.check.chkStyle==o.STYLE){var d=u.getRadioCheckedList(e);if(s)if(e.check.radioType==o.TYPE_ALL){for(r=d.length-1;r>=0;r--){n=d[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),d.splice(r,1),l.setChkClass(e,c(n,a.id.CHECK,e),n),n.parentTId!=t.parentTId&&l.repairParentChkClassWithSelf(e,n))}d.push(t)}else{var h=t.parentTId?t.getParentNode():u.getRoot(e);for(r=0,i=(p=u.nodeChildren(e,h)).length;r<i;r++){n=p[r],u.nodeChecked(e,n)&&n!=t&&(u.nodeChecked(e,n,!1),l.setChkClass(e,c(n,a.id.CHECK,e),n))}}else if(e.check.radioType==o.TYPE_ALL)for(r=0,i=d.length;r<i;r++)if(t==d[r]){d.splice(r,1);break}}else{var p=u.nodeChildren(e,t);s&&(!p||0==p.length||e.check.chkboxType.Y.indexOf("s")>-1)&&l.setSonNodeCheckBox(e,t,!0),s||p&&0!=p.length&&!(e.check.chkboxType.N.indexOf("s")>-1)||l.setSonNodeCheckBox(e,t,!1),s&&e.check.chkboxType.Y.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!0),!s&&e.check.chkboxType.N.indexOf("p")>-1&&l.setParentNodeCheckBox(e,t,!1)}},makeChkClass:function(e,t){var n=a.checkbox,r=a.radio,i="",o=u.nodeChecked(e,t);i=!0===t.chkDisabled?n.DISABLED:t.halfCheck?n.PART:e.check.chkStyle==r.STYLE?t.check_Child_State<1?n.FULL:n.PART:o?2===t.check_Child_State||-1===t.check_Child_State?n.FULL:n.PART:t.check_Child_State<1?n.FULL:n.PART;var s=e.check.chkStyle+"_"+(o?n.TRUE:n.FALSE)+"_"+i;return s=t.check_Focus&&!0!==t.chkDisabled?s+"_"+n.FOCUS:s,a.className.BUTTON+" "+n.DEFAULT+" "+s},repairAllChk:function(e,t){if(e.check.enable&&e.check.chkStyle===a.checkbox.STYLE)for(var n=u.getRoot(e),r=u.nodeChildren(e,n),i=0,o=r.length;i<o;i++){var s=r[i];!0!==s.nocheck&&!0!==s.chkDisabled&&u.nodeChecked(e,s,t),l.setSonNodeCheckBox(e,s,t)}},repairChkClass:function(e,t){if(t&&(u.makeChkFlag(e,t),!0!==t.nocheck)){var n=c(t,a.id.CHECK,e);l.setChkClass(e,n,t)}},repairParentChkClass:function(e,t){if(t&&t.parentTId){var n=t.getParentNode();l.repairChkClass(e,n),l.repairParentChkClass(e,n)}},repairParentChkClassWithSelf:function(e,t){if(t){var n=u.nodeChildren(e,t);n&&n.length>0?l.repairParentChkClass(e,n[0]):l.repairParentChkClass(e,t)}},repairSonChkDisabled:function(e,t,n,r){if(t){t.chkDisabled!=n&&(t.chkDisabled=n),l.repairChkClass(e,t);var i=u.nodeChildren(e,t);if(i&&r)for(var o=0,s=i.length;o<s;o++){var a=i[o];l.repairSonChkDisabled(e,a,n,r)}}},repairParentChkDisabled:function(e,t,n,r){t&&(t.chkDisabled!=n&&r&&(t.chkDisabled=n),l.repairChkClass(e,t),l.repairParentChkDisabled(e,t.getParentNode(),n,r))},setChkClass:function(e,t,n){t&&(!0===n.nocheck?t.hide():t.show(),t.attr("class",l.makeChkClass(e,n)))},setParentNodeCheckBox:function(e,t,n,r){var i=c(t,a.id.CHECK,e);if(r||(r=t),u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled&&(u.nodeChecked(e,t,n),l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t])),t.parentTId){var o=!0;if(!n)for(var s=u.nodeChildren(e,t.getParentNode()),d=0,h=s.length;d<h;d++){var p=s[d],f=u.nodeChecked(e,p);if(!0!==p.nocheck&&!0!==p.chkDisabled&&f||(!0===p.nocheck||!0===p.chkDisabled)&&p.check_Child_State>0){o=!1;break}}o&&l.setParentNodeCheckBox(e,t.getParentNode(),n,r)}},setSonNodeCheckBox:function(e,t,n,r){if(t){var i=c(t,a.id.CHECK,e);r||(r=t);var o=!1,s=u.nodeChildren(e,t);if(s)for(var d=0,h=s.length;d<h;d++){var p=s[d];l.setSonNodeCheckBox(e,p,n,r),!0===p.chkDisabled&&(o=!0)}t!=u.getRoot(e)&&!0!==t.chkDisabled&&(o&&!0!==t.nocheck&&u.makeChkFlag(e,t),!0!==t.nocheck&&!0!==t.chkDisabled?(u.nodeChecked(e,t,n),o||(t.check_Child_State=s&&s.length>0?n?2:0:-1)):t.check_Child_State=-1,l.setChkClass(e,i,t),e.check.autoCheckTrigger&&t!=r&&!0!==t.nocheck&&!0!==t.chkDisabled&&e.treeObj.trigger(a.event.CHECK,[null,e.treeId,t]))}}},event:{},data:{getRadioCheckedList:function(e){for(var t=u.getRoot(e).radioCheckedList,n=0,r=t.length;n<r;n++)u.getNodeCache(e,t[n].tId)||(t.splice(n,1),n--,r--);return t},getCheckStatus:function(e,t){if(!e.check.enable||t.nocheck||t.chkDisabled)return null;var n=u.nodeChecked(e,t);return{checked:n,half:t.halfCheck?t.halfCheck:e.check.chkStyle==a.radio.STYLE?2===t.check_Child_State:n?t.check_Child_State>-1&&t.check_Child_State<2:t.check_Child_State>0}},getTreeCheckedNodes:function(e,t,n,r){if(!t)return[];var i=n&&e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL;r=r||[];for(var o=0,s=t.length;o<s;o++){var l=t[o],c=u.nodeChildren(e,l),d=u.nodeChecked(e,l);if(!0!==l.nocheck&&!0!==l.chkDisabled&&d==n&&(r.push(l),i))break;if(u.getTreeCheckedNodes(e,c,n,r),i&&r.length>0)break}return r},getTreeChangeCheckedNodes:function(e,t,n){if(!t)return[];n=n||[];for(var r=0,i=t.length;r<i;r++){var o=t[r],s=u.nodeChildren(e,o),a=u.nodeChecked(e,o);!0!==o.nocheck&&!0!==o.chkDisabled&&a!=o.checkedOld&&n.push(o),u.getTreeChangeCheckedNodes(e,s,n)}return n},makeChkFlag:function(e,t){if(t){var n=-1,r=u.nodeChildren(e,t);if(r)for(var i=0,o=r.length;i<o;i++){var s=r[i],l=u.nodeChecked(e,s),c=-1;if(e.check.chkStyle==a.radio.STYLE){if(2==(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck||l||s.check_Child_State>0?2:0)){n=2;break}0==c&&(n=0)}else if(e.check.chkStyle==a.checkbox.STYLE){if(1===(c=!0===s.nocheck||!0===s.chkDisabled?s.check_Child_State:!0===s.halfCheck?1:l?-1===s.check_Child_State||2===s.check_Child_State?2:1:s.check_Child_State>0?1:0)){n=1;break}if(2===c&&n>-1&&i>0&&c!==n){n=1;break}if(2===n&&c>-1&&c<2){n=1;break}c>-1&&(n=c)}}t.check_Child_State=n}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.nodeChecked=function(e,t,n){if(!t)return!1;var r=e.data.key.checked;return void 0!==n?("string"==typeof n&&(n=s.eqs(n,"true")),n=!!n,t[r]=n):"string"==typeof t[r]?t[r]=s.eqs(t[r],"true"):t[r]=!!t[r],t[r]},u.exSetting(n),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.CHECK,(function(t,n,r,i){t.srcEvent=n,s.apply(e.callback.onCheck,[t,r,i])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.CHECK)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,l){if(n){var c=u.nodeChecked(e,n);if(n.checkedOld=c,"string"==typeof n.nocheck&&(n.nocheck=s.eqs(n.nocheck,"true")),n.nocheck=!!n.nocheck||e.check.nocheckInherit&&r&&!!r.nocheck,"string"==typeof n.chkDisabled&&(n.chkDisabled=s.eqs(n.chkDisabled,"true")),n.chkDisabled=!!n.chkDisabled||e.check.chkDisabledInherit&&r&&!!r.chkDisabled,"string"==typeof n.halfCheck&&(n.halfCheck=s.eqs(n.halfCheck,"true")),n.halfCheck=!!n.halfCheck,n.check_Child_State=-1,n.check_Focus=!1,n.getCheckStatus=function(){return u.getCheckStatus(e,n)},e.check.chkStyle==a.radio.STYLE&&e.check.radioType==a.radio.TYPE_ALL&&c)u.getRoot(e).radioCheckedList.push(n)}})),u.addInitProxy((function(e){var t=e.target,n=u.getSetting(e.data.treeId),i="",o=null,l="",c=null;if(s.eqs(e.type,"mouseover")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoverCheck"):s.eqs(e.type,"mouseout")?n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="mouseoutCheck"):s.eqs(e.type,"click")&&n.check.enable&&s.eqs(t.tagName,"span")&&null!==t.getAttribute("treeNode"+a.id.CHECK)&&(i=s.getNodeMainDom(t).id,l="checkNode"),i.length>0)switch(o=u.getNodeCache(n,i),l){case"checkNode":c=r.onCheckNode;break;case"mouseoverCheck":c=r.onMouseoverCheck;break;case"mouseoutCheck":c=r.onMouseoutCheck}return{stop:"checkNode"===l,node:o,nodeEventType:l,nodeEventCallback:c,treeEventType:"",treeEventCallback:null}}),!0),u.addInitRoot((function(e){u.getRoot(e).radioCheckedList=[]})),u.addBeforeA((function(e,t,n){e.check.enable&&(u.makeChkFlag(e,t),n.push("<span ID='",t.tId,a.id.CHECK,"' class='",l.makeChkClass(e,t),"' treeNode",a.id.CHECK,!0===t.nocheck?" style='display:none;'":"","></span>"))})),u.addZTreeTools((function(e,t){t.checkNode=function(t,n,r,i){var o=u.nodeChecked(e,t);if(!0!==t.chkDisabled&&(!0!==n&&!1!==n&&(n=!o),i=!!i,(o!==n||r)&&(!i||0!=s.apply(this.setting.callback.beforeCheck,[this.setting.treeId,t],!0))&&s.uCanDo(this.setting)&&this.setting.check.enable&&!0!==t.nocheck)){u.nodeChecked(e,t,n);var d=c(t,a.id.CHECK,this.setting);(r||this.setting.check.chkStyle===a.radio.STYLE)&&l.checkNodeRelation(this.setting,t),l.setChkClass(this.setting,d,t),l.repairParentChkClassWithSelf(this.setting,t),i&&this.setting.treeObj.trigger(a.event.CHECK,[null,this.setting.treeId,t])}},t.checkAllNodes=function(e){l.repairAllChk(this.setting,!!e)},t.getCheckedNodes=function(t){t=!1!==t;var n=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeCheckedNodes(this.setting,n,t)},t.getChangeCheckedNodes=function(){var t=u.nodeChildren(e,u.getRoot(this.setting));return u.getTreeChangeCheckedNodes(this.setting,t)},t.setChkDisabled=function(e,t,n,r){t=!!t,n=!!n,r=!!r,l.repairSonChkDisabled(this.setting,e,t,r),l.repairParentChkDisabled(this.setting,e.getParentNode(),t,n)};var n=t.updateNode;t.updateNode=function(e,r){if((n&&n.apply(t,arguments),e&&this.setting.check.enable)&&(c(e,this.setting).get(0)&&s.uCanDo(this.setting))){var i=c(e,a.id.CHECK,this.setting);1!=r&&this.setting.check.chkStyle!==a.radio.STYLE||l.checkNodeRelation(this.setting,e),l.setChkClass(this.setting,i,e),l.repairParentChkClassWithSelf(this.setting,e)}}}));var d=l.createNodes;l.createNodes=function(e,t,n,r,i){d&&d.apply(l,arguments),n&&l.repairParentChkClassWithSelf(e,r)};var h=l.removeNode;l.removeNode=function(e,t){var n=t.getParentNode();h&&h.apply(l,arguments),t&&n&&(l.repairChkClass(e,n),l.repairParentChkClass(e,n))};var p=l.appendNodes;l.appendNodes=function(e,t,n,r,i,o,s){var a="";return p&&(a=p.apply(l,arguments)),r&&u.makeChkFlag(e,r),a}}(jQuery),function(e){var t={event:{DRAG:"ztree_drag",DROP:"ztree_drop",RENAME:"ztree_rename",DRAGMOVE:"ztree_dragmove"},id:{EDIT:"_edit",INPUT:"_input",REMOVE:"_remove"},move:{TYPE_INNER:"inner",TYPE_PREV:"prev",TYPE_NEXT:"next"},node:{CURSELECTED_EDIT:"curSelectedNode_Edit",TMPTARGET_TREE:"tmpTargetzTree",TMPTARGET_NODE:"tmpTargetNode"}},n={onHoverOverNode:function(e,t){var r=u.getSetting(e.data.treeId),i=u.getRoot(r);i.curHoverNode!=t&&n.onHoverOutNode(e),i.curHoverNode=t,l.addHoverDom(r,t)},onHoverOutNode:function(e,t){var n=u.getSetting(e.data.treeId),r=u.getRoot(n);r.curHoverNode&&!u.isSelectedNode(n,r.curHoverNode)&&(l.removeTreeDom(n,r.curHoverNode),r.curHoverNode=null)},onMousedownNode:function(n,r){var i,o,d=u.getSetting(n.data.treeId),h=u.getRoot(d),p=u.getRoots();if(2==n.button||!d.edit.enable||!d.edit.drag.isCopy&&!d.edit.drag.isMove)return!0;var f=n.target,m=u.getRoot(d).curSelectedList,g=[];if(u.isSelectedNode(d,r))for(i=0,o=m.length;i<o;i++){if(m[i].editNameFlag&&s.eqs(f.tagName,"input")&&null!==f.getAttribute("treeNode"+a.id.INPUT))return!0;if(g.push(m[i]),g[0].parentTId!==m[i].parentTId){g=[r];break}}else g=[r];l.editNodeBlur=!0,l.cancelCurEditNode(d);var v,y,_,b,w,x=e(d.treeObj.get(0).ownerDocument),S=e(d.treeObj.get(0).ownerDocument.body),k=!1,T=d,E=d,D=null,C=null,M=null,A=a.move.TYPE_INNER,I=n.clientX,L=n.clientY,O=(new Date).getTime();function N(n){if(0==h.dragFlag&&Math.abs(I-n.clientX)<d.edit.drag.minMoveSize&&Math.abs(L-n.clientY)<d.edit.drag.minMoveSize)return!0;var r,i,o,f,m;if(S.css("cursor","pointer"),0==h.dragFlag){if(0==s.apply(d.callback.beforeDrag,[d.treeId,g],!0))return R(n),!0;for(r=0,i=g.length;r<i;r++)0==r&&(h.dragNodeShowBefore=[]),o=g[r],u.nodeIsParent(d,o)&&o.open?(l.expandCollapseNode(d,o,!o.open),h.dragNodeShowBefore[o.tId]=!0):h.dragNodeShowBefore[o.tId]=!1;h.dragFlag=1,p.showHoverDom=!1,s.showIfameMask(d,!0);var E=!0,N=-1;if(g.length>1){var P=g[0].parentTId?u.nodeChildren(d,g[0].getParentNode()):u.getNodes(d);for(m=[],r=0,i=P.length;r<i;r++)if(void 0!==h.dragNodeShowBefore[P[r].tId]&&(E&&N>-1&&N+1!==r&&(E=!1),m.push(P[r]),N=r),g.length===m.length){g=m;break}}for(E&&(b=g[0].getPreNode(),w=g[g.length-1].getNextNode()),v=c("<ul class='zTreeDragUL'></ul>",d),r=0,i=g.length;r<i;r++)(o=g[r]).editNameFlag=!1,l.selectNode(d,o,r>0),l.removeTreeDom(d,o),r>d.edit.drag.maxShowNodeNum-1||((f=c("<li id='"+o.tId+"_tmp'></li>",d)).append(c(o,a.id.A,d).clone()),f.css("padding","0"),f.children("#"+o.tId+a.id.A).removeClass(a.node.CURSELECTED),v.append(f),r==d.edit.drag.maxShowNodeNum-1&&(f=c("<li id='"+o.tId+"_moretmp'><a> ... </a></li>",d),v.append(f)));v.attr("id",g[0].tId+a.id.UL+"_tmp"),v.addClass(d.treeObj.attr("class")),v.appendTo(S),(y=c("<span class='tmpzTreeMove_arrow'></span>",d)).attr("id","zTreeMove_arrow_tmp"),y.appendTo(S),d.treeObj.trigger(a.event.DRAG,[n,d.treeId,g])}if(1==h.dragFlag){if(_&&y.attr("id")==n.target.id&&M&&n.clientX+x.scrollLeft()+2>e("#"+M+a.id.A,_).offset().left){var F=e("#"+M+a.id.A,_);n.target=F.length>0?F.get(0):n.target}else _&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER));_=null,M=null,k=!1,T=d;var j=u.getSettings();for(var Y in j)j[Y].treeId&&j[Y].edit.enable&&j[Y].treeId!=d.treeId&&(n.target.id==j[Y].treeId||e(n.target).parents("#"+j[Y].treeId).length>0)&&(k=!0,T=j[Y]);var V=x.scrollTop(),H=x.scrollLeft(),B=T.treeObj.offset(),U=T.treeObj.get(0).scrollHeight,z=T.treeObj.get(0).scrollWidth,q=n.clientY+V-B.top,W=T.treeObj.height()+B.top-n.clientY-V,$=n.clientX+H-B.left,G=T.treeObj.width()+B.left-n.clientX-H,K=q<d.edit.drag.borderMax&&q>d.edit.drag.borderMin,Z=W<d.edit.drag.borderMax&&W>d.edit.drag.borderMin,X=$<d.edit.drag.borderMax&&$>d.edit.drag.borderMin,J=G<d.edit.drag.borderMax&&G>d.edit.drag.borderMin,Q=q>d.edit.drag.borderMin&&W>d.edit.drag.borderMin&&$>d.edit.drag.borderMin&&G>d.edit.drag.borderMin,ee=K&&T.treeObj.scrollTop()<=0,te=Z&&T.treeObj.scrollTop()+T.treeObj.height()+10>=U,ne=X&&T.treeObj.scrollLeft()<=0,re=J&&T.treeObj.scrollLeft()+T.treeObj.width()+10>=z;if(n.target&&s.isChildOrSelf(n.target,T.treeId)){for(var ie=n.target;ie&&ie.tagName&&!s.eqs(ie.tagName,"li")&&ie.id!=T.treeId;)ie=ie.parentNode;var oe=!0;for(r=0,i=g.length;r<i;r++){if(o=g[r],ie.id===o.tId){oe=!1;break}if(c(o,d).find("#"+ie.id).length>0){oe=!1;break}}oe&&n.target&&s.isChildOrSelf(n.target,ie.id+a.id.A)&&(_=e(ie),M=ie.id)}o=g[0],Q&&s.isChildOrSelf(n.target,T.treeId)&&(!_&&(n.target.id==T.treeId||ee||te||ne||re)&&(k||!k&&o.parentTId)&&(_=T.treeObj),K?T.treeObj.scrollTop(T.treeObj.scrollTop()-10):Z&&T.treeObj.scrollTop(T.treeObj.scrollTop()+10),X?T.treeObj.scrollLeft(T.treeObj.scrollLeft()-10):J&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+10),_&&_!=T.treeObj&&_.offset().left<T.treeObj.offset().left&&T.treeObj.scrollLeft(T.treeObj.scrollLeft()+_.offset().left-T.treeObj.offset().left)),v.css({top:n.clientY+V+3+"px",left:n.clientX+H+3+"px"});var se=0,ae=0;if(_&&_.attr("id")!=T.treeId){var le=null==M?null:u.getNodeCache(T,M),ue=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy,ce=!(!b||M!==b.tId),de=!(!w||M!==w.tId),he=o.parentTId&&o.parentTId==M,pe=(ue||!de)&&s.apply(T.edit.drag.prev,[T.treeId,g,le],!!T.edit.drag.prev),fe=(ue||!ce)&&s.apply(T.edit.drag.next,[T.treeId,g,le],!!T.edit.drag.next),me=(ue||!he)&&!(T.data.keep.leaf&&!u.nodeIsParent(d,le))&&s.apply(T.edit.drag.inner,[T.treeId,g,le],!!T.edit.drag.inner);function ge(){_=null,M="",A=a.move.TYPE_INNER,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null)}if(pe||fe||me){var ve=e("#"+M+a.id.A,_),ye=le.isLastNode?null:e("#"+le.getNextNode().tId+a.id.A,_.next()),_e=ve.offset().top,be=ve.offset().left,we=pe?me?.25:fe?.5:1:-1,xe=fe?me?.75:pe?.5:0:-1,Se=(n.clientY+V-_e)/ve.height();if((1==we||Se<=we&&Se>=-.2)&&pe?(se=1-y.width(),ae=_e-y.height()/2,A=a.move.TYPE_PREV):(0==xe||Se>=xe&&Se<=1.2)&&fe?(se=1-y.width(),ae=null==ye||u.nodeIsParent(d,le)&&le.open?_e+ve.height()-y.height()/2:ye.offset().top-y.height()/2,A=a.move.TYPE_NEXT):me?(se=5-y.width(),ae=_e,A=a.move.TYPE_INNER):ge(),_&&(y.css({display:"block",top:ae+"px",left:be+se+"px"}),ve.addClass(a.node.TMPTARGET_NODE+"_"+A),D==M&&C==A||(O=(new Date).getTime()),le&&u.nodeIsParent(d,le)&&A==a.move.TYPE_INNER)){var ke=!0;window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId!==le.tId?(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null):window.zTreeMoveTimer&&window.zTreeMoveTargetNodeTId===le.tId&&(ke=!1),ke&&(window.zTreeMoveTimer=setTimeout((function(){A==a.move.TYPE_INNER&&le&&u.nodeIsParent(d,le)&&!le.open&&(new Date).getTime()-O>T.edit.drag.autoOpenTime&&s.apply(T.callback.beforeDragOpen,[T.treeId,le],!0)&&(l.switchNode(T,le),T.edit.drag.autoExpandTrigger&&T.treeObj.trigger(a.event.EXPAND,[T.treeId,le]))}),T.edit.drag.autoOpenTime+50),window.zTreeMoveTargetNodeTId=le.tId)}}else ge()}else A=a.move.TYPE_INNER,_&&s.apply(T.edit.drag.inner,[T.treeId,g,null],!!T.edit.drag.inner)?_.addClass(a.node.TMPTARGET_TREE):_=null,y.css({display:"none"}),window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null);D=M,C=A,d.treeObj.trigger(a.event.DRAGMOVE,[n,d.treeId,g])}return!1}function R(n){if(window.zTreeMoveTimer&&(clearTimeout(window.zTreeMoveTimer),window.zTreeMoveTargetNodeTId=null),D=null,C=null,x.unbind("mousemove",N),x.unbind("mouseup",R),x.unbind("selectstart",P),S.css("cursor",""),_&&(_.removeClass(a.node.TMPTARGET_TREE),M&&e("#"+M+a.id.A,_).removeClass(a.node.TMPTARGET_NODE+"_"+a.move.TYPE_PREV).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_NEXT).removeClass(a.node.TMPTARGET_NODE+"_"+t.move.TYPE_INNER)),s.showIfameMask(d,!1),p.showHoverDom=!0,0!=h.dragFlag){var r,i,o;for(h.dragFlag=0,r=0,i=g.length;r<i;r++)o=g[r],u.nodeIsParent(d,o)&&h.dragNodeShowBefore[o.tId]&&!o.open&&(l.expandCollapseNode(d,o,!o.open),delete h.dragNodeShowBefore[o.tId]);v&&v.remove(),y&&y.remove();var f=(n.ctrlKey||n.metaKey)&&d.edit.drag.isMove&&d.edit.drag.isCopy||!d.edit.drag.isMove&&d.edit.drag.isCopy;if(!f&&_&&M&&g[0].parentTId&&M==g[0].parentTId&&A==a.move.TYPE_INNER&&(_=null),_){var m=null==M?null:u.getNodeCache(T,M);if(0==s.apply(d.callback.beforeDrop,[T.treeId,g,m,A,f],!0))return void l.selectNodes(E,g);var b=f?s.clone(g):g;function w(){if(k){if(!f)for(var e=0,t=g.length;e<t;e++)l.removeNode(d,g[e]);A==a.move.TYPE_INNER?l.addNodes(T,m,-1,b):l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b)}else if(f&&A==a.move.TYPE_INNER)l.addNodes(T,m,-1,b);else if(f)l.addNodes(T,m.getParentNode(),A==a.move.TYPE_PREV?m.getIndex():m.getIndex()+1,b);else if(A!=a.move.TYPE_NEXT)for(e=0,t=b.length;e<t;e++)l.moveNode(T,m,b[e],A,!1);else for(e=-1,t=b.length-1;e<t;t--)l.moveNode(T,m,b[t],A,!1);l.selectNodes(T,b);var r=c(b[0],d).get(0);l.scrollIntoView(d,r),d.treeObj.trigger(a.event.DROP,[n,T.treeId,b,m,A,f])}A==a.move.TYPE_INNER&&s.canAsync(T,m)?l.asyncNode(T,m,!1,w):w()}else l.selectNodes(E,g),d.treeObj.trigger(a.event.DROP,[n,d.treeId,g,null,null,null])}}function P(){return!1}return s.uCanDo(d)&&x.bind("mousemove",N),x.bind("mouseup",R),x.bind("selectstart",P),!0}},r={addEditBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.EDIT,e).length>0)&&s.apply(e.edit.showRenameBtn,[e.treeId,t],e.edit.showRenameBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" edit' id='"+t.tId+a.id.EDIT+"' title='"+s.apply(e.edit.renameTitle,[e.treeId,t],e.edit.renameTitle)+"' treeNode"+a.id.EDIT+" style='display:none;'></span>";n.append(r),c(t,a.id.EDIT,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeEditName,[e.treeId,t],!0))&&(l.editNode(e,t),!1)})).show()}},addRemoveBtn:function(e,t){if(!(t.editNameFlag||c(t,a.id.REMOVE,e).length>0)&&s.apply(e.edit.showRemoveBtn,[e.treeId,t],e.edit.showRemoveBtn)){var n=c(t,a.id.A,e),r="<span class='"+a.className.BUTTON+" remove' id='"+t.tId+a.id.REMOVE+"' title='"+s.apply(e.edit.removeTitle,[e.treeId,t],e.edit.removeTitle)+"' treeNode"+a.id.REMOVE+" style='display:none;'></span>";n.append(r),c(t,a.id.REMOVE,e).bind("click",(function(){return!(!s.uCanDo(e)||0==s.apply(e.callback.beforeRemove,[e.treeId,t],!0))&&(l.removeNode(e,t),e.treeObj.trigger(a.event.REMOVE,[e.treeId,t]),!1)})).bind("mousedown",(function(e){return!0})).show()}},addHoverDom:function(e,t){u.getRoots().showHoverDom&&(t.isHover=!0,e.edit.enable&&(l.addEditBtn(e,t),l.addRemoveBtn(e,t)),s.apply(e.view.addHoverDom,[e.treeId,t]))},cancelCurEditNode:function(e,t,n){var r=u.getRoot(e),i=r.curEditNode;if(i){var o=r.curEditInput,d=t||(n?u.nodeName(e,i):o.val());if(!1===s.apply(e.callback.beforeRename,[e.treeId,i,d,n],!0))return!1;u.nodeName(e,i,d),c(i,a.id.A,e).removeClass(a.node.CURSELECTED_EDIT),o.unbind(),l.setNodeName(e,i),i.editNameFlag=!1,r.curEditNode=null,r.curEditInput=null,l.selectNode(e,i,!1),e.treeObj.trigger(a.event.RENAME,[e.treeId,i,n])}return r.noSelection=!0,!0},editNode:function(e,t){var n=u.getRoot(e);if(l.editNodeBlur=!1,u.isSelectedNode(e,t)&&n.curEditNode==t&&t.editNameFlag)setTimeout((function(){s.inputFocus(n.curEditInput)}),0);else{t.editNameFlag=!0,l.removeTreeDom(e,t),l.cancelCurEditNode(e),l.selectNode(e,t,!1),c(t,a.id.SPAN,e).html("<input type=text class='rename' id='"+t.tId+a.id.INPUT+"' treeNode"+a.id.INPUT+" >");var r=c(t,a.id.INPUT,e);r.attr("value",u.nodeName(e,t)),e.edit.editNameSelectAll?s.inputSelect(r):s.inputFocus(r),r.bind("blur",(function(t){l.editNodeBlur||l.cancelCurEditNode(e)})).bind("keydown",(function(t){"13"==t.keyCode?(l.editNodeBlur=!0,l.cancelCurEditNode(e)):"27"==t.keyCode&&l.cancelCurEditNode(e,null,!0)})).bind("click",(function(e){return!1})).bind("dblclick",(function(e){return!1})),c(t,a.id.A,e).addClass(a.node.CURSELECTED_EDIT),n.curEditInput=r,n.noSelection=!1,n.curEditNode=t}},moveNode:function(e,t,n,r,i,o){var s=u.getRoot(e);if(t!=n&&(!e.data.keep.leaf||!t||u.nodeIsParent(e,t)||r!=a.move.TYPE_INNER)){var d=n.parentTId?n.getParentNode():s,h=null===t||t==s;h&&null===t&&(t=s),h&&(r=a.move.TYPE_INNER);var p,f,m=t.parentTId?t.getParentNode():s;if(r!=a.move.TYPE_PREV&&r!=a.move.TYPE_NEXT&&(r=a.move.TYPE_INNER),r==a.move.TYPE_INNER&&(h?n.parentTId=null:(u.nodeIsParent(e,t)||(u.nodeIsParent(e,t,!0),t.open=!!t.open,l.setNodeLineIcos(e,t)),n.parentTId=t.tId)),h)f=p=e.treeObj;else{if(o||r!=a.move.TYPE_INNER?o||l.expandCollapseNode(e,t.getParentNode(),!0,!1):l.expandCollapseNode(e,t,!0,!1),p=c(t,e),f=c(t,a.id.UL,e),p.get(0)&&!f.get(0)){var g=[];l.makeUlHtml(e,t,g,""),p.append(g.join(""))}f=c(t,a.id.UL,e)}var v=c(n,e);v.get(0)?p.get(0)||v.remove():v=l.appendNodes(e,n.level,[n],null,-1,!1,!0).join(""),f.get(0)&&r==a.move.TYPE_INNER?f.append(v):p.get(0)&&r==a.move.TYPE_PREV?p.before(v):p.get(0)&&r==a.move.TYPE_NEXT&&p.after(v);var y,_,b=-1,w=0,x=null,S=null,k=n.level,T=u.nodeChildren(e,d),E=u.nodeChildren(e,m),D=u.nodeChildren(e,t);if(n.isFirstNode)b=0,T.length>1&&((x=T[1]).isFirstNode=!0);else if(n.isLastNode)(x=T[(b=T.length-1)-1]).isLastNode=!0;else for(y=0,_=T.length;y<_;y++)if(T[y].tId==n.tId){b=y;break}if(b>=0&&T.splice(b,1),r!=a.move.TYPE_INNER)for(y=0,_=E.length;y<_;y++)E[y].tId==t.tId&&(w=y);if(r==a.move.TYPE_INNER?(D||(D=u.nodeChildren(e,t,[])),D.length>0&&((S=D[D.length-1]).isLastNode=!1),D.splice(D.length,0,n),n.isLastNode=!0,n.isFirstNode=1==D.length):t.isFirstNode&&r==a.move.TYPE_PREV?(E.splice(w,0,n),(S=t).isFirstNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!0,n.isLastNode=!1):t.isLastNode&&r==a.move.TYPE_NEXT?(E.splice(w+1,0,n),(S=t).isLastNode=!1,n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!0):(r==a.move.TYPE_PREV?E.splice(w,0,n):E.splice(w+1,0,n),n.parentTId=t.parentTId,n.isFirstNode=!1,n.isLastNode=!1),u.fixPIdKeyValue(e,n),u.setSonNodeLevel(e,n.getParentNode(),n),l.setNodeLineIcos(e,n),l.repairNodeLevelClass(e,n,k),!e.data.keep.parent&&T.length<1){u.nodeIsParent(e,d,!1),d.open=!1;var C=c(d,a.id.UL,e),M=c(d,a.id.SWITCH,e),A=c(d,a.id.ICON,e);l.replaceSwitchClass(d,M,a.folder.DOCU),l.replaceIcoClass(d,A,a.folder.DOCU),C.css("display","none")}else x&&l.setNodeLineIcos(e,x);S&&l.setNodeLineIcos(e,S),e.check&&e.check.enable&&l.repairChkClass&&(l.repairChkClass(e,d),l.repairParentChkClassWithSelf(e,d),d!=n.parent&&l.repairParentChkClassWithSelf(e,n)),o||l.expandCollapseParentNode(e,n.getParentNode(),!0,i)}},removeEditBtn:function(e,t){c(t,a.id.EDIT,e).unbind().remove()},removeRemoveBtn:function(e,t){c(t,a.id.REMOVE,e).unbind().remove()},removeTreeDom:function(e,t){t.isHover=!1,l.removeEditBtn(e,t),l.removeRemoveBtn(e,t),s.apply(e.view.removeHoverDom,[e.treeId,t])},repairNodeLevelClass:function(e,t,n){if(n!==t.level){var r=c(t,e),i=c(t,a.id.A,e),o=c(t,a.id.UL,e),s=a.className.LEVEL+n,l=a.className.LEVEL+t.level;r.removeClass(s),r.addClass(l),i.removeClass(s),i.addClass(l),o.removeClass(s),o.addClass(l)}},selectNodes:function(e,t){for(var n=0,r=t.length;n<r;n++)l.selectNode(e,t[n],n>0)}},i={tools:{getAbs:function(e){var t=e.getBoundingClientRect(),n=document.body.scrollTop+document.documentElement.scrollTop,r=document.body.scrollLeft+document.documentElement.scrollLeft;return[t.left+r,t.top+n]},inputFocus:function(e){e.get(0)&&(e.focus(),s.setCursorPosition(e.get(0),e.val().length))},inputSelect:function(e){e.get(0)&&(e.focus(),e.select())},setCursorPosition:function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},showIfameMask:function(e,t){for(var n=u.getRoot(e);n.dragMaskList.length>0;)n.dragMaskList[0].remove(),n.dragMaskList.shift();if(t)for(var r=c("iframe",e),i=0,o=r.length;i<o;i++){var a=r.get(i),l=s.getAbs(a),d=c("<div id='zTreeMask_"+i+"' class='zTreeMask' style='top:"+l[1]+"px; left:"+l[0]+"px; width:"+a.offsetWidth+"px; height:"+a.offsetHeight+"px;'></div>",e);d.appendTo(c("body",e)),n.dragMaskList.push(d)}}},view:r,event:{},data:{setSonNodeLevel:function(e,t,n){if(n){var r=u.nodeChildren(e,n),i=n.level;if(n.level=t?t.level+1:0,l.repairNodeLevelClass(e,n,i),r)for(var o=0,s=r.length;o<s;o++)r[o]&&u.setSonNodeLevel(e,n,r[o])}}}};e.extend(!0,e.fn.zTree.consts,t),e.extend(!0,e.fn.zTree._z,i);var o=e.fn.zTree,s=o._z.tools,a=o.consts,l=o._z.view,u=o._z.data,c=(o._z.event,s.$);u.exSetting({edit:{enable:!1,editNameSelectAll:!1,showRemoveBtn:!0,showRenameBtn:!0,removeTitle:"remove",renameTitle:"rename",drag:{autoExpandTrigger:!1,isCopy:!0,isMove:!0,prev:!0,next:!0,inner:!0,minMoveSize:5,borderMax:10,borderMin:-5,maxShowNodeNum:5,autoOpenTime:500}},view:{addHoverDom:null,removeHoverDom:null},callback:{beforeDrag:null,beforeDragOpen:null,beforeDrop:null,beforeEditName:null,beforeRename:null,onDrag:null,onDragMove:null,onDrop:null,onRename:null}}),u.addInitBind((function(e){var t=e.treeObj,n=a.event;t.bind(n.RENAME,(function(t,n,r,i){s.apply(e.callback.onRename,[t,n,r,i])})),t.bind(n.DRAG,(function(t,n,r,i){s.apply(e.callback.onDrag,[n,r,i])})),t.bind(n.DRAGMOVE,(function(t,n,r,i){s.apply(e.callback.onDragMove,[n,r,i])})),t.bind(n.DROP,(function(t,n,r,i,o,a,l){s.apply(e.callback.onDrop,[n,r,i,o,a,l])}))})),u.addInitUnBind((function(e){var t=e.treeObj,n=a.event;t.unbind(n.RENAME),t.unbind(n.DRAG),t.unbind(n.DRAGMOVE),t.unbind(n.DROP)})),u.addInitCache((function(e){})),u.addInitNode((function(e,t,n,r,i,o,s){n&&(n.isHover=!1,n.editNameFlag=!1)})),u.addInitProxy((function(e){var t=e.target,r=u.getSetting(e.data.treeId),i=e.relatedTarget,o="",l=null,c="",d=null,h=null;if(s.eqs(e.type,"mouseover")?(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="hoverOverNode"):s.eqs(e.type,"mouseout")?(h=s.getMDom(r,i,[{tagName:"a",attrName:"treeNode"+a.id.A}]))||(o="remove",c="hoverOutNode"):s.eqs(e.type,"mousedown")&&(h=s.getMDom(r,t,[{tagName:"a",attrName:"treeNode"+a.id.A}]))&&(o=s.getNodeMainDom(h).id,c="mousedownNode"),o.length>0)switch(l=u.getNodeCache(r,o),c){case"mousedownNode":d=n.onMousedownNode;break;case"hoverOverNode":d=n.onHoverOverNode;break;case"hoverOutNode":d=n.onHoverOutNode}return{stop:!1,node:l,nodeEventType:c,nodeEventCallback:d,treeEventType:"",treeEventCallback:null}})),u.addInitRoot((function(e){var t=u.getRoot(e),n=u.getRoots();t.curEditNode=null,t.curEditInput=null,t.curHoverNode=null,t.dragFlag=0,t.dragNodeShowBefore=[],t.dragMaskList=new Array,n.showHoverDom=!0})),u.addZTreeTools((function(e,t){t.cancelEditName=function(e){u.getRoot(this.setting).curEditNode&&l.cancelCurEditNode(this.setting,e||null,!0)},t.copyNode=function(t,n,r,i){if(!n)return null;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;var c=this,d=s.clone(n);if(t||(t=null,r=a.move.TYPE_INNER),r==a.move.TYPE_INNER){function h(){l.addNodes(c.setting,t,-1,[d],i)}s.canAsync(this.setting,t)?l.asyncNode(this.setting,t,i,h):h()}else l.addNodes(this.setting,t.parentNode,-1,[d],i),l.moveNode(this.setting,t,d,r,!1,i);return d},t.editName=function(e){e&&e.tId&&e===u.getNodeCache(this.setting,e.tId)&&(e.parentTId&&l.expandCollapseParentNode(this.setting,e.getParentNode(),!0),l.editNode(this.setting,e))},t.moveNode=function(t,n,r,i){if(!n)return n;var o=u.nodeIsParent(e,t);if(t&&!o&&this.setting.data.keep.leaf&&r===a.move.TYPE_INNER)return null;if(t&&(n.parentTId==t.tId&&r==a.move.TYPE_INNER||c(n,this.setting).find("#"+t.tId).length>0))return null;t||(t=null);var d=this;function h(){l.moveNode(d.setting,t,n,r,!1,i)}return s.canAsync(this.setting,t)&&r===a.move.TYPE_INNER?l.asyncNode(this.setting,t,i,h):h(),n},t.setEditable=function(e){return this.setting.edit.enable=e,this.refresh()}}));var d=l.cancelPreSelectedNode;l.cancelPreSelectedNode=function(e,t){for(var n=u.getRoot(e).curSelectedList,r=0,i=n.length;r<i&&(t&&t!==n[r]||(l.removeTreeDom(e,n[r]),!t));r++);d&&d.apply(l,arguments)};var h=l.createNodes;l.createNodes=function(e,t,n,r,i){h&&h.apply(l,arguments),n&&l.repairParentChkClassWithSelf&&l.repairParentChkClassWithSelf(e,r)};var p=l.makeNodeUrl;l.makeNodeUrl=function(e,t){return e.edit.enable?null:p.apply(l,arguments)};var f=l.removeNode;l.removeNode=function(e,t){var n=u.getRoot(e);n.curEditNode===t&&(n.curEditNode=null),f&&f.apply(l,arguments)};var m=l.selectNode;l.selectNode=function(e,t,n){var r=u.getRoot(e);return(!u.isSelectedNode(e,t)||r.curEditNode!=t||!t.editNameFlag)&&(m&&m.apply(l,arguments),l.addHoverDom(e,t),!0)};var g=s.uCanDo;s.uCanDo=function(e,t){var n=u.getRoot(e);return!(!t||!(s.eqs(t.type,"mouseover")||s.eqs(t.type,"mouseout")||s.eqs(t.type,"mousedown")||s.eqs(t.type,"mouseup")))||(n.curEditNode&&(l.editNodeBlur=!1,n.curEditInput.focus()),!n.curEditNode&&(!g||g.apply(l,arguments)))}}(jQuery),function(e){e.fn.zTreeKeyboardNavigationDestroy=function(){},e.fn.zTreeKeyboardNavigation=function(t,n,r=null,i){("string"==typeof n||n instanceof String)&&(n=e(n));var o=t.getNodes();if(o){var s=function(){(r=t.getSelectedNodes())&&r.length&&e("#"+r[0].tId).focus()};e.fn.zTreeKeyboardNavigationDestroy(),e.fn.zTreeKeyboardNavigationDestroy=function(){e(n).off("keydown")},e.fn.changeTreeIcons=function(){let t=e(".app-tree li span.button.switch");e(t).map(((t,n)=>{e(n).addClass(i),e(n).on("click",(function(t){setTimeout((()=>{e(n).addClass(i)}),0)}))}))},e(n).on("keydown",(function(n){var r=t.getSelectedNodes(),i=r.length?r[0]:null,a=function(){t.selectNode(o[0],!1,!0)},l=function(){var e=t.transformToArray(o);t.selectNode(e[e.length-1])};switch(n.keyCode){case 32:return void(i&&i.isParent&&(t.expandNode(i,!i.open,!0,!0),e.fn.changeTreeIcons()));case 36:a();break;case 35:l();break;case 33:case 34:break;case 37:!function(){if(i){var e=i.getParentNode(),n=i.getPreNode();if(e||n)if(n){if(n.isParent){for(;n&&n.isParent&&n.open&&n.children;)n=n.children[n.children.length-1];return void t.selectNode(n)}t.selectNode(n)}else e&&t.selectNode(e,!1,!0)}}();break;case 38:!function(){var e;if(i){if(!(e=i.getPreNode()))return}else l();e&&t.selectNode(e)}();break;case 39:!function(){if(i)if(i.isParent&&i.open&&i.children)t.selectNode(i.children[0]);else if(n=i.getNextNode())t.selectNode(n);else for(var e=i;e=e.getParentNode();){var n;if(n=e.getNextNode()){t.selectNode(n);break}}}();break;case 40:!function(){var e;if(i){if(!(e=i.getNextNode()))return}else a();e&&t.selectNode(e)}();break;default:if(!function(e){if(!Array.from({length:26},((e,t)=>t+65)).includes(95&e))return!1;var n=t.transformToArray(o);if(!(n=n.filter((t=>"accesskey"in t&&t.accesskey.length&&(95&t.accesskey.charCodeAt(0))==e))).length)return!1;var r=t.getSelectedNodes();return!!r.length&&r[0]!=n[0]&&(t.selectNode(n[0]),!0)}(95&n.keyCode))return}s()})),r&&r.length?(t.selectNode(r[0]),s()):e(n).trigger({type:"keydown",which:36,keyCode:36})}}}(jQuery);
|