@wavemaker/app-runtime-wm-build 11.7.5-next.NULL → 11.8.0-next.24863

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.
@@ -744,7 +744,7 @@ FullCalendar v5.3.1
744
744
  Docs & License: https://fullcalendar.io/
745
745
  (c) 2020 Adam Shaw
746
746
  */
747
- 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 o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}var i,a,s,l,u,c,d,p={},f=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function v(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 m(e,t,n){var r,o=arguments,i={};for(r in t)"key"!==r&&"ref"!==r&&(i[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(o[r]);if(null!=n&&(i.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===i[r]&&(i[r]=e.defaultProps[r]);return y(e,i,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(a.__v=a),i.vnode&&i.vnode(a),a}function E(e){return e.children}function S(e,t){this.props=e,this.context=t}function D(e,t){if(null==t)return e.__?D(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?D(e):null}function b(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 b(e)}}function C(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!s++||u!==i.debounceRendering)&&((u=i.debounceRendering)||l)(w)}function w(){for(var e;s=a.length;)e=a.sort((function(e,t){return e.__v.__b-t.__v.__b})),a=[],e.some((function(e){var t,n,r,o,i,a,s;e.__d&&(a=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=v({},i)).__v=r,o=_(s,i,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==a?D(i):a),I(n,i),o!=a&&b(i)))}))}function R(e,t,n,r,o,i,a,s,l){var u,c,d,h,v,m,y,E=n&&n.__k||f,S=E.length;if(s==p&&(s=null!=i?i[0]:S?D(n,0):null),u=0,t.__k=T(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=E[u])||d&&n.key==d.key&&n.type===d.type)E[u]=void 0;else for(c=0;c<S;c++){if((d=E[c])&&n.key==d.key&&n.type===d.type){E[c]=void 0;break}d=null}if(h=_(e,n,d=d||p,r,o,i,a,s,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||h,n)),null!=h){var f;if(null==m&&(m=h),void 0!==n.__d)f=n.__d,n.__d=void 0;else if(i==d||h!=s||null==h.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(h),f=null;else{for(v=s,c=0;(v=v.nextSibling)&&c<S;c+=2)if(v==h)break e;e.insertBefore(h,s),f=s}"option"==t.type&&(e.value="")}s=void 0!==f?f:h.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&d.__e==s&&s.parentNode!=e&&(s=D(d))}return u++,n})),t.__e=m,null!=i&&"function"!=typeof t.type)for(u=i.length;u--;)null!=i[u]&&g(i[u]);for(u=S;u--;)null!=E[u]&&H(E[u],E[u]);if(y)for(u=0;u<y.length;u++)N(y[u],y[++u],y[++u])}function T(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++)T(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 k(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===h.test(t)?n+"px":null==n?"":n}function M(e,t,n,r,o){var i,a,s,l,u;if(o?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(i=e.style,"string"==typeof n)i.cssText=n;else{if("string"==typeof r&&(i.cssText="",r=null),r)for(l in r)n&&l in n||k(i,l,"");if(n)for(u in n)r&&n[u]===r[u]||k(i,u,n[u])}else"o"===t[0]&&"n"===t[1]?(a=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,x,a),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,x,a)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!o&&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 x(e){this.l[e.type](i.event?i.event(e):e)}function _(e,t,n,r,o,a,s,l,u){var c,d,p,f,h,g,m,y,D,b,C=t.type;if(void 0!==t.constructor)return null;(c=i.__b)&&c(t);try{e:if("function"==typeof C){if(y=t.props,D=(c=C.contextType)&&r[c.__c],b=c?D?D.props.value:c.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(y,b):(t.__c=d=new S(y,b),d.constructor=C,d.render=O),D&&D.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=r,p=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=v({},d.__s)),v(d.__s,C.getDerivedStateFromProps(y,d.__s))),f=d.props,h=d.state,p)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||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&&s.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,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,g)}))}d.context=b,d.props=y,d.state=d.__s,(c=i.__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==E&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=v(v({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(f,h)),R(e,t,n,r,o,a,s,l,u),d.base=t.__e,d.__h.length&&s.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=P(n.__e,t,n,r,o,a,s,u);(c=i.diffed)&&c(t)}catch(e){t.__v=null,i.__e(e,t,n)}return t.__e}function I(e,t){i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function P(e,t,n,r,o,i,a,s){var l,u,c,d,h,v=n.props,g=t.props;if(o="svg"===t.type||o,null!=i)for(l=0;l<i.length;l++)if(null!=(u=i[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,i[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),i=null,s=!1}if(null===t.type)v!==g&&e.data!=g&&(e.data=g);else{if(null!=i&&(i=f.slice.call(e.childNodes)),c=(v=n.props||p).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(v===p)for(v={},h=0;h<e.attributes.length;h++)v[e.attributes[h].name]=e.attributes[h].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||M(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||M(e,i,t[i],n[i],r)})(e,g,v,o,s),d?t.__k=[]:(t.__k=t.props.children,R(e,t,n,r,"foreignObject"!==t.type&&o,i,a,p,s)),s||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&M(e,"value",l,v.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&M(e,"checked",l,v.checked,!1))}return e}function N(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){i.__e(e,n)}}function H(e,t,n){var r,o,a;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||N(r,null,t)),n||"function"==typeof e.type||(n=null!=(o=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&H(r[a],t,n);null!=o&&g(o)}function O(e,t,n){return this.constructor(e,n)}function A(e,t,n){var r,o,a;i.__&&i.__(e,t),o=(r=n===c)?null:n&&n.__k||t.__k,e=m(E,null,[e]),a=[],_(t,(r?t:n||t).__k=e,o||p,p,void 0!==t.ownerSVGElement,n&&!r?[n]:o?null:f.slice.call(t.childNodes),a,n||p,r),I(a,e)}i={__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 C(n.__E=n)}catch(t){e=t}throw e}},S.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),C(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},S.prototype.render=E,a=[],s=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=p,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:S,createElement:m,render:A,createRef:function(){return{}},Fragment:E,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,o=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=o,t},this.shouldComponentUpdate=function(e){o.props.value!==e.value&&r.some((function(t){t.context=e.value,C(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 o=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&o.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=i.debounceRendering,t=[];i.debounceRendering=function(e){t.push(e)},A(m(U,{}),document.createElement("div"));for(;t.length;)t.shift()();i.debounceRendering=e}};var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return m("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(S);var L=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 W(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(z(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function z(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function F(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o++)for(var i=n[o].querySelectorAll(t),a=0;a<i.length;a++)r.push(i[a]);return r}var B=/(top|left|right|bottom|width|height)$/i;function j(e,t){for(var n in t)G(e,n,t[n])}function G(e,t,n){null==n?e.style[t]="":"number"==typeof n&&B.test(t)?e.style[t]=n+"px":e.style[t]=n}function q(e){e.preventDefault()}function Y(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function Z(e,t,n,r){var o=Y(n,r);return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}var X=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function K(e,t){var n=function(r){t(r),X.forEach((function(t){e.removeEventListener(t,n)}))};X.forEach((function(t){e.addEventListener(t,n)}))}var J=0;function $(){return String(J++)}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",q)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",q)}function re(e){e.addEventListener("contextmenu",q)}function oe(e){e.removeEventListener("contextmenu",q)}function ie(e){var t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t++)"string"==typeof(n=o[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 ae(e,t,n){var r,o;for(r=0;r<n.length;r++)if(o=se(e,t,n[r]))return o;return 0}function se(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 pe(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 fe=["sun","mon","tue","wed","thu","fri","sat"];function he(e,t){var n=ke(e);return n[2]+=7*t,Me(n)}function ve(e,t){var n=ke(e);return n[2]+=t,Me(n)}function ge(e,t){var n=ke(e);return n[6]+=t,Me(n)}function me(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function Ee(e,t){var n=be(e),r=be(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function Se(e,t){var n=De(e,t);return null!==n&&n%7==0?n/7:null}function De(e,t){return _e(e)===_e(t)?Math.round(ye(e,t)):null}function be(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Ce(e,t,n,r){var o=Me([t,0,1+we(t,n,r)]),i=be(e),a=Math.round(ye(o,i));return Math.floor(a/7)+1}function we(e,t,n){var r=7+t-n;return-((7+Me([e,0,r]).getUTCDay()-t)%7)+r-1}function Re(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Te(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 ke(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Me(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function xe(e){return!isNaN(e.valueOf())}function _e(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:$(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Pe=Object.prototype.hasOwnProperty;function Ne(e,t){var n={};if(t)for(var r in t){for(var o=[],i=e.length-1;i>=0;i--){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=Ne(o))}for(i=e.length-1;i>=0;i--){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function He(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Oe(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Ae(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function Ue(e){var t=[];for(var n in e)t.push(e[n]);return t}function Le(e,t){if(e===t)return!0;for(var n in e)if(Pe.call(e,n)&&!(n in t))return!1;for(var n in t)if(Pe.call(t,n)&&e[n]!==t[n])return!1;return!0}function We(e,t){var n=[];for(var r in e)Pe.call(e,r)&&(r in t||n.push(r));for(var r in t)Pe.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)||!ze(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function ze(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Fe(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;i<n;i+=r){var a=e[i];void 0!==a&&o.push(a)}return o}function Be(e,t,n){var r=n.dateEnv,o=n.pluginHooks,i=n.options,a=e.defs,s=e.instances;for(var l in s=He(s,(function(e){return!a[e.defId].recurringDef})),a){var u=a[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);for(var d=0,p=je(u,c,t,r,o.recurringTypes);d<p.length;d++){var f=p[d],h=Ie(l,{start:f,end:r.add(f,c)});s[h.instanceId]=h}}}return{defs:a,instances:s}}function je(e,t,n,r,o){var i=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(i=i.map(be)),i}var Ge=["years","months","days","milliseconds"],qe=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Ye(e,t){var n;return"string"==typeof e?function(e){var t=qe.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?Ze(e):"number"==typeof e?Ze(((n={})[t||"milliseconds"]=e,n)):null}function Ze(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 Xe(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ke(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Je(e){return $e(e)/864e5}function $e(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<Ge.length;r++){var o=Ge[r];if(t[o]){var i=e[o]/t[o];if(!de(i)||null!==n&&n!==i)return null;n=i}else if(e[o])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),o=Math.floor(r/60),i=Math.round(r%60);return t?n+ue(o,2)+":"+ue(i,2):"GMT"+n+o+(i?":"+ue(i,2):"")}function ot(e,t,n){if(e===t)return!0;var r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function it(e,t,n){var r,o;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(r){if(!ot(r,i)){n&&n(o);var s=e.apply(this,i);t&&t(s,o)||(o=s)}}else o=e.apply(this,i);return r=i,o}}function at(e,t,n){var r,o;return function(i){if(r){if(!Le(r,i)){n&&n(o);var a=e.call(this,i);t&&t(a,o)||(o=a)}}else o=e.call(this,i);return r=i,o}}var st={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,pt=/\u200e/g,ft=/UTC|GMT/,ht=function(){function e(e){var t={},n={},r=0;for(var o in e)o in st?(n[o]=e[o],r=Math.max(st[o],r)):(t[o]=e[o],o in lt&&(r=Math.max(lt[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=it(vt)}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 o=this.standardDateProps,i=this.extendedSettings,a=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(_e(e)!==_e(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!a)return this.format(e,n);var s=a;!(s>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(s=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=vt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(o,s),i,n),d=c(e),p=c(t),f=function(e,t,n,r){var o=0;for(;o<e.length;){var i=e.indexOf(t,o);if(-1===i)break;var a=e.substr(0,i);o=i+t.length;for(var s=e.substr(o),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(a===c&&s===d)return{before:a,after:s}}}return null}(l,d,u,p),h=i.separator||r||n.defaultSeparator||"";return f?f.before+d+h+p+f.after:l+h+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 vt(e,t,n){var o=Object.keys(e).length;return 1===o&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===o&&t.week?function(e){return function(e,t,n,r){var o=[];"narrow"===r?o.push(t):"short"===r&&o.push(t," ");o.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&o.reverse();return o.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 o,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var a=r({},e);delete a.minute,o=new Intl.DateTimeFormat(n.locale.codes,a)}return function(r){var a=r.marker;return function(e,t,n,r,o){e=e.replace(pt,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(ft,(function(){return n=!0,t})),n||(e+=" "+t);return e}(e,"UTC"===o.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()})));return e=(e=e.replace(dt," ")).trim()}((o&&!a.getUTCMinutes()?o:i).format(a),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 mt(e,t,n,r){var o=gt(e,n.calendarSystem);return{date:o,start:o,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,mt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,mt(e,t,n,r))},e}(),Et=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(mt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(mt(e,t,n,r))},e}();function St(e){return"object"==typeof e&&e?new ht(e):"string"==typeof e?new yt(e):"function"==typeof e?new Et(e):void 0}var Dt={navLinkDayClick:_t,navLinkWeekClick:_t,duration:Ye,bootstrapFontAwesome:_t,buttonIcons:_t,customButtons:_t,defaultAllDayEventDuration:Ye,defaultTimedEventDuration:Ye,nextDayThreshold:Ye,scrollTime:Ye,slotMinTime:Ye,slotMaxTime:Ye,dayPopoverFormat:St,slotDuration:Ye,snapDuration:Ye,headerToolbar:_t,footerToolbar:_t,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:St,dayHeaderClassNames:_t,dayHeaderContent:_t,dayHeaderDidMount:_t,dayHeaderWillUnmount:_t,dayCellClassNames:_t,dayCellContent:_t,dayCellDidMount:_t,dayCellWillUnmount:_t,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:_t,weekNumbers:Boolean,weekNumberClassNames:_t,weekNumberContent:_t,weekNumberDidMount:_t,weekNumberWillUnmount:_t,editable:Boolean,viewClassNames:_t,viewDidMount:_t,viewWillUnmount:_t,nowIndicator:Boolean,nowIndicatorClassNames:_t,nowIndicatorContent:_t,nowIndicatorDidMount:_t,nowIndicatorWillUnmount:_t,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:_t,locale:_t,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:_t,eventOrder:ie,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:_t,contentHeight:_t,direction:String,weekNumberFormat:St,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:_t,initialDate:_t,now:_t,eventDataTransform:_t,stickyHeaderDates:_t,stickyFooterScrollbar:_t,viewHeight:_t,defaultAllDay:Boolean,eventSourceFailure:_t,eventSourceSuccess:_t,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:_t,eventConstraint:_t,eventAllow:_t,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:_t,eventContent:_t,eventDidMount:_t,eventWillUnmount:_t,selectConstraint:_t,selectOverlap:_t,selectAllow:_t,droppable:Boolean,unselectCancel:String,slotLabelFormat:_t,slotLaneClassNames:_t,slotLaneContent:_t,slotLaneDidMount:_t,slotLaneWillUnmount:_t,slotLabelClassNames:_t,slotLabelContent:_t,slotLabelDidMount:_t,slotLabelWillUnmount:_t,dayMaxEvents:_t,dayMaxEventRows:_t,dayMinWidth:Number,slotLabelInterval:Ye,allDayText:String,allDayClassNames:_t,allDayContent:_t,allDayDidMount:_t,allDayWillUnmount:_t,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:St,rerenderDelay:Number,moreLinkText:_t,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:_t,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Ye,hiddenDays:_t,monthMode:Boolean,fixedWeekCount:Boolean,validRange:_t,visibleRange:_t,titleFormat:_t,noEventsText:String},bt={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},Ct={datesSet:_t,eventsSet:_t,eventAdd:_t,eventChange:_t,eventRemove:_t,windowResize:_t,eventClick:_t,eventMouseEnter:_t,eventMouseLeave:_t,select:_t,unselect:_t,loading:_t,_unmount:_t,_beforeprint:_t,_afterprint:_t,_noEventDrop:_t,_noEventResize:_t,_resize:_t,_scrollRequest:_t},wt={buttonText:_t,views:_t,plugins:_t,initialEvents:_t,events:_t,eventSources:_t},Rt={headerToolbar:Tt,footerToolbar:Tt,buttonText:Tt,buttonIcons:Tt};function Tt(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?Le(e,t):e===t}var kt={type:String,component:_t,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:_t,usesMinMaxTime:Boolean,classNames:_t,content:_t,didMount:_t,willUnmount:_t};function Mt(e){return Ne(e,Rt)}function xt(e,t){var n={},r={};for(var o in t)o in e&&(n[o]=t[o](e[o]));for(var o in e)o in t||(r[o]=e[o]);return{refined:n,extra:r}}function _t(e){return e}function It(e,t,n,r){for(var o={defs:{},instances:{}},i=Zt(n),a=0,s=e;a<s.length;a++){var l=qt(s[a],t,n,r,i);l&&Pt(l,o)}return o}function Pt(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 Nt(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],o=At(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return{defs:{},instances:{}}}function Ht(){return{defs:{},instances:{}}}function Ot(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function At(e,t){var n=He(e.defs,t),r=He(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Ut(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Lt={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:_t,overlap:_t,allow:_t,className:Ut,classNames:Ut,color:String,backgroundColor:String,borderColor:String,textColor:String};function Wt(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 Vt(e){return e.reduce(zt,Ft)}function zt(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 Ft={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},jt={start:_t,end:_t,date:_t,allDay:Boolean},Gt=r(r(r({},Bt),jt),{extendedProps:_t});function qt(e,t,n,r,o){void 0===o&&(o=Zt(n));var i=Yt(e,n,o),a=i.refined,s=i.extra,l=function(e,t){var n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),u=function(e,t,n,r){for(var o=0;o<r.length;o++){var i=r[o].parse(e,n);if(i){var a=e.allDay;return null==a&&null==(a=t)&&null==(a=i.allDayGuess)&&(a=!1),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:o}}}return null}(a,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Xt(a,s,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 o,i,a=e.allDay,s=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(c))s=o.marker;else if(!r)return null;null!=e.end&&(i=n.dateEnv.createMarkerMeta(e.end));null==a&&(a=null!=t?t:(!o||o.isTimeUnspecified)&&(!i||i.isTimeUnspecified));a&&s&&(s=be(s));i&&(u=i.marker,a&&(u=be(u)),s&&u<=s&&(u=null));u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(s,a?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration));return{allDay:a,hasEnd:l,range:{start:s,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:i?i.forcedTzo:null}}(a,l,n,r);return d?{def:c=Xt(a,s,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Yt(e,t,n){return void 0===n&&(n=Zt(t)),xt(e,n)}function Zt(e){return r(r(r({},Lt),Gt),e.pluginHooks.eventRefiners)}function Xt(e,t,n,o,i,a){for(var s={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:$(),sourceId:n,allDay:o,hasEnd:i,ui:Wt(e,a),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=a.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(s,c(e))}return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=be(e.start);return{start:n,end:ve(n,t)}}function Jt(e,t){void 0===t&&(t=Ye(0));var n=null,r=null;if(e.end){r=be(e.end);var o=e.end.valueOf()-r.valueOf();o&&o>=$e(t)&&(r=ve(r,1))}return e.start&&(n=be(e.start),r&&r<=n&&(r=ve(n,1))),{start:n,end:r}}function $t(e){var t=Jt(e);return ye(t.start,t.end)>1}function Qt(e,t,n,r){return"year"===r?Ye(n.diffWholeYears(e,t),"year"):"month"===r?Ye(n.diffWholeMonths(e,t),"month"):Ee(e,t)}function en(e,t){var n,r,o=[],i=t.start;for(e.sort(tn),n=0;n<e.length;n++)(r=e[n]).start>i&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return i<t.end&&o.push({start:i,end:t.end}),o}function tn(e,t){return e.start.valueOf()-t.start.valueOf()}function nn(e,t){var n=e.start,r=e.end,o=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)&&(o={start:n,end:r}),o}function rn(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 on(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function an(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 ln(e,t,n,r){var o={},i={},a={},s=[],l=[],u=pn(e.defs,t);for(var c in e.defs){"inverse-background"===(f=u[(S=e.defs[c]).defId]).display&&(S.groupId?(o[S.groupId]=[],a[S.groupId]||(a[S.groupId]=S)):i[c]=[])}for(var d in e.instances){var p=e.instances[d],f=u[(S=e.defs[p.defId]).defId],h=p.range,v=!S.allDay&&r?Jt(h,r):h,g=nn(v,n);g&&("inverse-background"===f.display?S.groupId?o[S.groupId].push(g):i[p.defId].push(g):"none"!==f.display&&("background"===f.display?s:l).push({def:S,ui:f,instance:p,range:g,isStart:v.start&&v.start.valueOf()===g.start.valueOf(),isEnd:v.end&&v.end.valueOf()===g.end.valueOf()}))}for(var m in o)for(var y=0,E=en(o[m],n);y<E.length;y++){var S,D=E[y];f=u[(S=a[m]).defId];s.push({def:S,ui:f,instance:null,range:D,isStart:!1,isEnd:!1})}for(var c in i)for(var b=0,C=en(i[c],n);b<C.length;b++){D=C[b];s.push({def:e.defs[c],ui:u[c],instance:null,range:D,isStart:!1,isEnd:!1})}return{bg:s,fg:l}}function un(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function cn(e,t){e.fcSeg=t}function dn(e){return e.fcSeg||e.parentNode.fcSeg||null}function pn(e,t){return Oe(e,(function(e){return fn(e,t)}))}function fn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Vt(n)}function hn(e,t){var n=e.map(vn);return n.sort((function(e,n){return ae(e,n,t)})),n.map((function(e){return e._seg}))}function vn(e){var t=e.eventRange,n=t.def,o=t.instance?t.instance.range:t.range,i=o.start?o.start.valueOf():0,a=o.end?o.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function gn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,o=r.def,i=r.ui,a=i.startEditable,s=0,l=n;s<l.length;s++){a=(0,l[s])(a,o,i,t)}return a}function mn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function yn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function En(e,t,n,r,o,i,a){var s=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,p=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==o),u&&!d.allDay&&(e.isStart||e.isEnd)){var f=i||(e.isStart?p.range.start:e.start||e.eventRange.range.start),h=a||(e.isEnd?p.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?s.formatRange(f,h,t,{forcedStartTzo:i?null:p.forcedStartTzo,forcedEndTzo:a?null:p.forcedEndTzo}):s.format(f,t,{forcedTzo:i?null:p.forcedStartTzo})}return""}function Sn(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 Dn(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 bn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var Cn={start:_t,end:_t,allDay:Boolean};function wn(e,t,n){var o=function(e,t){var n=xt(e,Cn),o=n.refined,i=n.extra,a=o.start?t.createMarkerMeta(o.start):null,s=o.end?t.createMarkerMeta(o.end):null,l=o.allDay;null==l&&(l=a&&a.isTimeUnspecified&&(!s||s.isTimeUnspecified));return r({range:{start:a?a.marker:null,end:s?s.marker:null},allDay:l},i)}(e,t),i=o.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return o}function Rn(e,t){return rn(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({},kn(e,t,n)),{timeZone:t.timeZone})}function kn(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 Mn(e,t,n){var r=Yt({editable:!1},n),o=Xt(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:fn(o,t),instance:Ie(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function xn(e,t,n){n.emitter.trigger("select",r(r({},_n(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function _n(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.dateSpanTransforms;a<s.length;a++){var l=s[a];r(i,l(e,t))}return r(i,(n=e,o=t.dateEnv,r(r({},kn(n.range,o,n.allDay)),{allDay:n.allDay}))),i}function In(e,t,n){var r=n.dateEnv,o=n.options,i=t;return e?(i=be(i),i=r.add(i,o.defaultAllDayEventDuration)):i=r.add(i,o.defaultTimedEventDuration),i}function Pn(e,t,n,r){var o=pn(e.defs,t),i={defs:{},instances:{}};for(var a in e.defs){var s=e.defs[a];i.defs[a]=Nn(s,o[a],n,r)}for(var l in e.instances){var u=e.instances[l];s=i.defs[u.defId];i.instances[l]=Hn(u,s,o[u.defId],n,r)}return i}function Nn(e,t,n,o){var i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);var a=r(r(r({},e),i),{ui:r(r({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=r(r({},a.extendedProps),n.extendedProps));for(var s=0,l=o.pluginHooks.eventDefMutationAppliers;s<l.length;s++){(0,l[s])(a,n,o)}return!a.hasEnd&&o.options.forceEventDuration&&(a.hasEnd=!0),a}function Hn(e,t,n,o,i){var a=i.dateEnv,s=o.standardProps&&!0===o.standardProps.allDay,l=o.standardProps&&!1===o.standardProps.hasEnd,u=r({},e);return s&&(u.range=Kt(u.range)),o.datesDelta&&n.startEditable&&(u.range={start:a.add(u.range.start,o.datesDelta),end:a.add(u.range.end,o.datesDelta)}),o.startDelta&&n.durationEditable&&(u.range={start:a.add(u.range.start,o.startDelta),end:u.range.end}),o.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:a.add(u.range.end,o.endDelta)}),l&&(u.range={start:u.range.start,end:In(t.allDay,u.range.start,i)}),t.allDay&&(u.range={start:be(u.range.start),end:be(u.range.end)}),u.range.end<u.range.start&&(u.range.end=In(t.allDay,u.range.start,i)),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}(),An={id:String,defaultAllDay:Boolean,url:String,events:_t,eventDataTransform:_t,success:_t,failure:_t};function Un(e,t,n){var r;if(void 0===n&&(n=Ln(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var o=xt(r,n),i=o.refined,a=o.extra,s=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:$(),sourceDefId:s.sourceDefId,meta:s.meta,ui:Wt(i,t),extendedProps:a}}return null}function Ln(e){return r(r(r({},Lt),An),e.pluginHooks.eventSourceRefiners)}function Wn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Vn=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,o([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(),o=r.viewSpecs,i=r.toolbarConfig,a=[].concat(i.viewsWithButtons);for(var s in o)a.push(s);for(t=0;t<a.length;t++)if((n=o[a[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:Wn(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=Ye(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),St(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),St(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(),o=wn(n,r.dateEnv,Ye({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),xn(o,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 zn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Pt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var o,i=this.getCurrentData();if(t instanceof L)o=t.internalEventSource;else if("boolean"==typeof t)t&&(o=Ue(i.eventSources)[0]);else if(null!=t){var a=this.getEventSourceById(t);if(!a)return console.warn('Could not find an event source with ID "'+t+'"'),null;o=a.internalEventSource}var s=qt(e,o,i,!1);if(s){var l=new zn(i,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Pt(s)}),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:Fn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,o=n.instances;for(var i in e=String(e),r){var a=r[i];if(a.publicId===e){if(a.recurringDef)return new zn(t,a,null);for(var s in o){var l=o[s];if(l.defId===a.defId)return new zn(t,a,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Bn(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 L(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 L(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof L)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Un(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new L(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=Ye(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),zn=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 jt)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 Lt){var o=Lt[e](t);"color"===e?o={backgroundColor:t,borderColor:t}:"editable"===e?o={startEditable:t,durationEditable:t}:((r={})[e]=t,o=r),this.mutate({standardProps:{ui:o}})}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 o=Qt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}},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 o=Qt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,o,i,a=this._context.dateEnv,s={allDay:n.allDay},l=a.createMarker(e);if(l&&((null==t||(r=a.createMarker(t)))&&this._instance)){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Qt(u.start,l,a,n.granularity);if(r){var d=Qt(u.end,r,a,n.granularity);i=d,(o=c).years===i.years&&o.months===i.months&&o.days===i.days&&o.milliseconds===i.milliseconds?this.mutate({datesDelta:c,standardProps:s}):this.mutate({startDelta:c,endDelta:d,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:c,standardProps:s})}},e.prototype.moveStart=function(e){var t=Ye(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=Ye(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=Ye(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=St(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,o=this._context,i=Nt(o.getCurrentData().eventStore,n.instanceId);i=Pn(i,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,o);var a=new e(o,r,n);this._def=i.defs[r.defId],this._instance=i.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:i}),o.emitter.trigger("eventChange",{oldEvent:a,event:this,relatedEvents:Bn(i,o,n),revert:function(){o.dispatch({type:"REMOVE_EVENTS",eventStore:i})}})}},e.prototype.remove=function(){var e=this._context,t=Fn(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 L(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,o=this.startStr,i=this.endStr,a={};return t.title&&(a.title=t.title),o&&(a.start=o),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&"auto"!==n.display&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(a,t.extendedProps):a.extendedProps=t.extendedProps),a},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Fn(e){var t,n,r=e._def,o=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:o?(n={},n[o.instanceId]=o,n):{}}}function Bn(e,t,n){var r=e.defs,o=e.instances,i=[],a=n?n.instanceId:"";for(var s in o){var l=o[s],u=r[l.defId];l.instanceId!==a&&i.push(new zn(t,u,l))}return i}var jn={};var Gn,qn=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 Me(e)},e.prototype.markerToArray=function(e){return ke(e)},e}();Gn=qn,jn["gregory"]=Gn;var Yn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Zn(e){var t=Yn.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(xe(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 Xn=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 jn[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()):Me(Re(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=Me(e)),null!==t&&xe(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Zn(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 _e(e)===_e(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 _e(e)===_e(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=Se(e,t))?{unit:"week",value:n}:null!==(n=De(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/(Je(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Je(e)/30}(n):n.days&&null!==(r=De(e,t))?r/Je(n):(t.valueOf()-e.valueOf())/$e(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?be(e):"hour"===t?function(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Me([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(),o=Ce(e,r,t,n);if(o<1)return Ce(e,r-1,t,n);var i=Ce(e,r+1,t,n);return i>=1?Math.min(o,i):o}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=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?Me(Re(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Me(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Te(ke(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ke(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Te(ke(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(ke(e))*60):new Date(e.valueOf()-(t||0))},e}(),Kn=[],Jn={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 $n(e){for(var t=e.length>0?e[0].code:"en",n=Kn.concat(e),r={en:Jn},o=0,i=n;o<i.length;o++){var a=i[o];r[a.code]=a}return{map:r,defaultCode:t}}function Qn(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("-"),o=r.length;o>0;o--){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Jn;return er(e,n,r)}(e,t):er(e.code,[e.code],e)}function er(e,t,n){var r=Ne([Jn,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function tr(e){var t=Qn(e.locale||"en",$n([]).map);return new Xn(r(r({timeZone:bt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var nr,rr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function or(e,t){return It(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return r(r({},rr),e)}))}(e),null,t)}function ir(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ar(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 sr(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 lr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ur(e,t){return{left:e.left-t.left,top:e.top-t.top}}function cr(){return null==nr&&(nr=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}()),nr}var dr={defs:{},instances:{}},pr=function(){function e(){this.getKeysForEventDefs=it(this._getKeysForEventDefs),this.splitDateSelection=it(this._splitDateSpan),this.splitEventStore=it(this._splitEventStore),this.splitIndividualUi=it(this._splitIndividualUi),this.splitEventDrag=it(this._splitInteraction),this.splitEventResize=it(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Oe(n,(function(e,n){return t.eventUiBuilders[n]||it(fr)})),n){var d=n[c],p=a[c]||dr,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:o[c]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],d.ui,i[c]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Oe(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,o={};for(var i in n)for(var a=0,s=t[i];a<s.length;a++){o[p=s[a]]||(o[p]={defs:{},instances:{}}),o[p].defs[i]=n[i]}for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var p;o[p=d[c]]&&(o[p].instances[l]=u)}return o},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var o=0,i=t[r];o<i.length;o++){var a=i[o];n[a]||(n[a]={}),n[a][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),o=this._splitEventStore(e.mutatedEvents,r),i=function(r){t[r]||(t[r]={affectedEvents:n[r]||dr,mutatedEvents:o[r]||dr,isEvent:e.isEvent})};for(var a in n)i(a);for(var a in o)i(a)}return t},e}();function fr(e,t,n){var o=[];e&&o.push(e),t&&o.push(t);var i={"":Vt(o)};return n&&r(i,n),i}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 vr(e,t){var n=["fc-day","fc-day-"+fe[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 gr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,yr=null;function Er(){return null===yr&&(yr=function(){var e=document.createElement("div");j(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 W(e),t}()),yr}function Sr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=Dr(e);return document.body.removeChild(e),t}()),mr}function Dr(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,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=Dr(e),l=s.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:s.x-i-a,scrollbarLeft:0,scrollbarRight:0};return Er()&&"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 Cr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():wr(e),o=br(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function wr(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 Rr(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 Tr(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var kr=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]||[],o=this.options&&this.options[e],i=[].concat(o||[],r),a=0,s=i;a<s.length;a++){var l=s[a];l.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}();var Mr=function(){function e(e,t,n,r){this.els=t;var o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,o=n.length;for(t=0;t<o;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,o=n.length;for(t=0;t<o;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}(),xr=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}(),_r=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}(xr),Ir=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}(xr),Pr=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(Pr.prototype.classes={},Pr.prototype.iconClasses={},Pr.prototype.baseIconClass="",Pr.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Nr=FullCalendarVDom.Component,Hr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Ar=FullCalendarVDom.createRef,Ur=FullCalendarVDom.Fragment,Lr=FullCalendarVDom.createContext,Wr=FullCalendarVDom.flushToDom,Vr=function(){function e(e,t,n){var o=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){o.queuedRequest=r({},o.queuedRequest||{},e),o.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}(),zr=Lr({});function Fr(e,t,n,r,o,i,a,s,l,u,c,d,p){return{dateEnv:o,options:n,pluginHooks:a,emitter:u,dispatch:s,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:i,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new Vr(e,u,Ye(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:p}}var Br=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(We(e,this.props),We(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Gr,t.addStateEquality=qr,t.contextType=zr,t}(Nr);Br.prototype.propEquality={},Br.prototype.stateEquality={};var jr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=zr,t}(Br);function Gr(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function qr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function Yr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Zr(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,i){if(t&&n===t.latestFetchId){var a=It(function(e,t,n){var r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;o&&(e=Xr(e,o));r&&(e=Xr(e,r));return e}(o,t,i),t,i);return r&&(a=Be(a,r,i)),Ot(Kr(e,t.sourceId),a)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Be(t,n,r));return Ot(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"MERGE_EVENTS":return Ot(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Be(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,o={},i={};for(var a in n)t.defs[a]||(o[a]=n[a]);for(var s in r)!t.instances[s]&&o[r[s].defId]&&(i[s]=r[s]);return{defs:o,instances:i}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Kr(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return At(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Xr(e,t){var n;if(t){n=[];for(var r=0,o=e;r<o.length;r++){var i=o[r],a=t(i);a?n.push(a):null==a&&n.push(i)}}else n=e;return n}function Kr(e,t){return At(e,(function(e){return e.sourceId!==t}))}function Jr(e,t){return $r({eventDrag:e},t)}function $r(e,t){var n=t.getCurrentData(),o=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Qr)(o,t)}function Qr(e,t,n,o){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,o){var i=t.getCurrentData(),a=e.eventDrag,s=a.mutatedEvents,l=s.defs,u=s.instances,c=pn(l,a.isEvent?e.eventUiBases:{"":i.selectionConfig});o&&(c=Oe(c,o));var d=(v=e.eventStore,g=a.affectedEvents.instances,{defs:v.defs,instances:He(v.instances,(function(e){return!g[e.instanceId]}))}),p=d.defs,f=d.instances,h=pn(p,e.eventUiBases);var v,g;for(var m in u){var y=u[m],E=y.range,S=c[y.defId],D=l[y.defId];if(!eo(S.constraints,E,d,e.businessHours,t))return!1;var b=t.options.eventOverlap,C="function"==typeof b?b:null;for(var w in f){var R=f[w];if(on(E,R.range)){if(!1===h[R.defId].overlap&&a.isEvent)return!1;if(!1===S.overlap)return!1;if(C&&!C(new zn(t,p[R.defId],R),new zn(t,D,y)))return!1}}for(var T=i.eventStore,k=0,M=S.allows;k<M.length;k++){var x=M[k],_=r(r({},n),{range:y.range,allDay:D.allDay}),I=T.defs[D.defId],P=T.instances[m],N=void 0;if(N=I?new zn(t,I,P):new zn(t,D),!x(_n(_,t),N))return!1}}return!0}(e,t,n,o))&&!(e.dateSelection&&!function(e,t,n,o){var i=e.eventStore,a=i.defs,s=i.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;o&&(c=o(c));if(!eo(c.constraints,u,i,e.businessHours,t))return!1;var d=t.options.selectOverlap,p="function"==typeof d?d:null;for(var f in s){var h=s[f];if(on(u,h.range)){if(!1===c.overlap)return!1;if(p&&!p(new zn(t,a[h.defId],h),null))return!1}}for(var v=0,g=c.allows;v<g.length;v++){var m=g[v],y=r(r({},n),l);if(!m(_n(y,t),null))return!1}return!0}(e,t,n,o))}function eo(e,t,n,r,o){for(var i=0,a=e;i<a.length;i++){if(!ro(to(a[i],t,n,r,o),t))return!1}return!0}function to(e,t,n,r,o){return"businessHours"===e?no(Be(r,t,o)):"string"==typeof e?no(At(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?no(Be(e,t,o)):[]}function no(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ro(e,t){for(var n=0,r=e;n<r.length;n++){if(an(r[n],t))return!0}return!1}var oo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=$(),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(!an(t.validRange,n[r].range))return!1;return Jr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t,n,r=this.props.dateProfile;return!(r&&!an(r.validRange,e.range))&&(t=e,n=this.context,$r({dateSelection:t},n))},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}(jr);function io(e){return{id:$(),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||{}}}function ao(){var e,t=[],n=[];return function(o,i){return e&&ot(o,t)&&ot(i,n)||(e=function(e,t){var n={},o={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 i(e){for(var t=0,a=e;t<a.length;t++){var s=a[t];n[s.id]||(n[s.id]=!0,i(s.deps),u=s,o={reducers:(l=o).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&&i(e),i(t),o}(o,i)),t=o,n=i,e}}var so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Pr);function lo(e,t,n,o){if(t[e])return t[e];var i=function(e,t,n,o){var i=n[e],a=o[e],s=function(e){return i&&null!==i[e]?i[e]:a&&null!==a[e]?a[e]:null},l=s("component"),u=s("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=lo(u,t,n,o)}!l&&c&&(l=c.component);if(!l)return null;return{type:e,component:l,defaults:r(r({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),a?a.rawOptions:{})}}(e,t,n,o);return i&&(t[e]=i),i}so.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},so.prototype.baseIconClass="fc-icon",so.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"},so.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},so.prototype.iconOverrideOption="buttonIcons",so.prototype.iconOverrideCustomButtonOption="icon",so.prototype.iconOverridePrefix="fc-icon-";var uo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ar(),t.handleRootEl=function(e){Yr(t.rootElRef,e),t.props.elRef&&Yr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Hr(ho,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Hr(po,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,o){return t.children(r,go(t.classNames,n),e,o)}))}))},t}(jr),co=Lr(0);function po(e){return Hr(co.Consumer,null,(function(t){return Hr(fo,r({renderId:t},e))}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Ar(),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=mo(t.content,t.hookProps),o=null;if(void 0===r&&(r=mo(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var i in e)if(void 0!==r[i]){n=this.customContentInfo={contentKey:i,contentVal:r[i],handler:e[i]()};break}o=n?[]:r}return o},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(jr),ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&Yr(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}(jr);function vo(){var e,t,n=[];return function(r,o){return t&&Le(t,o)&&r===e||(e=r,t=o,n=go(r,o)),n}}function go(e,t){return"function"==typeof e&&(e=e(t)),Ut(e)}function mo(e,t){return"function"==typeof e?e(t,Hr):e}var yo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=vo(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},o=this.normalizeClassNames(n.viewClassNames,r);return Hr(ho,{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(o))}))},t}(jr);function Eo(e){return Oe(e,So)}function So(e){var t,n="function"==typeof e?{component:e}:e,o=n.component;return n.content&&(t=n,o=function(e){return Hr(zr.Consumer,null,(function(n){return Hr(yo,{viewSpec:n.viewSpec},(function(o,i){var a=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Hr(uo,{hookProps:a,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:o},(function(e,t,n,r){return Hr("div",{className:i.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:o,rawOptions:n}}function Do(e,t,n,o){var i=Eo(e),a=Eo(t.views);return Oe(function(e,t){var n,r={};for(n in e)lo(n,r,e,t);for(n in t)lo(n,r,e,t);return r}(i,a),(function(e){return function(e,t,n,o,i){var a=e.overrides.duration||e.defaults.duration||o.duration||n.duration,s=null,l="",u="",c={};if(a&&(s=function(e){var t=JSON.stringify(e),n=bo[t];void 0===n&&(n=Ye(e),bo[t]=n);return n}(a))){var d=et(s);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var p=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:s,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:p(o)||p(n)||e.overrides.buttonText,buttonTextDefault:p(i)||e.defaults.buttonText||p(bt)||e.type}}(e,a,t,n,o)}))}var bo={};var Co=function(){function e(e){this.props=e,this.nowDate=Wn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,o,i,a,s,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),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),d.showNonCurrentDates||(s=nn(s,o.range)),s=nn(s=this.adjustActiveRange(s),r),l=on(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=et(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Ye({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(Je(o)<0&&(a=be(a),a=n.add(a,o)),Je(i)>1&&(s=ve(s=be(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,u=s.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&$e(c)<$e(n)?et(c).unit:r}function d(){o=l.startOf(e,u),i=l.add(o,n),a={start:o,end:i}}return Je(n)<=1&&this.isHiddenDay(o)&&(o=be(o=this.skipHiddenDays(o,t))),d(),this.trimHiddenDays(a)||(e=this.skipHiddenDays(e,t),d()),a},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,o=this.props,i=o.dateEnv,a=o.dateAlignment,s=0,l=e;a&&(l=i.startOf(l,a)),l=be(l),r=l=this.skipHiddenDays(l,t);do{r=ve(r,1),this.isHiddenDay(r)||s++}while(s<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,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.props.dateIncrement;return n||((t=this.props.dateAlignment)?Ye(1,t):e||Ye({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,o=null,i=null,n.start&&(o=r.createMarker(n.start)),n.end&&(i=r.createMarker(n.end)),o||i?o&&i&&i<o?null:{start:o,end:i}:null);return t&&(t=Jt(t)),t}var n,r,o,i;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=ve(e,t);return e},e}();function wo(e,t,n){var r=t?t.activeRange:null;return ko({},function(e,t){var n=Ln(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(var i=0,a=r;i<a.length;i++){var s=Un(a[i],t,n);s&&o.push(s)}return o}(e,n),r,n)}function Ro(e,t,n,o){var i,a,s=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return ko(e,t.sources,s,o);case"REMOVE_EVENT_SOURCE":return i=e,a=t.sourceId,He(i,(function(e){return e.sourceId!==a}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Mo(e,s,o):e;case"FETCH_EVENT_SOURCES":return xo(e,t.sourceIds?Ae(t.sourceIds):Io(e,o),s,o);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,o){var i,a=e[t];if(a&&n===a.latestFetchId)return r(r({},e),((i={})[t]=r(r({},a),{isFetching:!1,fetchRange:o}),i));return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function To(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function ko(e,t,n,o){for(var i={},a=0,s=t;a<s.length;a++){var l=s[a];i[l.sourceId]=l}return n&&(i=Mo(i,n,o)),r(r({},e),i)}function Mo(e,t,n){return xo(e,He(e,(function(e){return function(e,t,n){return Po(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 xo(e,t,n,r){var o={};for(var i in e){var a=e[i];t[i]?o[i]=_o(a,n,r):o[i]=a}return o}function _o(e,t,n){var o=n.options,i=n.calendarApi,a=n.pluginHooks.eventSourceDefs[e.sourceDefId],s=$();return a.fetch({eventSource:e,range:t,context:n},(function(r){var a=r.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,r.xhr)||a),e.success&&(a=e.success.call(i,a,r.xhr)||a),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:a})}),(function(r){console.warn(r.message,r),o.eventSourceFailure&&o.eventSourceFailure.call(i,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:s})}function Io(e,t){return He(e,(function(e){return Po(e,t)}))}function Po(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function No(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Ho(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Oo(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 Ao(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 Uo(e,t,n,r,o){var i=[];return{headerToolbar:e.headerToolbar?Lo(e.headerToolbar,e,t,n,r,o,i):null,footerToolbar:e.footerToolbar?Lo(e.footerToolbar,e,t,n,r,o,i):null,viewsWithButtons:i}}function Lo(e,t,n,r,o,i,a){return Oe(e,(function(e){return function(e,t,n,r,o,i,a){var s="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,p=void 0,f=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(p=r.getCustomButtonIconClass(t))||(p=r.getIconClass(e,s))||(f=t.text)):(n=o[e])?(a.push(e),d=function(){i.changeView(e)},(f=n.buttonTextOverride)||(p=r.getIconClass(e,s))||(f=n.buttonTextDefault)):i[e]&&(d=function(){i[e]()},(f=u[e])||(p=r.getIconClass(e,s))||(f=c[e])),{buttonName:e,buttonClick:d,buttonIcon:p,buttonText:f}}))}))}(e,t,n,r,o,i,a)}))}function Wo(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Vo(t)}(t,n):i=Vo(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function Vo(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function zo(e,t){for(var n=Ue(t.getCurrentData().eventSources),r=[],o=0,i=e;o<i.length;o++){for(var a=i[o],s=!1,l=0;l<n.length;l++)if(n[l]._raw===a){n.splice(l,1),s=!0;break}s||r.push(a)}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 p=0,f=r;p<f.length;p++){var h=f[p];t.calendarApi.addEventSource(h)}}var Fo=[io({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),io({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;Tr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),io({eventSourceRefiners:{method:String,extraParams:_t,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 o=e.eventSource.meta,i=function(e,t,n){var o,i,a,s,l=n.dateEnv,u=n.options,c={};null==(o=e.startParam)&&(o=u.startParam);null==(i=e.endParam)&&(i=u.endParam);null==(a=e.timeZoneParam)&&(a=u.timeZoneParam);s="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};r(c,s),c[o]=l.formatIso(t.start),c[i]=l.formatIso(t.end),"local"!==l.timeZone&&(c[a]=l.timeZone);return c}(o,e.range,e.context);Wo(o.method,o.url,i,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),io({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&&(o=e.endTime,i=e.startTime,r={years:o.years-i.years,months:o.months-i.months,days:o.days-i.days,milliseconds:o.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var o,i;return null},expand:function(e,t,n){var r=nn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var o=e?Ae(e):null,i=be(n.start),a=n.end,s=[];for(;i<a;){var l=void 0;o&&!o[i.getUTCDay()]||(l=t?r.add(i,t):i,s.push(l)),i=ve(i,1)}return s}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:_t,startTime:Ye,endTime:Ye,duration:Ye,startRecur:_t,endRecur:_t}}),io({optionChangeHandlers:{events:function(e,t){zo([e],t)},eventSources:zo}}),io({contentTypeHandlers:{html:function(){return Bo},domNodes:function(){return jo}},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",Bn(e,t))}}})];function Bo(e,t){e.innerHTML=t}function jo(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!ot(n,r)){for(var o=0,i=r;o<i.length;o++){var a=i[o];e.appendChild(a)}n.forEach(W)}}var Go=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;if(e in n){if(t)delete n[e];else--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}(),qo=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Go(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 Yo(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,St(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=De(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 Zo=function(){function e(e){var t=this;this.computeOptionsData=it(this._computeOptionsData),this.computeCurrentViewData=it(this._computeCurrentViewData),this.organizeRawLocales=it($n),this.buildLocale=it(Qn),this.buildPluginHooks=ao(),this.buildDateEnv=it(Xo),this.buildTheme=it(Ko),this.parseToolbars=it(Uo),this.buildViewSpecs=it(Do),this.buildDateProfileGenerator=at(Jo),this.buildViewApi=it($o),this.buildViewUiProps=at(ti),this.buildEventUiBySource=it(Qo,Le),this.buildEventUiBases=it(ei),this.parseContextBusinessHours=at(ni),this.buildTitle=it(Yo),this.emitter=new kr,this.actionRunner=new qo(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},o=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=o.calendarOptions.initialView||o.pluginHooks.initialView,a=this.computeCurrentViewData(i,o,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(a.options);var s,l,u,c=(s=o.calendarOptions,l=o.dateEnv,null!=(u=s.initialDate)?l.createMarker(u):Wn(s.now,l)),d=a.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var p={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,h=o.pluginHooks.contextInit;f<h.length;f++){(0,h[f])(p)}for(var v=wo(o.calendarOptions,d,p),g={dynamicOptionOverrides:n,currentViewType:i,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(p),eventSources:v,eventUiBases:{},loadingLevel:To(v),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(p).selectionConfig},m=r(r({},p),g),y=0,E=o.pluginHooks.reducers;y<E.length;y++){var S=E[y];r(g,S(null,null,m))}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,o=this.emitter,i=function(e,t){var n;switch(t.type){case"SET_OPTION":return r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n));default:return e}}(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),s=function(e,t){switch(t.type){case"CHANGE_VIEW_TYPE":return t.viewType}return e}(n.currentViewType,e),l=this.computeCurrentViewData(s,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,o.setThisContext(t.calendarApi),o.setOptions(l.options);var u={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:o,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 o;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((o=r.buildPrev(e,n)).isValid)return o;break;case"NEXT":if((o=r.buildNext(e,n)).isValid)return o}return e}(d,e,c=function(e,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return e}}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var p=Ro(n.eventSources,e,d,u),f=To(p),h=Zr(n.eventStore,e,p,d,u),v=f&&!l.options.progressiveEventRendering&&n.renderableEventStore||h,g=this.buildViewUiProps(u),m=g.eventUiSingleBase,y=g.selectionConfig,E=this.buildEventUiBySource(p),S=this.buildEventUiBases(v.defs,m,E),D=n.loadingLevel||0,b=f,C={dynamicOptionOverrides:i,currentViewType:s,currentDate:c,dateProfile:d,eventSources:p,eventStore:h,renderableEventStore:v,selectionConfig:y,eventUiBases:S,loadingLevel:b,businessHours:this.parseContextBusinessHours(u),dateSelection:No(n.dateSelection,e),eventSelection:Ho(n.eventSelection,e),eventDrag:Oo(n.eventDrag,e),eventResize:Ao(n.eventResize,e)},w=r(r({},u),C),R=0,T=a.pluginHooks.reducers;R<T.length;R++){var k=T[R];r(C,k(n,e,w))}!D&&b?o.trigger("loading",!0):D&&!b&&o.trigger("loading",!1),this.state=C,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,o,i,a,s,l,u,c=this.props,d=this.state,p=this.data,f=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),h=this.computeCurrentViewData(d.currentViewType,f,c.optionOverrides,d.dynamicOptionOverrides),v=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,h.options,f.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f),h),d),g=f.pluginHooks.optionChangeHandlers,m=p&&p.calendarOptions,y=f.calendarOptions;if(m&&m!==y)for(var E in m.timeZone!==y.timeZone&&(d.eventSources=v.eventSources=(a=v.eventSources,s=d.dateProfile,l=v,u=s?s.activeRange:null,xo(a,Io(a,l),u,l)),d.eventStore=v.eventStore=(e=v.eventStore,t=p.dateEnv,n=v.dateEnv,o=e.defs,i=Oe(e.instances,(function(e){var i=o[e.defId];return i.allDay||i.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:o,instances:i})),g)m[E]!==y[E]&&g[E](y[E],v);c.onData&&c.onData(v)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),o=r.refinedOptions,i=r.pluginHooks,a=r.localeDefaults,s=r.availableLocaleData;ri(r.extra);var l=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,i,s,o.defaultRangeSeparator),u=this.buildViewSpecs(i.views,e,t,a),c=this.buildTheme(o,i);return{calendarOptions:o,pluginHooks:i,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(o,e,c,u,n),localeDefaults:a,availableRawLocales:s.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Mt([bt,e,t]),o=n.locales,i=n.locale,a=this.organizeRawLocales(o),s=a.map,l=this.buildLocale(i||a.defaultCode,s).options,u=this.buildPluginHooks(e.plugins||[],Fo),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},Dt),Ct),wt),u.listenerRefiners),u.optionRefiners),d={},p=Mt([bt,l,e,t]),f={},h=this.currentCalendarOptionsInput,v=this.currentCalendarOptionsRefined,g=!1;for(var m in p)"plugins"!==m&&(p[m]===h[m]||Rt[m]&&m in h&&Rt[m](h[m],p[m])?f[m]=v[m]:c[m]?(f[m]=c[m](p[m]),g=!0):d[m]=h[m]);return g&&(this.currentCalendarOptionsInput=p,this.currentCalendarOptionsRefined=f),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:a,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var o=t.viewSpecs[e];if(!o)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var i=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r),a=i.refinedOptions;return ri(i.extra),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,monthMode:a.monthMode,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,o,i){var a=Mt([bt,e.optionDefaults,n,o,e.optionOverrides,i]),s=r(r(r(r(r(r({},Dt),Ct),wt),kt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,p={};for(var f in a)a[f]===u[f]?l[f]=c[f]:(a[f]===this.currentCalendarOptionsInput[f]?f in this.currentCalendarOptionsRefined&&(l[f]=this.currentCalendarOptionsRefined[f]):s[f]?l[f]=s[f](a[f]):p[f]=a[f],d=!0);return d&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:p}},e}();function Xo(e,t,n,r,o,i,a,s){var l=Qn(t||a.defaultCode,a.map);return new Xn({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:i.cmdFormatter,defaultSeparator:s})}function Ko(e,t){return new(t.themeClasses[e.themeSystem]||so)(e)}function Jo(e){return new(e.dateProfileGeneratorClass||Co)(e)}function $o(e,t,n){return new On(e,t,n)}function Qo(e){return Oe(e,(function(e){return e.ui}))}function ei(e,t,n){var r={"":t};for(var o in e){var i=e[o];i.sourceId&&n[i.sourceId]&&(r[o]=n[i.sourceId])}return r}function ti(e){var t=e.options;return{eventUiSingleBase:Wt({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:Wt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ni(e){return or(e.options.businessHours,e)}function ri(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var oi=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 Zo({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}(Nr);var ii=function(e){this.timeZoneName=e},ai=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function si(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}function li(e){var t;return(t={})[e.component.uid]=e,t}var ui={},ci=function(){function e(e,t){this.emitter=new kr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),di={},pi={startTime:Ye,duration:Ye,create:Boolean,sourceId:String};function fi(e){var t=xt(e,pi),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 hi=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,o=n.extraClassName,i=!1,a=r.center;return r.left?(i=!0,e=r.left):e=r.start,r.right?(i=!0,t=r.right):t=r.end,Hr("div",{className:[o||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",a||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Hr(vi,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(jr),vi=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 Hr.apply(void 0,o(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,i=[],a=!0,s=0,l=e;s<l.length;s++){var u=l[s],c=u.buttonName,d=u.buttonClick,p=u.buttonText,f=u.buttonIcon;if("title"===c)a=!1,i.push(Hr("h2",{className:"fc-toolbar-title"},t.title));else{var h=f?{"aria-label":c}:{},v=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&v.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;i.push(Hr("button",r({disabled:g,className:v.join(" "),onClick:d,type:"button"},h),p||(f?Hr("span",{className:f}):"")))}}if(i.length>1){var m=a&&n.getClass("buttonGroup")||"";return Hr.apply(void 0,o(["div",{className:m}],i))}return i[0]},t}(jr),gi=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,Yr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",Hr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(jr),mi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=dn(t);if(i&&r.isValidSegDownEl(e.target)){var a=V(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new zn(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=Z(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(ai),yi=function(e){function t(t){var n,r,o,i,a,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){dn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,r=".fc-event",o=s.handleSegEnter,i=s.handleSegLeave,Z(n,"mouseover",r,(function(e,t){if(t!==a){a=t,o(e,t);var n=function(e){a=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=dn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new zn(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(ai),Ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=it(Fr),t.buildViewPropTransformers=it(Di),t.buildToolbarProps=it(Si),t.handleNavLinkClick=Y("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Ar(),t.footerRef=Ar(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=si(e,n),o=[mi,yi].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,ui[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 ui[e.uid]},t.resizeRunner=new Go((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,o=t.options,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Wn(t.options.now,t.dateEnv),t.viewTitle),a=!1,s="";t.isHeightAuto||t.forPrint?s="":null!=o.height?a=!0:null!=o.contentHeight?s=o.contentHeight:e=Math.max(o.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 Hr(zr.Provider,{value:l},n.headerToolbar&&Hr(hi,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},i)),Hr(gi,{liquid:a,height:s,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Hr(hi,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},i)))},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,o=n.options,i=n.calendarApi,a=t.getAttribute("data-navlink");a=a?JSON.parse(a):{};var s=r.createMarker(a.date),l=a.type,u="day"===l?o.navLinkDayClick:"week"===l?o.navLinkWeekClick:null;"function"==typeof u?u.call(i,r.toDate(s),e):("string"==typeof u&&(l=u),i.zoomTo(s,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Hr.apply(void 0,o([Ur,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,o={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=0,a=this.buildViewPropTransformers(t.viewPropsTransformers);i<a.length;i++){var s=a[i];r(o,s.transform(o,e))}var l=n.component;return Hr(l,r({},o))},t}(Br);function Si(e,t,n,r,o,i){var a=n.build(o,void 0,!1),s=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:i,activeButton:e.type,isTodayEnabled:a.isValid&&!sn(t.currentRange,o),isPrevEnabled:s.isValid,isNextEnabled:l.isValid}}function Di(e){return e.map((function(e){return new e}))}var bi=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,o=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return cr()||i.push("fc-liquid-hack"),e.children(i,o,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}(jr);function Ci(e,t){return St(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var wi="fc-col-header-cell",Ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,o=e.theme,i=e.viewApi,a=this.props,s=a.date,l=a.dateProfile,u=hr(s,a.todayRange,null,l),c=[wi].concat(vr(u,o)),d=t.format(s,a.dayHeaderFormat),p=n.navLinks&&!u.isDisabled&&a.colCnt>1?{"data-navlink":gr(s),tabIndex:0}:{},f=r(r(r({date:t.toDate(s),view:i},a.extraHookProps),{text:d}),u);return Hr(uo,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ki,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,o){return Hr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(s),colSpan:a.colSpan},a.extraDataAttrs),Hr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Hr("a",r({ref:n,className:["fc-col-header-cell-cushion",a.isSticky?"fc-sticky":""].join(" ")},p),o)))}))},t}(jr),Ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,o=t.theme,i=t.viewApi,a=t.options,s=ve(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[wi].concat(vr(l,o),e.extraClassNames||[]),c=n.format(s,e.dayHeaderFormat),d=r(r(r(r({date:s},l),{view:i}),e.extraHookProps),{text:c});return Hr(uo,{hookProps:d,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:ki,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(t,n,o,i){return Hr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Hr("div",{className:"fc-scrollgrid-sync-inner"},Hr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(jr);function ki(e){return e.text}var Mi=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Wn(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),o=t.dateEnv.add(r,Ye(1,e.unit)),i=o.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:xi(r)},nextState:{nowDate:o,todayRange:xi(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=zr,t}(Nr);function xi(e){var t=be(e);return{start:t,end:ve(t,1)}}var _i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=it(Ii),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return Hr(Mi,{unit:"day"},(function(e,t){return Hr("tr",null,i&&i(),n.map((function(e){return o?Hr(Ri,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):Hr(Ti,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(jr);function Ii(e,t,n){return e||Ci(t,n)}var Pi=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n<r;)t.isHiddenDay(n)?o.push(a+.5):(a++,o.push(a),i.push(n)),n=ve(n,1);this.dates=i,this.indices=o,this.cnt=i.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(ve(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(o=Math.floor(o))?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}: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}(),Ni=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;n<i.length&&i[n].getUTCDay()!==r;n++);o=Math.ceil(i.length/n)}else o=1,n=i.length;this.rowCnt=o,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 o=n.firstIndex,i=n.lastIndex,a=o;a<=i;){var s=Math.floor(a/t),l=Math.min((s+1)*t,i+1);r.push({row:s,firstCol:a%t,lastCol:(l-1)%t,isStart:n.isStart&&a===o,isEnd:n.isEnd&&l-1===i}),a=l}return r},e}(),Hi=function(){function e(){this.sliceBusinessHours=it(this._sliceBusinessHours),this.sliceDateSelection=it(this._sliceDateSpan),this.sliceEventStore=it(this._sliceEventStore),this.sliceEventDrag=it(this._sliceInteraction),this.sliceEventResize=it(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=e.eventUiBases,l=this.sliceEventStore.apply(this,o([e.eventStore,s,t,n],i));return{dateSelectionSegs:this.sliceDateSelection.apply(this,o([e.dateSelection,s,r],i)),businessHourSegs:this.sliceBusinessHours.apply(this,o([e.businessHours,t,n,r],i)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,o([e.eventDrag,s,t,n],i)),eventResize:this.sliceEventResize.apply(this,o([e.eventResize,s,t,n],i)),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,o([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];return e?this._sliceEventStore.apply(this,o([Be(e,Oi(t,Boolean(n)),r),{},t,n],i)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(e){var a=ln(e,t,Oi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(!e)return null;var a=ln(e.mutatedEvents,t,Oi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];if(!e)return[];for(var a=Mn(e,t,n),s=this.sliceRange.apply(this,o([e.range],r)),l=0,u=s;l<u.length;l++){var c=u[l];c.eventRange=a}return s},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.sliceEventRange(i,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:ve(n.start,1)});for(var r=this.sliceRange.apply(this,o([n],t)),i=0,a=r;i<a.length;i++){var s=a[i];s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd}return r},e}();function Oi(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 Ai=/^(visible|hidden)$/,Ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,Yr(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,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),Hr("div",{ref:this.handleEl,className:o.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(Ai.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(Ai.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 Ai.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Ai.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(jr),Li=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):0==--o[n]&&(delete i[n],delete t.callbackMap[n],a=!0),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Fe(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Ue(this.currentMap)},e}();function Wi(e){for(var t=0,n=0,r=F(e,".fc-scrollgrid-shrink");n<r.length;n++){var o=r[n];t=Math.max(t,pe(o))}return Math.ceil(t)}function Vi(e,t){return e.liquid&&t.liquid}function zi(e,t){return null!=t.maxHeight||Vi(e,t)}function Fi(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Hr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Hr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Bi(e,t){return ot(e,t,Le)}function ji(e,t){for(var n=[],r=0,i=e;r<i.length;r++)for(var a=i[r],s=a.span||1,l=0;l<s;l++)n.push(Hr("col",{style:{width:"shrink"===a.width?Gi(t):a.width||"",minWidth:a.minWidth||""}}));return Hr.apply(void 0,o(["colgroup",{}],n))}function Gi(e){return null==e?4:e}function qi(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}function Yi(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Zi(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 Xi(e){return Hr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Ki(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Ji(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var $i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=it((function(e){return e}),Bi),t.renderMicroColGroup=it(ji),t.scrollerRefs=new Li,t.scrollerElRefs=new Li(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,i=t.sections||[],a=this.processCols(t.cols),s=this.renderMicroColGroup(a,n.shrinkWidth),l=Yi(t.liquid,r),u=i.length,c=0,d=[],p=[],f=[];c<u&&"header"===(e=i[c]).type;)d.push(this.renderSection(e,c,s)),c++;for(;c<u&&"body"===(e=i[c]).type;)p.push(this.renderSection(e,c,s)),c++;for(;c<u&&"footer"===(e=i[c]).type;)f.push(this.renderSection(e,c,s)),c++;var h=!cr();return Hr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!h&&d.length)&&Hr.apply(void 0,o(["thead",{}],d)),Boolean(!h&&p.length)&&Hr.apply(void 0,o(["tbody",{}],p)),Boolean(!h&&f.length)&&Hr.apply(void 0,o(["tfoot",{}],f)),h&&Hr.apply(void 0,o(["tbody",{}],d,p,f)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Hr(Ur,{key:e.key},e.outerContent):Hr("tr",{key:e.key,className:Zi(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 o=this.props,i=this.state,a=i.forceYScrollbars,s=i.scrollerClientWidths,l=i.scrollerClientHeights,u=zi(o,e),c=Vi(o,e),d=o.liquid?a?"scroll":u?"auto":"hidden":"visible",p=Fi(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==s[t]?s[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Hr("td",{ref:r.elRef},Hr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Hr(Ui,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},p)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);Yr(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 qi(this.props.cols)?Wi(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=Sr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,o=!1,i={},a={},s=0;s<t;s++){var l=n.currentMap[s];if(l&&l.needsYScrolling()){o=!0;break}}for(s=0;s<t;s++){var u=r.currentMap[s];if(u){var c=u.parentNode;i[s]=Math.floor(c.getBoundingClientRect().width-(o?e.y:0)),a[s]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:o,scrollerClientWidths:i,scrollerClientHeights:a}},t}(jr);$i.addStateEquality({scrollerClientWidths:Le,scrollerClientHeights:Le});var Qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Ar(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,o=r.eventRange,i=o.ui,a={event:new zn(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&gn(r,t),isStartResizable:!e.disableResizing&&mn(r,t),isEndResizable:!e.disableResizing&&yn(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)},s=Dn(a).concat(i.classNames);return Hr(uo,{hookProps:a,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,o){return e.children(t,s.concat(n),r,o,a)}))},t.prototype.componentDidMount=function(){cn(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&cn(this.elRef.current,t)},t}(jr),ea=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,o=t.options.eventTimeFormat||e.defaultTimeFormat,i=En(n,o,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Hr(Qi,{seg:n,timeText:i,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||ta,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,o,i,a,s){return Hr("a",r({className:e.extraClassNames.concat(o).join(" "),style:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Hr("div",{className:"fc-event-main",ref:i,style:{color:s.textColor}},a),s.isStartResizable&&Hr("div",{className:"fc-event-resizer fc-event-resizer-start"}),s.isEndResizable&&Hr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(jr);function ta(e){return Hr("div",{className:"fc-event-main-frame"},e.timeText&&Hr("div",{className:"fc-event-time"},e.timeText),Hr("div",{className:"fc-event-title-container"},Hr("div",{className:"fc-event-title fc-sticky"},e.event.title||Hr(Ur,null,"\xa0"))))}var na=function(e){return Hr(zr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Hr(uo,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},ra=St({day:"numeric"}),oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=at(aa),t.normalizeClassNames=vo(),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}),o=vr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),i=r.isDisabled?{}:{"data-date":tt(e.date)};return Hr(ho,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,o,i,r.isDisabled)}))},t}(jr),ia=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=aa({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Hr(po,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(jr);function aa(e){var t=e.date,n=e.dateEnv,o=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},o),{dayNumberText:e.showDayNumber?n.format(t,ra):""}),e.extraProps)}function sa(e){return Hr("div",{className:"fc-"+e})}var la=function(e){return Hr(Qi,{defaultContent:ua,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,o){return Hr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:o.backgroundColor}},r)}))};function ua(e){return e.event.title&&Hr("div",{className:"fc-event-title"},e.event.title)}var ca=function(e){return Hr(zr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,o=e.date,i=r.weekNumberFormat||e.defaultFormat,a=n.computeWeekNumber(o),s=n.format(o,i);return Hr(uo,{hookProps:{num:a,text:s,date:o},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:da,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function da(e){return e.text}var pa=function(e){function t(t,n){void 0===n&&(n={});var o=e.call(this)||this;return o.isRendering=!1,o.isRendered=!1,o.currentClassNames=[],o.customContentRenderId=0,o.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":o.renderRunner.tryDrain()}},o.handleData=function(e){o.currentData=e,o.renderRunner.request(e.calendarOptions.rerenderDelay)},o.handleRenderRequest=function(){if(o.isRendering){o.isRendered=!0;var e=o.currentData;Or(Hr(bi,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,a){return o.setClassNames(t),o.setHeight(n),Hr(co.Provider,{value:o.customContentRenderId},Hr(Ei,r({isHeightAuto:i,forPrint:a},e)))})),o.el)}else o.isRendered&&(o.isRendered=!1,Or(null,o.el),o.setClassNames([]),o.setHeight(""));Wr()},o.el=t,o.renderRunner=new Go(o.handleRenderRequest),new Zo({optionOverrides:n,calendarApi:o,onAction:o.handleAction,onData:o.handleData}),o}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),Wr()},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(!ot(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var o=r[n];t.remove(o)}for(var i=0,a=e;i<a.length;i++){o=a[i];t.add(o)}this.currentClassNames=e}},t.prototype.setHeight=function(e){G(this.el,"height",e)},t}(Vn);di.touchMouseIgnoreWait=500;var fa=0,ha=0,va=!1,ga=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,fa++,setTimeout((function(){fa--}),di.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 kr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ha++||window.addEventListener("touchmove",ma,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ha||window.removeEventListener("touchmove",ma,{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(){va=!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 fa||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(va=!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,o=e.touches,i=0,a=0;return o&&o.length?(n=o[0].pageX,r=o[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(i=n-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:i,deltaY:a}},e}();function ma(e){va&&e.preventDefault()}var ya=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",j(n,{left:r.left,top:r.top}),K(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(W(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&j(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"),j(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}(),Ea=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}(xr),Sa=function(e){function t(t,n){return e.call(this,new _r(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return Cr(this.scrollController.el)},t}(Ea),Da=function(e){function t(t){return e.call(this,new Ir,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}(Ea),ba="function"==typeof performance?performance.now:Date.now,Ca=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=ba();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,o=null===this.pointerScreenY?0:r-this.pointerScreenY,i=null===this.pointerScreenX?0:n-this.pointerScreenX;o<0?this.everMovedUp=!0:o>0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(ba()))}},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,o=r-e.distance,i=o*o/(r*r)*this.maxVelocity*t,a=1;switch(e.name){case"left":a=-1;case"right":n.setScrollLeft(n.getScrollLeft()+i*a);break;case"top":a=-1;case"bottom":n.setScrollTop(n.getScrollTop()+i*a)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,o=0,i=this.scrollCaches;o<i.length;o++){var a=i[o],s=a.clientRect,l=e-s.left,u=s.right-e,c=t-s.top,d=s.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"top",distance:c}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),u<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new Da(!1):new Sa(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}(),wa=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,o=e.deltaY;n*n+o*o>=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),oe(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new ga(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new ya,r.autoScroller=new Ca,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}(ci),Ra=function(){function e(e){this.origRect=wr(e),this.scrollCaches=Rr(e).map((function(e){return new Sa(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,o={left:e,top:t},i=0,a=this.scrollCaches;i<a.length;i++){var s=a[i];if(n=s.getEventTarget(),r=void 0,"HTML"!==(r=n.tagName)&&"BODY"!==r&&!ir(o,s.clientRect))return!1}return!0},e}();var Ta=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 kr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,o=e.subjectEl;o!==document&&(r=sr(r,t=wr(o)));var i=this.initialHit=this.queryHitForOffset(r.left,r.top);if(i){if(this.useSubjectCenter&&t){var a=ar(t,i.rect);a&&(r=lr(a))}this.coordAdjust=ur(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&&ka(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Oe(this.droppableStore,(function(e){return e.component.prepareHits(),new Ra(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,o=null;for(var i in n){var a=n[i].component,s=r[i];if(s&&s.isWithinClipping(e,t)){var l=s.computeLeft(),u=s.computeTop(),c=e-l,d=t-u,p=s.origRect,f=p.right-p.left,h=p.bottom-p.top;if(c>=0&&c<f&&d>=0&&d<h){var v=a.queryHit(c,d,f,h),g=a.context.getCurrentData().dateProfile;v&&an(g.activeRange,v.dateSpan.range)&&(!o||v.layer>o.layer)&&(v.rect.left+=l,v.rect.right+=l,v.rect.top+=u,v.rect.bottom+=u,o=v)}}}return o},e}();function ka(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Rn(e.dateSpan,t.dateSpan)}function Ma(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.datePointTransforms;a<s.length;a++){var l=s[a];r(i,l(e,t))}return r(i,(n=e,{date:(o=t.dateEnv).toDate(n.range.start),dateStr:o.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),i}var xa=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 o=n.hitDragging,i=o.initialHit,a=o.finalHit;if(i&&a&&ka(i,a)){var s=t.context,l=r(r({},Ma(i.dateSpan,s)),{dayEl:i.dayEl,jsEvent:e.origEvent,view:s.viewApi||s.calendarApi.view});s.emitter.trigger("dateClick",l)}}},n.dragging=new wa(t.el),n.dragging.autoScroller.isEnabled=!1;var o=n.hitDragging=new Ta(n.dragging,li(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(ai),_a=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,o=t.dragging,i=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);o.setIgnoreMove(!i),o.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;null==n&&(n=t.longPressDelay);return n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var o=n.component.context,i=null,a=!1;e&&((i=function(e,t,n){var o=e.dateSpan,i=t.dateSpan,a=[o.range.start,o.range.end,i.range.start,i.range.end];a.sort(ce);for(var s={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(s,c)}return s.range={start:a[0],end:a[3]},s.allDay=o.allDay,s}(n.hitDragging.initialHit,e,o.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(i)||(a=!0,i=null)),i?o.dispatch({type:"SELECT_DATES",selection:i}):t||o.dispatch({type:"UNSELECT_DATES"}),a?Q():ee(),t||(n.dragSelection=i)},n.handlePointerUp=function(e){n.dragSelection&&(xn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var o=t.component.context.options,i=n.dragging=new wa(t.el);i.touchScrollAllowed=!1,i.minDistance=o.selectMinDistance||0,i.autoScroller.isEnabled=o.dragScroll;var a=n.hitDragging=new Ta(n.dragging,li(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(ai);var Ia=function(e){function t(n){var o=e.call(this,n)||this;o.subjectEl=null,o.subjectSeg=null,o.isDragging=!1,o.eventRange=null,o.relevantEvents=null,o.receivingContext=null,o.validMutation=null,o.mutatedRelevantEvents=null,o.handlePointerDown=function(e){var t=e.origEvent.target,n=o,r=n.component,i=n.dragging,a=i.mirror,s=r.context.options,l=r.context;o.subjectEl=e.subjectEl;var u=o.subjectSeg=dn(e.subjectEl),c=(o.eventRange=u.eventRange).instance.instanceId;o.relevantEvents=Nt(l.getCurrentData().eventStore,c),i.minDistance=e.isTouch?0:s.eventDragMinDistance,i.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;null==n&&(n=t.longPressDelay);return n}(r):null,a.parentNode=V(t,".fc"),a.revertDuration=s.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");i.setIgnoreMove(!d),o.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},o.handleDragStart=function(e){var t=o.component.context,n=o.eventRange,r=n.instance.instanceId;e.isTouch?r!==o.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),o.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:o.subjectEl,event:new zn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},o.handleHitUpdate=function(e,t){if(o.isDragging){var n=o.relevantEvents,r=o.hitDragging.initialHit,i=o.component.context,a=null,s=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,p=(a=d.context).options;i===a||p.editable&&p.droppable?(s=function(e,t,n){var r=e.dateSpan,o=t.dateSpan,i=r.range.start,a=o.range.start,s={};r.allDay!==o.allDay&&(s.allDay=o.allDay,s.hasEnd=t.component.context.options.allDayMaintainDuration,o.allDay&&(i=be(i)));var l=Qt(i,a,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(s.allDay=!1);for(var u={datesDelta:l,standardProps:s},c=0,d=n;c<d.length;c++){(0,d[c])(u,e,t)}return u}(r,e,a.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=Pn(n,a.getCurrentData().eventUiBases,s,a),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,s=null,l=null,c.mutatedEvents={defs:{},instances:{}})):a=null}o.displayDrag(a,c),u?Q():ee(),t||(i===a&&ka(r,e)&&(s=null),o.dragging.setMirrorNeedsRevert(!s),o.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),o.receivingContext=a,o.validMutation=s,o.mutatedRelevantEvents=l)}},o.handlePointerUp=function(){o.isDragging||o.cleanup()},o.handleDragEnd=function(e){if(o.isDragging){var t=o.component.context,n=t.viewApi,i=o,a=i.receivingContext,s=i.validMutation,l=o.eventRange.def,u=o.eventRange.instance,c=new zn(t,l,u),d=o.relevantEvents,p=o.mutatedRelevantEvents,f=o.hitDragging.finalHit;if(o.clearDrag(),t.emitter.trigger("eventDragStop",{el:o.subjectEl,event:c,jsEvent:e.origEvent,view:n}),s){if(a===t){var h=new zn(t,p.defs[l.defId],u?p.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:p});for(var v={oldEvent:c,event:h,relatedEvents:Bn(p,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},m=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;m<y.length;m++){var E=y[m];r(g,E(s,t))}t.emitter.trigger("eventDrop",r(r(r({},v),g),{el:e.subjectEl,delta:s.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",v)}else if(a){var S={event:c,relatedEvents:Bn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},S),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",S);var D=p.defs[l.defId],b=p.instances[u.instanceId],C=new zn(a,D,b);a.dispatch({type:"MERGE_EVENTS",eventStore:p});var w={event:C,relatedEvents:Bn(p,a,b),revert:function(){a.dispatch({type:"REMOVE_EVENTS",eventStore:p})}};a.emitter.trigger("eventAdd",w),e.isTouch&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),a.emitter.trigger("drop",r(r({},Ma(f.dateSpan,a)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:f.component.context.viewApi})),a.emitter.trigger("eventReceive",r(r({},w),{draggedEl:e.subjectEl,view:f.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}o.cleanup()};var i=o.component.context.options,a=o.dragging=new wa(n.el);a.pointer.selector=t.SELECTOR,a.touchScrollAllowed=!1,a.autoScroller.isEnabled=i.dragScroll;var s=o.hitDragging=new Ta(o.dragging,ui);return s.useSubjectCenter=n.useEventCenter,s.emitter.on("pointerdown",o.handlePointerDown),s.emitter.on("dragstart",o.handleDragStart),s.emitter.on("hitupdate",o.handleHitUpdate),s.emitter.on("pointerup",o.handlePointerUp),s.emitter.on("dragend",o.handleDragEnd),o}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}(ai);var Pa=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=dn(n.querySegEl(e)),o=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!==o.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Nt(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var o=n.querySegEl(e);n.draggingSegEl=o,n.draggingSeg=dn(o),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:o,event:new zn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,o){var i=n.component.context,a=n.relevantEvents,s=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,p={affectedEvents:a,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,o,i){for(var a=e.component.context.dateEnv,s=e.dateSpan.range.start,l=t.dateSpan.range.start,u=Qt(s,l,a,e.component.largeUnit),c={},d=0,p=i;d<p.length;d++){var f=(0,p[d])(e,t);if(!1===f)return null;f&&r(c,f)}if(n){if(a.add(o.start,u)<o.end)return c.startDelta=u,c}else if(a.add(o.end,u)>o.start)return c.endDelta=u,c;return null}(s,e,o.subjectEl.classList.contains("fc-event-resizer-start"),l.range,i.pluginHooks.eventResizeJoinTransforms)),u&&(c=Pn(a,i.getCurrentData().eventUiBases,u,i),p.mutatedEvents=c,n.component.isInteractionValid(p)||(d=!0,u=null,c=null,p.mutatedEvents=null)),c?i.dispatch({type:"SET_EVENT_RESIZE",state:p}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&ka(s,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,o=n.eventRange.def,i=n.eventRange.instance,a=new zn(t,o,i),s=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:a,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new zn(t,l.defs[o.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:a,event:u,relatedEvents:Bn(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:s})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Ye(0),endDelta:n.validMutation.endDelta||Ye(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var o=t.component,i=n.dragging=new wa(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=o.context.options.dragScroll;var a=n.hitDragging=new Ta(n.dragging,li(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(ai);var Na=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,Ia.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}o.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ga(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}(),Ha={dateClick:_t,eventDragStart:_t,eventDragStop:_t,eventDrop:_t,eventResizeStart:_t,eventResizeStop:_t,eventResize:_t,drop:_t,eventReceive:_t,eventLeave:_t},Oa=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,o){var i=n.hitDragging.dragging,a=null,s=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(a=e.component.context,n.canDropElOnCalendar(o.subjectEl,a)&&(s=function(e,t,n){for(var o=r({},t.leftoverProps),i=0,a=n.pluginHooks.externalDefTransforms;i<a.length;i++){var s=a[i];r(o,s(e,t))}var l=Yt(o,n),u=l.refined,c=l.extra,d=Xt(u,c,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),p=e.range.start;e.allDay&&t.startTime&&(p=n.dateEnv.add(p,t.startTime));var f=t.duration?n.dateEnv.add(p,t.duration):In(e.allDay,p,n),h=Ie(d.defId,{start:p,end:f});return{def:d,instance:h}}(e.dateSpan,n.dragMeta,a),u.mutatedEvents=Pt(s),(l=!Jr(u,a))&&(u.mutatedEvents={defs:{},instances:{}},s=null))),n.displayDrag(a,u),i.setMirrorIsVisible(t||!s||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(i.setMirrorNeedsRevert(!s),n.receivingContext=a,n.droppableEvent=s)},this.handleDragEnd=function(e){var t=n,o=t.receivingContext,i=t.droppableEvent;if(n.clearDrag(),o&&i){var a=n.hitDragging.finalHit,s=a.component.context.viewApi,l=n.dragMeta;if(o.emitter.trigger("drop",r(r({},Ma(a.dateSpan,o)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:s})),l.create){var u=Pt(i);o.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:i.instance.instanceId}),o.emitter.trigger("eventReceive",{event:new zn(o,i.def,i.instance),relatedEvents:[],revert:function(){o.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:s})}}n.receivingContext=null,n.droppableEvent=null};var o=this.hitDragging=new Ta(e,ui);o.requireInitial=!1,o.emitter.on("dragstart",this.handleDragStart),o.emitter.on("hitupdate",this.handleHitUpdate),o.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?fi(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?fi(this.suppliedDragMeta(e)):fi((t=function(e,t){var n=di.dataAttrPrefix,r=(n?n+"-":"")+t;return e.getAttribute("data-"+r)||""}(e,"event"))?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(z(e,n))},e}();di.dataAttrPrefix="";var Aa=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,o=r.minDistance,i=r.longPressDelay;t.minDistance=null!=o?o:e.isTouch?0:bt.eventDragMinDistance,t.delay=e.isTouch?null!=i?i:bt.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 wa(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 Oa(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ua=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 ga(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}(ci),La=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ua(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 Oa(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Wa=io({componentInteractions:[xa,_a,Ia,Pa],calendarInteractions:[Na],elementDraggingImpl:wa,listenerRefiners:Ha}),Va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Ar(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,o=[],i=Ki(r.options);return e&&o.push({type:"header",key:"header",isSticky:i,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Hr(yo,{viewSpec:r.viewSpec},(function(e,t){return Hr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Hr($i,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");var i=this.props,a=this.context,s=!i.forPrint&&Ki(a.options),l=!i.forPrint&&Ji(a.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:s,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:Xi}]}),Hr(yo,{viewSpec:a.viewSpec},(function(e,t){return Hr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Hr(o,{liquid:!i.isHeightAuto&&!i.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(oo);function za(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.row].push(a)}return n}function Fa(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.firstCol].push(a)}return n}function Ba(e,t){var n=[];if(e){for(a=0;a<t;a++)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.row].segs.push(i)}}else for(var a=0;a<t;a++)n[a]=null;return n}var ja=St({week:"narrow"}),Ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,Yr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,o=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:o,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,o=t.viewApi,i=this.props,a=i.date,s=i.dateProfile,l={num:i.moreCnt,text:i.buildMoreLinkText(i.moreCnt),view:o},u=n.navLinks?{"data-navlink":gr(a,"week"),tabIndex:0}:{};return Hr(oa,{date:a,dateProfile:s,todayRange:i.todayRange,showDayNumber:i.showDayNumber,extraHookProps:i.extraHookProps,elRef:this.handleRootEl},(function(t,o,c,d){return Hr("td",r({ref:t,className:["fc-daygrid-day"].concat(o,i.extraClassNames||[]).join(" ")},c,i.extraDataAttrs),Hr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:i.innerElRef},i.showWeekNumber&&Hr(ca,{date:a,defaultFormat:ja},(function(e,t,n,o){return Hr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),o)})),!d&&Hr(Za,{date:a,dateProfile:s,showDayNumber:i.showDayNumber,forceDayTop:i.forceDayTop,todayRange:i.todayRange,extraHookProps:i.extraHookProps}),Hr("div",{className:"fc-daygrid-day-events",ref:i.fgContentElRef,style:{paddingBottom:i.fgPaddingBottom}},i.fgContent,Boolean(i.moreCnt)&&Hr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:i.moreMarginTop}},Hr(uo,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ya,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,o){return Hr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},o)})))),Hr("div",{className:"fc-daygrid-day-bg"},i.bgContent)))}))},t}(oo);function qa(e){return e.dayNumberText}function Ya(e){return e.text}var Za=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":gr(e.date),tabIndex:0}:{};return Hr(ia,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:qa},(function(n,o){return(o||e.forceDayTop)&&Hr("div",{className:"fc-daygrid-day-top",ref:n},Hr("a",r({className:"fc-daygrid-day-number"},t),o||Hr(Ur,null,"\xa0")))}))},t}(jr),Xa=St({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ka(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 Ja=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||Xa,o=En(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Hr(Qi,{seg:e.seg,timeText:o,defaultContent:$a,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,o,i){return Hr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(a=e.seg,(s=a.eventRange.def.url)?{href:s}:{})),i);var a,s}))},t}(jr);function $a(e){return Hr(Ur,null,Hr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Hr("div",{className:"fc-event-time"},e.timeText),Hr("div",{className:"fc-event-title"},e.event.title||Hr(Ur,null,"\xa0")))}var Qa=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 Hr(ea,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Xa,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(jr);function es(e,t,n,o,i,a,s,l){for(var u=[],c=[],d={},p={},f={},h={},v={},g=0;g<s;g++)u.push([]),c.push(0);for(var m=0,y=t=hn(t,l);m<y.length;m++){T(w=y[m],i[w.eventRange.instance.instanceId+":"+w.firstCol]||0)}!0===n||!0===o?function(e,t,n,r){ns(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,a):"number"==typeof n?function(e,t,n,r){ns(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof o&&function(e,t,n,r){ns(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,o);for(var E=0;E<s;E++){for(var S=0,D=0,b=0,C=u[E];b<C.length;b++){var w,R=C[b];d[(w=R.seg).eventRange.instance.instanceId]||(p[w.eventRange.instance.instanceId]=R.top,w.firstCol===w.lastCol&&w.isStart&&w.isEnd?(f[w.eventRange.instance.instanceId]=R.top-S,D=0,S=R.bottom):D+=R.bottom-R.top)}D&&(c[E]?h[E]=D:v[E]=D)}function T(e,t){if(!k(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,o=u[n];r<o.length;r++){if(k(e,t,o[r].bottom))return}}function k(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var o=0,i=u[r];o<i.length;o++){var a=i[o];if(n<a.bottom&&n+t>a.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var o=u[r],i=0;i<o.length&&n>=o[i].top;)i++;o.splice(i,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var M in i)i[M]||(d[M.split(":")[0]]=!0);return{segsByFirstCol:u.map(ts),segsByEachCol:u.map((function(t,n){var o=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n];t.push(o.seg)}return t}(t);return o=function(e,t,n){for(var o=t,i=ve(o,1),a={start:o,end:i},s=[],l=0,u=e;l<u.length;l++){var c=u[l],d=c.eventRange,p=d.range,f=nn(p,a);f&&s.push(r(r({},c),{firstCol:n,lastCol:n,eventRange:{def:d.def,ui:r(r({},d.ui),{durationEditable:!1}),instance:d.instance,range:f},isStart:c.isStart&&f.start.valueOf()===p.start.valueOf(),isEnd:c.isEnd&&f.end.valueOf()===p.end.valueOf()}))}return s}(o,e[n].date,n)})),segIsHidden:d,segTops:p,segMarginTops:f,moreCnts:c,moreTops:h,paddingBottoms:v}}function ts(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];i.seg.firstCol===t&&n.push(i.seg)}return n}function ns(e,t,n,r,o){for(var i=e.length,a={},s=[],l=0;l<i;l++)s.push([]);for(l=0;l<i;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var p=d[c];o(p,u)?f(p):h(p,u,r),p.top!==p.bottom&&u++}function f(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!a[n]){a[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)s[r].push(e)}}function h(n,r,o){var i=n.seg,a=i.eventRange.instance.instanceId;if(!t[a]){t[a]=!0;for(var l=i.firstCol;l<=i.lastCol;l++){var u=++e[l];if(o&&1===u)for(var c=r-1;s[l].length>c;)h(s[l].pop(),s[l].length,!1)}}}}var rs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Li,t.frameElRefs=new Li,t.fgElRefs=new Li,t.segHarnessRefs=new Li,t.rootElRef=Ar(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,o=t.cells.length,i=Fa(t.businessHourSegs,o),a=Fa(t.bgEventSegs,o),s=Fa(this.getHighlightSegs(),o),l=Fa(this.getMirrorSegs(),o),u=es(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,o,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,p=u.segsByEachCol,f=u.segIsHidden,h=u.segTops,v=u.segMarginTops,g=u.moreCnts,m=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Hr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var o=e.renderFgSegs(d[r],f,h,v,y,t.todayRange),u=e.renderFgSegs(l[r],{},h,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Hr(Ga,{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:f,moreMarginTop:m[r],segsByEachCol:p[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Hr(Ur,null,Hr(Ur,null,o),Hr(Ur,null,u)),bgContent:Hr(Ur,null,e.renderFillSegs(s[r],"highlight"),e.renderFillSegs(i[r],"non-business"),e.renderFillSegs(a[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!Le(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,o,i,a,s,l,u){var c=this.context,d=this.props.eventSelection,p=this.state.framePositions,f=1===this.props.cells.length,h=[];if(p)for(var v=0,g=e;v<g.length;v++){var m=g[v],y=m.eventRange.instance.instanceId,E=s||l||u,S=i[y],D=t[y]||S,b=t[y]||E||m.firstCol!==m.lastCol||!m.isStart||!m.isEnd,C=void 0,w=void 0,R=void 0,T=void 0;b?(w=n[y],c.isRtl?(T=0,R=p.lefts[m.lastCol]-p.lefts[m.firstCol]):(R=0,T=p.rights[m.firstCol]-p.rights[m.lastCol])):C=o[y],h.push(Hr("div",{className:"fc-daygrid-event-harness"+(b?" fc-daygrid-event-harness-abs":""),key:y,ref:E?null:this.segHarnessRefs.createRef(y+":"+m.firstCol),style:{visibility:D?"hidden":"",marginTop:C||"",top:w||"",left:R||"",right:T||""}},Ka(m)?Hr(Ja,r({seg:m,isDragging:s,isSelected:y===d,defaultDisplayEventEnd:f},Sn(m,a))):Hr(Qa,r({seg:m,isDragging:s,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:f},Sn(m,a)))))}return h},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,i=this.props.todayRange,a=this.state.framePositions,s=[];if(a)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:a.lefts[c.lastCol]-a.lefts[c.firstCol]}:{left:0,right:a.rights[c.firstCol]-a.rights[c.lastCol]};s.push(Hr("div",{key:bn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Hr(la,r({seg:c},Sn(c,i))):sa(t)))}return Hr.apply(void 0,o([Ur,{}],s))},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 o=this.rootElRef.current;this.setState({framePositions:new Mr(o,r,!0,!1)})}}var i=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:i?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Oe(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}(oo);rs.addStateEquality({segHeights:Le});var os=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new Go(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&Yr(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 Hr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Hr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Hr("span",{className:"fc-popover-title"},t.title),Hr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Hr("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 o,i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),s=n?n.getBoundingClientRect().top:a.top;s=Math.min(s,window.innerHeight-i.height-10),s=Math.max(s,10),o=this.context.isRtl?a.right-i.width:a.left,o=Math.min(o,window.innerWidth-i.width-10),j(r,{top:s,left:o=Math.max(o,10)})}},t}(jr),is=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,o=this.props,i=o.date,a=o.hiddenInstances,s=o.todayRange,l=o.dateProfile,u=o.selectedInstanceId,c=n.format(i,t.dayPopoverFormat);return Hr(oa,{date:i,dateProfile:l,todayRange:s,elRef:this.handlePopoverEl},(function(e,t,n){return Hr(os,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:o.onCloseClick,alignmentEl:o.alignmentEl,topAlignmentEl:o.topAlignmentEl},Hr(ia,{date:i,dateProfile:l,todayRange:s},(function(e,t){return t&&Hr("div",{className:"fc-more-popover-misc",ref:e},t)})),o.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Hr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:a[t]?"hidden":""}},Ka(e)?Hr(Ja,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},Sn(e,s))):Hr(Qa,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},Sn(e,s))))})))}))},t.prototype.queryHit=function(e,t,n,r){var o=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:o,end:ve(o,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(oo),as=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=it(za),t.splitBgEventSegs=it(za),t.splitFgEventSegs=it(za),t.splitDateSelectionSegs=it(za),t.splitEventDrag=it(Ba),t.splitEventResize=it(Ba),t.buildBuildMoreLinkText=it(ss),t.rowRefs=new Li,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,Yr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,o=n.dateEnv,i=n.options.moreLinkClick;function a(e){var t=e.eventRange,r=t.def,i=t.instance,a=t.range;return{event:new zn(n,r,i),start:o.toDate(a.start),end:o.toDate(a.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof i&&(i=i({date:o.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(a),hiddenSegs:e.hiddenSegs.map(a),jsEvent:e.ev,view:n.viewApi})),i&&"popover"!==i?"string"==typeof i&&n.calendarApi.zoomTo(e.date,i):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,o=t.dayMaxEvents,i=t.expandRows,a=this.state.morePopoverState,s=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,s),u=this.splitBgEventSegs(t.bgEventSegs,s),c=this.splitFgEventSegs(t.fgEventSegs,s),d=this.splitDateSelectionSegs(t.dateSelectionSegs,s),p=this.splitEventDrag(t.eventDrag,s),f=this.splitEventResize(t.eventResize,s),h=this.buildBuildMoreLinkText(this.context.options.moreLinkText),v=!0===o||!0===r;return v&&!i&&(v=!1,r=null,o=null),Hr("div",{className:["fc-daygrid-body",v?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Hr(Mi,{unit:"day"},(function(v,g){return Hr(Ur,null,Hr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:i?t.clientHeight:""}},t.colGroupNode,Hr("tbody",null,t.cells.map((function(i,a){return Hr(rs,{ref:e.rowRefs.createRef(a),key:i.length?i[0].date.toISOString():a,showDayNumbers:s>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:l[a],eventSelection:t.eventSelection,bgEventSegs:u[a].filter(ls),fgEventSegs:c[a],dateSelectionSegs:d[a],eventDrag:p[a],eventResize:f[a],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:h,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&a&&a.currentFgEventSegs===t.fgEventSegs&&Hr(is,{date:a.date,dateProfile:n,segs:a.allSegs,alignmentEl:a.dayEl,topAlignmentEl:1===s?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Mr(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Mr(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,o=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=o)return{row:i,col:o,dateSpan:{range:this.getCellRange(i,o),allDay:!0},dayEl:this.getCellEl(i,o),relativeRect:{left:n.lefts[o],right:n.rights[o],top:r.tops[i],bottom:r.bottoms[i]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:ve(n,1)}},t}(oo);function ss(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ls(e){return e.eventRange.def.allDay}var us=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new cs,t.tableRef=Ar(),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 Hr(as,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}(oo),cs=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}(Hi),ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=it(ps),t.headerRef=Ar(),t.tableRef=Ar(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&Hr(_i,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return Hr(us,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(Va);function ps(e,t){var n=new Pi(e.renderRange,t);return new Ni(n,/year|month|week/.test(e.currentRangeUnit))}var fs=io({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:_t,moreLinkClassNames:_t,moreLinkContent:_t,moreLinkDidMount:_t,moreLinkWillUnmount:_t},views:{dayGrid:{component:ds,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=he(o,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=he(l,6-Math.ceil(me(s,l))));return{start:s,end:l}},t}(Co)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),hs=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?un(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(pr),vs=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=be(e),r=e.valueOf()-n.valueOf();if(r>=$e(t.slotMinTime)&&r<$e(t.slotMaxTime))return this.computeTimeTop(Ye(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=be(e)),this.computeTimeTop(Ye(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,o=this.dateProfile,i=this.slatMetas,a=r.els.length,s=i[1].date.valueOf()-i[0].date.valueOf(),l=(e.milliseconds-$e(o.slotMinTime))/s;return l=Math.max(0,l),l=Math.min(a,l),t=Math.floor(l),n=l-(t=Math.min(t,a-1)),r.tops[t]+r.getHeight(t)*n},e}(),gs=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ar(),t.slatElRefs=new Li,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Hr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Hr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Hr(ys,{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 vs(new Mr(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas)))},t}(jr);var ys=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,o=e.slatElRefs;return Hr("tbody",null,e.slatMetas.map((function(i,a){var s={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",i.isLabeled?"":"fc-timegrid-slot-minor"];return Hr("tr",{key:i.key,ref:o.createRef(i.key)},e.axis&&Hr(Ss,r({},i)),Hr(uo,{hookProps:s,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Hr("td",{ref:e,className:l.concat(t).join(" "),"data-time":i.isoTimeStr},r)})))})))},t}(jr),Es=St({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Ss(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Hr(zr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,o=n.options,i=n.viewApi,a=null==o.slotLabelFormat?Es:Array.isArray(o.slotLabelFormat)?St(o.slotLabelFormat[0]):St(o.slotLabelFormat),s={level:0,time:e.time,date:r.toDate(e.date),view:i,text:r.format(e.date,a)};return Hr(uo,{hookProps:s,classNames:o.slotLabelClassNames,content:o.slotLabelContent,defaultContent:Ds,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},(function(n,r,o,i){return Hr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Hr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Hr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:o},i)))}))}return Hr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function Ds(e){return e.text}function bs(e,t,n,r,o){for(var i=new Date(0),a=e,s=Ye(0),l=n||function(e){var t,n,r;for(t=gs.length-1;t>=0;t--)if(n=Ye(gs[t]),null!==(r=Qe(n,e))&&r>1)return n;return e}(r),u=[];$e(a)<$e(t);){var c=o.add(i,a),d=null!==Qe(s,l);u.push({date:c,time:a,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),a=Xe(a,r),s=Xe(s,r)}return u}var Cs=St({week:"short"}),ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new hs,t.headerElRef=Ar(),t.rootElRef=Ar(),t.scrollerElRef=Ar(),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,o=t.props.dateProfile.renderRange,i=ye(o.start,o.end),a=n.navLinks&&1===i?{"data-navlink":gr(o.start,"week"),tabIndex:0}:{};return n.weekNumbers?Hr(ca,{date:o.start,defaultFormat:Cs},(function(t,n,o,i){return Hr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Hr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Hr("a",r({ref:o,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},a),i)))})):Hr("th",{className:"fc-timegrid-axis"},Hr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,o=n.viewApi,i={text:r.allDayText,view:o};return Hr(uo,{hookProps:i,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Rs,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,o){return Hr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Hr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Hr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,o=this.props,i=[],a=Ki(r.options);return e&&i.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(i.push({type:"body",key:"all-day",chunk:{content:t}}),i.push({type:"body",key:"all-day-divider",outerContent:Hr("tr",{className:"fc-scrollgrid-section"},Hr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),i.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Hr(yo,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Hr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Hr($i,{liquid:!o.isHeightAuto&&!o.forPrint,cols:[{width:"shrink"}],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,o,i,a){var s=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Ki(u.options),p=!c.forPrint&&Ji(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Hr("tr",null,s.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Hr("tr",null,s.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:Hr("tr",{className:"fc-scrollgrid-section"},Hr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var h=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Hr("div",{className:"fc-timegrid-axis-chunk"},Hr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Hr("tbody",null,Hr(Ts,{slatMetas:i}))),Hr("div",{className:"fc-timegrid-now-indicator-container"},Hr(Mi,{unit:h?"minute":"day"},(function(e){var t=h&&a&&a.safeComputeTop(e);return"number"==typeof t?Hr(na,{isAxis:!0,date:e},(function(e,n,r,o){return Hr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},o)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),p&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Xi},{key:"cols",content:Xi}]}),Hr(yo,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Hr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Hr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:o}]}],sections:f}))}))},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}(oo);function Rs(e){return e.text}var Ts=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 Hr("tr",{key:e.key},Hr(Ss,r({},e)))}))},t}(jr);function ks(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 Ms(e,t){var n=[];if(e){for(a=0;a<t;a++)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.col].segs.push(i)}}else for(var a=0;a<t;a++)n[a]=null;return n}function xs(e,t,n,r,o){return _s(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 o,i=function(e){var t,n,r,o=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<o.length&&Is(n,o[r]).length;r++);n.level=r,(o[r]||(o[r]=[])).push(n)}return o}(e=hn(e,t));if(function(e){var t,n,r,o,i;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((o=n[r]).forwardSegs=[],i=t+1;i<e.length;i++)Is(o,e[i],o.forwardSegs)}(i),o=i[0]){for(var a=0,s=o;a<s.length;a++){Ps(c=s[a])}for(var l=0,u=o;l<u.length;l++){var c;Ns(c=u[l],0,0,t)}}return e}(e,o)}function _s(e,t,n,r){for(var o=0,i=e;o<i.length;o++){var a=i[o];a.top=n.computeDateTop(a.start,t),a.bottom=Math.max(a.top+(r||0),n.computeDateTop(a.end,t))}}function Is(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)o=e,i=t[r],o.bottom>i.top&&o.top<i.bottom&&n.push(t[r]);var o,i;return n}function Ps(e){var t,n,r=e.forwardSegs,o=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)Ps(n=r[t]),o=Math.max(o,1+n.forwardPressure);e.forwardPressure=o}}function Ns(e,t,n,r){var o,i=e.forwardSegs;if(null==e.forwardCoord)for(i.length?(!function(e,t){var n=e.map(Hs),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return ae(e,t,r)})),n.map((function(e){return e._seg}))}(i,r),Ns(i[0],t+1,n,r),e.forwardCoord=i[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),o=0;o<i.length;o++)Ns(i[o],0,e.forwardCoord,r)}function Hs(e){var t=vn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Os=St({hour:"numeric",minute:"2-digit",meridiem:!1}),As=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"),Hr(ea,r({},this.props,{defaultTimeFormat:Os,extraClassNames:e}))},t}(jr);di.timeGridEventCondensedHeight=30;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,t=this.props,n=this.context.options.selectMirror,o=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],i=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Hr(oa,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(a,s,l){return Hr("td",r({ref:a,className:["fc-timegrid-col"].concat(s,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Hr("div",{className:"fc-timegrid-col-frame"},Hr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Hr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,i)),Hr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(o,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Hr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Hr(Ls,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,o){var i=this.props;return i.forPrint?this.renderPrintFgSegs(e):i.slatCoords?this.renderPositionedFgSegs(e,t,n,r,o):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=hn(e,this.context.options.eventOrder)).map((function(e){return Hr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Hr(As,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},Sn(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,o,i){var a=this,s=this.context,l=this.props;return(e=xs(e,l.date,l.slatCoords,s.options.eventMinHeight,s.options.eventOrder)).map((function(e){var s=e.eventRange.instance.instanceId,u=n||o||i?r({left:0,right:0},a.computeSegTopBottomCss(e)):a.computeFgSegPositionCss(e);return Hr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:s,style:r({visibility:t[s]?"hidden":""},u)},Hr(As,r({seg:e,isDragging:n,isResizing:o,isDateSelecting:i,isSelected:s===l.eventSelection,isCondensed:e.bottom-e.top<di.timeGridEventCondensedHeight},Sn(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,o=this.context,i=this.props;if(i.slatCoords){_s(e,i.date,i.slatCoords,o.options.eventMinHeight);var a=e.map((function(e){return Hr("div",{key:bn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Hr(la,r({seg:e},Sn(e,i.todayRange,i.nowDate))):sa(t))}));return Hr(Ur,null,a)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Hr(na,{isAxis:!1,date:r,key:t},(function(t,o,i,a){return Hr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(o).join(" "),style:{top:n.computeDateTop(e.start,r)}},a)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,o=this.context,i=o.isRtl,a=o.options.slotEventOverlap,s=e.backwardCoord,l=e.forwardCoord;a&&(l=Math.min(1,s+2*(l-s))),i?(t=1-l,n=s):(t=s,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return a&&e.forwardPressure&&(u[i?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(jr),Ls=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 Hr(ia,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Hr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(jr),Ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=it(ks),t.splitBgEventSegs=it(ks),t.splitBusinessHourSegs=it(ks),t.splitNowIndicatorSegs=it(ks),t.splitDateSelectionSegs=it(ks),t.splitEventDrag=it(Ms),t.splitEventResize=it(Ms),t.rootElRef=Ar(),t.cellElRefs=new Li,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,o=this.splitFgEventSegs(t.fgEventSegs,r),i=this.splitBgEventSegs(t.bgEventSegs,r),a=this.splitBusinessHourSegs(t.businessHourSegs,r),s=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Hr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Hr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Hr("tbody",null,Hr("tr",null,t.axis&&Hr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Hr("div",{className:"fc-timegrid-col-frame"},Hr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Hr(na,{isAxis:!0,date:t.nowDate},(function(e,t,r,o){return Hr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},o)}))))),t.cells.map((function(n,r){return Hr(Us,{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:o[r],bgEventSegs:i[r],businessHourSegs:a[r],nowIndicatorSegs:s[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 Mr(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(jr);var Vs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=it(zs),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var o=r.computeTimeTop(e.time);(o=Math.ceil(o))&&o++,n(o)}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 Hr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Hr(ms,{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}),Hr(Ws,{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,o=n.options,i=this.colCoords,a=this.props.dateProfile,s=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,o.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=i.leftToIndex(e),p=s.positions.topToIndex(t);if(null!=d&&null!=p){var f=s.positions.tops[p],h=s.positions.getHeight(p),v=(t-f)/h,g=p*c+Math.floor(v*c),m=this.props.cells[d].date,y=Xe(a.slotMinTime,Ke(u,g)),E=r.add(m,y);return{col:d,dateSpan:{range:{start:E,end:r.add(E,u)},allDay:!1},dayEl:i.els[d],relativeRect:{left:i.lefts[d],right:i.rights[d],top:f,bottom:f+h}}}},t}(jr);function zs(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=it(Bs),t.slicer=new js,t.timeColsRef=Ar(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,o=t.dateProfile,i=t.dayTableModel,a=n.options.nowIndicator,s=this.buildDayRanges(i,o,n.dateEnv);return Hr(Mi,{unit:a?"minute":"day"},(function(l,u){return Hr(Vs,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,o,null,n,s),{forPrint:t.forPrint,axis:t.axis,dateProfile:o,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:i.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:a&&e.slicer.sliceNowDate(l,n,s),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}(oo);function Bs(e,t,n){for(var r=[],o=0,i=e.headerDates;o<i.length;o++){var a=i[o];r.push({start:n.add(a,t.slotMinTime),end:n.add(a,t.slotMaxTime)})}return r}var js=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 o=nn(e,t[r]);o&&n.push({start:o.start,end:o.end,isStart:o.start.valueOf()===e.start.valueOf(),isEnd:o.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Hi),Gs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=it(qs),t.buildSlatMetas=it(bs),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,o=t.dateEnv,i=t.dateProfileGenerator,a=this.props,s=a.dateProfile,l=this.buildTimeColsModel(s,i),u=this.allDaySplitter.splitProps(a),c=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,n.slotLabelInterval,n.slotDuration,o),d=n.dayMinWidth,p=!d,f=d,h=n.dayHeaders&&Hr(_i,{dates:l.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:p?this.renderHeadAxis:null}),v=!1!==n.allDaySlot&&function(t){return Hr(us,r({},u.allDay,{dateProfile:s,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:p?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:a.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Hr(Fs,r({},u.timed,{dayTableModel:l,dateProfile:s,axis:p,slotDuration:n.slotDuration,slatMetas:c,forPrint:a.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return f?this.renderHScrollLayout(h,v,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(h,v,g)},t}(ws);function qs(e,t){var n=new Pi(e.renderRange,t);return new Ni(n,!1)}var Ys=io({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Gs,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Zs=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,o=this.context,i=o.theme,a=o.dateEnv,s=o.options,l=o.viewApi,u=hr(t,n),c=s.listDayFormat?a.format(t,s.listDayFormat):"",d=s.listDaySideFormat?a.format(t,s.listDaySideFormat):"",p=s.navLinks?gr(t):null,f=r({date:a.toDate(t),view:l,text:c,sideText:d,navLinkData:p},u),h=["fc-list-day"].concat(vr(u,i));return Hr(uo,{hookProps:f,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:Xs,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(e,n,r,o){return Hr("tr",{ref:e,className:h.concat(n).join(" "),"data-date":tt(t)},Hr("th",{colSpan:3},Hr("div",{className:"fc-list-day-cushion "+i.getClass("tableCellShaded"),ref:r},o)))}))},t}(jr);function Xs(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Hr(Ur,null,e.text&&Hr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Hr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ks=St({hour:"numeric",minute:"2-digit",meridiem:"short"}),Js=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||Ks;return Hr(Qi,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:$s,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,o,i,a,s){return Hr("tr",{className:["fc-list-event",s.event.url?"fc-event-forced-url":""].concat(o).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var o=e.eventRange.def,i=e.eventRange.instance,a=!1,s=void 0;if(o.allDay?a=!0:$t(e.eventRange.range)?e.isStart?s=En(e,t,n,null,null,i.range.start,e.end):e.isEnd?s=En(e,t,n,null,null,e.start,i.range.end):a=!0:s=En(e,t,n),a){var l={text:n.options.allDayText,view:n.viewApi};return Hr(uo,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Qs,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Hr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Hr("td",{className:"fc-list-event-time"},s)}return null}(n,r,t),Hr("td",{className:"fc-list-event-graphic"},Hr("span",{className:"fc-list-event-dot",style:{borderColor:s.borderColor||s.backgroundColor}})),Hr("td",{className:"fc-list-event-title",ref:i},a))}))},t}(jr);function $s(e){var t=e.event,n=t.url;return Hr("a",r({},n?{href:n}:{}),t.title)}function Qs(e){return e.text}var el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=it(nl),t.eventStoreToSegs=it(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":""],o=this.computeDateVars(t.dateProfile),i=o.dayDates,a=o.dayRanges,s=this.eventStoreToSegs(t.eventStore,t.eventUiBases,a);return Hr(yo,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,o){return Hr("div",{ref:n,className:r.concat(o).join(" ")},Hr(Ui,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},s.length>0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Hr(uo,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:tl,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Hr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Hr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,o=n.theme,i=n.options,a=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Hr(Mi,{unit:"day"},(function(e,n){for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u){var c=t[l].toISOString();s.push(Hr(Zs,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,p=u=hn(u,i.eventOrder);d<p.length;d++){var f=p[d];s.push(Hr(Js,r({key:c+":"+f.eventRange.instance.instanceId,seg:f,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},Sn(f,n,e))))}}}return Hr("table",{className:"fc-list-table "+o.getClass("table")},Hr("tbody",null,s))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(ln(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.eventRangeToSegs(i,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,o,i=this.context.dateEnv,a=this.context.options.nextDayThreshold,s=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=nn(s,t[n]))&&(o={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===s.end.valueOf(),dayIndex:n},u.push(o),!o.isEnd&&!l&&n+1<t.length&&s.end<i.add(t[n+1].start,a))){o.end=s.end,o.isEnd=!0;break}return u},t}(oo);function tl(e){return e.text}function nl(e){for(var t=be(e.renderRange.start),n=e.renderRange.end,r=[],o=[];t<n;)r.push(t),o.push({start:t,end:ve(t,1)}),t=ve(t,1);return{dayDates:r,dayRanges:o}}function rl(e){return!1===e?null:St(e)}var ol=io({optionRefiners:{listDayFormat:rl,listDaySideFormat:rl,noEventsClassNames:_t,noEventsContent:_t,noEventsDidMount:_t,noEventsWillUnmount:_t},views:{list:{component:el,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"}}}}),il=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Pr);il.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"},il.prototype.baseIconClass="fa",il.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},il.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},il.prototype.iconOverrideOption="bootstrapFontAwesome",il.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",il.prototype.iconOverridePrefix="fa-";var al=io({themeClasses:{bootstrap:il}});var sl=io({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;if(/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e))return e;if((t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e)))return decodeURIComponent(t[1])}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var o=e.context,i=o.dateEnv,a=o.options,s=e.eventSource.meta,l=s.googleCalendarApiKey||a.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;t||(t="https://www.googleapis.com/calendar/v3/calendars");return t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(s),c=s.extraParams,d="function"==typeof c?c():c,p=function(e,t,n,o){var i,a,s;o.canComputeOffset?(a=o.formatIso(e.start),s=o.formatIso(e.end)):(a=ve(e.start,-1).toISOString(),s=ve(e.end,1).toISOString());i=r(r({},n||{}),{key:t,timeMin:a,timeMax:s,singleEvents:!0,maxResults:9999}),"local"!==o.timeZone&&(i.timeZone=o.timeZone);return i}(e.range,l,d,i);Wo("GET",u,p,(function(e,r){var o,i;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(o=e.items,i=p.timeZone,o.map((function(e){return function(e,t){var n=e.htmlLink||null;n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t));return{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,i)}))),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:_t}});return Fo.push(Wa,fs,Ys,ol,al,sl),e.BASE_OPTION_DEFAULTS=bt,e.BASE_OPTION_REFINERS=Dt,e.BaseComponent=jr,e.BgEvent=la,e.BootstrapTheme=il,e.Calendar=pa,e.CalendarApi=Vn,e.CalendarContent=Ei,e.CalendarDataManager=Zo,e.CalendarDataProvider=oi,e.CalendarRoot=bi,e.Component=Nr,e.ContentHook=po,e.CustomContentRenderContext=co,e.DateComponent=oo,e.DateEnv=Xn,e.DateProfileGenerator=Co,e.DayCellContent=ia,e.DayCellRoot=oa,e.DayGridView=ds,e.DayHeader=_i,e.DaySeriesModel=Pi,e.DayTable=us,e.DayTableModel=Ni,e.DayTableSlicer=cs,e.DayTimeCols=Fs,e.DayTimeColsSlicer=js,e.DayTimeColsView=Gs,e.DelayedRunner=Go,e.Draggable=Aa,e.ElementDragging=ci,e.ElementScrollController=_r,e.Emitter=kr,e.EventApi=zn,e.EventRoot=Qi,e.EventSourceApi=L,e.FeaturefulElementDragging=wa,e.Fragment=Ur,e.Interaction=ai,e.ListView=el,e.MountHook=ho,e.NamedTimeZoneImpl=ii,e.NowIndicatorRoot=na,e.NowTimer=Mi,e.PointerDragging=ga,e.PositionCache=Mr,e.RefMap=Li,e.RenderHook=uo,e.ScrollController=xr,e.ScrollResponder=Vr,e.Scroller=Ui,e.SimpleScrollGrid=$i,e.Slicer=Hi,e.Splitter=pr,e.StandardEvent=ea,e.Table=as,e.TableDateCell=Ri,e.TableDowCell=Ti,e.TableView=Va,e.Theme=Pr,e.ThirdPartyDraggable=La,e.TimeCols=Vs,e.TimeColsSlatsCoords=vs,e.TimeColsView=ws,e.ViewApi=On,e.ViewContextType=zr,e.ViewRoot=yo,e.WeekNumberRoot=ca,e.WindowScrollController=Ir,e.addDays=ve,e.addDurations=Xe,e.addMs=ge,e.addWeeks=he,e.allowContextMenu=oe,e.allowSelection=ne,e.applyMutationToEventStore=Pn,e.applyStyle=j,e.applyStyleProp=G,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return $e(e)/6e4},e.asRoughMs=$e,e.asRoughSeconds=function(e){return $e(e)/1e3},e.buildClassNameNormalizer=vo,e.buildDayRanges=Bs,e.buildDayTableModel=ps,e.buildEventApis=Bn,e.buildEventRangeKey=bn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var o=t(e[r],r);n[o[0]]=o[1]}return n},e.buildNavLinkData=gr,e.buildSegCompareObj=vn,e.buildSegTimeText=En,e.buildSlatMetas=bs,e.buildTimeColsModel=qs,e.collectFromHash=Fe,e.combineEventUis=Vt,e.compareByFieldSpec=se,e.compareByFieldSpecs=ae,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=Ci,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=Cr,e.computeRect=wr,e.computeSegDraggable=gn,e.computeSegEndResizable=yn,e.computeSegStartResizable=mn,e.computeShrinkWidth=Wi,e.computeSmallestCellWidth=pe,e.computeVisibleDayRange=Jt,e.config=di,e.constrainPoint=sr,e.createContext=Lr,e.createDuration=Ye,e.createElement=Hr,e.createEmptyEventStore=Ht,e.createEventInstance=Ie,e.createEventUi=Wt,e.createFormatter=St,e.createPlugin=io,e.createRef=Ar,e.diffDates=Qt,e.diffDayAndTime=Ee,e.diffDays=ye,e.diffPoints=ur,e.diffWeeks=me,e.diffWholeDays=De,e.diffWholeWeeks=Se,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=z,e.enableCursor=ee,e.eventTupleToStore=Pt,e.filterEventStoreDefs=At,e.filterHash=He,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o++)for(var i=n[o].children,a=0;a<i.length;a++){var s=i[a];t&&!z(s,t)||r.push(s)}return r},e.findElements=F,e.flexibleCompare=le,e.flushToDom=Wr,e.formatDate=function(e,t){void 0===t&&(t={});var n=tr(t),r=St(t),o=n.createMarkerMeta(e);return o?n.format(o.marker,r,{forcedTzo:o.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=tr("object"==typeof n&&n?n:{}),o=St(n),i=r.createMarkerMeta(e),a=r.createMarkerMeta(t);return i&&a?r.formatRange(i.marker,a.marker,o,{forcedStartTzo:i.forcedTzo,forcedEndTzo:a.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:bt.defaultRangeSeparator}):""},e.getAllowYScrolling=zi,e.getCanVGrowWithinCell=cr,e.getClippingParents=Rr,e.getDateMeta=hr,e.getDayClassNames=vr,e.getDefaultEventEnd=In,e.getElSeg=dn,e.getEventClassNames=Dn,e.getIsRtlScrollbarOnLeft=Er,e.getRectCenter=lr,e.getRelevantEvents=Nt,e.getScrollGridClassNames=Yi,e.getScrollbarWidths=Sr,e.getSectionClassNames=Zi,e.getSectionHasLiquidHeight=Vi,e.getSegMeta=Sn,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+fe[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=Ji,e.getStickyHeaderDates=Ki,e.getUnequalProps=We,e.globalLocales=Kn,e.globalPlugins=Fo,e.greatestDurationDenominator=et,e.guid=$,e.hasBgRendering=un,e.hasShrinkWidth=qi,e.identity=_t,e.interactionSettingsStore=ui,e.interactionSettingsToStore=li,e.intersectRanges=nn,e.intersectRects=ar,e.isArraysEqual=ot,e.isColPropsEqual=Bi,e.isDateSpansEqual=Rn,e.isInt=de,e.isInteractionValid=Jr,e.isMultiDayRange=$t,e.isPropsEqual=Le,e.isPropsValid=Qr,e.isValidDate=xe,e.listenBySelector=Z,e.mapHash=Oe,e.memoize=it,e.memoizeArraylike=function(e,t,n){var r=[],o=[];return function(i){for(var a=r.length,s=i.length,l=0;l<a;l++)if(i[l]){if(!ot(r[l],i[l])){n&&n(o[l]);var u=e.apply(this,i[l]);t&&t(u,o[l])||(o[l]=u)}}else n&&n(o[l]);for(;l<s;l++)o[l]=e.apply(this,i[l]);return r=i,o.splice(s),o}},e.memoizeHashlike=function(e,t,n){var r={},o={};return function(i){var a={};for(var s in i)if(o[s])if(ot(r[s],i[s]))a[s]=o[s];else{n&&n(o[s]);var l=e.apply(this,i[s]);a[s]=t&&t(l,o[s])?o[s]:l}else a[s]=e.apply(this,i[s]);return r=i,o=a,a}},e.memoizeObjArg=at,e.mergeEventStores=Ot,e.multiplyDuration=Ke,e.padStart=ue,e.parseBusinessHours=or,e.parseClassNames=Ut,e.parseDragMeta=fi,e.parseEventDef=Xt,e.parseFieldSpecs=ie,e.parseMarker=Zn,e.pointInsideRect=ir,e.preventContextMenu=re,e.preventDefault=q,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=an,e.rangesEqual=rn,e.rangesIntersect=on,e.refineEventDef=Yt,e.refineProps=xt,e.removeElement=W,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=Fi,e.renderFill=sa,e.renderMicroColGroup=ji,e.renderScrollShim=Xi,e.requestJson=Wo,e.sanitizeShrinkWidth=Gi,e.setElSeg=cn,e.setRef=Yr,e.sliceEventStore=ln,e.sliceEvents=function(e,t){return ln(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=hn,e.startOfDay=be,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=xn,e.unpromisify=Tr,e.version="5.3.1",e.whenTransitionDone=K,e.wholeDivideDurations=Qe,e}({});!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(r="undefined"!=typeof globalThis?globalThis:r||self).jsSHA=t()}(this,(function(){"use strict";var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])},r(t,n)};"function"==typeof SuppressedError&&SuppressedError;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="ARRAYBUFFER not supported by this environment",i="UINT8ARRAY not supported by this environment";function e(r,t,n,i){var e,o,u,s=t||[0],f=(n=n||0)>>>3,h=-1===i?3:0;for(e=0;e<r.length;e+=1)o=(u=e+f)>>>2,s.length<=o&&s.push(0),s[o]|=r[e]<<8*(h+i*(u%4));return{value:s,binLen:8*r.length+n}}function o(r,o,u){switch(o){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(r,t,n){return function(r,t,n,i){var e,o,u,s;if(0!=r.length%2)throw new Error("String of HEX type must be in byte increments");var f=t||[0],h=(n=n||0)>>>3,a=-1===i?3:0;for(e=0;e<r.length;e+=2){if(o=parseInt(r.substr(e,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(u=(s=(e>>>1)+h)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(a+i*(s%4))}return{value:f,binLen:4*r.length+n}}(r,t,n,u)};case"TEXT":return function(r,t,n){return function(r,t,n,i,e){var o,u,s,f,h,a,c,w,E=0,v=n||[0],l=(i=i||0)>>>3;if("UTF8"===t)for(c=-1===e?3:0,s=0;s<r.length;s+=1)for(u=[],128>(o=r.charCodeAt(s))?u.push(o):2048>o?(u.push(192|o>>>6),u.push(128|63&o)):55296>o||57344<=o?u.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&r.charCodeAt(s)),u.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),f=0;f<u.length;f+=1){for(h=(a=E+l)>>>2;v.length<=h;)v.push(0);v[h]|=u[f]<<8*(c+e*(a%4)),E+=1}else for(c=-1===e?2:0,w="UTF16LE"===t&&1!==e||"UTF16LE"!==t&&1===e,s=0;s<r.length;s+=1){for(o=r.charCodeAt(s),!0===w&&(o=(f=255&o)<<8|o>>>8),h=(a=E+l)>>>2;v.length<=h;)v.push(0);v[h]|=o<<8*(c+e*(a%4)),E+=2}return{value:v,binLen:8*E+i}}(r,o,t,n,u)};case"B64":return function(r,n,i){return function(r,n,i,e){var o,u,s,f,h,a,c=0,w=n||[0],E=(i=i||0)>>>3,v=-1===e?3:0,l=r.indexOf("=");if(-1===r.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(r=r.replace(/=/g,""),-1!==l&&l<r.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<r.length;o+=4){for(f=r.substr(o,4),s=0,u=0;u<f.length;u+=1)s|=t.indexOf(f.charAt(u))<<18-6*u;for(u=0;u<f.length-1;u+=1){for(h=(a=c+E)>>>2;w.length<=h;)w.push(0);w[h]|=(s>>>16-8*u&255)<<8*(v+e*(a%4)),c+=1}}return{value:w,binLen:8*c+i}}(r,n,i,u)};case"BYTES":return function(r,t,n){return function(r,t,n,i){var e,o,u,s,f=t||[0],h=(n=n||0)>>>3,a=-1===i?3:0;for(o=0;o<r.length;o+=1)e=r.charCodeAt(o),u=(s=o+h)>>>2,f.length<=u&&f.push(0),f[u]|=e<<8*(a+i*(s%4));return{value:f,binLen:8*r.length+n}}(r,t,n,u)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(r){throw new Error(n)}return function(r,t,n){return function(r,t,n,i){return e(new Uint8Array(r),t,n,i)}(r,t,n,u)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(r){throw new Error(i)}return function(r,t,n){return e(r,t,n,u)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function u(r,e,o,u){switch(r){case"HEX":return function(r){return function(r,t,n,i){var e,o,u="0123456789abcdef",s="",f=t/8,h=-1===n?3:0;for(e=0;e<f;e+=1)o=r[e>>>2]>>>8*(h+n*(e%4)),s+=u.charAt(o>>>4&15)+u.charAt(15&o);return i.outputUpper?s.toUpperCase():s}(r,e,o,u)};case"B64":return function(r){return function(r,n,i,e){var o,u,s,f,h,a="",c=n/8,w=-1===i?3:0;for(o=0;o<c;o+=3)for(f=o+1<c?r[o+1>>>2]:0,h=o+2<c?r[o+2>>>2]:0,s=(r[o>>>2]>>>8*(w+i*(o%4))&255)<<16|(f>>>8*(w+i*((o+1)%4))&255)<<8|h>>>8*(w+i*((o+2)%4))&255,u=0;u<4;u+=1)a+=8*o+6*u<=n?t.charAt(s>>>6*(3-u)&63):e.b64Pad;return a}(r,e,o,u)};case"BYTES":return function(r){return function(r,t,n){var i,e,o="",u=t/8,s=-1===n?3:0;for(i=0;i<u;i+=1)e=r[i>>>2]>>>8*(s+n*(i%4))&255,o+=String.fromCharCode(e);return o}(r,e,o)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(r){throw new Error(n)}return function(r){return function(r,t,n){var i,e=t/8,o=new ArrayBuffer(e),u=new Uint8Array(o),s=-1===n?3:0;for(i=0;i<e;i+=1)u[i]=r[i>>>2]>>>8*(s+n*(i%4))&255;return o}(r,e,o)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(r){throw new Error(i)}return function(r){return function(r,t,n){var i,e=t/8,o=-1===n?3:0,u=new Uint8Array(e);for(i=0;i<e;i+=1)u[i]=r[i>>>2]>>>8*(o+n*(i%4))&255;return u}(r,e,o)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var s=[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],f=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function a(r){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=r||{},i="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(i);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(i);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 c(r,t){return r>>>t|r<<32-t}function w(r,t){return r>>>t}function E(r,t,n){return r&t^~r&n}function v(r,t,n){return r&t^r&n^t&n}function l(r){return c(r,2)^c(r,13)^c(r,22)}function p(r,t){var n=(65535&r)+(65535&t);return(65535&(r>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function A(r,t,n,i){var e=(65535&r)+(65535&t)+(65535&n)+(65535&i);return(65535&(r>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(e>>>16))<<16|65535&e}function d(r,t,n,i,e){var o=(65535&r)+(65535&t)+(65535&n)+(65535&i)+(65535&e);return(65535&(r>>>16)+(t>>>16)+(n>>>16)+(i>>>16)+(e>>>16)+(o>>>16))<<16|65535&o}function y(r){return c(r,7)^c(r,18)^w(r,3)}function U(r){return c(r,6)^c(r,11)^c(r,25)}function T(r){return"SHA-224"==r?f.slice():h.slice()}function b(r,t){var n,i,e,o,u,f,h,a,T,b,R,m,F=[];for(n=t[0],i=t[1],e=t[2],o=t[3],u=t[4],f=t[5],h=t[6],a=t[7],R=0;R<64;R+=1)F[R]=R<16?r[R]:A(c(m=F[R-2],17)^c(m,19)^w(m,10),F[R-7],y(F[R-15]),F[R-16]),T=d(a,U(u),E(u,f,h),s[R],F[R]),b=p(l(n),v(n,i,e)),a=h,h=f,f=u,u=p(o,T),o=e,e=i,i=n,n=p(T,b);return t[0]=p(n,t[0]),t[1]=p(i,t[1]),t[2]=p(e,t[2]),t[3]=p(o,t[3]),t[4]=p(u,t[4]),t[5]=p(f,t[5]),t[6]=p(h,t[6]),t[7]=p(a,t[7]),t}return function(t){function n(r,n,i){var e=this;if("SHA-224"!==r&&"SHA-256"!==r)throw new Error("Chosen SHA variant is not supported");var u=i||{};return(e=t.call(this,r,n,i)||this).t=e.i,e.o=!0,e.u=-1,e.h=o(e.v,e.l,e.u),e.p=b,e.A=function(r){return r.slice()},e.U=T,e.T=function(t,n,i,e){return function(r,t,n,i,e){for(var o,u=15+(t+65>>>9<<4),s=t+n;r.length<=u;)r.push(0);for(r[t>>>5]|=128<<24-t%32,r[u]=4294967295&s,r[u-1]=s/4294967296|0,o=0;o<r.length;o+=16)i=b(r.slice(o,o+16),i);return"SHA-224"===e?[i[0],i[1],i[2],i[3],i[4],i[5],i[6]]:i}(t,n,i,e,r)},e.R=T(r),e.m=512,e.F="SHA-224"===r?224:256,e.g=!1,u.hmacKey&&e.B(function(r,t,n,i){var e=r+" must include a value and format";if(!t){if(!i)throw new Error(e);return i}if(void 0===t.value||!t.format)throw new Error(e);return o(t.format,t.encoding||"UTF8",n)(t.value)}("hmacKey",u.hmacKey,e.u)),e}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 i(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}(n,t),n}(function(){function r(r,t,n){var i=n||{};if(this.v=t,this.l=i.encoding||"UTF8",this.numRounds=i.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.S=r,this.H=[],this.Y=0,this.C=!1,this.I=0,this.L=!1,this.N=[],this.X=[]}return r.prototype.update=function(r){var t,n=0,i=this.m>>>5,e=this.h(r,this.H,this.Y),o=e.binLen,u=e.value,s=o>>>5;for(t=0;t<s;t+=i)n+this.m<=o&&(this.R=this.p(u.slice(t,t+i),this.R),n+=this.m);return this.I+=n,this.H=u.slice(n>>>5),this.Y=o%this.m,this.C=!0,this},r.prototype.getHash=function(r,t){var n,i,e=this.F,o=a(t);if(this.g){if(-1===o.outputLen)throw new Error("Output length must be specified in options");e=o.outputLen}var s=u(r,e,this.u,o);if(this.L&&this.t)return s(this.t(o));for(i=this.T(this.H.slice(),this.Y,this.I,this.A(this.R),e),n=1;n<this.numRounds;n+=1)this.g&&e%32!=0&&(i[i.length-1]&=16777215>>>24-e%32),i=this.T(i,e,0,this.U(this.S),e);return s(i)},r.prototype.setHMACKey=function(r,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 i=o(t,(n||{}).encoding||"UTF8",this.u);this.B(i(r))},r.prototype.B=function(r){var t,n=this.m>>>3,i=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<r.binLen/8&&(r.value=this.T(r.value,r.binLen,0,this.U(this.S),this.F));r.value.length<=i;)r.value.push(0);for(t=0;t<=i;t+=1)this.N[t]=909522486^r.value[t],this.X[t]=1549556828^r.value[t];this.R=this.p(this.N,this.R),this.I=this.m,this.L=!0},r.prototype.getHMAC=function(r,t){var n=a(t);return u(r,this.F,this.u,n)(this.i())},r.prototype.i=function(){var r;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 r=this.p(this.X,this.U(this.S)),r=this.T(t,this.F,this.m,r,this.F)},r}())}));
747
+ 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 o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}var i,a,s,l,u,c,d,p={},f=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function v(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 m(e,t,n){var r,o=arguments,i={};for(r in t)"key"!==r&&"ref"!==r&&(i[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(o[r]);if(null!=n&&(i.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===i[r]&&(i[r]=e.defaultProps[r]);return y(e,i,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(a.__v=a),i.vnode&&i.vnode(a),a}function E(e){return e.children}function S(e,t){this.props=e,this.context=t}function D(e,t){if(null==t)return e.__?D(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?D(e):null}function b(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 b(e)}}function C(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!s++||u!==i.debounceRendering)&&((u=i.debounceRendering)||l)(w)}function w(){for(var e;s=a.length;)e=a.sort((function(e,t){return e.__v.__b-t.__v.__b})),a=[],e.some((function(e){var t,n,r,o,i,a,s;e.__d&&(a=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=v({},i)).__v=r,o=_(s,i,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==a?D(i):a),I(n,i),o!=a&&b(i)))}))}function R(e,t,n,r,o,i,a,s,l){var u,c,d,h,v,m,y,E=n&&n.__k||f,S=E.length;if(s==p&&(s=null!=i?i[0]:S?D(n,0):null),u=0,t.__k=T(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=E[u])||d&&n.key==d.key&&n.type===d.type)E[u]=void 0;else for(c=0;c<S;c++){if((d=E[c])&&n.key==d.key&&n.type===d.type){E[c]=void 0;break}d=null}if(h=_(e,n,d=d||p,r,o,i,a,s,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||h,n)),null!=h){var f;if(null==m&&(m=h),void 0!==n.__d)f=n.__d,n.__d=void 0;else if(i==d||h!=s||null==h.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(h),f=null;else{for(v=s,c=0;(v=v.nextSibling)&&c<S;c+=2)if(v==h)break e;e.insertBefore(h,s),f=s}"option"==t.type&&(e.value="")}s=void 0!==f?f:h.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&d.__e==s&&s.parentNode!=e&&(s=D(d))}return u++,n})),t.__e=m,null!=i&&"function"!=typeof t.type)for(u=i.length;u--;)null!=i[u]&&g(i[u]);for(u=S;u--;)null!=E[u]&&H(E[u],E[u]);if(y)for(u=0;u<y.length;u++)N(y[u],y[++u],y[++u])}function T(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++)T(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 k(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===h.test(t)?n+"px":null==n?"":n}function M(e,t,n,r,o){var i,a,s,l,u;if(o?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(i=e.style,"string"==typeof n)i.cssText=n;else{if("string"==typeof r&&(i.cssText="",r=null),r)for(l in r)n&&l in n||k(i,l,"");if(n)for(u in n)r&&n[u]===r[u]||k(i,u,n[u])}else"o"===t[0]&&"n"===t[1]?(a=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,x,a),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,x,a)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!o&&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 x(e){this.l[e.type](i.event?i.event(e):e)}function _(e,t,n,r,o,a,s,l,u){var c,d,p,f,h,g,m,y,D,b,C=t.type;if(void 0!==t.constructor)return null;(c=i.__b)&&c(t);try{e:if("function"==typeof C){if(y=t.props,D=(c=C.contextType)&&r[c.__c],b=c?D?D.props.value:c.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(y,b):(t.__c=d=new S(y,b),d.constructor=C,d.render=O),D&&D.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=r,p=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=v({},d.__s)),v(d.__s,C.getDerivedStateFromProps(y,d.__s))),f=d.props,h=d.state,p)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||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&&s.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,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,g)}))}d.context=b,d.props=y,d.state=d.__s,(c=i.__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==E&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=v(v({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(f,h)),R(e,t,n,r,o,a,s,l,u),d.base=t.__e,d.__h.length&&s.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=P(n.__e,t,n,r,o,a,s,u);(c=i.diffed)&&c(t)}catch(e){t.__v=null,i.__e(e,t,n)}return t.__e}function I(e,t){i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function P(e,t,n,r,o,i,a,s){var l,u,c,d,h,v=n.props,g=t.props;if(o="svg"===t.type||o,null!=i)for(l=0;l<i.length;l++)if(null!=(u=i[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,i[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),i=null,s=!1}if(null===t.type)v!==g&&e.data!=g&&(e.data=g);else{if(null!=i&&(i=f.slice.call(e.childNodes)),c=(v=n.props||p).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(v===p)for(v={},h=0;h<e.attributes.length;h++)v[e.attributes[h].name]=e.attributes[h].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||M(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||M(e,i,t[i],n[i],r)})(e,g,v,o,s),d?t.__k=[]:(t.__k=t.props.children,R(e,t,n,r,"foreignObject"!==t.type&&o,i,a,p,s)),s||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&M(e,"value",l,v.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&M(e,"checked",l,v.checked,!1))}return e}function N(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){i.__e(e,n)}}function H(e,t,n){var r,o,a;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||N(r,null,t)),n||"function"==typeof e.type||(n=null!=(o=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&H(r[a],t,n);null!=o&&g(o)}function O(e,t,n){return this.constructor(e,n)}function A(e,t,n){var r,o,a;i.__&&i.__(e,t),o=(r=n===c)?null:n&&n.__k||t.__k,e=m(E,null,[e]),a=[],_(t,(r?t:n||t).__k=e,o||p,p,void 0!==t.ownerSVGElement,n&&!r?[n]:o?null:f.slice.call(t.childNodes),a,n||p,r),I(a,e)}i={__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 C(n.__E=n)}catch(t){e=t}throw e}},S.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),C(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},S.prototype.render=E,a=[],s=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=p,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:S,createElement:m,render:A,createRef:function(){return{}},Fragment:E,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,o=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=o,t},this.shouldComponentUpdate=function(e){o.props.value!==e.value&&r.some((function(t){t.context=e.value,C(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 o=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&o.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=i.debounceRendering,t=[];i.debounceRendering=function(e){t.push(e)},A(m(U,{}),document.createElement("div"));for(;t.length;)t.shift()();i.debounceRendering=e}};var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return m("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(S);var L=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 W(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(z(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function z(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function F(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o++)for(var i=n[o].querySelectorAll(t),a=0;a<i.length;a++)r.push(i[a]);return r}var B=/(top|left|right|bottom|width|height)$/i;function j(e,t){for(var n in t)G(e,n,t[n])}function G(e,t,n){null==n?e.style[t]="":"number"==typeof n&&B.test(t)?e.style[t]=n+"px":e.style[t]=n}function q(e){e.preventDefault()}function Y(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function Z(e,t,n,r){var o=Y(n,r);return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}var X=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function K(e,t){var n=function(r){t(r),X.forEach((function(t){e.removeEventListener(t,n)}))};X.forEach((function(t){e.addEventListener(t,n)}))}var J=0;function $(){return String(J++)}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",q)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",q)}function re(e){e.addEventListener("contextmenu",q)}function oe(e){e.removeEventListener("contextmenu",q)}function ie(e){var t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t++)"string"==typeof(n=o[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 ae(e,t,n){var r,o;for(r=0;r<n.length;r++)if(o=se(e,t,n[r]))return o;return 0}function se(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 pe(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 fe=["sun","mon","tue","wed","thu","fri","sat"];function he(e,t){var n=ke(e);return n[2]+=7*t,Me(n)}function ve(e,t){var n=ke(e);return n[2]+=t,Me(n)}function ge(e,t){var n=ke(e);return n[6]+=t,Me(n)}function me(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function Ee(e,t){var n=be(e),r=be(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function Se(e,t){var n=De(e,t);return null!==n&&n%7==0?n/7:null}function De(e,t){return _e(e)===_e(t)?Math.round(ye(e,t)):null}function be(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Ce(e,t,n,r){var o=Me([t,0,1+we(t,n,r)]),i=be(e),a=Math.round(ye(o,i));return Math.floor(a/7)+1}function we(e,t,n){var r=7+t-n;return-((7+Me([e,0,r]).getUTCDay()-t)%7)+r-1}function Re(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Te(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 ke(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Me(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function xe(e){return!isNaN(e.valueOf())}function _e(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:$(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Pe=Object.prototype.hasOwnProperty;function Ne(e,t){var n={};if(t)for(var r in t){for(var o=[],i=e.length-1;i>=0;i--){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=Ne(o))}for(i=e.length-1;i>=0;i--){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function He(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Oe(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Ae(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function Ue(e){var t=[];for(var n in e)t.push(e[n]);return t}function Le(e,t){if(e===t)return!0;for(var n in e)if(Pe.call(e,n)&&!(n in t))return!1;for(var n in t)if(Pe.call(t,n)&&e[n]!==t[n])return!1;return!0}function We(e,t){var n=[];for(var r in e)Pe.call(e,r)&&(r in t||n.push(r));for(var r in t)Pe.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)||!ze(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function ze(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Fe(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;i<n;i+=r){var a=e[i];void 0!==a&&o.push(a)}return o}function Be(e,t,n){var r=n.dateEnv,o=n.pluginHooks,i=n.options,a=e.defs,s=e.instances;for(var l in s=He(s,(function(e){return!a[e.defId].recurringDef})),a){var u=a[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);for(var d=0,p=je(u,c,t,r,o.recurringTypes);d<p.length;d++){var f=p[d],h=Ie(l,{start:f,end:r.add(f,c)});s[h.instanceId]=h}}}return{defs:a,instances:s}}function je(e,t,n,r,o){var i=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(i=i.map(be)),i}var Ge=["years","months","days","milliseconds"],qe=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Ye(e,t){var n;return"string"==typeof e?function(e){var t=qe.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?Ze(e):"number"==typeof e?Ze(((n={})[t||"milliseconds"]=e,n)):null}function Ze(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 Xe(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ke(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Je(e){return $e(e)/864e5}function $e(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<Ge.length;r++){var o=Ge[r];if(t[o]){var i=e[o]/t[o];if(!de(i)||null!==n&&n!==i)return null;n=i}else if(e[o])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),o=Math.floor(r/60),i=Math.round(r%60);return t?n+ue(o,2)+":"+ue(i,2):"GMT"+n+o+(i?":"+ue(i,2):"")}function ot(e,t,n){if(e===t)return!0;var r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function it(e,t,n){var r,o;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(r){if(!ot(r,i)){n&&n(o);var s=e.apply(this,i);t&&t(s,o)||(o=s)}}else o=e.apply(this,i);return r=i,o}}function at(e,t,n){var r,o;return function(i){if(r){if(!Le(r,i)){n&&n(o);var a=e.call(this,i);t&&t(a,o)||(o=a)}}else o=e.call(this,i);return r=i,o}}var st={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,pt=/\u200e/g,ft=/UTC|GMT/,ht=function(){function e(e){var t={},n={},r=0;for(var o in e)o in st?(n[o]=e[o],r=Math.max(st[o],r)):(t[o]=e[o],o in lt&&(r=Math.max(lt[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=it(vt)}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 o=this.standardDateProps,i=this.extendedSettings,a=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(_e(e)!==_e(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!a)return this.format(e,n);var s=a;!(s>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(s=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=vt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(o,s),i,n),d=c(e),p=c(t),f=function(e,t,n,r){var o=0;for(;o<e.length;){var i=e.indexOf(t,o);if(-1===i)break;var a=e.substr(0,i);o=i+t.length;for(var s=e.substr(o),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(a===c&&s===d)return{before:a,after:s}}}return null}(l,d,u,p),h=i.separator||r||n.defaultSeparator||"";return f?f.before+d+h+p+f.after:l+h+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 vt(e,t,n){var o=Object.keys(e).length;return 1===o&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===o&&t.week?function(e){return function(e,t,n,r){var o=[];"narrow"===r?o.push(t):"short"===r&&o.push(t," ");o.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&o.reverse();return o.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 o,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var a=r({},e);delete a.minute,o=new Intl.DateTimeFormat(n.locale.codes,a)}return function(r){var a=r.marker;return function(e,t,n,r,o){e=e.replace(pt,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(ft,(function(){return n=!0,t})),n||(e+=" "+t);return e}(e,"UTC"===o.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()})));return e=(e=e.replace(dt," ")).trim()}((o&&!a.getUTCMinutes()?o:i).format(a),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 mt(e,t,n,r){var o=gt(e,n.calendarSystem);return{date:o,start:o,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,mt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,mt(e,t,n,r))},e}(),Et=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(mt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(mt(e,t,n,r))},e}();function St(e){return"object"==typeof e&&e?new ht(e):"string"==typeof e?new yt(e):"function"==typeof e?new Et(e):void 0}var Dt={navLinkDayClick:_t,navLinkWeekClick:_t,duration:Ye,bootstrapFontAwesome:_t,buttonIcons:_t,customButtons:_t,defaultAllDayEventDuration:Ye,defaultTimedEventDuration:Ye,nextDayThreshold:Ye,scrollTime:Ye,slotMinTime:Ye,slotMaxTime:Ye,dayPopoverFormat:St,slotDuration:Ye,snapDuration:Ye,headerToolbar:_t,footerToolbar:_t,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:St,dayHeaderClassNames:_t,dayHeaderContent:_t,dayHeaderDidMount:_t,dayHeaderWillUnmount:_t,dayCellClassNames:_t,dayCellContent:_t,dayCellDidMount:_t,dayCellWillUnmount:_t,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:_t,weekNumbers:Boolean,weekNumberClassNames:_t,weekNumberContent:_t,weekNumberDidMount:_t,weekNumberWillUnmount:_t,editable:Boolean,viewClassNames:_t,viewDidMount:_t,viewWillUnmount:_t,nowIndicator:Boolean,nowIndicatorClassNames:_t,nowIndicatorContent:_t,nowIndicatorDidMount:_t,nowIndicatorWillUnmount:_t,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:_t,locale:_t,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:_t,eventOrder:ie,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:_t,contentHeight:_t,direction:String,weekNumberFormat:St,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:_t,initialDate:_t,now:_t,eventDataTransform:_t,stickyHeaderDates:_t,stickyFooterScrollbar:_t,viewHeight:_t,defaultAllDay:Boolean,eventSourceFailure:_t,eventSourceSuccess:_t,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:_t,eventConstraint:_t,eventAllow:_t,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:_t,eventContent:_t,eventDidMount:_t,eventWillUnmount:_t,selectConstraint:_t,selectOverlap:_t,selectAllow:_t,droppable:Boolean,unselectCancel:String,slotLabelFormat:_t,slotLaneClassNames:_t,slotLaneContent:_t,slotLaneDidMount:_t,slotLaneWillUnmount:_t,slotLabelClassNames:_t,slotLabelContent:_t,slotLabelDidMount:_t,slotLabelWillUnmount:_t,dayMaxEvents:_t,dayMaxEventRows:_t,dayMinWidth:Number,slotLabelInterval:Ye,allDayText:String,allDayClassNames:_t,allDayContent:_t,allDayDidMount:_t,allDayWillUnmount:_t,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:St,rerenderDelay:Number,moreLinkText:_t,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:_t,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Ye,hiddenDays:_t,monthMode:Boolean,fixedWeekCount:Boolean,validRange:_t,visibleRange:_t,titleFormat:_t,noEventsText:String},bt={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},Ct={datesSet:_t,eventsSet:_t,eventAdd:_t,eventChange:_t,eventRemove:_t,windowResize:_t,eventClick:_t,eventMouseEnter:_t,eventMouseLeave:_t,select:_t,unselect:_t,loading:_t,_unmount:_t,_beforeprint:_t,_afterprint:_t,_noEventDrop:_t,_noEventResize:_t,_resize:_t,_scrollRequest:_t},wt={buttonText:_t,views:_t,plugins:_t,initialEvents:_t,events:_t,eventSources:_t},Rt={headerToolbar:Tt,footerToolbar:Tt,buttonText:Tt,buttonIcons:Tt};function Tt(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?Le(e,t):e===t}var kt={type:String,component:_t,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:_t,usesMinMaxTime:Boolean,classNames:_t,content:_t,didMount:_t,willUnmount:_t};function Mt(e){return Ne(e,Rt)}function xt(e,t){var n={},r={};for(var o in t)o in e&&(n[o]=t[o](e[o]));for(var o in e)o in t||(r[o]=e[o]);return{refined:n,extra:r}}function _t(e){return e}function It(e,t,n,r){for(var o={defs:{},instances:{}},i=Zt(n),a=0,s=e;a<s.length;a++){var l=qt(s[a],t,n,r,i);l&&Pt(l,o)}return o}function Pt(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 Nt(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],o=At(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return{defs:{},instances:{}}}function Ht(){return{defs:{},instances:{}}}function Ot(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function At(e,t){var n=He(e.defs,t),r=He(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Ut(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Lt={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:_t,overlap:_t,allow:_t,className:Ut,classNames:Ut,color:String,backgroundColor:String,borderColor:String,textColor:String};function Wt(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 Vt(e){return e.reduce(zt,Ft)}function zt(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 Ft={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},jt={start:_t,end:_t,date:_t,allDay:Boolean},Gt=r(r(r({},Bt),jt),{extendedProps:_t});function qt(e,t,n,r,o){void 0===o&&(o=Zt(n));var i=Yt(e,n,o),a=i.refined,s=i.extra,l=function(e,t){var n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),u=function(e,t,n,r){for(var o=0;o<r.length;o++){var i=r[o].parse(e,n);if(i){var a=e.allDay;return null==a&&null==(a=t)&&null==(a=i.allDayGuess)&&(a=!1),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:o}}}return null}(a,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Xt(a,s,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 o,i,a=e.allDay,s=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(c))s=o.marker;else if(!r)return null;null!=e.end&&(i=n.dateEnv.createMarkerMeta(e.end));null==a&&(a=null!=t?t:(!o||o.isTimeUnspecified)&&(!i||i.isTimeUnspecified));a&&s&&(s=be(s));i&&(u=i.marker,a&&(u=be(u)),s&&u<=s&&(u=null));u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(s,a?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration));return{allDay:a,hasEnd:l,range:{start:s,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:i?i.forcedTzo:null}}(a,l,n,r);return d?{def:c=Xt(a,s,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Yt(e,t,n){return void 0===n&&(n=Zt(t)),xt(e,n)}function Zt(e){return r(r(r({},Lt),Gt),e.pluginHooks.eventRefiners)}function Xt(e,t,n,o,i,a){for(var s={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:$(),sourceId:n,allDay:o,hasEnd:i,ui:Wt(e,a),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=a.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(s,c(e))}return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=be(e.start);return{start:n,end:ve(n,t)}}function Jt(e,t){void 0===t&&(t=Ye(0));var n=null,r=null;if(e.end){r=be(e.end);var o=e.end.valueOf()-r.valueOf();o&&o>=$e(t)&&(r=ve(r,1))}return e.start&&(n=be(e.start),r&&r<=n&&(r=ve(n,1))),{start:n,end:r}}function $t(e){var t=Jt(e);return ye(t.start,t.end)>1}function Qt(e,t,n,r){return"year"===r?Ye(n.diffWholeYears(e,t),"year"):"month"===r?Ye(n.diffWholeMonths(e,t),"month"):Ee(e,t)}function en(e,t){var n,r,o=[],i=t.start;for(e.sort(tn),n=0;n<e.length;n++)(r=e[n]).start>i&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return i<t.end&&o.push({start:i,end:t.end}),o}function tn(e,t){return e.start.valueOf()-t.start.valueOf()}function nn(e,t){var n=e.start,r=e.end,o=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)&&(o={start:n,end:r}),o}function rn(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 on(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function an(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 ln(e,t,n,r){var o={},i={},a={},s=[],l=[],u=pn(e.defs,t);for(var c in e.defs){"inverse-background"===(f=u[(S=e.defs[c]).defId]).display&&(S.groupId?(o[S.groupId]=[],a[S.groupId]||(a[S.groupId]=S)):i[c]=[])}for(var d in e.instances){var p=e.instances[d],f=u[(S=e.defs[p.defId]).defId],h=p.range,v=!S.allDay&&r?Jt(h,r):h,g=nn(v,n);g&&("inverse-background"===f.display?S.groupId?o[S.groupId].push(g):i[p.defId].push(g):"none"!==f.display&&("background"===f.display?s:l).push({def:S,ui:f,instance:p,range:g,isStart:v.start&&v.start.valueOf()===g.start.valueOf(),isEnd:v.end&&v.end.valueOf()===g.end.valueOf()}))}for(var m in o)for(var y=0,E=en(o[m],n);y<E.length;y++){var S,D=E[y];f=u[(S=a[m]).defId];s.push({def:S,ui:f,instance:null,range:D,isStart:!1,isEnd:!1})}for(var c in i)for(var b=0,C=en(i[c],n);b<C.length;b++){D=C[b];s.push({def:e.defs[c],ui:u[c],instance:null,range:D,isStart:!1,isEnd:!1})}return{bg:s,fg:l}}function un(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function cn(e,t){e.fcSeg=t}function dn(e){return e.fcSeg||e.parentNode.fcSeg||null}function pn(e,t){return Oe(e,(function(e){return fn(e,t)}))}function fn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Vt(n)}function hn(e,t){var n=e.map(vn);return n.sort((function(e,n){return ae(e,n,t)})),n.map((function(e){return e._seg}))}function vn(e){var t=e.eventRange,n=t.def,o=t.instance?t.instance.range:t.range,i=o.start?o.start.valueOf():0,a=o.end?o.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function gn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,o=r.def,i=r.ui,a=i.startEditable,s=0,l=n;s<l.length;s++){a=(0,l[s])(a,o,i,t)}return a}function mn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function yn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function En(e,t,n,r,o,i,a){var s=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,p=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==o),u&&!d.allDay&&(e.isStart||e.isEnd)){var f=i||(e.isStart?p.range.start:e.start||e.eventRange.range.start),h=a||(e.isEnd?p.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?s.formatRange(f,h,t,{forcedStartTzo:i?null:p.forcedStartTzo,forcedEndTzo:a?null:p.forcedEndTzo}):s.format(f,t,{forcedTzo:i?null:p.forcedStartTzo})}return""}function Sn(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 Dn(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 bn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var Cn={start:_t,end:_t,allDay:Boolean};function wn(e,t,n){var o=function(e,t){var n=xt(e,Cn),o=n.refined,i=n.extra,a=o.start?t.createMarkerMeta(o.start):null,s=o.end?t.createMarkerMeta(o.end):null,l=o.allDay;null==l&&(l=a&&a.isTimeUnspecified&&(!s||s.isTimeUnspecified));return r({range:{start:a?a.marker:null,end:s?s.marker:null},allDay:l},i)}(e,t),i=o.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return o}function Rn(e,t){return rn(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({},kn(e,t,n)),{timeZone:t.timeZone})}function kn(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 Mn(e,t,n){var r=Yt({editable:!1},n),o=Xt(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:fn(o,t),instance:Ie(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function xn(e,t,n){n.emitter.trigger("select",r(r({},_n(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function _n(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.dateSpanTransforms;a<s.length;a++){var l=s[a];r(i,l(e,t))}return r(i,(n=e,o=t.dateEnv,r(r({},kn(n.range,o,n.allDay)),{allDay:n.allDay}))),i}function In(e,t,n){var r=n.dateEnv,o=n.options,i=t;return e?(i=be(i),i=r.add(i,o.defaultAllDayEventDuration)):i=r.add(i,o.defaultTimedEventDuration),i}function Pn(e,t,n,r){var o=pn(e.defs,t),i={defs:{},instances:{}};for(var a in e.defs){var s=e.defs[a];i.defs[a]=Nn(s,o[a],n,r)}for(var l in e.instances){var u=e.instances[l];s=i.defs[u.defId];i.instances[l]=Hn(u,s,o[u.defId],n,r)}return i}function Nn(e,t,n,o){var i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);var a=r(r(r({},e),i),{ui:r(r({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=r(r({},a.extendedProps),n.extendedProps));for(var s=0,l=o.pluginHooks.eventDefMutationAppliers;s<l.length;s++){(0,l[s])(a,n,o)}return!a.hasEnd&&o.options.forceEventDuration&&(a.hasEnd=!0),a}function Hn(e,t,n,o,i){var a=i.dateEnv,s=o.standardProps&&!0===o.standardProps.allDay,l=o.standardProps&&!1===o.standardProps.hasEnd,u=r({},e);return s&&(u.range=Kt(u.range)),o.datesDelta&&n.startEditable&&(u.range={start:a.add(u.range.start,o.datesDelta),end:a.add(u.range.end,o.datesDelta)}),o.startDelta&&n.durationEditable&&(u.range={start:a.add(u.range.start,o.startDelta),end:u.range.end}),o.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:a.add(u.range.end,o.endDelta)}),l&&(u.range={start:u.range.start,end:In(t.allDay,u.range.start,i)}),t.allDay&&(u.range={start:be(u.range.start),end:be(u.range.end)}),u.range.end<u.range.start&&(u.range.end=In(t.allDay,u.range.start,i)),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}(),An={id:String,defaultAllDay:Boolean,url:String,events:_t,eventDataTransform:_t,success:_t,failure:_t};function Un(e,t,n){var r;if(void 0===n&&(n=Ln(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var o=xt(r,n),i=o.refined,a=o.extra,s=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:$(),sourceDefId:s.sourceDefId,meta:s.meta,ui:Wt(i,t),extendedProps:a}}return null}function Ln(e){return r(r(r({},Lt),An),e.pluginHooks.eventSourceRefiners)}function Wn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Vn=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,o([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(),o=r.viewSpecs,i=r.toolbarConfig,a=[].concat(i.viewsWithButtons);for(var s in o)a.push(s);for(t=0;t<a.length;t++)if((n=o[a[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:Wn(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=Ye(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),St(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),St(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(),o=wn(n,r.dateEnv,Ye({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),xn(o,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 zn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Pt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var o,i=this.getCurrentData();if(t instanceof L)o=t.internalEventSource;else if("boolean"==typeof t)t&&(o=Ue(i.eventSources)[0]);else if(null!=t){var a=this.getEventSourceById(t);if(!a)return console.warn('Could not find an event source with ID "'+t+'"'),null;o=a.internalEventSource}var s=qt(e,o,i,!1);if(s){var l=new zn(i,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Pt(s)}),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:Fn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,o=n.instances;for(var i in e=String(e),r){var a=r[i];if(a.publicId===e){if(a.recurringDef)return new zn(t,a,null);for(var s in o){var l=o[s];if(l.defId===a.defId)return new zn(t,a,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Bn(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 L(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 L(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof L)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Un(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new L(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=Ye(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),zn=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 jt)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 Lt){var o=Lt[e](t);"color"===e?o={backgroundColor:t,borderColor:t}:"editable"===e?o={startEditable:t,durationEditable:t}:((r={})[e]=t,o=r),this.mutate({standardProps:{ui:o}})}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 o=Qt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}},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 o=Qt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,o,i,a=this._context.dateEnv,s={allDay:n.allDay},l=a.createMarker(e);if(l&&((null==t||(r=a.createMarker(t)))&&this._instance)){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Qt(u.start,l,a,n.granularity);if(r){var d=Qt(u.end,r,a,n.granularity);i=d,(o=c).years===i.years&&o.months===i.months&&o.days===i.days&&o.milliseconds===i.milliseconds?this.mutate({datesDelta:c,standardProps:s}):this.mutate({startDelta:c,endDelta:d,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:c,standardProps:s})}},e.prototype.moveStart=function(e){var t=Ye(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=Ye(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=Ye(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=St(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,o=this._context,i=Nt(o.getCurrentData().eventStore,n.instanceId);i=Pn(i,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,o);var a=new e(o,r,n);this._def=i.defs[r.defId],this._instance=i.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:i}),o.emitter.trigger("eventChange",{oldEvent:a,event:this,relatedEvents:Bn(i,o,n),revert:function(){o.dispatch({type:"REMOVE_EVENTS",eventStore:i})}})}},e.prototype.remove=function(){var e=this._context,t=Fn(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 L(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,o=this.startStr,i=this.endStr,a={};return t.title&&(a.title=t.title),o&&(a.start=o),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&"auto"!==n.display&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(a,t.extendedProps):a.extendedProps=t.extendedProps),a},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Fn(e){var t,n,r=e._def,o=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:o?(n={},n[o.instanceId]=o,n):{}}}function Bn(e,t,n){var r=e.defs,o=e.instances,i=[],a=n?n.instanceId:"";for(var s in o){var l=o[s],u=r[l.defId];l.instanceId!==a&&i.push(new zn(t,u,l))}return i}var jn={};var Gn,qn=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 Me(e)},e.prototype.markerToArray=function(e){return ke(e)},e}();Gn=qn,jn["gregory"]=Gn;var Yn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Zn(e){var t=Yn.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(xe(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 Xn=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 jn[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()):Me(Re(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=Me(e)),null!==t&&xe(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Zn(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 _e(e)===_e(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 _e(e)===_e(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=Se(e,t))?{unit:"week",value:n}:null!==(n=De(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/(Je(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Je(e)/30}(n):n.days&&null!==(r=De(e,t))?r/Je(n):(t.valueOf()-e.valueOf())/$e(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?be(e):"hour"===t?function(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Me([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(),o=Ce(e,r,t,n);if(o<1)return Ce(e,r-1,t,n);var i=Ce(e,r+1,t,n);return i>=1?Math.min(o,i):o}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=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?Me(Re(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Me(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Te(ke(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ke(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Te(ke(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(ke(e))*60):new Date(e.valueOf()-(t||0))},e}(),Kn=[],Jn={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 $n(e){for(var t=e.length>0?e[0].code:"en",n=Kn.concat(e),r={en:Jn},o=0,i=n;o<i.length;o++){var a=i[o];r[a.code]=a}return{map:r,defaultCode:t}}function Qn(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("-"),o=r.length;o>0;o--){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Jn;return er(e,n,r)}(e,t):er(e.code,[e.code],e)}function er(e,t,n){var r=Ne([Jn,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function tr(e){var t=Qn(e.locale||"en",$n([]).map);return new Xn(r(r({timeZone:bt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var nr,rr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function or(e,t){return It(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return r(r({},rr),e)}))}(e),null,t)}function ir(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ar(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 sr(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 lr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ur(e,t){return{left:e.left-t.left,top:e.top-t.top}}function cr(){return null==nr&&(nr=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}()),nr}var dr={defs:{},instances:{}},pr=function(){function e(){this.getKeysForEventDefs=it(this._getKeysForEventDefs),this.splitDateSelection=it(this._splitDateSpan),this.splitEventStore=it(this._splitEventStore),this.splitIndividualUi=it(this._splitIndividualUi),this.splitEventDrag=it(this._splitInteraction),this.splitEventResize=it(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Oe(n,(function(e,n){return t.eventUiBuilders[n]||it(fr)})),n){var d=n[c],p=a[c]||dr,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:o[c]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],d.ui,i[c]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Oe(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,o={};for(var i in n)for(var a=0,s=t[i];a<s.length;a++){o[p=s[a]]||(o[p]={defs:{},instances:{}}),o[p].defs[i]=n[i]}for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var p;o[p=d[c]]&&(o[p].instances[l]=u)}return o},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var o=0,i=t[r];o<i.length;o++){var a=i[o];n[a]||(n[a]={}),n[a][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),o=this._splitEventStore(e.mutatedEvents,r),i=function(r){t[r]||(t[r]={affectedEvents:n[r]||dr,mutatedEvents:o[r]||dr,isEvent:e.isEvent})};for(var a in n)i(a);for(var a in o)i(a)}return t},e}();function fr(e,t,n){var o=[];e&&o.push(e),t&&o.push(t);var i={"":Vt(o)};return n&&r(i,n),i}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 vr(e,t){var n=["fc-day","fc-day-"+fe[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 gr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,yr=null;function Er(){return null===yr&&(yr=function(){var e=document.createElement("div");j(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 W(e),t}()),yr}function Sr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=Dr(e);return document.body.removeChild(e),t}()),mr}function Dr(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,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=Dr(e),l=s.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:s.x-i-a,scrollbarLeft:0,scrollbarRight:0};return Er()&&"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 Cr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():wr(e),o=br(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function wr(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 Rr(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 Tr(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var kr=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]||[],o=this.options&&this.options[e],i=[].concat(o||[],r),a=0,s=i;a<s.length;a++){var l=s[a];l.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}();var Mr=function(){function e(e,t,n,r){this.els=t;var o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,o=n.length;for(t=0;t<o;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,o=n.length;for(t=0;t<o;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}(),xr=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}(),_r=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}(xr),Ir=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}(xr),Pr=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(Pr.prototype.classes={},Pr.prototype.iconClasses={},Pr.prototype.baseIconClass="",Pr.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Nr=FullCalendarVDom.Component,Hr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Ar=FullCalendarVDom.createRef,Ur=FullCalendarVDom.Fragment,Lr=FullCalendarVDom.createContext,Wr=FullCalendarVDom.flushToDom,Vr=function(){function e(e,t,n){var o=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){o.queuedRequest=r({},o.queuedRequest||{},e),o.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}(),zr=Lr({});function Fr(e,t,n,r,o,i,a,s,l,u,c,d,p){return{dateEnv:o,options:n,pluginHooks:a,emitter:u,dispatch:s,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:i,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new Vr(e,u,Ye(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:p}}var Br=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(We(e,this.props),We(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Gr,t.addStateEquality=qr,t.contextType=zr,t}(Nr);Br.prototype.propEquality={},Br.prototype.stateEquality={};var jr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=zr,t}(Br);function Gr(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function qr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function Yr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Zr(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,i){if(t&&n===t.latestFetchId){var a=It(function(e,t,n){var r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;o&&(e=Xr(e,o));r&&(e=Xr(e,r));return e}(o,t,i),t,i);return r&&(a=Be(a,r,i)),Ot(Kr(e,t.sourceId),a)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Be(t,n,r));return Ot(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"MERGE_EVENTS":return Ot(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Be(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,o={},i={};for(var a in n)t.defs[a]||(o[a]=n[a]);for(var s in r)!t.instances[s]&&o[r[s].defId]&&(i[s]=r[s]);return{defs:o,instances:i}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Kr(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return At(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Xr(e,t){var n;if(t){n=[];for(var r=0,o=e;r<o.length;r++){var i=o[r],a=t(i);a?n.push(a):null==a&&n.push(i)}}else n=e;return n}function Kr(e,t){return At(e,(function(e){return e.sourceId!==t}))}function Jr(e,t){return $r({eventDrag:e},t)}function $r(e,t){var n=t.getCurrentData(),o=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Qr)(o,t)}function Qr(e,t,n,o){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,o){var i=t.getCurrentData(),a=e.eventDrag,s=a.mutatedEvents,l=s.defs,u=s.instances,c=pn(l,a.isEvent?e.eventUiBases:{"":i.selectionConfig});o&&(c=Oe(c,o));var d=(v=e.eventStore,g=a.affectedEvents.instances,{defs:v.defs,instances:He(v.instances,(function(e){return!g[e.instanceId]}))}),p=d.defs,f=d.instances,h=pn(p,e.eventUiBases);var v,g;for(var m in u){var y=u[m],E=y.range,S=c[y.defId],D=l[y.defId];if(!eo(S.constraints,E,d,e.businessHours,t))return!1;var b=t.options.eventOverlap,C="function"==typeof b?b:null;for(var w in f){var R=f[w];if(on(E,R.range)){if(!1===h[R.defId].overlap&&a.isEvent)return!1;if(!1===S.overlap)return!1;if(C&&!C(new zn(t,p[R.defId],R),new zn(t,D,y)))return!1}}for(var T=i.eventStore,k=0,M=S.allows;k<M.length;k++){var x=M[k],_=r(r({},n),{range:y.range,allDay:D.allDay}),I=T.defs[D.defId],P=T.instances[m],N=void 0;if(N=I?new zn(t,I,P):new zn(t,D),!x(_n(_,t),N))return!1}}return!0}(e,t,n,o))&&!(e.dateSelection&&!function(e,t,n,o){var i=e.eventStore,a=i.defs,s=i.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;o&&(c=o(c));if(!eo(c.constraints,u,i,e.businessHours,t))return!1;var d=t.options.selectOverlap,p="function"==typeof d?d:null;for(var f in s){var h=s[f];if(on(u,h.range)){if(!1===c.overlap)return!1;if(p&&!p(new zn(t,a[h.defId],h),null))return!1}}for(var v=0,g=c.allows;v<g.length;v++){var m=g[v],y=r(r({},n),l);if(!m(_n(y,t),null))return!1}return!0}(e,t,n,o))}function eo(e,t,n,r,o){for(var i=0,a=e;i<a.length;i++){if(!ro(to(a[i],t,n,r,o),t))return!1}return!0}function to(e,t,n,r,o){return"businessHours"===e?no(Be(r,t,o)):"string"==typeof e?no(At(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?no(Be(e,t,o)):[]}function no(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ro(e,t){for(var n=0,r=e;n<r.length;n++){if(an(r[n],t))return!0}return!1}var oo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=$(),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(!an(t.validRange,n[r].range))return!1;return Jr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t,n,r=this.props.dateProfile;return!(r&&!an(r.validRange,e.range))&&(t=e,n=this.context,$r({dateSelection:t},n))},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}(jr);function io(e){return{id:$(),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||{}}}function ao(){var e,t=[],n=[];return function(o,i){return e&&ot(o,t)&&ot(i,n)||(e=function(e,t){var n={},o={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 i(e){for(var t=0,a=e;t<a.length;t++){var s=a[t];n[s.id]||(n[s.id]=!0,i(s.deps),u=s,o={reducers:(l=o).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&&i(e),i(t),o}(o,i)),t=o,n=i,e}}var so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Pr);function lo(e,t,n,o){if(t[e])return t[e];var i=function(e,t,n,o){var i=n[e],a=o[e],s=function(e){return i&&null!==i[e]?i[e]:a&&null!==a[e]?a[e]:null},l=s("component"),u=s("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=lo(u,t,n,o)}!l&&c&&(l=c.component);if(!l)return null;return{type:e,component:l,defaults:r(r({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),a?a.rawOptions:{})}}(e,t,n,o);return i&&(t[e]=i),i}so.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},so.prototype.baseIconClass="fc-icon",so.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"},so.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},so.prototype.iconOverrideOption="buttonIcons",so.prototype.iconOverrideCustomButtonOption="icon",so.prototype.iconOverridePrefix="fc-icon-";var uo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ar(),t.handleRootEl=function(e){Yr(t.rootElRef,e),t.props.elRef&&Yr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Hr(ho,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Hr(po,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,o){return t.children(r,go(t.classNames,n),e,o)}))}))},t}(jr),co=Lr(0);function po(e){return Hr(co.Consumer,null,(function(t){return Hr(fo,r({renderId:t},e))}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Ar(),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=mo(t.content,t.hookProps),o=null;if(void 0===r&&(r=mo(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var i in e)if(void 0!==r[i]){n=this.customContentInfo={contentKey:i,contentVal:r[i],handler:e[i]()};break}o=n?[]:r}return o},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(jr),ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&Yr(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}(jr);function vo(){var e,t,n=[];return function(r,o){return t&&Le(t,o)&&r===e||(e=r,t=o,n=go(r,o)),n}}function go(e,t){return"function"==typeof e&&(e=e(t)),Ut(e)}function mo(e,t){return"function"==typeof e?e(t,Hr):e}var yo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=vo(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},o=this.normalizeClassNames(n.viewClassNames,r);return Hr(ho,{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(o))}))},t}(jr);function Eo(e){return Oe(e,So)}function So(e){var t,n="function"==typeof e?{component:e}:e,o=n.component;return n.content&&(t=n,o=function(e){return Hr(zr.Consumer,null,(function(n){return Hr(yo,{viewSpec:n.viewSpec},(function(o,i){var a=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Hr(uo,{hookProps:a,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:o},(function(e,t,n,r){return Hr("div",{className:i.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:o,rawOptions:n}}function Do(e,t,n,o){var i=Eo(e),a=Eo(t.views);return Oe(function(e,t){var n,r={};for(n in e)lo(n,r,e,t);for(n in t)lo(n,r,e,t);return r}(i,a),(function(e){return function(e,t,n,o,i){var a=e.overrides.duration||e.defaults.duration||o.duration||n.duration,s=null,l="",u="",c={};if(a&&(s=function(e){var t=JSON.stringify(e),n=bo[t];void 0===n&&(n=Ye(e),bo[t]=n);return n}(a))){var d=et(s);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var p=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:s,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:p(o)||p(n)||e.overrides.buttonText,buttonTextDefault:p(i)||e.defaults.buttonText||p(bt)||e.type}}(e,a,t,n,o)}))}var bo={};var Co=function(){function e(e){this.props=e,this.nowDate=Wn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,o,i,a,s,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),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),d.showNonCurrentDates||(s=nn(s,o.range)),s=nn(s=this.adjustActiveRange(s),r),l=on(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=et(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Ye({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(Je(o)<0&&(a=be(a),a=n.add(a,o)),Je(i)>1&&(s=ve(s=be(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,u=s.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&$e(c)<$e(n)?et(c).unit:r}function d(){o=l.startOf(e,u),i=l.add(o,n),a={start:o,end:i}}return Je(n)<=1&&this.isHiddenDay(o)&&(o=be(o=this.skipHiddenDays(o,t))),d(),this.trimHiddenDays(a)||(e=this.skipHiddenDays(e,t),d()),a},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,o=this.props,i=o.dateEnv,a=o.dateAlignment,s=0,l=e;a&&(l=i.startOf(l,a)),l=be(l),r=l=this.skipHiddenDays(l,t);do{r=ve(r,1),this.isHiddenDay(r)||s++}while(s<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,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.props.dateIncrement;return n||((t=this.props.dateAlignment)?Ye(1,t):e||Ye({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,o=null,i=null,n.start&&(o=r.createMarker(n.start)),n.end&&(i=r.createMarker(n.end)),o||i?o&&i&&i<o?null:{start:o,end:i}:null);return t&&(t=Jt(t)),t}var n,r,o,i;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=ve(e,t);return e},e}();function wo(e,t,n){var r=t?t.activeRange:null;return ko({},function(e,t){var n=Ln(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(var i=0,a=r;i<a.length;i++){var s=Un(a[i],t,n);s&&o.push(s)}return o}(e,n),r,n)}function Ro(e,t,n,o){var i,a,s=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return ko(e,t.sources,s,o);case"REMOVE_EVENT_SOURCE":return i=e,a=t.sourceId,He(i,(function(e){return e.sourceId!==a}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Mo(e,s,o):e;case"FETCH_EVENT_SOURCES":return xo(e,t.sourceIds?Ae(t.sourceIds):Io(e,o),s,o);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,o){var i,a=e[t];if(a&&n===a.latestFetchId)return r(r({},e),((i={})[t]=r(r({},a),{isFetching:!1,fetchRange:o}),i));return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function To(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function ko(e,t,n,o){for(var i={},a=0,s=t;a<s.length;a++){var l=s[a];i[l.sourceId]=l}return n&&(i=Mo(i,n,o)),r(r({},e),i)}function Mo(e,t,n){return xo(e,He(e,(function(e){return function(e,t,n){return Po(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 xo(e,t,n,r){var o={};for(var i in e){var a=e[i];t[i]?o[i]=_o(a,n,r):o[i]=a}return o}function _o(e,t,n){var o=n.options,i=n.calendarApi,a=n.pluginHooks.eventSourceDefs[e.sourceDefId],s=$();return a.fetch({eventSource:e,range:t,context:n},(function(r){var a=r.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,r.xhr)||a),e.success&&(a=e.success.call(i,a,r.xhr)||a),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:a})}),(function(r){console.warn(r.message,r),o.eventSourceFailure&&o.eventSourceFailure.call(i,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:s})}function Io(e,t){return He(e,(function(e){return Po(e,t)}))}function Po(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function No(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Ho(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Oo(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 Ao(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 Uo(e,t,n,r,o){var i=[];return{headerToolbar:e.headerToolbar?Lo(e.headerToolbar,e,t,n,r,o,i):null,footerToolbar:e.footerToolbar?Lo(e.footerToolbar,e,t,n,r,o,i):null,viewsWithButtons:i}}function Lo(e,t,n,r,o,i,a){return Oe(e,(function(e){return function(e,t,n,r,o,i,a){var s="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,p=void 0,f=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(p=r.getCustomButtonIconClass(t))||(p=r.getIconClass(e,s))||(f=t.text)):(n=o[e])?(a.push(e),d=function(){i.changeView(e)},(f=n.buttonTextOverride)||(p=r.getIconClass(e,s))||(f=n.buttonTextDefault)):i[e]&&(d=function(){i[e]()},(f=u[e])||(p=r.getIconClass(e,s))||(f=c[e])),{buttonName:e,buttonClick:d,buttonIcon:p,buttonText:f}}))}))}(e,t,n,r,o,i,a)}))}function Wo(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Vo(t)}(t,n):i=Vo(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function Vo(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function zo(e,t){for(var n=Ue(t.getCurrentData().eventSources),r=[],o=0,i=e;o<i.length;o++){for(var a=i[o],s=!1,l=0;l<n.length;l++)if(n[l]._raw===a){n.splice(l,1),s=!0;break}s||r.push(a)}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 p=0,f=r;p<f.length;p++){var h=f[p];t.calendarApi.addEventSource(h)}}var Fo=[io({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),io({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;Tr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),io({eventSourceRefiners:{method:String,extraParams:_t,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 o=e.eventSource.meta,i=function(e,t,n){var o,i,a,s,l=n.dateEnv,u=n.options,c={};null==(o=e.startParam)&&(o=u.startParam);null==(i=e.endParam)&&(i=u.endParam);null==(a=e.timeZoneParam)&&(a=u.timeZoneParam);s="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};r(c,s),c[o]=l.formatIso(t.start),c[i]=l.formatIso(t.end),"local"!==l.timeZone&&(c[a]=l.timeZone);return c}(o,e.range,e.context);Wo(o.method,o.url,i,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),io({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&&(o=e.endTime,i=e.startTime,r={years:o.years-i.years,months:o.months-i.months,days:o.days-i.days,milliseconds:o.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var o,i;return null},expand:function(e,t,n){var r=nn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var o=e?Ae(e):null,i=be(n.start),a=n.end,s=[];for(;i<a;){var l=void 0;o&&!o[i.getUTCDay()]||(l=t?r.add(i,t):i,s.push(l)),i=ve(i,1)}return s}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:_t,startTime:Ye,endTime:Ye,duration:Ye,startRecur:_t,endRecur:_t}}),io({optionChangeHandlers:{events:function(e,t){zo([e],t)},eventSources:zo}}),io({contentTypeHandlers:{html:function(){return Bo},domNodes:function(){return jo}},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",Bn(e,t))}}})];function Bo(e,t){e.innerHTML=t}function jo(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!ot(n,r)){for(var o=0,i=r;o<i.length;o++){var a=i[o];e.appendChild(a)}n.forEach(W)}}var Go=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;if(e in n){if(t)delete n[e];else--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}(),qo=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Go(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 Yo(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,St(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=De(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 Zo=function(){function e(e){var t=this;this.computeOptionsData=it(this._computeOptionsData),this.computeCurrentViewData=it(this._computeCurrentViewData),this.organizeRawLocales=it($n),this.buildLocale=it(Qn),this.buildPluginHooks=ao(),this.buildDateEnv=it(Xo),this.buildTheme=it(Ko),this.parseToolbars=it(Uo),this.buildViewSpecs=it(Do),this.buildDateProfileGenerator=at(Jo),this.buildViewApi=it($o),this.buildViewUiProps=at(ti),this.buildEventUiBySource=it(Qo,Le),this.buildEventUiBases=it(ei),this.parseContextBusinessHours=at(ni),this.buildTitle=it(Yo),this.emitter=new kr,this.actionRunner=new qo(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},o=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=o.calendarOptions.initialView||o.pluginHooks.initialView,a=this.computeCurrentViewData(i,o,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(a.options);var s,l,u,c=(s=o.calendarOptions,l=o.dateEnv,null!=(u=s.initialDate)?l.createMarker(u):Wn(s.now,l)),d=a.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var p={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,h=o.pluginHooks.contextInit;f<h.length;f++){(0,h[f])(p)}for(var v=wo(o.calendarOptions,d,p),g={dynamicOptionOverrides:n,currentViewType:i,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(p),eventSources:v,eventUiBases:{},loadingLevel:To(v),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(p).selectionConfig},m=r(r({},p),g),y=0,E=o.pluginHooks.reducers;y<E.length;y++){var S=E[y];r(g,S(null,null,m))}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,o=this.emitter,i=function(e,t){var n;switch(t.type){case"SET_OPTION":return r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n));default:return e}}(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),s=function(e,t){switch(t.type){case"CHANGE_VIEW_TYPE":return t.viewType}return e}(n.currentViewType,e),l=this.computeCurrentViewData(s,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,o.setThisContext(t.calendarApi),o.setOptions(l.options);var u={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:o,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 o;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((o=r.buildPrev(e,n)).isValid)return o;break;case"NEXT":if((o=r.buildNext(e,n)).isValid)return o}return e}(d,e,c=function(e,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return e}}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var p=Ro(n.eventSources,e,d,u),f=To(p),h=Zr(n.eventStore,e,p,d,u),v=f&&!l.options.progressiveEventRendering&&n.renderableEventStore||h,g=this.buildViewUiProps(u),m=g.eventUiSingleBase,y=g.selectionConfig,E=this.buildEventUiBySource(p),S=this.buildEventUiBases(v.defs,m,E),D=n.loadingLevel||0,b=f,C={dynamicOptionOverrides:i,currentViewType:s,currentDate:c,dateProfile:d,eventSources:p,eventStore:h,renderableEventStore:v,selectionConfig:y,eventUiBases:S,loadingLevel:b,businessHours:this.parseContextBusinessHours(u),dateSelection:No(n.dateSelection,e),eventSelection:Ho(n.eventSelection,e),eventDrag:Oo(n.eventDrag,e),eventResize:Ao(n.eventResize,e)},w=r(r({},u),C),R=0,T=a.pluginHooks.reducers;R<T.length;R++){var k=T[R];r(C,k(n,e,w))}!D&&b?o.trigger("loading",!0):D&&!b&&o.trigger("loading",!1),this.state=C,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,o,i,a,s,l,u,c=this.props,d=this.state,p=this.data,f=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),h=this.computeCurrentViewData(d.currentViewType,f,c.optionOverrides,d.dynamicOptionOverrides),v=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,h.options,f.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f),h),d),g=f.pluginHooks.optionChangeHandlers,m=p&&p.calendarOptions,y=f.calendarOptions;if(m&&m!==y)for(var E in m.timeZone!==y.timeZone&&(d.eventSources=v.eventSources=(a=v.eventSources,s=d.dateProfile,l=v,u=s?s.activeRange:null,xo(a,Io(a,l),u,l)),d.eventStore=v.eventStore=(e=v.eventStore,t=p.dateEnv,n=v.dateEnv,o=e.defs,i=Oe(e.instances,(function(e){var i=o[e.defId];return i.allDay||i.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:o,instances:i})),g)m[E]!==y[E]&&g[E](y[E],v);c.onData&&c.onData(v)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),o=r.refinedOptions,i=r.pluginHooks,a=r.localeDefaults,s=r.availableLocaleData;ri(r.extra);var l=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,i,s,o.defaultRangeSeparator),u=this.buildViewSpecs(i.views,e,t,a),c=this.buildTheme(o,i);return{calendarOptions:o,pluginHooks:i,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(o,e,c,u,n),localeDefaults:a,availableRawLocales:s.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Mt([bt,e,t]),o=n.locales,i=n.locale,a=this.organizeRawLocales(o),s=a.map,l=this.buildLocale(i||a.defaultCode,s).options,u=this.buildPluginHooks(e.plugins||[],Fo),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},Dt),Ct),wt),u.listenerRefiners),u.optionRefiners),d={},p=Mt([bt,l,e,t]),f={},h=this.currentCalendarOptionsInput,v=this.currentCalendarOptionsRefined,g=!1;for(var m in p)"plugins"!==m&&(p[m]===h[m]||Rt[m]&&m in h&&Rt[m](h[m],p[m])?f[m]=v[m]:c[m]?(f[m]=c[m](p[m]),g=!0):d[m]=h[m]);return g&&(this.currentCalendarOptionsInput=p,this.currentCalendarOptionsRefined=f),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:a,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var o=t.viewSpecs[e];if(!o)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var i=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r),a=i.refinedOptions;return ri(i.extra),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,monthMode:a.monthMode,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,o,i){var a=Mt([bt,e.optionDefaults,n,o,e.optionOverrides,i]),s=r(r(r(r(r(r({},Dt),Ct),wt),kt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,p={};for(var f in a)a[f]===u[f]?l[f]=c[f]:(a[f]===this.currentCalendarOptionsInput[f]?f in this.currentCalendarOptionsRefined&&(l[f]=this.currentCalendarOptionsRefined[f]):s[f]?l[f]=s[f](a[f]):p[f]=a[f],d=!0);return d&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:p}},e}();function Xo(e,t,n,r,o,i,a,s){var l=Qn(t||a.defaultCode,a.map);return new Xn({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:i.cmdFormatter,defaultSeparator:s})}function Ko(e,t){return new(t.themeClasses[e.themeSystem]||so)(e)}function Jo(e){return new(e.dateProfileGeneratorClass||Co)(e)}function $o(e,t,n){return new On(e,t,n)}function Qo(e){return Oe(e,(function(e){return e.ui}))}function ei(e,t,n){var r={"":t};for(var o in e){var i=e[o];i.sourceId&&n[i.sourceId]&&(r[o]=n[i.sourceId])}return r}function ti(e){var t=e.options;return{eventUiSingleBase:Wt({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:Wt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ni(e){return or(e.options.businessHours,e)}function ri(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var oi=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 Zo({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}(Nr);var ii=function(e){this.timeZoneName=e},ai=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function si(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}function li(e){var t;return(t={})[e.component.uid]=e,t}var ui={},ci=function(){function e(e,t){this.emitter=new kr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),di={},pi={startTime:Ye,duration:Ye,create:Boolean,sourceId:String};function fi(e){var t=xt(e,pi),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 hi=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,o=n.extraClassName,i=!1,a=r.center;return r.left?(i=!0,e=r.left):e=r.start,r.right?(i=!0,t=r.right):t=r.end,Hr("div",{className:[o||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",a||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Hr(vi,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(jr),vi=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 Hr.apply(void 0,o(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,i=[],a=!0,s=0,l=e;s<l.length;s++){var u=l[s],c=u.buttonName,d=u.buttonClick,p=u.buttonText,f=u.buttonIcon;if("title"===c)a=!1,i.push(Hr("h2",{className:"fc-toolbar-title"},t.title));else{var h=f?{"aria-label":c}:{},v=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&v.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;i.push(Hr("button",r({disabled:g,className:v.join(" "),onClick:d,type:"button"},h),p||(f?Hr("span",{className:f}):"")))}}if(i.length>1){var m=a&&n.getClass("buttonGroup")||"";return Hr.apply(void 0,o(["div",{className:m}],i))}return i[0]},t}(jr),gi=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,Yr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",Hr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(jr),mi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=dn(t);if(i&&r.isValidSegDownEl(e.target)){var a=V(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new zn(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=Z(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(ai),yi=function(e){function t(t){var n,r,o,i,a,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){dn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,r=".fc-event",o=s.handleSegEnter,i=s.handleSegLeave,Z(n,"mouseover",r,(function(e,t){if(t!==a){a=t,o(e,t);var n=function(e){a=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=dn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new zn(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(ai),Ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=it(Fr),t.buildViewPropTransformers=it(Di),t.buildToolbarProps=it(Si),t.handleNavLinkClick=Y("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Ar(),t.footerRef=Ar(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=si(e,n),o=[mi,yi].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,ui[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 ui[e.uid]},t.resizeRunner=new Go((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,o=t.options,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Wn(t.options.now,t.dateEnv),t.viewTitle),a=!1,s="";t.isHeightAuto||t.forPrint?s="":null!=o.height?a=!0:null!=o.contentHeight?s=o.contentHeight:e=Math.max(o.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 Hr(zr.Provider,{value:l},n.headerToolbar&&Hr(hi,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},i)),Hr(gi,{liquid:a,height:s,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Hr(hi,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},i)))},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,o=n.options,i=n.calendarApi,a=t.getAttribute("data-navlink");a=a?JSON.parse(a):{};var s=r.createMarker(a.date),l=a.type,u="day"===l?o.navLinkDayClick:"week"===l?o.navLinkWeekClick:null;"function"==typeof u?u.call(i,r.toDate(s),e):("string"==typeof u&&(l=u),i.zoomTo(s,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Hr.apply(void 0,o([Ur,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,o={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=0,a=this.buildViewPropTransformers(t.viewPropsTransformers);i<a.length;i++){var s=a[i];r(o,s.transform(o,e))}var l=n.component;return Hr(l,r({},o))},t}(Br);function Si(e,t,n,r,o,i){var a=n.build(o,void 0,!1),s=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:i,activeButton:e.type,isTodayEnabled:a.isValid&&!sn(t.currentRange,o),isPrevEnabled:s.isValid,isNextEnabled:l.isValid}}function Di(e){return e.map((function(e){return new e}))}var bi=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,o=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return cr()||i.push("fc-liquid-hack"),e.children(i,o,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}(jr);function Ci(e,t){return St(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var wi="fc-col-header-cell",Ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,o=e.theme,i=e.viewApi,a=this.props,s=a.date,l=a.dateProfile,u=hr(s,a.todayRange,null,l),c=[wi].concat(vr(u,o)),d=t.format(s,a.dayHeaderFormat),p=n.navLinks&&!u.isDisabled&&a.colCnt>1?{"data-navlink":gr(s),tabIndex:0}:{},f=r(r(r({date:t.toDate(s),view:i},a.extraHookProps),{text:d}),u);return Hr(uo,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ki,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,o){return Hr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(s),colSpan:a.colSpan},a.extraDataAttrs),Hr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Hr("a",r({ref:n,className:["fc-col-header-cell-cushion",a.isSticky?"fc-sticky":""].join(" ")},p),o)))}))},t}(jr),Ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,o=t.theme,i=t.viewApi,a=t.options,s=ve(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[wi].concat(vr(l,o),e.extraClassNames||[]),c=n.format(s,e.dayHeaderFormat),d=r(r(r(r({date:s},l),{view:i}),e.extraHookProps),{text:c});return Hr(uo,{hookProps:d,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:ki,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(t,n,o,i){return Hr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Hr("div",{className:"fc-scrollgrid-sync-inner"},Hr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(jr);function ki(e){return e.text}var Mi=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Wn(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),o=t.dateEnv.add(r,Ye(1,e.unit)),i=o.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:xi(r)},nextState:{nowDate:o,todayRange:xi(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=zr,t}(Nr);function xi(e){var t=be(e);return{start:t,end:ve(t,1)}}var _i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=it(Ii),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return Hr(Mi,{unit:"day"},(function(e,t){return Hr("tr",null,i&&i(),n.map((function(e){return o?Hr(Ri,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):Hr(Ti,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(jr);function Ii(e,t,n){return e||Ci(t,n)}var Pi=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n<r;)t.isHiddenDay(n)?o.push(a+.5):(a++,o.push(a),i.push(n)),n=ve(n,1);this.dates=i,this.indices=o,this.cnt=i.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(ve(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(o=Math.floor(o))?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}: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}(),Ni=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;n<i.length&&i[n].getUTCDay()!==r;n++);o=Math.ceil(i.length/n)}else o=1,n=i.length;this.rowCnt=o,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 o=n.firstIndex,i=n.lastIndex,a=o;a<=i;){var s=Math.floor(a/t),l=Math.min((s+1)*t,i+1);r.push({row:s,firstCol:a%t,lastCol:(l-1)%t,isStart:n.isStart&&a===o,isEnd:n.isEnd&&l-1===i}),a=l}return r},e}(),Hi=function(){function e(){this.sliceBusinessHours=it(this._sliceBusinessHours),this.sliceDateSelection=it(this._sliceDateSpan),this.sliceEventStore=it(this._sliceEventStore),this.sliceEventDrag=it(this._sliceInteraction),this.sliceEventResize=it(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=e.eventUiBases,l=this.sliceEventStore.apply(this,o([e.eventStore,s,t,n],i));return{dateSelectionSegs:this.sliceDateSelection.apply(this,o([e.dateSelection,s,r],i)),businessHourSegs:this.sliceBusinessHours.apply(this,o([e.businessHours,t,n,r],i)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,o([e.eventDrag,s,t,n],i)),eventResize:this.sliceEventResize.apply(this,o([e.eventResize,s,t,n],i)),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,o([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];return e?this._sliceEventStore.apply(this,o([Be(e,Oi(t,Boolean(n)),r),{},t,n],i)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(e){var a=ln(e,t,Oi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(!e)return null;var a=ln(e.mutatedEvents,t,Oi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];if(!e)return[];for(var a=Mn(e,t,n),s=this.sliceRange.apply(this,o([e.range],r)),l=0,u=s;l<u.length;l++){var c=u[l];c.eventRange=a}return s},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.sliceEventRange(i,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:ve(n.start,1)});for(var r=this.sliceRange.apply(this,o([n],t)),i=0,a=r;i<a.length;i++){var s=a[i];s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd}return r},e}();function Oi(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 Ai=/^(visible|hidden)$/,Ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,Yr(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,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),Hr("div",{ref:this.handleEl,className:o.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(Ai.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(Ai.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 Ai.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Ai.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(jr),Li=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):0==--o[n]&&(delete i[n],delete t.callbackMap[n],a=!0),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Fe(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Ue(this.currentMap)},e}();function Wi(e){for(var t=0,n=0,r=F(e,".fc-scrollgrid-shrink");n<r.length;n++){var o=r[n];t=Math.max(t,pe(o))}return Math.ceil(t)}function Vi(e,t){return e.liquid&&t.liquid}function zi(e,t){return null!=t.maxHeight||Vi(e,t)}function Fi(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Hr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Hr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Bi(e,t){return ot(e,t,Le)}function ji(e,t){for(var n=[],r=0,i=e;r<i.length;r++)for(var a=i[r],s=a.span||1,l=0;l<s;l++)n.push(Hr("col",{style:{width:"shrink"===a.width?Gi(t):a.width||"",minWidth:a.minWidth||""}}));return Hr.apply(void 0,o(["colgroup",{}],n))}function Gi(e){return null==e?4:e}function qi(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}function Yi(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Zi(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 Xi(e){return Hr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Ki(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Ji(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var $i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=it((function(e){return e}),Bi),t.renderMicroColGroup=it(ji),t.scrollerRefs=new Li,t.scrollerElRefs=new Li(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,i=t.sections||[],a=this.processCols(t.cols),s=this.renderMicroColGroup(a,n.shrinkWidth),l=Yi(t.liquid,r),u=i.length,c=0,d=[],p=[],f=[];c<u&&"header"===(e=i[c]).type;)d.push(this.renderSection(e,c,s)),c++;for(;c<u&&"body"===(e=i[c]).type;)p.push(this.renderSection(e,c,s)),c++;for(;c<u&&"footer"===(e=i[c]).type;)f.push(this.renderSection(e,c,s)),c++;var h=!cr();return Hr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!h&&d.length)&&Hr.apply(void 0,o(["thead",{}],d)),Boolean(!h&&p.length)&&Hr.apply(void 0,o(["tbody",{}],p)),Boolean(!h&&f.length)&&Hr.apply(void 0,o(["tfoot",{}],f)),h&&Hr.apply(void 0,o(["tbody",{}],d,p,f)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Hr(Ur,{key:e.key},e.outerContent):Hr("tr",{key:e.key,className:Zi(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 o=this.props,i=this.state,a=i.forceYScrollbars,s=i.scrollerClientWidths,l=i.scrollerClientHeights,u=zi(o,e),c=Vi(o,e),d=o.liquid?a?"scroll":u?"auto":"hidden":"visible",p=Fi(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==s[t]?s[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Hr("td",{ref:r.elRef},Hr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Hr(Ui,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},p)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);Yr(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 qi(this.props.cols)?Wi(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=Sr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,o=!1,i={},a={},s=0;s<t;s++){var l=n.currentMap[s];if(l&&l.needsYScrolling()){o=!0;break}}for(s=0;s<t;s++){var u=r.currentMap[s];if(u){var c=u.parentNode;i[s]=Math.floor(c.getBoundingClientRect().width-(o?e.y:0)),a[s]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:o,scrollerClientWidths:i,scrollerClientHeights:a}},t}(jr);$i.addStateEquality({scrollerClientWidths:Le,scrollerClientHeights:Le});var Qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Ar(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,o=r.eventRange,i=o.ui,a={event:new zn(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&gn(r,t),isStartResizable:!e.disableResizing&&mn(r,t),isEndResizable:!e.disableResizing&&yn(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)},s=Dn(a).concat(i.classNames);return Hr(uo,{hookProps:a,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,o){return e.children(t,s.concat(n),r,o,a)}))},t.prototype.componentDidMount=function(){cn(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&cn(this.elRef.current,t)},t}(jr),ea=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,o=t.options.eventTimeFormat||e.defaultTimeFormat,i=En(n,o,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Hr(Qi,{seg:n,timeText:i,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||ta,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,o,i,a,s){return Hr("a",r({className:e.extraClassNames.concat(o).join(" "),style:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Hr("div",{className:"fc-event-main",ref:i,style:{color:s.textColor}},a),s.isStartResizable&&Hr("div",{className:"fc-event-resizer fc-event-resizer-start"}),s.isEndResizable&&Hr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(jr);function ta(e){return Hr("div",{className:"fc-event-main-frame"},e.timeText&&Hr("div",{className:"fc-event-time"},e.timeText),Hr("div",{className:"fc-event-title-container"},Hr("div",{className:"fc-event-title fc-sticky"},e.event.title||Hr(Ur,null,"\xa0"))))}var na=function(e){return Hr(zr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Hr(uo,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},ra=St({day:"numeric"}),oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=at(aa),t.normalizeClassNames=vo(),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}),o=vr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),i=r.isDisabled?{}:{"data-date":tt(e.date)};return Hr(ho,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,o,i,r.isDisabled)}))},t}(jr),ia=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=aa({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Hr(po,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(jr);function aa(e){var t=e.date,n=e.dateEnv,o=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},o),{dayNumberText:e.showDayNumber?n.format(t,ra):""}),e.extraProps)}function sa(e){return Hr("div",{className:"fc-"+e})}var la=function(e){return Hr(Qi,{defaultContent:ua,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,o){return Hr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:o.backgroundColor}},r)}))};function ua(e){return e.event.title&&Hr("div",{className:"fc-event-title"},e.event.title)}var ca=function(e){return Hr(zr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,o=e.date,i=r.weekNumberFormat||e.defaultFormat,a=n.computeWeekNumber(o),s=n.format(o,i);return Hr(uo,{hookProps:{num:a,text:s,date:o},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:da,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function da(e){return e.text}var pa=function(e){function t(t,n){void 0===n&&(n={});var o=e.call(this)||this;return o.isRendering=!1,o.isRendered=!1,o.currentClassNames=[],o.customContentRenderId=0,o.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":o.renderRunner.tryDrain()}},o.handleData=function(e){o.currentData=e,o.renderRunner.request(e.calendarOptions.rerenderDelay)},o.handleRenderRequest=function(){if(o.isRendering){o.isRendered=!0;var e=o.currentData;Or(Hr(bi,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,a){return o.setClassNames(t),o.setHeight(n),Hr(co.Provider,{value:o.customContentRenderId},Hr(Ei,r({isHeightAuto:i,forPrint:a},e)))})),o.el)}else o.isRendered&&(o.isRendered=!1,Or(null,o.el),o.setClassNames([]),o.setHeight(""));Wr()},o.el=t,o.renderRunner=new Go(o.handleRenderRequest),new Zo({optionOverrides:n,calendarApi:o,onAction:o.handleAction,onData:o.handleData}),o}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),Wr()},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(!ot(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var o=r[n];t.remove(o)}for(var i=0,a=e;i<a.length;i++){o=a[i];t.add(o)}this.currentClassNames=e}},t.prototype.setHeight=function(e){G(this.el,"height",e)},t}(Vn);di.touchMouseIgnoreWait=500;var fa=0,ha=0,va=!1,ga=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,fa++,setTimeout((function(){fa--}),di.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 kr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ha++||window.addEventListener("touchmove",ma,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ha||window.removeEventListener("touchmove",ma,{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(){va=!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 fa||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(va=!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,o=e.touches,i=0,a=0;return o&&o.length?(n=o[0].pageX,r=o[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(i=n-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:i,deltaY:a}},e}();function ma(e){va&&e.preventDefault()}var ya=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",j(n,{left:r.left,top:r.top}),K(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(W(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&j(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"),j(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}(),Ea=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}(xr),Sa=function(e){function t(t,n){return e.call(this,new _r(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return Cr(this.scrollController.el)},t}(Ea),Da=function(e){function t(t){return e.call(this,new Ir,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}(Ea),ba="function"==typeof performance?performance.now:Date.now,Ca=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=ba();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,o=null===this.pointerScreenY?0:r-this.pointerScreenY,i=null===this.pointerScreenX?0:n-this.pointerScreenX;o<0?this.everMovedUp=!0:o>0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(ba()))}},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,o=r-e.distance,i=o*o/(r*r)*this.maxVelocity*t,a=1;switch(e.name){case"left":a=-1;case"right":n.setScrollLeft(n.getScrollLeft()+i*a);break;case"top":a=-1;case"bottom":n.setScrollTop(n.getScrollTop()+i*a)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,o=0,i=this.scrollCaches;o<i.length;o++){var a=i[o],s=a.clientRect,l=e-s.left,u=s.right-e,c=t-s.top,d=s.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"top",distance:c}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),u<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new Da(!1):new Sa(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}(),wa=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,o=e.deltaY;n*n+o*o>=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),oe(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new ga(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new ya,r.autoScroller=new Ca,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}(ci),Ra=function(){function e(e){this.origRect=wr(e),this.scrollCaches=Rr(e).map((function(e){return new Sa(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,o={left:e,top:t},i=0,a=this.scrollCaches;i<a.length;i++){var s=a[i];if(n=s.getEventTarget(),r=void 0,"HTML"!==(r=n.tagName)&&"BODY"!==r&&!ir(o,s.clientRect))return!1}return!0},e}();var Ta=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 kr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,o=e.subjectEl;o!==document&&(r=sr(r,t=wr(o)));var i=this.initialHit=this.queryHitForOffset(r.left,r.top);if(i){if(this.useSubjectCenter&&t){var a=ar(t,i.rect);a&&(r=lr(a))}this.coordAdjust=ur(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&&ka(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Oe(this.droppableStore,(function(e){return e.component.prepareHits(),new Ra(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,o=null;for(var i in n){var a=n[i].component,s=r[i];if(s&&s.isWithinClipping(e,t)){var l=s.computeLeft(),u=s.computeTop(),c=e-l,d=t-u,p=s.origRect,f=p.right-p.left,h=p.bottom-p.top;if(c>=0&&c<f&&d>=0&&d<h){var v=a.queryHit(c,d,f,h),g=a.context.getCurrentData().dateProfile;v&&an(g.activeRange,v.dateSpan.range)&&(!o||v.layer>o.layer)&&(v.rect.left+=l,v.rect.right+=l,v.rect.top+=u,v.rect.bottom+=u,o=v)}}}return o},e}();function ka(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Rn(e.dateSpan,t.dateSpan)}function Ma(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.datePointTransforms;a<s.length;a++){var l=s[a];r(i,l(e,t))}return r(i,(n=e,{date:(o=t.dateEnv).toDate(n.range.start),dateStr:o.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),i}var xa=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 o=n.hitDragging,i=o.initialHit,a=o.finalHit;if(i&&a&&ka(i,a)){var s=t.context,l=r(r({},Ma(i.dateSpan,s)),{dayEl:i.dayEl,jsEvent:e.origEvent,view:s.viewApi||s.calendarApi.view});s.emitter.trigger("dateClick",l)}}},n.dragging=new wa(t.el),n.dragging.autoScroller.isEnabled=!1;var o=n.hitDragging=new Ta(n.dragging,li(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(ai),_a=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,o=t.dragging,i=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);o.setIgnoreMove(!i),o.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;null==n&&(n=t.longPressDelay);return n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var o=n.component.context,i=null,a=!1;e&&((i=function(e,t,n){var o=e.dateSpan,i=t.dateSpan,a=[o.range.start,o.range.end,i.range.start,i.range.end];a.sort(ce);for(var s={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(s,c)}return s.range={start:a[0],end:a[3]},s.allDay=o.allDay,s}(n.hitDragging.initialHit,e,o.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(i)||(a=!0,i=null)),i?o.dispatch({type:"SELECT_DATES",selection:i}):t||o.dispatch({type:"UNSELECT_DATES"}),a?Q():ee(),t||(n.dragSelection=i)},n.handlePointerUp=function(e){n.dragSelection&&(xn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var o=t.component.context.options,i=n.dragging=new wa(t.el);i.touchScrollAllowed=!1,i.minDistance=o.selectMinDistance||0,i.autoScroller.isEnabled=o.dragScroll;var a=n.hitDragging=new Ta(n.dragging,li(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(ai);var Ia=function(e){function t(n){var o=e.call(this,n)||this;o.subjectEl=null,o.subjectSeg=null,o.isDragging=!1,o.eventRange=null,o.relevantEvents=null,o.receivingContext=null,o.validMutation=null,o.mutatedRelevantEvents=null,o.handlePointerDown=function(e){var t=e.origEvent.target,n=o,r=n.component,i=n.dragging,a=i.mirror,s=r.context.options,l=r.context;o.subjectEl=e.subjectEl;var u=o.subjectSeg=dn(e.subjectEl),c=(o.eventRange=u.eventRange).instance.instanceId;o.relevantEvents=Nt(l.getCurrentData().eventStore,c),i.minDistance=e.isTouch?0:s.eventDragMinDistance,i.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;null==n&&(n=t.longPressDelay);return n}(r):null,a.parentNode=V(t,".fc"),a.revertDuration=s.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");i.setIgnoreMove(!d),o.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},o.handleDragStart=function(e){var t=o.component.context,n=o.eventRange,r=n.instance.instanceId;e.isTouch?r!==o.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),o.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:o.subjectEl,event:new zn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},o.handleHitUpdate=function(e,t){if(o.isDragging){var n=o.relevantEvents,r=o.hitDragging.initialHit,i=o.component.context,a=null,s=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,p=(a=d.context).options;i===a||p.editable&&p.droppable?(s=function(e,t,n){var r=e.dateSpan,o=t.dateSpan,i=r.range.start,a=o.range.start,s={};r.allDay!==o.allDay&&(s.allDay=o.allDay,s.hasEnd=t.component.context.options.allDayMaintainDuration,o.allDay&&(i=be(i)));var l=Qt(i,a,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(s.allDay=!1);for(var u={datesDelta:l,standardProps:s},c=0,d=n;c<d.length;c++){(0,d[c])(u,e,t)}return u}(r,e,a.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=Pn(n,a.getCurrentData().eventUiBases,s,a),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,s=null,l=null,c.mutatedEvents={defs:{},instances:{}})):a=null}o.displayDrag(a,c),u?Q():ee(),t||(i===a&&ka(r,e)&&(s=null),o.dragging.setMirrorNeedsRevert(!s),o.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),o.receivingContext=a,o.validMutation=s,o.mutatedRelevantEvents=l)}},o.handlePointerUp=function(){o.isDragging||o.cleanup()},o.handleDragEnd=function(e){if(o.isDragging){var t=o.component.context,n=t.viewApi,i=o,a=i.receivingContext,s=i.validMutation,l=o.eventRange.def,u=o.eventRange.instance,c=new zn(t,l,u),d=o.relevantEvents,p=o.mutatedRelevantEvents,f=o.hitDragging.finalHit;if(o.clearDrag(),t.emitter.trigger("eventDragStop",{el:o.subjectEl,event:c,jsEvent:e.origEvent,view:n}),s){if(a===t){var h=new zn(t,p.defs[l.defId],u?p.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:p});for(var v={oldEvent:c,event:h,relatedEvents:Bn(p,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},m=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;m<y.length;m++){var E=y[m];r(g,E(s,t))}t.emitter.trigger("eventDrop",r(r(r({},v),g),{el:e.subjectEl,delta:s.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",v)}else if(a){var S={event:c,relatedEvents:Bn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},S),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",S);var D=p.defs[l.defId],b=p.instances[u.instanceId],C=new zn(a,D,b);a.dispatch({type:"MERGE_EVENTS",eventStore:p});var w={event:C,relatedEvents:Bn(p,a,b),revert:function(){a.dispatch({type:"REMOVE_EVENTS",eventStore:p})}};a.emitter.trigger("eventAdd",w),e.isTouch&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),a.emitter.trigger("drop",r(r({},Ma(f.dateSpan,a)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:f.component.context.viewApi})),a.emitter.trigger("eventReceive",r(r({},w),{draggedEl:e.subjectEl,view:f.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}o.cleanup()};var i=o.component.context.options,a=o.dragging=new wa(n.el);a.pointer.selector=t.SELECTOR,a.touchScrollAllowed=!1,a.autoScroller.isEnabled=i.dragScroll;var s=o.hitDragging=new Ta(o.dragging,ui);return s.useSubjectCenter=n.useEventCenter,s.emitter.on("pointerdown",o.handlePointerDown),s.emitter.on("dragstart",o.handleDragStart),s.emitter.on("hitupdate",o.handleHitUpdate),s.emitter.on("pointerup",o.handlePointerUp),s.emitter.on("dragend",o.handleDragEnd),o}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}(ai);var Pa=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=dn(n.querySegEl(e)),o=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!==o.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Nt(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var o=n.querySegEl(e);n.draggingSegEl=o,n.draggingSeg=dn(o),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:o,event:new zn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,o){var i=n.component.context,a=n.relevantEvents,s=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,p={affectedEvents:a,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,o,i){for(var a=e.component.context.dateEnv,s=e.dateSpan.range.start,l=t.dateSpan.range.start,u=Qt(s,l,a,e.component.largeUnit),c={},d=0,p=i;d<p.length;d++){var f=(0,p[d])(e,t);if(!1===f)return null;f&&r(c,f)}if(n){if(a.add(o.start,u)<o.end)return c.startDelta=u,c}else if(a.add(o.end,u)>o.start)return c.endDelta=u,c;return null}(s,e,o.subjectEl.classList.contains("fc-event-resizer-start"),l.range,i.pluginHooks.eventResizeJoinTransforms)),u&&(c=Pn(a,i.getCurrentData().eventUiBases,u,i),p.mutatedEvents=c,n.component.isInteractionValid(p)||(d=!0,u=null,c=null,p.mutatedEvents=null)),c?i.dispatch({type:"SET_EVENT_RESIZE",state:p}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&ka(s,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,o=n.eventRange.def,i=n.eventRange.instance,a=new zn(t,o,i),s=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:a,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new zn(t,l.defs[o.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:a,event:u,relatedEvents:Bn(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:s})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Ye(0),endDelta:n.validMutation.endDelta||Ye(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var o=t.component,i=n.dragging=new wa(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=o.context.options.dragScroll;var a=n.hitDragging=new Ta(n.dragging,li(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(ai);var Na=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,Ia.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}o.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ga(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}(),Ha={dateClick:_t,eventDragStart:_t,eventDragStop:_t,eventDrop:_t,eventResizeStart:_t,eventResizeStop:_t,eventResize:_t,drop:_t,eventReceive:_t,eventLeave:_t},Oa=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,o){var i=n.hitDragging.dragging,a=null,s=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(a=e.component.context,n.canDropElOnCalendar(o.subjectEl,a)&&(s=function(e,t,n){for(var o=r({},t.leftoverProps),i=0,a=n.pluginHooks.externalDefTransforms;i<a.length;i++){var s=a[i];r(o,s(e,t))}var l=Yt(o,n),u=l.refined,c=l.extra,d=Xt(u,c,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),p=e.range.start;e.allDay&&t.startTime&&(p=n.dateEnv.add(p,t.startTime));var f=t.duration?n.dateEnv.add(p,t.duration):In(e.allDay,p,n),h=Ie(d.defId,{start:p,end:f});return{def:d,instance:h}}(e.dateSpan,n.dragMeta,a),u.mutatedEvents=Pt(s),(l=!Jr(u,a))&&(u.mutatedEvents={defs:{},instances:{}},s=null))),n.displayDrag(a,u),i.setMirrorIsVisible(t||!s||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(i.setMirrorNeedsRevert(!s),n.receivingContext=a,n.droppableEvent=s)},this.handleDragEnd=function(e){var t=n,o=t.receivingContext,i=t.droppableEvent;if(n.clearDrag(),o&&i){var a=n.hitDragging.finalHit,s=a.component.context.viewApi,l=n.dragMeta;if(o.emitter.trigger("drop",r(r({},Ma(a.dateSpan,o)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:s})),l.create){var u=Pt(i);o.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:i.instance.instanceId}),o.emitter.trigger("eventReceive",{event:new zn(o,i.def,i.instance),relatedEvents:[],revert:function(){o.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:s})}}n.receivingContext=null,n.droppableEvent=null};var o=this.hitDragging=new Ta(e,ui);o.requireInitial=!1,o.emitter.on("dragstart",this.handleDragStart),o.emitter.on("hitupdate",this.handleHitUpdate),o.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?fi(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?fi(this.suppliedDragMeta(e)):fi((t=function(e,t){var n=di.dataAttrPrefix,r=(n?n+"-":"")+t;return e.getAttribute("data-"+r)||""}(e,"event"))?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(z(e,n))},e}();di.dataAttrPrefix="";var Aa=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,o=r.minDistance,i=r.longPressDelay;t.minDistance=null!=o?o:e.isTouch?0:bt.eventDragMinDistance,t.delay=e.isTouch?null!=i?i:bt.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 wa(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 Oa(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ua=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 ga(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}(ci),La=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ua(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 Oa(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Wa=io({componentInteractions:[xa,_a,Ia,Pa],calendarInteractions:[Na],elementDraggingImpl:wa,listenerRefiners:Ha}),Va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Ar(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,o=[],i=Ki(r.options);return e&&o.push({type:"header",key:"header",isSticky:i,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Hr(yo,{viewSpec:r.viewSpec},(function(e,t){return Hr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Hr($i,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");var i=this.props,a=this.context,s=!i.forPrint&&Ki(a.options),l=!i.forPrint&&Ji(a.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:s,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:Xi}]}),Hr(yo,{viewSpec:a.viewSpec},(function(e,t){return Hr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Hr(o,{liquid:!i.isHeightAuto&&!i.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(oo);function za(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.row].push(a)}return n}function Fa(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.firstCol].push(a)}return n}function Ba(e,t){var n=[];if(e){for(a=0;a<t;a++)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.row].segs.push(i)}}else for(var a=0;a<t;a++)n[a]=null;return n}var ja=St({week:"narrow"}),Ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,Yr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,o=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:o,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,o=t.viewApi,i=this.props,a=i.date,s=i.dateProfile,l={num:i.moreCnt,text:i.buildMoreLinkText(i.moreCnt),view:o},u=n.navLinks?{"data-navlink":gr(a,"week"),tabIndex:0}:{};return Hr(oa,{date:a,dateProfile:s,todayRange:i.todayRange,showDayNumber:i.showDayNumber,extraHookProps:i.extraHookProps,elRef:this.handleRootEl},(function(t,o,c,d){return Hr("td",r({ref:t,className:["fc-daygrid-day"].concat(o,i.extraClassNames||[]).join(" ")},c,i.extraDataAttrs),Hr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:i.innerElRef},i.showWeekNumber&&Hr(ca,{date:a,defaultFormat:ja},(function(e,t,n,o){return Hr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),o)})),!d&&Hr(Za,{date:a,dateProfile:s,showDayNumber:i.showDayNumber,forceDayTop:i.forceDayTop,todayRange:i.todayRange,extraHookProps:i.extraHookProps}),Hr("div",{className:"fc-daygrid-day-events",ref:i.fgContentElRef,style:{paddingBottom:i.fgPaddingBottom}},i.fgContent,Boolean(i.moreCnt)&&Hr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:i.moreMarginTop}},Hr(uo,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ya,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,o){return Hr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},o)})))),Hr("div",{className:"fc-daygrid-day-bg"},i.bgContent)))}))},t}(oo);function qa(e){return e.dayNumberText}function Ya(e){return e.text}var Za=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":gr(e.date),tabIndex:0}:{};return Hr(ia,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:qa},(function(n,o){return(o||e.forceDayTop)&&Hr("div",{className:"fc-daygrid-day-top",ref:n},Hr("a",r({className:"fc-daygrid-day-number"},t),o||Hr(Ur,null,"\xa0")))}))},t}(jr),Xa=St({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ka(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 Ja=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||Xa,o=En(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Hr(Qi,{seg:e.seg,timeText:o,defaultContent:$a,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,o,i){return Hr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(a=e.seg,(s=a.eventRange.def.url)?{href:s}:{})),i);var a,s}))},t}(jr);function $a(e){return Hr(Ur,null,Hr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Hr("div",{className:"fc-event-time"},e.timeText),Hr("div",{className:"fc-event-title"},e.event.title||Hr(Ur,null,"\xa0")))}var Qa=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 Hr(ea,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Xa,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(jr);function es(e,t,n,o,i,a,s,l){for(var u=[],c=[],d={},p={},f={},h={},v={},g=0;g<s;g++)u.push([]),c.push(0);for(var m=0,y=t=hn(t,l);m<y.length;m++){T(w=y[m],i[w.eventRange.instance.instanceId+":"+w.firstCol]||0)}!0===n||!0===o?function(e,t,n,r){ns(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,a):"number"==typeof n?function(e,t,n,r){ns(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof o&&function(e,t,n,r){ns(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,o);for(var E=0;E<s;E++){for(var S=0,D=0,b=0,C=u[E];b<C.length;b++){var w,R=C[b];d[(w=R.seg).eventRange.instance.instanceId]||(p[w.eventRange.instance.instanceId]=R.top,w.firstCol===w.lastCol&&w.isStart&&w.isEnd?(f[w.eventRange.instance.instanceId]=R.top-S,D=0,S=R.bottom):D+=R.bottom-R.top)}D&&(c[E]?h[E]=D:v[E]=D)}function T(e,t){if(!k(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,o=u[n];r<o.length;r++){if(k(e,t,o[r].bottom))return}}function k(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var o=0,i=u[r];o<i.length;o++){var a=i[o];if(n<a.bottom&&n+t>a.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var o=u[r],i=0;i<o.length&&n>=o[i].top;)i++;o.splice(i,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var M in i)i[M]||(d[M.split(":")[0]]=!0);return{segsByFirstCol:u.map(ts),segsByEachCol:u.map((function(t,n){var o=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n];t.push(o.seg)}return t}(t);return o=function(e,t,n){for(var o=t,i=ve(o,1),a={start:o,end:i},s=[],l=0,u=e;l<u.length;l++){var c=u[l],d=c.eventRange,p=d.range,f=nn(p,a);f&&s.push(r(r({},c),{firstCol:n,lastCol:n,eventRange:{def:d.def,ui:r(r({},d.ui),{durationEditable:!1}),instance:d.instance,range:f},isStart:c.isStart&&f.start.valueOf()===p.start.valueOf(),isEnd:c.isEnd&&f.end.valueOf()===p.end.valueOf()}))}return s}(o,e[n].date,n)})),segIsHidden:d,segTops:p,segMarginTops:f,moreCnts:c,moreTops:h,paddingBottoms:v}}function ts(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];i.seg.firstCol===t&&n.push(i.seg)}return n}function ns(e,t,n,r,o){for(var i=e.length,a={},s=[],l=0;l<i;l++)s.push([]);for(l=0;l<i;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var p=d[c];o(p,u)?f(p):h(p,u,r),p.top!==p.bottom&&u++}function f(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!a[n]){a[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)s[r].push(e)}}function h(n,r,o){var i=n.seg,a=i.eventRange.instance.instanceId;if(!t[a]){t[a]=!0;for(var l=i.firstCol;l<=i.lastCol;l++){var u=++e[l];if(o&&1===u)for(var c=r-1;s[l].length>c;)h(s[l].pop(),s[l].length,!1)}}}}var rs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Li,t.frameElRefs=new Li,t.fgElRefs=new Li,t.segHarnessRefs=new Li,t.rootElRef=Ar(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,o=t.cells.length,i=Fa(t.businessHourSegs,o),a=Fa(t.bgEventSegs,o),s=Fa(this.getHighlightSegs(),o),l=Fa(this.getMirrorSegs(),o),u=es(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,o,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,p=u.segsByEachCol,f=u.segIsHidden,h=u.segTops,v=u.segMarginTops,g=u.moreCnts,m=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Hr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var o=e.renderFgSegs(d[r],f,h,v,y,t.todayRange),u=e.renderFgSegs(l[r],{},h,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Hr(Ga,{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:f,moreMarginTop:m[r],segsByEachCol:p[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Hr(Ur,null,Hr(Ur,null,o),Hr(Ur,null,u)),bgContent:Hr(Ur,null,e.renderFillSegs(s[r],"highlight"),e.renderFillSegs(i[r],"non-business"),e.renderFillSegs(a[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!Le(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,o,i,a,s,l,u){var c=this.context,d=this.props.eventSelection,p=this.state.framePositions,f=1===this.props.cells.length,h=[];if(p)for(var v=0,g=e;v<g.length;v++){var m=g[v],y=m.eventRange.instance.instanceId,E=s||l||u,S=i[y],D=t[y]||S,b=t[y]||E||m.firstCol!==m.lastCol||!m.isStart||!m.isEnd,C=void 0,w=void 0,R=void 0,T=void 0;b?(w=n[y],c.isRtl?(T=0,R=p.lefts[m.lastCol]-p.lefts[m.firstCol]):(R=0,T=p.rights[m.firstCol]-p.rights[m.lastCol])):C=o[y],h.push(Hr("div",{className:"fc-daygrid-event-harness"+(b?" fc-daygrid-event-harness-abs":""),key:y,ref:E?null:this.segHarnessRefs.createRef(y+":"+m.firstCol),style:{visibility:D?"hidden":"",marginTop:C||"",top:w||"",left:R||"",right:T||""}},Ka(m)?Hr(Ja,r({seg:m,isDragging:s,isSelected:y===d,defaultDisplayEventEnd:f},Sn(m,a))):Hr(Qa,r({seg:m,isDragging:s,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:f},Sn(m,a)))))}return h},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,i=this.props.todayRange,a=this.state.framePositions,s=[];if(a)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:a.lefts[c.lastCol]-a.lefts[c.firstCol]}:{left:0,right:a.rights[c.firstCol]-a.rights[c.lastCol]};s.push(Hr("div",{key:bn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Hr(la,r({seg:c},Sn(c,i))):sa(t)))}return Hr.apply(void 0,o([Ur,{}],s))},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 o=this.rootElRef.current;this.setState({framePositions:new Mr(o,r,!0,!1)})}}var i=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:i?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Oe(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}(oo);rs.addStateEquality({segHeights:Le});var os=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new Go(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&Yr(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 Hr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Hr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Hr("span",{className:"fc-popover-title"},t.title),Hr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Hr("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 o,i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),s=n?n.getBoundingClientRect().top:a.top;s=Math.min(s,window.innerHeight-i.height-10),s=Math.max(s,10),o=this.context.isRtl?a.right-i.width:a.left,o=Math.min(o,window.innerWidth-i.width-10),j(r,{top:s,left:o=Math.max(o,10)})}},t}(jr),is=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,o=this.props,i=o.date,a=o.hiddenInstances,s=o.todayRange,l=o.dateProfile,u=o.selectedInstanceId,c=n.format(i,t.dayPopoverFormat);return Hr(oa,{date:i,dateProfile:l,todayRange:s,elRef:this.handlePopoverEl},(function(e,t,n){return Hr(os,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:o.onCloseClick,alignmentEl:o.alignmentEl,topAlignmentEl:o.topAlignmentEl},Hr(ia,{date:i,dateProfile:l,todayRange:s},(function(e,t){return t&&Hr("div",{className:"fc-more-popover-misc",ref:e},t)})),o.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Hr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:a[t]?"hidden":""}},Ka(e)?Hr(Ja,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},Sn(e,s))):Hr(Qa,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},Sn(e,s))))})))}))},t.prototype.queryHit=function(e,t,n,r){var o=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:o,end:ve(o,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(oo),as=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=it(za),t.splitBgEventSegs=it(za),t.splitFgEventSegs=it(za),t.splitDateSelectionSegs=it(za),t.splitEventDrag=it(Ba),t.splitEventResize=it(Ba),t.buildBuildMoreLinkText=it(ss),t.rowRefs=new Li,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,Yr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,o=n.dateEnv,i=n.options.moreLinkClick;function a(e){var t=e.eventRange,r=t.def,i=t.instance,a=t.range;return{event:new zn(n,r,i),start:o.toDate(a.start),end:o.toDate(a.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof i&&(i=i({date:o.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(a),hiddenSegs:e.hiddenSegs.map(a),jsEvent:e.ev,view:n.viewApi})),i&&"popover"!==i?"string"==typeof i&&n.calendarApi.zoomTo(e.date,i):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,o=t.dayMaxEvents,i=t.expandRows,a=this.state.morePopoverState,s=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,s),u=this.splitBgEventSegs(t.bgEventSegs,s),c=this.splitFgEventSegs(t.fgEventSegs,s),d=this.splitDateSelectionSegs(t.dateSelectionSegs,s),p=this.splitEventDrag(t.eventDrag,s),f=this.splitEventResize(t.eventResize,s),h=this.buildBuildMoreLinkText(this.context.options.moreLinkText),v=!0===o||!0===r;return v&&!i&&(v=!1,r=null,o=null),Hr("div",{className:["fc-daygrid-body",v?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Hr(Mi,{unit:"day"},(function(v,g){return Hr(Ur,null,Hr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:i?t.clientHeight:""}},t.colGroupNode,Hr("tbody",null,t.cells.map((function(i,a){return Hr(rs,{ref:e.rowRefs.createRef(a),key:i.length?i[0].date.toISOString():a,showDayNumbers:s>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:l[a],eventSelection:t.eventSelection,bgEventSegs:u[a].filter(ls),fgEventSegs:c[a],dateSelectionSegs:d[a],eventDrag:p[a],eventResize:f[a],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:h,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&a&&a.currentFgEventSegs===t.fgEventSegs&&Hr(is,{date:a.date,dateProfile:n,segs:a.allSegs,alignmentEl:a.dayEl,topAlignmentEl:1===s?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Mr(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Mr(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,o=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=o)return{row:i,col:o,dateSpan:{range:this.getCellRange(i,o),allDay:!0},dayEl:this.getCellEl(i,o),relativeRect:{left:n.lefts[o],right:n.rights[o],top:r.tops[i],bottom:r.bottoms[i]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:ve(n,1)}},t}(oo);function ss(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ls(e){return e.eventRange.def.allDay}var us=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new cs,t.tableRef=Ar(),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 Hr(as,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}(oo),cs=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}(Hi),ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=it(ps),t.headerRef=Ar(),t.tableRef=Ar(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&Hr(_i,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return Hr(us,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(Va);function ps(e,t){var n=new Pi(e.renderRange,t);return new Ni(n,/year|month|week/.test(e.currentRangeUnit))}var fs=io({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:_t,moreLinkClassNames:_t,moreLinkContent:_t,moreLinkDidMount:_t,moreLinkWillUnmount:_t},views:{dayGrid:{component:ds,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=he(o,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=he(l,6-Math.ceil(me(s,l))));return{start:s,end:l}},t}(Co)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),hs=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?un(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(pr),vs=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=be(e),r=e.valueOf()-n.valueOf();if(r>=$e(t.slotMinTime)&&r<$e(t.slotMaxTime))return this.computeTimeTop(Ye(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=be(e)),this.computeTimeTop(Ye(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,o=this.dateProfile,i=this.slatMetas,a=r.els.length,s=i[1].date.valueOf()-i[0].date.valueOf(),l=(e.milliseconds-$e(o.slotMinTime))/s;return l=Math.max(0,l),l=Math.min(a,l),t=Math.floor(l),n=l-(t=Math.min(t,a-1)),r.tops[t]+r.getHeight(t)*n},e}(),gs=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ar(),t.slatElRefs=new Li,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Hr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Hr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Hr(ys,{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 vs(new Mr(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas)))},t}(jr);var ys=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,o=e.slatElRefs;return Hr("tbody",null,e.slatMetas.map((function(i,a){var s={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",i.isLabeled?"":"fc-timegrid-slot-minor"];return Hr("tr",{key:i.key,ref:o.createRef(i.key)},e.axis&&Hr(Ss,r({},i)),Hr(uo,{hookProps:s,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Hr("td",{ref:e,className:l.concat(t).join(" "),"data-time":i.isoTimeStr},r)})))})))},t}(jr),Es=St({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Ss(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Hr(zr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,o=n.options,i=n.viewApi,a=null==o.slotLabelFormat?Es:Array.isArray(o.slotLabelFormat)?St(o.slotLabelFormat[0]):St(o.slotLabelFormat),s={level:0,time:e.time,date:r.toDate(e.date),view:i,text:r.format(e.date,a)};return Hr(uo,{hookProps:s,classNames:o.slotLabelClassNames,content:o.slotLabelContent,defaultContent:Ds,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},(function(n,r,o,i){return Hr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Hr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Hr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:o},i)))}))}return Hr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function Ds(e){return e.text}function bs(e,t,n,r,o){for(var i=new Date(0),a=e,s=Ye(0),l=n||function(e){var t,n,r;for(t=gs.length-1;t>=0;t--)if(n=Ye(gs[t]),null!==(r=Qe(n,e))&&r>1)return n;return e}(r),u=[];$e(a)<$e(t);){var c=o.add(i,a),d=null!==Qe(s,l);u.push({date:c,time:a,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),a=Xe(a,r),s=Xe(s,r)}return u}var Cs=St({week:"short"}),ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new hs,t.headerElRef=Ar(),t.rootElRef=Ar(),t.scrollerElRef=Ar(),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,o=t.props.dateProfile.renderRange,i=ye(o.start,o.end),a=n.navLinks&&1===i?{"data-navlink":gr(o.start,"week"),tabIndex:0}:{};return n.weekNumbers?Hr(ca,{date:o.start,defaultFormat:Cs},(function(t,n,o,i){return Hr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Hr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Hr("a",r({ref:o,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},a),i)))})):Hr("th",{className:"fc-timegrid-axis"},Hr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,o=n.viewApi,i={text:r.allDayText,view:o};return Hr(uo,{hookProps:i,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Rs,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,o){return Hr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Hr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Hr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,o=this.props,i=[],a=Ki(r.options);return e&&i.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(i.push({type:"body",key:"all-day",chunk:{content:t}}),i.push({type:"body",key:"all-day-divider",outerContent:Hr("tr",{className:"fc-scrollgrid-section"},Hr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),i.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Hr(yo,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Hr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Hr($i,{liquid:!o.isHeightAuto&&!o.forPrint,cols:[{width:"shrink"}],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,o,i,a){var s=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Ki(u.options),p=!c.forPrint&&Ji(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Hr("tr",null,s.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Hr("tr",null,s.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:Hr("tr",{className:"fc-scrollgrid-section"},Hr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var h=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Hr("div",{className:"fc-timegrid-axis-chunk"},Hr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Hr("tbody",null,Hr(Ts,{slatMetas:i}))),Hr("div",{className:"fc-timegrid-now-indicator-container"},Hr(Mi,{unit:h?"minute":"day"},(function(e){var t=h&&a&&a.safeComputeTop(e);return"number"==typeof t?Hr(na,{isAxis:!0,date:e},(function(e,n,r,o){return Hr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},o)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),p&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Xi},{key:"cols",content:Xi}]}),Hr(yo,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Hr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Hr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:o}]}],sections:f}))}))},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}(oo);function Rs(e){return e.text}var Ts=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 Hr("tr",{key:e.key},Hr(Ss,r({},e)))}))},t}(jr);function ks(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 Ms(e,t){var n=[];if(e){for(a=0;a<t;a++)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.col].segs.push(i)}}else for(var a=0;a<t;a++)n[a]=null;return n}function xs(e,t,n,r,o){return _s(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 o,i=function(e){var t,n,r,o=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<o.length&&Is(n,o[r]).length;r++);n.level=r,(o[r]||(o[r]=[])).push(n)}return o}(e=hn(e,t));if(function(e){var t,n,r,o,i;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((o=n[r]).forwardSegs=[],i=t+1;i<e.length;i++)Is(o,e[i],o.forwardSegs)}(i),o=i[0]){for(var a=0,s=o;a<s.length;a++){Ps(c=s[a])}for(var l=0,u=o;l<u.length;l++){var c;Ns(c=u[l],0,0,t)}}return e}(e,o)}function _s(e,t,n,r){for(var o=0,i=e;o<i.length;o++){var a=i[o];a.top=n.computeDateTop(a.start,t),a.bottom=Math.max(a.top+(r||0),n.computeDateTop(a.end,t))}}function Is(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)o=e,i=t[r],o.bottom>i.top&&o.top<i.bottom&&n.push(t[r]);var o,i;return n}function Ps(e){var t,n,r=e.forwardSegs,o=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)Ps(n=r[t]),o=Math.max(o,1+n.forwardPressure);e.forwardPressure=o}}function Ns(e,t,n,r){var o,i=e.forwardSegs;if(null==e.forwardCoord)for(i.length?(!function(e,t){var n=e.map(Hs),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return ae(e,t,r)})),n.map((function(e){return e._seg}))}(i,r),Ns(i[0],t+1,n,r),e.forwardCoord=i[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),o=0;o<i.length;o++)Ns(i[o],0,e.forwardCoord,r)}function Hs(e){var t=vn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Os=St({hour:"numeric",minute:"2-digit",meridiem:!1}),As=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"),Hr(ea,r({},this.props,{defaultTimeFormat:Os,extraClassNames:e}))},t}(jr);di.timeGridEventCondensedHeight=30;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,t=this.props,n=this.context.options.selectMirror,o=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],i=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Hr(oa,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(a,s,l){return Hr("td",r({ref:a,className:["fc-timegrid-col"].concat(s,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Hr("div",{className:"fc-timegrid-col-frame"},Hr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Hr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,i)),Hr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(o,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Hr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Hr(Ls,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,o){var i=this.props;return i.forPrint?this.renderPrintFgSegs(e):i.slatCoords?this.renderPositionedFgSegs(e,t,n,r,o):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=hn(e,this.context.options.eventOrder)).map((function(e){return Hr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Hr(As,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},Sn(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,o,i){var a=this,s=this.context,l=this.props;return(e=xs(e,l.date,l.slatCoords,s.options.eventMinHeight,s.options.eventOrder)).map((function(e){var s=e.eventRange.instance.instanceId,u=n||o||i?r({left:0,right:0},a.computeSegTopBottomCss(e)):a.computeFgSegPositionCss(e);return Hr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:s,style:r({visibility:t[s]?"hidden":""},u)},Hr(As,r({seg:e,isDragging:n,isResizing:o,isDateSelecting:i,isSelected:s===l.eventSelection,isCondensed:e.bottom-e.top<di.timeGridEventCondensedHeight},Sn(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,o=this.context,i=this.props;if(i.slatCoords){_s(e,i.date,i.slatCoords,o.options.eventMinHeight);var a=e.map((function(e){return Hr("div",{key:bn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Hr(la,r({seg:e},Sn(e,i.todayRange,i.nowDate))):sa(t))}));return Hr(Ur,null,a)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Hr(na,{isAxis:!1,date:r,key:t},(function(t,o,i,a){return Hr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(o).join(" "),style:{top:n.computeDateTop(e.start,r)}},a)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,o=this.context,i=o.isRtl,a=o.options.slotEventOverlap,s=e.backwardCoord,l=e.forwardCoord;a&&(l=Math.min(1,s+2*(l-s))),i?(t=1-l,n=s):(t=s,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return a&&e.forwardPressure&&(u[i?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(jr),Ls=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 Hr(ia,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Hr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(jr),Ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=it(ks),t.splitBgEventSegs=it(ks),t.splitBusinessHourSegs=it(ks),t.splitNowIndicatorSegs=it(ks),t.splitDateSelectionSegs=it(ks),t.splitEventDrag=it(Ms),t.splitEventResize=it(Ms),t.rootElRef=Ar(),t.cellElRefs=new Li,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,o=this.splitFgEventSegs(t.fgEventSegs,r),i=this.splitBgEventSegs(t.bgEventSegs,r),a=this.splitBusinessHourSegs(t.businessHourSegs,r),s=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Hr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Hr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Hr("tbody",null,Hr("tr",null,t.axis&&Hr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Hr("div",{className:"fc-timegrid-col-frame"},Hr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Hr(na,{isAxis:!0,date:t.nowDate},(function(e,t,r,o){return Hr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},o)}))))),t.cells.map((function(n,r){return Hr(Us,{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:o[r],bgEventSegs:i[r],businessHourSegs:a[r],nowIndicatorSegs:s[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 Mr(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(jr);var Vs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=it(zs),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var o=r.computeTimeTop(e.time);(o=Math.ceil(o))&&o++,n(o)}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 Hr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Hr(ms,{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}),Hr(Ws,{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,o=n.options,i=this.colCoords,a=this.props.dateProfile,s=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,o.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=i.leftToIndex(e),p=s.positions.topToIndex(t);if(null!=d&&null!=p){var f=s.positions.tops[p],h=s.positions.getHeight(p),v=(t-f)/h,g=p*c+Math.floor(v*c),m=this.props.cells[d].date,y=Xe(a.slotMinTime,Ke(u,g)),E=r.add(m,y);return{col:d,dateSpan:{range:{start:E,end:r.add(E,u)},allDay:!1},dayEl:i.els[d],relativeRect:{left:i.lefts[d],right:i.rights[d],top:f,bottom:f+h}}}},t}(jr);function zs(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=it(Bs),t.slicer=new js,t.timeColsRef=Ar(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,o=t.dateProfile,i=t.dayTableModel,a=n.options.nowIndicator,s=this.buildDayRanges(i,o,n.dateEnv);return Hr(Mi,{unit:a?"minute":"day"},(function(l,u){return Hr(Vs,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,o,null,n,s),{forPrint:t.forPrint,axis:t.axis,dateProfile:o,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:i.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:a&&e.slicer.sliceNowDate(l,n,s),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}(oo);function Bs(e,t,n){for(var r=[],o=0,i=e.headerDates;o<i.length;o++){var a=i[o];r.push({start:n.add(a,t.slotMinTime),end:n.add(a,t.slotMaxTime)})}return r}var js=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 o=nn(e,t[r]);o&&n.push({start:o.start,end:o.end,isStart:o.start.valueOf()===e.start.valueOf(),isEnd:o.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Hi),Gs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=it(qs),t.buildSlatMetas=it(bs),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,o=t.dateEnv,i=t.dateProfileGenerator,a=this.props,s=a.dateProfile,l=this.buildTimeColsModel(s,i),u=this.allDaySplitter.splitProps(a),c=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,n.slotLabelInterval,n.slotDuration,o),d=n.dayMinWidth,p=!d,f=d,h=n.dayHeaders&&Hr(_i,{dates:l.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:p?this.renderHeadAxis:null}),v=!1!==n.allDaySlot&&function(t){return Hr(us,r({},u.allDay,{dateProfile:s,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:p?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:a.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Hr(Fs,r({},u.timed,{dayTableModel:l,dateProfile:s,axis:p,slotDuration:n.slotDuration,slatMetas:c,forPrint:a.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return f?this.renderHScrollLayout(h,v,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(h,v,g)},t}(ws);function qs(e,t){var n=new Pi(e.renderRange,t);return new Ni(n,!1)}var Ys=io({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Gs,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Zs=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,o=this.context,i=o.theme,a=o.dateEnv,s=o.options,l=o.viewApi,u=hr(t,n),c=s.listDayFormat?a.format(t,s.listDayFormat):"",d=s.listDaySideFormat?a.format(t,s.listDaySideFormat):"",p=s.navLinks?gr(t):null,f=r({date:a.toDate(t),view:l,text:c,sideText:d,navLinkData:p},u),h=["fc-list-day"].concat(vr(u,i));return Hr(uo,{hookProps:f,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:Xs,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(e,n,r,o){return Hr("tr",{ref:e,className:h.concat(n).join(" "),"data-date":tt(t)},Hr("th",{colSpan:3},Hr("div",{className:"fc-list-day-cushion "+i.getClass("tableCellShaded"),ref:r},o)))}))},t}(jr);function Xs(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Hr(Ur,null,e.text&&Hr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Hr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ks=St({hour:"numeric",minute:"2-digit",meridiem:"short"}),Js=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||Ks;return Hr(Qi,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:$s,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,o,i,a,s){return Hr("tr",{className:["fc-list-event",s.event.url?"fc-event-forced-url":""].concat(o).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var o=e.eventRange.def,i=e.eventRange.instance,a=!1,s=void 0;if(o.allDay?a=!0:$t(e.eventRange.range)?e.isStart?s=En(e,t,n,null,null,i.range.start,e.end):e.isEnd?s=En(e,t,n,null,null,e.start,i.range.end):a=!0:s=En(e,t,n),a){var l={text:n.options.allDayText,view:n.viewApi};return Hr(uo,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Qs,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Hr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Hr("td",{className:"fc-list-event-time"},s)}return null}(n,r,t),Hr("td",{className:"fc-list-event-graphic"},Hr("span",{className:"fc-list-event-dot",style:{borderColor:s.borderColor||s.backgroundColor}})),Hr("td",{className:"fc-list-event-title",ref:i},a))}))},t}(jr);function $s(e){var t=e.event,n=t.url;return Hr("a",r({},n?{href:n}:{}),t.title)}function Qs(e){return e.text}var el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=it(nl),t.eventStoreToSegs=it(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":""],o=this.computeDateVars(t.dateProfile),i=o.dayDates,a=o.dayRanges,s=this.eventStoreToSegs(t.eventStore,t.eventUiBases,a);return Hr(yo,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,o){return Hr("div",{ref:n,className:r.concat(o).join(" ")},Hr(Ui,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},s.length>0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Hr(uo,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:tl,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Hr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Hr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,o=n.theme,i=n.options,a=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Hr(Mi,{unit:"day"},(function(e,n){for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u){var c=t[l].toISOString();s.push(Hr(Zs,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,p=u=hn(u,i.eventOrder);d<p.length;d++){var f=p[d];s.push(Hr(Js,r({key:c+":"+f.eventRange.instance.instanceId,seg:f,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},Sn(f,n,e))))}}}return Hr("table",{className:"fc-list-table "+o.getClass("table")},Hr("tbody",null,s))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(ln(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.eventRangeToSegs(i,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,o,i=this.context.dateEnv,a=this.context.options.nextDayThreshold,s=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=nn(s,t[n]))&&(o={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===s.end.valueOf(),dayIndex:n},u.push(o),!o.isEnd&&!l&&n+1<t.length&&s.end<i.add(t[n+1].start,a))){o.end=s.end,o.isEnd=!0;break}return u},t}(oo);function tl(e){return e.text}function nl(e){for(var t=be(e.renderRange.start),n=e.renderRange.end,r=[],o=[];t<n;)r.push(t),o.push({start:t,end:ve(t,1)}),t=ve(t,1);return{dayDates:r,dayRanges:o}}function rl(e){return!1===e?null:St(e)}var ol=io({optionRefiners:{listDayFormat:rl,listDaySideFormat:rl,noEventsClassNames:_t,noEventsContent:_t,noEventsDidMount:_t,noEventsWillUnmount:_t},views:{list:{component:el,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"}}}}),il=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Pr);il.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"},il.prototype.baseIconClass="fa",il.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},il.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},il.prototype.iconOverrideOption="bootstrapFontAwesome",il.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",il.prototype.iconOverridePrefix="fa-";var al=io({themeClasses:{bootstrap:il}});var sl=io({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;if(/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e))return e;if((t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e)))return decodeURIComponent(t[1])}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var o=e.context,i=o.dateEnv,a=o.options,s=e.eventSource.meta,l=s.googleCalendarApiKey||a.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;t||(t="https://www.googleapis.com/calendar/v3/calendars");return t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(s),c=s.extraParams,d="function"==typeof c?c():c,p=function(e,t,n,o){var i,a,s;o.canComputeOffset?(a=o.formatIso(e.start),s=o.formatIso(e.end)):(a=ve(e.start,-1).toISOString(),s=ve(e.end,1).toISOString());i=r(r({},n||{}),{key:t,timeMin:a,timeMax:s,singleEvents:!0,maxResults:9999}),"local"!==o.timeZone&&(i.timeZone=o.timeZone);return i}(e.range,l,d,i);Wo("GET",u,p,(function(e,r){var o,i;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(o=e.items,i=p.timeZone,o.map((function(e){return function(e,t){var n=e.htmlLink||null;n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t));return{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,i)}))),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:_t}});return Fo.push(Wa,fs,Ys,ol,al,sl),e.BASE_OPTION_DEFAULTS=bt,e.BASE_OPTION_REFINERS=Dt,e.BaseComponent=jr,e.BgEvent=la,e.BootstrapTheme=il,e.Calendar=pa,e.CalendarApi=Vn,e.CalendarContent=Ei,e.CalendarDataManager=Zo,e.CalendarDataProvider=oi,e.CalendarRoot=bi,e.Component=Nr,e.ContentHook=po,e.CustomContentRenderContext=co,e.DateComponent=oo,e.DateEnv=Xn,e.DateProfileGenerator=Co,e.DayCellContent=ia,e.DayCellRoot=oa,e.DayGridView=ds,e.DayHeader=_i,e.DaySeriesModel=Pi,e.DayTable=us,e.DayTableModel=Ni,e.DayTableSlicer=cs,e.DayTimeCols=Fs,e.DayTimeColsSlicer=js,e.DayTimeColsView=Gs,e.DelayedRunner=Go,e.Draggable=Aa,e.ElementDragging=ci,e.ElementScrollController=_r,e.Emitter=kr,e.EventApi=zn,e.EventRoot=Qi,e.EventSourceApi=L,e.FeaturefulElementDragging=wa,e.Fragment=Ur,e.Interaction=ai,e.ListView=el,e.MountHook=ho,e.NamedTimeZoneImpl=ii,e.NowIndicatorRoot=na,e.NowTimer=Mi,e.PointerDragging=ga,e.PositionCache=Mr,e.RefMap=Li,e.RenderHook=uo,e.ScrollController=xr,e.ScrollResponder=Vr,e.Scroller=Ui,e.SimpleScrollGrid=$i,e.Slicer=Hi,e.Splitter=pr,e.StandardEvent=ea,e.Table=as,e.TableDateCell=Ri,e.TableDowCell=Ti,e.TableView=Va,e.Theme=Pr,e.ThirdPartyDraggable=La,e.TimeCols=Vs,e.TimeColsSlatsCoords=vs,e.TimeColsView=ws,e.ViewApi=On,e.ViewContextType=zr,e.ViewRoot=yo,e.WeekNumberRoot=ca,e.WindowScrollController=Ir,e.addDays=ve,e.addDurations=Xe,e.addMs=ge,e.addWeeks=he,e.allowContextMenu=oe,e.allowSelection=ne,e.applyMutationToEventStore=Pn,e.applyStyle=j,e.applyStyleProp=G,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return $e(e)/6e4},e.asRoughMs=$e,e.asRoughSeconds=function(e){return $e(e)/1e3},e.buildClassNameNormalizer=vo,e.buildDayRanges=Bs,e.buildDayTableModel=ps,e.buildEventApis=Bn,e.buildEventRangeKey=bn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var o=t(e[r],r);n[o[0]]=o[1]}return n},e.buildNavLinkData=gr,e.buildSegCompareObj=vn,e.buildSegTimeText=En,e.buildSlatMetas=bs,e.buildTimeColsModel=qs,e.collectFromHash=Fe,e.combineEventUis=Vt,e.compareByFieldSpec=se,e.compareByFieldSpecs=ae,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=Ci,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=Cr,e.computeRect=wr,e.computeSegDraggable=gn,e.computeSegEndResizable=yn,e.computeSegStartResizable=mn,e.computeShrinkWidth=Wi,e.computeSmallestCellWidth=pe,e.computeVisibleDayRange=Jt,e.config=di,e.constrainPoint=sr,e.createContext=Lr,e.createDuration=Ye,e.createElement=Hr,e.createEmptyEventStore=Ht,e.createEventInstance=Ie,e.createEventUi=Wt,e.createFormatter=St,e.createPlugin=io,e.createRef=Ar,e.diffDates=Qt,e.diffDayAndTime=Ee,e.diffDays=ye,e.diffPoints=ur,e.diffWeeks=me,e.diffWholeDays=De,e.diffWholeWeeks=Se,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=z,e.enableCursor=ee,e.eventTupleToStore=Pt,e.filterEventStoreDefs=At,e.filterHash=He,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o++)for(var i=n[o].children,a=0;a<i.length;a++){var s=i[a];t&&!z(s,t)||r.push(s)}return r},e.findElements=F,e.flexibleCompare=le,e.flushToDom=Wr,e.formatDate=function(e,t){void 0===t&&(t={});var n=tr(t),r=St(t),o=n.createMarkerMeta(e);return o?n.format(o.marker,r,{forcedTzo:o.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=tr("object"==typeof n&&n?n:{}),o=St(n),i=r.createMarkerMeta(e),a=r.createMarkerMeta(t);return i&&a?r.formatRange(i.marker,a.marker,o,{forcedStartTzo:i.forcedTzo,forcedEndTzo:a.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:bt.defaultRangeSeparator}):""},e.getAllowYScrolling=zi,e.getCanVGrowWithinCell=cr,e.getClippingParents=Rr,e.getDateMeta=hr,e.getDayClassNames=vr,e.getDefaultEventEnd=In,e.getElSeg=dn,e.getEventClassNames=Dn,e.getIsRtlScrollbarOnLeft=Er,e.getRectCenter=lr,e.getRelevantEvents=Nt,e.getScrollGridClassNames=Yi,e.getScrollbarWidths=Sr,e.getSectionClassNames=Zi,e.getSectionHasLiquidHeight=Vi,e.getSegMeta=Sn,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+fe[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=Ji,e.getStickyHeaderDates=Ki,e.getUnequalProps=We,e.globalLocales=Kn,e.globalPlugins=Fo,e.greatestDurationDenominator=et,e.guid=$,e.hasBgRendering=un,e.hasShrinkWidth=qi,e.identity=_t,e.interactionSettingsStore=ui,e.interactionSettingsToStore=li,e.intersectRanges=nn,e.intersectRects=ar,e.isArraysEqual=ot,e.isColPropsEqual=Bi,e.isDateSpansEqual=Rn,e.isInt=de,e.isInteractionValid=Jr,e.isMultiDayRange=$t,e.isPropsEqual=Le,e.isPropsValid=Qr,e.isValidDate=xe,e.listenBySelector=Z,e.mapHash=Oe,e.memoize=it,e.memoizeArraylike=function(e,t,n){var r=[],o=[];return function(i){for(var a=r.length,s=i.length,l=0;l<a;l++)if(i[l]){if(!ot(r[l],i[l])){n&&n(o[l]);var u=e.apply(this,i[l]);t&&t(u,o[l])||(o[l]=u)}}else n&&n(o[l]);for(;l<s;l++)o[l]=e.apply(this,i[l]);return r=i,o.splice(s),o}},e.memoizeHashlike=function(e,t,n){var r={},o={};return function(i){var a={};for(var s in i)if(o[s])if(ot(r[s],i[s]))a[s]=o[s];else{n&&n(o[s]);var l=e.apply(this,i[s]);a[s]=t&&t(l,o[s])?o[s]:l}else a[s]=e.apply(this,i[s]);return r=i,o=a,a}},e.memoizeObjArg=at,e.mergeEventStores=Ot,e.multiplyDuration=Ke,e.padStart=ue,e.parseBusinessHours=or,e.parseClassNames=Ut,e.parseDragMeta=fi,e.parseEventDef=Xt,e.parseFieldSpecs=ie,e.parseMarker=Zn,e.pointInsideRect=ir,e.preventContextMenu=re,e.preventDefault=q,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=an,e.rangesEqual=rn,e.rangesIntersect=on,e.refineEventDef=Yt,e.refineProps=xt,e.removeElement=W,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=Fi,e.renderFill=sa,e.renderMicroColGroup=ji,e.renderScrollShim=Xi,e.requestJson=Wo,e.sanitizeShrinkWidth=Gi,e.setElSeg=cn,e.setRef=Yr,e.sliceEventStore=ln,e.sliceEvents=function(e,t){return ln(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=hn,e.startOfDay=be,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=xn,e.unpromisify=Tr,e.version="5.3.1",e.whenTransitionDone=K,e.wholeDivideDurations=Qe,e}({});!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t=t||self).jsSHA=r()}(this,(function(){"use strict";var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])})(r,n)};var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(t,r,n,i){var e,o,u,s=r||[0],f=(n=n||0)>>>3,h=-1===i?3:0;for(e=0;e<t.length;e+=1)o=(u=e+f)>>>2,s.length<=o&&s.push(0),s[o]|=t[e]<<8*(h+i*(u%4));return{value:s,binLen:8*t.length+n}}function i(t,i,e){switch(i){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":return function(t,r,n){return function(t,r,n,i){var e,o,u,s;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var f=r||[0],h=(n=n||0)>>>3,a=-1===i?3:0;for(e=0;e<t.length;e+=2){if(o=parseInt(t.substr(e,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(u=(s=(e>>>1)+h)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(a+i*(s%4))}return{value:f,binLen:4*t.length+n}}(t,r,n,e)};case"TEXT":return function(t,r,n){return function(t,r,n,i,e){var o,u,s,f,h,a,c,w,v=0,E=n||[0],A=(i=i||0)>>>3;if("UTF8"===r)for(c=-1===e?3:0,s=0;s<t.length;s+=1)for(u=[],128>(o=t.charCodeAt(s))?u.push(o):2048>o?(u.push(192|o>>>6),u.push(128|63&o)):55296>o||57344<=o?u.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(s)),u.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),f=0;f<u.length;f+=1){for(h=(a=v+A)>>>2;E.length<=h;)E.push(0);E[h]|=u[f]<<8*(c+e*(a%4)),v+=1}else for(c=-1===e?2:0,w="UTF16LE"===r&&1!==e||"UTF16LE"!==r&&1===e,s=0;s<t.length;s+=1){for(o=t.charCodeAt(s),!0===w&&(o=(f=255&o)<<8|o>>>8),h=(a=v+A)>>>2;E.length<=h;)E.push(0);E[h]|=o<<8*(c+e*(a%4)),v+=2}return{value:E,binLen:8*v+i}}(t,i,r,n,e)};case"B64":return function(t,n,i){return function(t,n,i,e){var o,u,s,f,h,a,c=0,w=n||[0],v=(i=i||0)>>>3,E=-1===e?3:0,A=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==A&&A<t.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<t.length;o+=4){for(f=t.substr(o,4),s=0,u=0;u<f.length;u+=1)s|=r.indexOf(f.charAt(u))<<18-6*u;for(u=0;u<f.length-1;u+=1){for(h=(a=c+v)>>>2;w.length<=h;)w.push(0);w[h]|=(s>>>16-8*u&255)<<8*(E+e*(a%4)),c+=1}}return{value:w,binLen:8*c+i}}(t,n,i,e)};case"BYTES":return function(t,r,n){return function(t,r,n,i){var e,o,u,s,f=r||[0],h=(n=n||0)>>>3,a=-1===i?3:0;for(o=0;o<t.length;o+=1)e=t.charCodeAt(o),u=(s=o+h)>>>2,f.length<=u&&f.push(0),f[u]|=e<<8*(a+i*(s%4));return{value:f,binLen:8*t.length+n}}(t,r,n,e)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t,r,i){return function(t,r,i,e){return n(new Uint8Array(t),r,i,e)}(t,r,i,e)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t,r,i){return n(t,r,i,e)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function e(t,n,i,e){switch(t){case"HEX":return function(t){return function(t,r,n,i){var e,o,u="",s=r/8,f=-1===n?3:0;for(e=0;e<s;e+=1)o=t[e>>>2]>>>8*(f+n*(e%4)),u+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return i.outputUpper?u.toUpperCase():u}(t,n,i,e)};case"B64":return function(t){return function(t,n,i,e){var o,u,s,f,h,a="",c=n/8,w=-1===i?3:0;for(o=0;o<c;o+=3)for(f=o+1<c?t[o+1>>>2]:0,h=o+2<c?t[o+2>>>2]:0,s=(t[o>>>2]>>>8*(w+i*(o%4))&255)<<16|(f>>>8*(w+i*((o+1)%4))&255)<<8|h>>>8*(w+i*((o+2)%4))&255,u=0;u<4;u+=1)a+=8*o+6*u<=n?r.charAt(s>>>6*(3-u)&63):e.b64Pad;return a}(t,n,i,e)};case"BYTES":return function(t){return function(t,r,n){var i,e,o="",u=r/8,s=-1===n?3:0;for(i=0;i<u;i+=1)e=t[i>>>2]>>>8*(s+n*(i%4))&255,o+=String.fromCharCode(e);return o}(t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t){return function(t,r,n){var i,e=r/8,o=new ArrayBuffer(e),u=new Uint8Array(o),s=-1===n?3:0;for(i=0;i<e;i+=1)u[i]=t[i>>>2]>>>8*(s+n*(i%4))&255;return o}(t,n,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t){return function(t,r,n){var i,e=r/8,o=-1===n?3:0,u=new Uint8Array(e);for(i=0;i<e;i+=1)u[i]=t[i>>>2]>>>8*(o+n*(i%4))&255;return u}(t,n,i)};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],u=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],s=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function f(t){var r={outputUpper:!1,b64Pad:"=",outputLen:-1},n=t||{},i="Output length must be a multiple of 8";if(r.outputUpper=n.outputUpper||!1,n.b64Pad&&(r.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(i);r.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(i);r.outputLen=n.shakeLen}if("boolean"!=typeof r.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof r.b64Pad)throw new Error("Invalid b64Pad formatting option");return r}function h(t,r){return t>>>r|t<<32-r}function a(t,r){return t>>>r}function c(t,r,n){return t&r^~t&n}function w(t,r,n){return t&r^t&n^r&n}function v(t){return h(t,2)^h(t,13)^h(t,22)}function E(t,r){var n=(65535&t)+(65535&r);return(65535&(t>>>16)+(r>>>16)+(n>>>16))<<16|65535&n}function A(t,r,n,i){var e=(65535&t)+(65535&r)+(65535&n)+(65535&i);return(65535&(t>>>16)+(r>>>16)+(n>>>16)+(i>>>16)+(e>>>16))<<16|65535&e}function p(t,r,n,i,e){var o=(65535&t)+(65535&r)+(65535&n)+(65535&i)+(65535&e);return(65535&(t>>>16)+(r>>>16)+(n>>>16)+(i>>>16)+(e>>>16)+(o>>>16))<<16|65535&o}function d(t){return h(t,7)^h(t,18)^a(t,3)}function l(t){return h(t,6)^h(t,11)^h(t,25)}function R(t){return"SHA-224"==t?u.slice():s.slice()}function U(t,r){var n,i,e,u,s,f,R,U,y,b,T,m,F=[];for(n=r[0],i=r[1],e=r[2],u=r[3],s=r[4],f=r[5],R=r[6],U=r[7],T=0;T<64;T+=1)F[T]=T<16?t[T]:A(h(m=F[T-2],17)^h(m,19)^a(m,10),F[T-7],d(F[T-15]),F[T-16]),y=p(U,l(s),c(s,f,R),o[T],F[T]),b=E(v(n),w(n,i,e)),U=R,R=f,f=s,s=E(u,y),u=e,e=i,i=n,n=E(y,b);return r[0]=E(n,r[0]),r[1]=E(i,r[1]),r[2]=E(e,r[2]),r[3]=E(u,r[3]),r[4]=E(s,r[4]),r[5]=E(f,r[5]),r[6]=E(R,r[6]),r[7]=E(U,r[7]),r}return function(r){function n(t,n,e){var o=this;if("SHA-224"!==t&&"SHA-256"!==t)throw new Error("Chosen SHA variant is not supported");var u=e||{};return(o=r.call(this,t,n,e)||this).t=o.i,o.o=!0,o.u=-1,o.s=i(o.h,o.v,o.u),o.A=U,o.p=function(t){return t.slice()},o.l=R,o.R=function(r,n,i,e){return function(t,r,n,i,e){for(var o,u=15+(r+65>>>9<<4),s=r+n;t.length<=u;)t.push(0);for(t[r>>>5]|=128<<24-r%32,t[u]=4294967295&s,t[u-1]=s/4294967296|0,o=0;o<t.length;o+=16)i=U(t.slice(o,o+16),i);return"SHA-224"===e?[i[0],i[1],i[2],i[3],i[4],i[5],i[6]]:i}(r,n,i,e,t)},o.U=R(t),o.T=512,o.m="SHA-224"===t?224:256,o.F=!1,u.hmacKey&&o.B(function(t,r,n,e){var o=t+" must include a value and format";if(!r){if(!e)throw new Error(o);return e}if(void 0===r.value||!r.format)throw new Error(o);return i(r.format,r.encoding||"UTF8",n)(r.value)}("hmacKey",u.hmacKey,o.u)),o}return function(r,n){function i(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}(n,r),n}(function(){function t(t,r,n){var i=n||{};if(this.h=r,this.v=i.encoding||"UTF8",this.numRounds=i.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=t,this.Y=[],this.H=0,this.S=!1,this.I=0,this.C=!1,this.L=[],this.N=[]}return t.prototype.update=function(t){var r,n=0,i=this.T>>>5,e=this.s(t,this.Y,this.H),o=e.binLen,u=e.value,s=o>>>5;for(r=0;r<s;r+=i)n+this.T<=o&&(this.U=this.A(u.slice(r,r+i),this.U),n+=this.T);this.I+=n,this.Y=u.slice(n>>>5),this.H=o%this.T,this.S=!0},t.prototype.getHash=function(t,r){var n,i,o=this.m,u=f(r);if(this.F){if(-1===u.outputLen)throw new Error("Output length must be specified in options");o=u.outputLen}var s=e(t,o,this.u,u);if(this.C&&this.t)return s(this.t(u));for(i=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&&(i[i.length-1]&=16777215>>>24-o%32),i=this.R(i,o,0,this.l(this.g),o);return s(i)},t.prototype.setHMACKey=function(t,r,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 e=i(r,(n||{}).encoding||"UTF8",this.u);this.B(e(t))},t.prototype.B=function(t){var r,n=this.T>>>3,i=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<t.binLen/8&&(t.value=this.R(t.value,t.binLen,0,this.l(this.g),this.m));t.value.length<=i;)t.value.push(0);for(r=0;r<=i;r+=1)this.L[r]=909522486^t.value[r],this.N[r]=1549556828^t.value[r];this.U=this.A(this.L,this.U),this.I=this.T,this.C=!0},t.prototype.getHMAC=function(t,r){var n=f(r);return e(t,this.m,this.u,n)(this.i())},t.prototype.i=function(){var t;if(!this.C)throw new Error("Cannot call getHMAC without first setting MAC key");var r=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),this.m);return t=this.A(this.N,this.l(this.g)),t=this.R(r,this.m,this.T,t,this.m)},t}())}));
748
748
  /*!
749
749
  *
750
750
  * Super simple wysiwyg editor v0.8.18
@@ -844,7 +844,7 @@ var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.se
844
844
  *
845
845
  * Copyright (c) 2016 Jorik Tangelder;
846
846
  * Licensed under the MIT license */
847
- !function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(j(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function h(b,c,d){var e="DEPRECATED METHOD: "+c+"\n"+d+" AT \n";return function(){var c=new Error("get-stack-trace"),d=c&&c.stack?c.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&la(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==oa?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),(function(b){a.addEventListener(b,c,!1)}))}function n(a,b,c){g(q(b),(function(b){a.removeEventListener(b,c,!1)}))}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function s(a){return Array.prototype.slice.call(a,0)}function t(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];r(e,g)<0&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort((function(a,c){return a[b]>c[b]})):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g<ma.length;){if(c=ma[g],e=c?c+f:b,e in a)return e;g++}return d}function v(){return ua++}function w(b){var c=b.ownerDocument||b;return c.defaultView||c.parentWindow||a}function x(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){k(a.options.enable,[a])&&c.handler(b)},this.init()}function y(a){var b,c=a.options.inputClass;return new(b=c?c:xa?M:ya?P:wa?R:L)(a,z)}function z(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=b&Ea&&d-e===0,g=b&(Ga|Ha)&&d-e===0;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,A(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function A(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=D(b)),e>1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=ra(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=qa(j.x)>qa(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};b.eventType!==Ea&&f.eventType!==Ga||(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Ha&&(i>Da||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=qa(l.x)>qa(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:pa(a.pointers[c].clientX),clientY:pa(a.pointers[c].clientY)},c++;return{timeStamp:ra(),pointers:b,center:E(b),deltaX:a.deltaX,deltaY:a.deltaY}}function E(a){var b=a.length;if(1===b)return{x:pa(a[0].clientX),y:pa(a[0].clientY)};for(var c=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:pa(c/b),y:pa(d/b)}}function F(a,b,c){return{x:b/a||0,y:c/a||0}}function G(a,b){return a===b?Ia:qa(a)>=qa(b)?0>a?Ja:Ka:0>b?La:Ma}function H(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Ra)+I(a[1],a[0],Ra)}function K(a,b){return H(b[0],b[1],Ra)/H(a[0],a[1],Ra)}function L(){this.evEl=Ta,this.evWin=Ua,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Xa,this.evWin=Ya,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=$a,this.evWin=_a,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Ga|Ha)&&(c=t(c.concat(d),"identifier",!0)),[c,d]}function P(){this.evTarget=bb,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(Ea|Fa)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter((function(a){return o(a.target,i)})),b===Ea)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Ga|Ha)&&delete d[g[e].identifier],e++;return h.length?[t(f.concat(h),"identifier",!0),h]:void 0}function R(){x.apply(this,arguments);var a=j(this.handler,this);this.touch=new P(this.manager,a),this.mouse=new L(this.manager,a),this.primaryTouch=null,this.lastTouches=[]}function S(a,b){a&Ea?(this.primaryTouch=b.changedPointers[0].identifier,T.call(this,b)):a&(Ga|Ha)&&T.call(this,b)}function T(a){var b=a.changedPointers[0];if(b.identifier===this.primaryTouch){var c={x:b.clientX,y:b.clientY};this.lastTouches.push(c);var d=this.lastTouches,e=function(){var a=d.indexOf(c);a>-1&&d.splice(a,1)};setTimeout(e,cb)}}function U(a){for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d<this.lastTouches.length;d++){var e=this.lastTouches[d],f=Math.abs(b-e.x),g=Math.abs(c-e.y);if(db>=f&&db>=g)return!0}return!1}function V(a,b){this.manager=a,this.set(b)}function W(a){if(p(a,jb))return jb;var b=p(a,kb),c=p(a,lb);return b&&c?jb:b||c?b?kb:lb:p(a,ib)?ib:hb}function X(){if(!fb)return!1;var b={},c=a.CSS&&a.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(d){b[d]=c?a.CSS.supports("touch-action",d):!0})),b}function Y(a){this.options=la({},this.defaults,a||{}),this.id=v(),this.manager=null,this.options.enable=l(this.options.enable,!0),this.state=nb,this.simultaneous={},this.requireFail=[]}function Z(a){return a&sb?"cancel":a&qb?"end":a&pb?"move":a&ob?"start":""}function $(a){return a==Ma?"down":a==La?"up":a==Ja?"left":a==Ka?"right":""}function _(a,b){var c=b.manager;return c?c.get(a):a}function aa(){Y.apply(this,arguments)}function ba(){aa.apply(this,arguments),this.pX=null,this.pY=null}function ca(){aa.apply(this,arguments)}function da(){Y.apply(this,arguments),this._timer=null,this._input=null}function ea(){aa.apply(this,arguments)}function fa(){aa.apply(this,arguments)}function ga(){Y.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ha(a,b){return b=b||{},b.recognizers=l(b.recognizers,ha.defaults.preset),new ia(a,b)}function ia(a,b){this.options=la({},ha.defaults,b||{}),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=a,this.input=y(this),this.touchAction=new V(this,this.options.touchAction),ja(this,!0),g(this.options.recognizers,(function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])}),this)}function ja(a,b){var c=a.element;if(c.style){var d;g(a.options.cssProps,(function(e,f){d=u(c.style,f),b?(a.oldCssProps[d]=c.style[d],c.style[d]=e):c.style[d]=a.oldCssProps[d]||""})),b||(a.oldCssProps={})}}function ka(a,c){var d=b.createEvent("Event");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var la,ma=["","webkit","Moz","MS","ms","o"],na=b.createElement("div"),oa="function",pa=Math.round,qa=Math.abs,ra=Date.now;la="function"!=typeof Object.assign?function(a){if(a===d||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var e=arguments[c];if(e!==d&&null!==e)for(var f in e)e.hasOwnProperty(f)&&(b[f]=e[f])}return b}:Object.assign;var sa=h((function(a,b,c){for(var e=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;return a}),"extend","Use `assign`."),ta=h((function(a,b){return sa(a,b,!0)}),"merge","Use `assign`."),ua=1,va=/mobile|tablet|ip(ad|hone|od)|android/i,wa="ontouchstart"in a,xa=u(a,"PointerEvent")!==d,ya=wa&&va.test(navigator.userAgent),za="touch",Aa="pen",Ba="mouse",Ca="kinect",Da=25,Ea=1,Fa=2,Ga=4,Ha=8,Ia=1,Ja=2,Ka=4,La=8,Ma=16,Na=Ja|Ka,Oa=La|Ma,Pa=Na|Oa,Qa=["x","y"],Ra=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&n(this.element,this.evEl,this.domHandler),this.evTarget&&n(this.target,this.evTarget,this.domHandler),this.evWin&&n(w(this.element),this.evWin,this.domHandler)}};var Sa={mousedown:Ea,mousemove:Fa,mouseup:Ga},Ta="mousedown",Ua="mousemove mouseup";i(L,x,{handler:function(a){var b=Sa[a.type];b&Ea&&0===a.button&&(this.pressed=!0),b&Fa&&1!==a.which&&(b=Ga),this.pressed&&(b&Ga&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:Ba,srcEvent:a}))}});var Va={pointerdown:Ea,pointermove:Fa,pointerup:Ga,pointercancel:Ha,pointerout:Ha},Wa={2:za,3:Aa,4:Ba,5:Ca},Xa="pointerdown",Ya="pointermove pointerup pointercancel";a.MSPointerEvent&&!a.PointerEvent&&(Xa="MSPointerDown",Ya="MSPointerMove MSPointerUp MSPointerCancel"),i(M,x,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms",""),e=Va[d],f=Wa[a.pointerType]||a.pointerType,g=f==za,h=r(b,a.pointerId,"pointerId");e&Ea&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Ga|Ha)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Za={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},$a="touchstart",_a="touchstart touchmove touchend touchcancel";i(N,x,{handler:function(a){var b=Za[a.type];if(b===Ea&&(this.started=!0),this.started){var c=O.call(this,a,b);b&(Ga|Ha)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}}});var ab={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},bb="touchstart touchmove touchend touchcancel";i(P,x,{handler:function(a){var b=ab[a.type],c=Q.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}});var cb=2500,db=25;i(R,x,{handler:function(a,b,c){var d=c.pointerType==za,e=c.pointerType==Ba;if(!(e&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(d)S.call(this,b,c);else if(e&&U.call(this,c))return;this.callback(a,b,c)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var eb=u(na.style,"touchAction"),fb=eb!==d,gb="compute",hb="auto",ib="manipulation",jb="none",kb="pan-x",lb="pan-y",mb=X();V.prototype={set:function(a){a==gb&&(a=this.compute()),fb&&this.manager.element.style&&mb[a]&&(this.manager.element.style[eb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,(function(b){k(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))})),W(a.join(" "))},preventDefaults:function(a){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=p(d,jb)&&!mb[jb],f=p(d,lb)&&!mb[lb],g=p(d,kb)&&!mb[kb];if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}return g&&f?void 0:e||f&&c&Na||g&&c&Oa?this.preventSrc(b):void 0},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var nb=1,ob=2,pb=4,qb=8,rb=qb,sb=16,tb=32;Y.prototype={defaults:{},set:function(a){return la(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=_(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=_(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=_(a,this),-1===r(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=_(a,this);var b=r(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;qb>d&&b(c.options.event+Z(d)),b(c.options.event),a.additionalEvent&&b(a.additionalEvent),d>=qb&&b(c.options.event+Z(d))},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=tb)},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(tb|nb)))return!1;a++}return!0},recognize:function(a){var b=la({},a);return k(this.options.enable,[this,b])?(this.state&(rb|sb|tb)&&(this.state=nb),this.state=this.process(b),void(this.state&(ob|pb|qb|sb)&&this.tryEmit(b))):(this.reset(),void(this.state=tb))},process:function(a){},getTouchAction:function(){},reset:function(){}},i(aa,Y,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&(ob|pb),e=this.attrTest(a);return d&&(c&Ha||!e)?b|sb:d||e?c&Ga?b|qb:b&ob?b|pb:ob:tb}}),i(ba,aa,{defaults:{event:"pan",threshold:10,pointers:1,direction:Pa},getTouchAction:function(){var a=this.options.direction,b=[];return a&Na&&b.push(lb),a&Oa&&b.push(kb),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(b.direction&Na?(e=0===f?Ia:0>f?Ja:Ka,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Ia:0>g?La:Ma,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return aa.prototype.attrTest.call(this,a)&&(this.state&ob||!(this.state&ob)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=$(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i(ca,aa,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&ob)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(da,Y,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[hb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Ga|Ha)&&!f)this.reset();else if(a.eventType&Ea)this.reset(),this._timer=e((function(){this.state=rb,this.tryEmit()}),b.time,this);else if(a.eventType&Ga)return rb;return tb},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===rb&&(a&&a.eventType&Ga?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=ra(),this.manager.emit(this.options.event,this._input)))}}),i(ea,aa,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&ob)}}),i(fa,aa,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Na|Oa,pointers:1},getTouchAction:function(){return ba.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Na|Oa)?b=a.overallVelocity:c&Na?b=a.overallVelocityX:c&Oa&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&qa(b)>this.options.velocity&&a.eventType&Ga},emit:function(a){var b=$(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(ga,Y,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ib]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime<b.time;if(this.reset(),a.eventType&Ea&&0===this.count)return this.failTimeout();if(d&&f&&c){if(a.eventType!=Ga)return this.failTimeout();var g=this.pTime?a.timeStamp-this.pTime<b.interval:!0,h=!this.pCenter||H(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,h&&g?this.count+=1:this.count=1,this._input=a;var i=this.count%b.taps;if(0===i)return this.hasRequireFailures()?(this._timer=e((function(){this.state=rb,this.tryEmit()}),b.interval,this),ob):rb}return tb},failTimeout:function(){return this._timer=e((function(){this.state=tb}),this.options.interval,this),tb},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==rb&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ha.VERSION="2.0.7",ha.defaults={domEvents:!1,touchAction:gb,enable:!0,inputTarget:null,inputClass:null,preset:[[ea,{enable:!1}],[ca,{enable:!1},["rotate"]],[fa,{direction:Na}],[ba,{direction:Na},["swipe"]],[ga],[ga,{event:"doubletap",taps:2},["tap"]],[da]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var ub=1,vb=2;ia.prototype={set:function(a){return la(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?vb:ub},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&rb)&&(e=b.curRecognizer=null);for(var f=0;f<d.length;)c=d[f],b.stopped===vb||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(ob|pb|qb)&&(e=b.curRecognizer=c),f++}},get:function(a){if(a instanceof Y)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(f(a,"add",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(f(a,"remove",this))return this;if(a=this.get(a)){var b=this.recognizers,c=r(b,a);-1!==c&&(b.splice(c,1),this.touchAction.update())}return this},on:function(a,b){if(a!==d&&b!==d){var c=this.handlers;return g(q(a),(function(a){c[a]=c[a]||[],c[a].push(b)})),this}},off:function(a,b){if(a!==d){var c=this.handlers;return g(q(a),(function(a){b?c[a]&&c[a].splice(r(c[a],b),1):delete c[a]})),this}},emit:function(a,b){this.options.domEvents&&ka(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&ja(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},la(ha,{INPUT_START:Ea,INPUT_MOVE:Fa,INPUT_END:Ga,INPUT_CANCEL:Ha,STATE_POSSIBLE:nb,STATE_BEGAN:ob,STATE_CHANGED:pb,STATE_ENDED:qb,STATE_RECOGNIZED:rb,STATE_CANCELLED:sb,STATE_FAILED:tb,DIRECTION_NONE:Ia,DIRECTION_LEFT:Ja,DIRECTION_RIGHT:Ka,DIRECTION_UP:La,DIRECTION_DOWN:Ma,DIRECTION_HORIZONTAL:Na,DIRECTION_VERTICAL:Oa,DIRECTION_ALL:Pa,Manager:ia,Input:x,TouchAction:V,TouchInput:P,MouseInput:L,PointerEventInput:M,TouchMouseInput:R,SingleTouchInput:N,Recognizer:Y,AttrRecognizer:aa,Tap:ga,Pan:ba,Swipe:fa,Pinch:ca,Rotate:ea,Press:da,on:m,off:n,each:g,merge:ta,extend:sa,assign:la,inherit:i,bindFn:j,prefixed:u});var wb="undefined"!=typeof a?a:"undefined"!=typeof self?self:{};wb.Hammer=ha,"function"==typeof define&&define.amd?define((function(){return ha})):"undefined"!=typeof module&&module.exports?module.exports=ha:a[c]=ha}(window,document,"Hammer");"use strict";$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:false,enableSort:true,filtermode:"",filteronkeypress:false,activeRow:undefined,height:"100%",showHeader:true,selectFirstRow:false,showNewRow:true,showRowIndex:false,enableRowSelection:true,enableColumnSelection:false,multiselect:false,filterNullRecords:true,navigation:"",isdynamictable:"",cssClassNames:{tableRow:"app-datagrid-row",headerCell:"app-datagrid-header-cell",groupHeaderCell:"app-datagrid-group-header-cell",tableCell:"app-datagrid-cell",grid:"",gridDefault:"table",gridBody:"app-datagrid-body",gridFooter:"app-datagrid-footer",deleteRow:"danger",ascIcon:"wi wi-long-arrow-up",descIcon:"wi wi-long-arrow-down",selectedColumn:"selected-column",rowExpandIcon:"wi wi-minus-square",rowCollapseIcon:"wi wi-plus-square",gridRowExpansionClass:"table-row-expansion",expandedRowClass:"expanded"},dataStates:{loading:"Loading...",ready:"",error:"An error occurred in loading the data.",nodata:"No data found."},messages:{selectField:"Select Field"},loadingicon:"",startRowIndex:1,editmode:"",actionsEnabled:{edit:true,new:true},rowExpansionEnabled:false,rowDef:{position:"0",closeothers:false,columnwidth:"30px"},summaryRow:false,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:false,searchable:false,resizable:false,selectable:false,readonly:true,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:true,show:true},radio:{field:"radio",type:"custom",displayName:"",sortable:false,searchable:false,resizable:false,selectable:false,readonly:true,style:"width: 50px; text-align: center;",textAlignment:"center",show:true},__expand:{field:"__expand",type:"custom",displayName:"",sortable:false,searchable:false,resizable:false,selectable:false,readonly:true,style:"text-align: center;",textAlignment:"center",show:true,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:false,searchable:false,selectable:false,readonly:true,style:"text-align: left;",textAlignment:"left",show:true}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)},isDefined:function(value){return value!==undefined},isObject:function(value){return value!==null&&typeof value==="object"},getObjectIndex:function(data,obj){var matchIndex=-1;if(!Array.isArray(data)){return-1}data.some((function(data,index){if(_.isEqual(data,obj)){matchIndex=index;return true}}));return matchIndex},generateGuid:function(){var random=this.random;return random()+random()+"-"+random()+"-"+random()+"-"+random()+"-"+random()+random()+random()},isValidHtml:function(htm){var validHtmlRegex=/<[a-z][\s\S]*>/i;return validHtmlRegex.test(htm)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(event){return this.isMac()&&event.which===8||event.which===46}},_setStyles:function($el,styleString){if(!styleString){return}var styles=styleString.split(";");styles.forEach((function(styleBit){var parts=styleBit.split(":");var property,value;if(parts.length===2){property=parts[0].trim();value=parts[1].trim();$el.css(property,value)}}));return styleString},_getColumnSortDirection:function(field){var sortInfo=this.options.sortInfo;return field===sortInfo.field?sortInfo.direction:""},_toggleSpacingClasses:function(value){switch(value){case"normal":this.tableContainer.removeClass("table-condensed");if(this.gridSearch){this.gridSearch.find(".form-group").removeClass("form-group-sm");this.gridSearch.find("select").removeClass("input-sm");this.gridSearch.find(".input-group").removeClass("input-group-sm")}break;case"condensed":this.tableContainer.addClass("table-condensed");if(this.gridSearch){this.gridSearch.find(".form-group").addClass("form-group-sm");this.gridSearch.find("select").addClass("input-sm");this.gridSearch.find(".input-group").addClass("input-group-sm")}break}},_getColSpan:function(cols){var colSpan=0,self=this;_.forEach(cols,(function(col){var colDef;if(col.isGroup){colSpan+=self._getColSpan(col.columns)}else{colDef=_.find(self.preparedHeaderData,{field:col.field});colSpan=!_.isUndefined(colDef.show)&&!colDef.show?colSpan:colSpan+1}}));return colSpan},_setColSpan:function(config){var self=this;_.forEach(config,(function(col){if(col.isGroup){col.colspan=self._getColSpan(col.columns);self.gridHeaderElement.find('th[data-col-group="'+col.field+'"]').attr("colspan",col.colspan);self._setColSpan(col.columns)}}))},_getHeaderTemplate:function(){var $colgroup=$("<colgroup></colgroup>"),$htm=this.gridHeaderElement.empty(),isDefined=this.Utils.isDefined,sortInfo=this.options.sortInfo,sortField=sortInfo.field,self=this,rowTemplates=[],headerConfig=this.options.headerConfig,headerGroupClass=self.options.cssClassNames.groupHeaderCell,$row;function generateHeaderCell(value,index){var id=index,field=value.field,headerLabel=self.Utils.isDefined(value.displayName)?value.displayName:field||"",titleLabel=headerLabel,sortEnabled=self.options.enableSort&&(_.isUndefined(value.show)||value.show)&&(_.isUndefined(value.sortable)||value.sortable),headerClasses=self.options.cssClassNames.headerCell,sortClass,tl="",$th,$col,$sortSpan,$sortIcon;headerLabel=!self.Utils.isDefined(headerLabel)||headerLabel===""?"&nbsp;":headerLabel;$col=$("<col/>");if(value.style){self._setStyles($col,value.style)}$colgroup.append($col);if(isDefined(value.class)){headerClasses+=" "+value.class}if(value.selected){headerClasses+=" "+self.options.cssClassNames.selectedColumn+" "}if(field==="checkbox"||field==="radio"){headerClasses+=" grid-col-small"}tl+="<th";if((_.isUndefined(value.resizable)||value.resizable)&&(_.isUndefined(value.show)||value.show)){tl+=" data-col-resizable"}if(self.options.enableColumnSelection&&(_.isUndefined(value.selectable)||value.selectable)){tl+=" data-col-selectable"}if(sortEnabled){tl+=" data-col-sortable"}tl+="></th>";$th=$(tl);$th.attr({"data-col-id":id,"data-col-field":field,title:titleLabel});self._setStyles($th,"text-align: "+value.textAlignment);$th.addClass(headerClasses);if(field==="checkbox"){$th.append('<input type="checkbox" />')}$th.append('<span class="header-data">'+headerLabel+"</span>");if(sortEnabled){$sortSpan=$('<span class="sort-buttons-container"></span>');$sortIcon=$('<i class="sort-icon"></i>');if(sortField&&sortField===value.field&&sortInfo.direction){sortClass=sortInfo.direction==="asc"?self.options.cssClassNames.ascIcon:self.options.cssClassNames.descIcon;$sortSpan.addClass("active");$sortIcon.addClass(sortClass+" "+sortInfo.direction)}$th.append($sortSpan.append($sortIcon))}return $th}function generateRow(cols,i){var $thList=[];_.forEach(cols,(function(col){var index,value,classes,styles,$groupTl;if(col.columns&&col.columns.length){$groupTl=$("<th></th>");classes=headerGroupClass+" "+(col.class||"");styles="text-align: "+col.textAlignment+";background-color: "+(col.backgroundColor||"")+";";$groupTl.attr({"data-col-group":col.field,class:classes,title:col.displayName});self._setStyles($groupTl,styles);$groupTl.append('<span class="header-data">'+col.displayName+"</span>");$thList.push($groupTl);generateRow(col.columns,i+1)}else{index=_.findIndex(self.preparedHeaderData,{field:col.field});value=self.preparedHeaderData[index];if(value){$thList.push(generateHeaderCell(value,index))}}}));rowTemplates[i]=rowTemplates[i]||[];rowTemplates[i]=rowTemplates[i].concat($thList)}if(_.isEmpty(headerConfig)){$row=$("<tr></tr>");self.preparedHeaderData.forEach((function(value,index){$row.append(generateHeaderCell(value,index))}));$htm.append($row)}else{generateRow(headerConfig,0);rowTemplates.forEach((function($thList,index){$row=$('<tr role="row" tabindex="0"></tr>');var rowSpan=rowTemplates.length-index;$thList.forEach((function($th){if(rowSpan>1&&$th.hasClass("app-datagrid-header-cell")){$th.attr("rowspan",rowSpan)}$row.append($th)}));$htm.append($row)}))}return{colgroup:$colgroup,header:$htm}},_getSearchEl:function(){var htm,sel='<select name="wm-datatable" data-element="dgFilterValue" '+'class="form-control app-select">'+'<option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",searchLabel=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(colDef,index){if(colDef.field!=="none"&&colDef.field!=="rowOperations"&&colDef.searchable&&_.toString(colDef.showinfilter)!=="false"){sel+='<option value="'+colDef.field+'" data-coldef-index="'+index+'">'+(colDef.displayName||colDef.field)+"</option>"}}));sel+="</select>";htm='<form class="form-search form-inline" onsubmit="return false;"><div class="form-group">'+'<input type="text" data-element="dgSearchText" class="form-control app-textbox" value="" placeholder="'+searchLabel+'"/>'+'</div><div class="input-append input-group">'+sel+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+searchLabel+'">'+'<i class="wi wi-search"></i>'+"</button></span>"+"</div>"+"</div></form>";var $htm=$(htm);this._setStyles($htm.find('[data-element="dgSearchText"]'),"display: inline-block;");return $htm},_appendRowExpansionButtons:function($htm){var self=this;$htm.find("[data-identifier='rowExpansionButtons']").each((function(index){var _rowData,$row,rowId,rowIndex=index;$row=$(this).closest("tr.app-datagrid-row");rowId=parseInt($row.attr("data-row-id"),10);_rowData=_.clone(self.options.data[rowId]);_rowData.$index=rowIndex+1;self.options.generateRowExpansionCell(_rowData,rowIndex);$(this).empty().append(self.options.getRowExpansionAction(rowIndex))}))},setSummaryRowDef:function(key,data,rowIndex,refreshIndicator){this.options.summaryRow=true;if(this.options.summaryRowDefs[rowIndex]==undefined){this.options.summaryRowDefs[rowIndex]={};this.options.summaryRowDefsObject[rowIndex]={}}this.options.summaryRowDefsObject[rowIndex][key]=data;this.options.summaryRowDefs[rowIndex][key]=data&&data.value?data.value:data;if(refreshIndicator)this.refreshGridData()},_getSummaryRowTemplate:function(){var self=this,$tfoot=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');this._setStyles($tfoot,"border-top: 3px solid #eee;");_.forEach(this.options.summaryRowDefs,(function(row,index){row.$$pk=index;$tfoot.append(self._getRowTemplate(row,index,true))}));return $tfoot},getPageStartIndex:function(){var currentPage=this.options.getCurrentPage(),pagesize=this.options.getPageSize();var isPrevPageUpdated=this.options.actionRowPage<currentPage;var pageIndex=isPrevPageUpdated?this.options.actionRowPage:currentPage;return(pageIndex-1)*pagesize},_getPreparedDataForInfiniteScroll:function($tbody,preparedData){preparedData=preparedData.filter((function(row,index){var isExists=$tbody.find("tr.app-datagrid-row[data-row-id="+row.$$pk+"]");if(!isExists.length){return row}}));return preparedData},_updateTrData:function($tbody){var editedRow,updatedRowData,self=this;editedRow=$tbody.find("tr.app-datagrid-row[data-row-id="+self.options.actionRowIndex+"]");updatedRowData=self.preparedData[self.options.actionRowIndex];self.options.generateCustomExpressions(updatedRowData,self.options.actionRowIndex);var rowTemplate=self._getRowTemplate(updatedRowData,self.options.actionRowIndex);editedRow.replaceWith(rowTemplate[0])},_handleCRUDForInfiniteScroll:function($tbody){var self=this;if((self.options.lastActionPerformed===self.options.ACTIONS.SEARCH_OR_SORT||self.options.lastActionPerformed===self.options.ACTIONS.FILTER_CRITERIA||self.options.lastActionPerformed===self.options.ACTIONS.DATASET_UPDATE)&&(self.options.isSearchTrigerred||self.options.isDatasetUpdated||self.options.isDataUpdatedByUser)){$tbody.html("");if(this.options.navigation==="On-Demand"&&!this.options.isLastPage)this.element.find(".on-demand-datagrid").show();self.options.clearCustomExpression();self.options.clearRowDetailExpression();self.options.setIsSearchTrigerred(false);self.options.setIsDatasetUpdated(false)}else if(self.options.lastActionPerformed===self.options.ACTIONS.EDIT&&self.options.actionRowIndex!==undefined&&self.options.editmode!==this.CONSTANTS.QUICK_EDIT){self._updateTrData($tbody)}},_getGridTemplate:function(){var self=this,preparedData,$tbody,pageStartIndex=self.getPageStartIndex(),startRowIndex=self.options.startRowIndex,isScrollorOnDemand=self.options.isNavTypeScrollOrOndemand();if(isScrollorOnDemand){$tbody=this.gridElement;if(this.renderTableOnViewLess){$tbody=this.gridElement.empty();this.hideLoadingIndicator();this.renderTableOnViewLess=false}}else{$tbody=this.gridElement.empty()}if(isScrollorOnDemand){this._handleCRUDForInfiniteScroll($tbody);if(self.options.lastActionPerformed===self.options.ACTIONS.DELETE){startRowIndex=self.options.actionRowIndex+1}preparedData=this._getPreparedDataForInfiniteScroll($tbody,this.preparedData.slice(pageStartIndex))}else{this.options.clearCustomExpression();this.options.clearRowDetailExpression();preparedData=this.preparedData}_.forEach(preparedData,(function(row,index){var _row=_.clone(row),rowIndex=isScrollorOnDemand?startRowIndex+index-1:index,rowTemplate;_row.$index=rowIndex+1;self.options.generateCustomExpressions(_row,rowIndex);self.options.registerRowNgClassWatcher(_row,rowIndex);rowTemplate=self._getRowTemplate(row,rowIndex);$tbody.append(rowTemplate);if(self.options.rowExpansionEnabled){var rowHeight=self.options.rowDef.height;var rowPosition=self.options.rowDef.position;var colSpanLength=_.filter(self.preparedHeaderData,(function(c){return c.show})).length-1;var $tr=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+row.$$pk+'"><td></td><td colspan="'+colSpanLength+'" class="app-datagrid-row-details-cell">'+'<div class="row-overlay"><div class="row-status"><i class="'+self.options.loadingicon+'"></i></div></div><div class="details-section"></div>'+"</td></tr>");if(rowPosition==="-1"){$tr=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+row.$$pk+'"><td colspan="'+colSpanLength+'" class="app-datagrid-row-details-cell">'+'<div class="row-overlay"><div class="row-status"><i class="'+self.options.loadingicon+'"></i></div></div><div class="details-section"></div>'+"</td><td></td></tr>")}if(rowHeight){$tr.find("div.row-overlay").css("min-height",rowHeight)}$tr.css("display","none");$tr.find(".details-section").css("display","none");$tbody.append($tr)}}));if(!this.options.isdynamictable){this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT);this.options.setIsDataUpdatedByUser(false);this.options.clearActionRowIndex()}return $tbody},_getRowTemplate:function(row,rowIndex,summaryRow){var $htm,self=this,gridOptions=self.options;$htm=$('<tr role="row" tabindex="0" class="'+gridOptions.cssClassNames.tableRow+" "+(gridOptions.rowClass||"")+'" data-row-id="'+row.$$pk+'"></tr>');this.preparedHeaderData.forEach((function(current,colIndex){$htm.append(self._getColumnTemplate(row,colIndex,current,rowIndex,summaryRow))}));return $htm},_getRowActionsColumnDefIndex:function(){var i,len=this.preparedHeaderData.length;for(i=0;i<len;i+=1){if(this.preparedHeaderData[i].field==="rowOperations"){return i}}return-1},_getRowActionsColumnDef:function(){var index=this._getRowActionsColumnDefIndex();if(index!==-1){return this.preparedHeaderData[index]}return null},_getCheckboxTemplate:function(row,isMultiSelectCol){var checked=row._checked===true?" checked":"",disabled=row.disabed?" disabled":"",chkBoxName=isMultiSelectCol?"gridMultiSelect":"";return'<input name="'+chkBoxName+'" type="checkbox"'+checked+disabled+"/>"},_getRadioTemplate:function(row){var checked=row._checked===true?" checked":"",disabled=row.disabed?" disabled":"";return'<input type="radio" rowSelectInput name="" value=""'+checked+disabled+"/>"},_getColumnTemplate:function(row,colId,colDef,rowIndex,summaryRow){var $htm,columnValue,columnValueObject,cellPreloader='<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',customExpressionHtml,innerTmpl,classes=this.options.cssClassNames.tableCell+" "+(colDef.class||""),colExpression=colDef.customExpression,styles="text-align: "+colDef.textAlignment+";position: relative;";$htm=$('<td class="'+classes+'" data-col-id="'+colId+'" role="cell"></td>');this._setStyles($htm,styles);columnValue=_.get(row,colDef.field);if(summaryRow){columnValueObject=this.options.summaryRowDefsObject[rowIndex][colDef.field];if(columnValueObject instanceof Object){if(columnValueObject.class){$htm.addClass(columnValueObject.class)}}if(columnValue instanceof Promise){customExpressionHtml=cellPreloader;$htm.html(customExpressionHtml)}else{innerTmpl=_.isUndefined(columnValue)||columnValue===null?"":columnValue;$htm.html(innerTmpl)}}else if(colExpression){$htm.html(this.options.getCustomExpression(colDef.field,rowIndex))}else{if(colDef.type!=="custom"){columnValue=_.get(row,colDef.field);if(this.options.filterNullRecords&&columnValue===null||_.isUndefined(columnValue)){columnValue=""}$htm.attr("title",columnValue);$htm.text(""+columnValue)}else{switch(colDef.field){case"checkbox":innerTmpl=this._getCheckboxTemplate(row,colDef.isMultiSelectCol);break;case"__expand":innerTmpl='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":innerTmpl=this._getRadioTemplate(row);break;case"rowOperations":innerTmpl='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":innerTmpl=row.$$index;break;case"none":innerTmpl="";break;default:innerTmpl=_.isUndefined(columnValue)||columnValue===null?"":columnValue}$htm.html(innerTmpl)}}row.$index=rowIndex+1;this.options.registerColNgClassWatcher(row,colDef,rowIndex,colId);return $htm},_getEventTemplate:function(colDef){var events=_.filter(_.keys(colDef),(function(key){return _.startsWith(key,"on")})),changeEvt,template="";changeEvt=colDef.editWidgetType==="autocomplete"?"onSubmit":"onChange";events=_.union(events,[changeEvt]);_.forEach(events,(function(eventName){template+=" "+_.kebabCase(eventName)+'="';if(eventName==="onSubmit"||eventName==="onChange"){template+="_"+eventName+"Field($event, $scope, newVal, oldVal);"}template+=(colDef[eventName]||"")+'" '}));return template},_insertFieldInHeaderConfig:function(headerConfig,fieldName,position){var index=_.findIndex(headerConfig,{field:position}),self=this;if(index===-1){_.forEach(headerConfig,(function(config){if(config.isGroup){self._insertFieldInHeaderConfig(config.columns,fieldName,position)}}))}else{headerConfig.splice(index+1,0,{field:fieldName,isPredefined:true})}},setHeaderConfigForDefaultFields:function(name,position){if(_.isEmpty(this.options.headerConfig)){return}var fieldName=this.customColumnDefs[name].field;_.remove(this.options.headerConfig,{field:fieldName});if(position==="0"){this.options.headerConfig.unshift({field:fieldName,isPredefined:true})}else if(position==="-1"){this.options.headerConfig.push({field:fieldName,isPredefined:true})}else{this._insertFieldInHeaderConfig(this.options.headerConfig,fieldName,position)}},setDefaultColsData:function(header){if(_.isEmpty(this.preparedHeaderData)){return}var rowExpandPosition,rowExpandCol;if(this.options.rowExpansionEnabled){rowExpandPosition=this.options.rowDef.position;rowExpandCol=_.clone(this.customColumnDefs.__expand);rowExpandCol.width=this.options.rowDef.columnwidth;if(header){if(rowExpandPosition==="-1"){this.preparedHeaderData.push(rowExpandCol)}else if(rowExpandPosition==="0"){this.preparedHeaderData.unshift(rowExpandCol)}else{var index=_.findIndex(this.preparedHeaderData,{field:rowExpandPosition});this.preparedHeaderData.splice(index+1,0,rowExpandCol)}}this.setHeaderConfigForDefaultFields("__expand",rowExpandPosition)}if(this.options.showRowIndex){if(header){this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex)}this.setHeaderConfigForDefaultFields("rowIndex","0")}if(this.options.multiselect){if(header){this.preparedHeaderData.unshift(this.customColumnDefs.checkbox)}this.setHeaderConfigForDefaultFields("checkbox","0")}if(!this.options.multiselect&&this.options.showRadioColumn){if(header){this.preparedHeaderData.unshift(this.customColumnDefs.radio)}this.setHeaderConfigForDefaultFields("radio","0")}},_prepareHeaderData:function(){this.preparedHeaderData=[];$.extend(this.preparedHeaderData,this.options.colDefs);this.setDefaultColsData(true)},_generateCustomColDefs:function(){var colDefs=[],generatedColDefs={};function generateColumnDef(key){if(!generatedColDefs[key]){var colDef={type:"string",field:key};colDefs.push(colDef);generatedColDefs[key]=true}}this.options.data.forEach((function(item){_.keys(item).forEach(generateColumnDef)}));this.options.colDefs=colDefs;this._prepareHeaderData()},_prepareData:function(){var data=[],colDefs=this.options.colDefs,self=this,gridData=[],pageStartIndex=self.getPageStartIndex(),isObject=this.Utils.isObject,isDefined=this.Utils.isDefined;if(!this.options.colDefs.length&&this.options.data.length){this._generateCustomColDefs()}gridData=this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(pageStartIndex):this.options.data;gridData.forEach((function(item,i){var rowData=$.extend(true,{},item);colDefs.forEach((function(colDef){if(!colDef.field){return}var fields=colDef.field.split("."),text=item,j,len=fields.length,key,isArray;for(j=0;j<len;j++){key=fields[j];isArray=undefined;if(key.indexOf("[0]")!==-1){key=key.replace("[0]","");isArray=true}if(isObject(text)&&!isArray){text=_.get(text,key)}else if(isArray){text=_.get(text,key+"[0]")}else{text=undefined;break}}if(isDefined(text)){rowData[colDef.field]=text}else if(fields.length>1&&_.has(item,colDef.field)){rowData[colDef.field]=item[colDef.field]}}));rowData.$$index=pageStartIndex+i+1;rowData.$$pk=self.options.isNavTypeScrollOrOndemand()?pageStartIndex+i:i;data.push(rowData)}));if(self.options.isNavTypeScrollOrOndemand()){if(self.options.isSearchTrigerred&&!self.emptySearch||self.options.isDatasetUpdated){self.preparedData=data}else if(self.preparedData.length){data.forEach((function(rowData,index){var rowId=pageStartIndex+index;if(self.preparedData[rowId]&&rowData.$$index===self.preparedData[rowId].$$index){self.preparedData[rowId]=rowData}else{self.preparedData.push(rowData)}}))}else{self.preparedData.push(...data)}}else{self.preparedData=data}},_reselectColumns:function(){var selectedColumns=[],self=this;if(this.gridHeaderElement&&this.options.enableColumnSelection){selectedColumns=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn);if(selectedColumns.length){selectedColumns.each((function(){self.columnSelectionHandler(undefined,$(this))}))}}if(this.options.multiselect){this.updateSelectAllCheckboxState()}},_create:function(){$.extend(this,{dataStatus:{message:"",state:"ready"},preparedData:[],preparedHeaderData:[],dataStatusContainer:null,gridContainer:null,gridElement:null,gridHeader:null,gridBody:null,columnClickInfo:{},gridFooter:null,gridSearch:null,tableId:null,searchObj:{field:"",value:"",event:null},compiledCellTemplates:{}});this._setStatus=_.debounce((function(isCreated){this.__setStatus(isCreated)}),100);this._debounceOnEnter=_.debounce((function($target,$row,quickEdit,event){this._onEnter($target,$row,quickEdit,event)}),150);this.options.summaryRow=false;this.options.summaryRowDefs=[];this._prepareHeaderData();this._prepareData();this._render(true)},_setGridEditMode:function(val){if(_.isFunction(this.options.setGridEditMode)){this.options.setGridEditMode(val)}},_refreshGrid:function(){this._prepareHeaderData();this._prepareData();this._render();this.addOrRemoveScroll();this._setGridEditMode(false)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout);this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var $alwaysNewRow=this.gridElement.find("> tr.app-datagrid-row.always-new-row");if($alwaysNewRow.length){$alwaysNewRow.remove()}this._renderGrid(undefined)},refreshGridData:function(){this._prepareData();if(!this.options.isNavTypeScrollOrOndemand()){this.gridFooter.remove();this._renderGrid()}else{this.callRenderGridForInfiniteScroll()}this._reselectColumns();this.addOrRemoveScroll();this._setGridEditMode(false);this.toggleNewRowActions(false)},setDefaultRowData:function(rowData){_.forEach(this.preparedHeaderData,(function(colDef){rowData[colDef.field]=colDef.defaultvalue}))},addNewRow:function(skipFocus,alwaysNewRow){var rowId=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,self=this,rowData={},$row,$gridBody,$alwaysNewRow;if(!alwaysNewRow&&_.isFunction(this.options.beforeRowInsert)){this.options.beforeRowInsert()}$gridBody=this.gridElement;$alwaysNewRow=$gridBody.find("> tr.app-datagrid-row.always-new-row");if($alwaysNewRow.length){this.setFocusOnElement(undefined,$alwaysNewRow);if(this.options.editmode===this.CONSTANTS.QUICK_EDIT){var $qTarget=$alwaysNewRow.find("input").length>0?$($alwaysNewRow.find("input")[0]):null;if($qTarget!==null){var event=$.Event("keydown");event.which=13;$qTarget.trigger(event)}}return}rowData.$index=rowId;rowData.$$pk=rowId;if(this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG){$row=$(this._getRowTemplate(rowData,rowData.$index));if(!this.preparedData.length){this.setStatus("ready",this.dataStatus.ready)}if(this.options.formPosition==="top"){$gridBody.prepend($row)}else{$gridBody.append($row)}this._appendRowActions($row,true,rowData);this.attachEventHandlers($row);if(alwaysNewRow||this.options.editmode!==this.CONSTANTS.QUICK_EDIT){$row.find(".delete-row-button").hide();if(alwaysNewRow){$row.find(".edit-row-button").hide()}}this._findAndReplaceCompiledTemplates();if(alwaysNewRow){this.setDefaultRowData(rowData);$row.addClass("always-new-row").addClass("row-editing");this.options.runInNgZone((function(){self.makeRowEditable($row,rowData,true)}))}else{$row.trigger("click",[undefined,{action:"edit",operation:"new",skipFocus:skipFocus}])}this.updateSelectAllCheckboxState();this.addOrRemoveScroll();this.options.timeoutCall((function(){self.setColGroupWidths()}),100)}},addLoadMoreBtn:function(onDemandMsg,loadingdatamsg,cb,infScroll){var $btnEl;if(!this.options.isLastPage||infScroll){var self=this;var $parenEl=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');$btnEl=$parenEl.find("a");$btnEl.append(onDemandMsg);this.element.find(".app-grid-header-inner").append($parenEl);if(infScroll){if(this.element.find(".on-demand-load-btn").length){this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage)}}$btnEl.on("click",(function(e){var lastPage=self.options.getCurrentPage()==self.options.getPageCount();if(!lastPage){self.showLoadingIndicator(loadingdatamsg,false)}if(!self.options.showviewlessbutton){$btnEl.hide()}if(infScroll){if(lastPage){self.element.find(".on-demand-datagrid").remove()}}if(lastPage&&self.options.showviewlessbutton){$btnEl.hide();self.renderTableOnViewLess=true;self.renderPaginationOnViewLess=true;self.options.enableNavigation();self._renderGrid()}if(cb&&typeof cb==="function"){cb(e)}}))}},showLoadingIndicator:function(loadingdatamsg,infScroll){var hasLoadingEl=this.element.find(".loading-data-msg");var $dataGrid=this.element.find(".on-demand-datagrid");if(hasLoadingEl.length&&!infScroll){hasLoadingEl.show()}else if(infScroll&&$dataGrid.length){$dataGrid.show()}else{var $loadingEl=$('<div class="loading-data-msg spin-icon-in-center"><span><i class="app-icon panel-icon fa-spin '+this.options.loadingicon+'"></i>'+'<span class="sr-only">Loading</span><span class="loading-text"></span></span></div>');$loadingEl.find(".loading-text").html(loadingdatamsg);if($dataGrid.length){$dataGrid.append($loadingEl)}else{var gridEl=$('<div class="on-demand-datagrid">'+$loadingEl[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(gridEl)}}},hideLoadingIndicator:function(showLoadBtn,infScroll){if(!showLoadBtn&&!infScroll){this.element.find(".loading-data-msg").hide();this.element.find(".on-demand-load-btn").text(this.options.ondemandmessage);this.element.find(".on-demand-load-btn").show()}else if(this.options.getCurrentPage()==this.options.getPageCount()&&this.options.showviewlessbutton){this.element.find(".on-demand-load-btn").show().text(this.options.viewlessmessage);this.element.find(".loading-data-msg").hide();if(infScroll){if(!this.element.find(".on-demand-load-btn").length){this.options.addLoadMoreBtn()}this.element.find(".loading-data-msg").hide()}}else{this.element.find(".on-demand-datagrid").hide()}},getSelectedRows:function(){this.getSelectedColumns();var selectedRowsData=[],self=this;this.preparedData.forEach((function(data,i){if(data._selected){selectedRowsData.push(self.options.data[i])}}));return selectedRowsData},selectRows:function(rows){var self=this;self.gridElement.find("tr.app-datagrid-row").each((function(index){if(self.preparedData[index]&&self.preparedData[index]._selected===true){$(this).trigger("click",[$(this),{skipSingleCheck:true}])}}));if(_.isArray(rows)){_.forEach(rows,(function(row){self.selectRow(row,true)}))}else{self.selectRow(rows,true)}},toggleRowFilter:function(show){if(this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch){if(show){this.gridSearch.show()}else{this.gridSearch.hide()}}},setColGroupWidths:function(){var self=this,headerCols=this.options.isMobile?this.tableContainer.find("col"):this.tableContainer.find("col"),bodyCols=this.tableContainer.find("col"),headerCells=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),colLength=this.preparedHeaderData.length,scrollLeft=this.gridElement.parent().prop("scrollLeft");if(!headerCols.length&&!headerCells.length){return}this._setColSpan(this.options.headerConfig);this.toggleRowFilter();var definedColWidth=0;var colsLen=headerCols.length;headerCols.each((function(){var eachColWidth=$(this).width();if(eachColWidth){definedColWidth=definedColWidth+eachColWidth;colsLen=colsLen-1}}));headerCells.each((function(){var id=Number($(this).attr("data-col-id")),colDef=self.preparedHeaderData[id],$headerCell=self.gridContainer.find('th[data-col-id="'+id+'"]'),$tdCell=self.gridElement.find('td.app-datagrid-cell[data-col-id="'+id+'"]'),$footCell=self.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+id+'"]'),$headerCol=$(headerCols[id]),$bodyCol=$(bodyCols[id]),definedWidth,width;if(!colDef){return}definedWidth=colDef.width;if(!_.isUndefined(colDef.show)&&!colDef.show){$headerCell.hide();$tdCell.hide();$headerCol.hide();$bodyCol.hide();$footCell.hide()}else{$headerCell.show();$tdCell.show();$headerCol.show();$bodyCol.show();$footCell.show()}if($headerCol.length&&$headerCol[0].style.width==="90px"){width=_.isUndefined(definedWidth)?"":definedWidth;$headerCol.css("width",width);$bodyCol.css("width",width)}}));headerCells.each((function(){var $header=$(this),id=Number($header.attr("data-col-id")),colDef=self.preparedHeaderData[id],definedWidth,width,tempWidth,$headerCol;if(!colDef){return}definedWidth=colDef.width;if(!_.isUndefined(colDef.show)&&!colDef.show){width=0}else{if($header.hasClass("grid-col-small")){width=50}else{if(_.isUndefined(definedWidth)||definedWidth===""||_.includes(definedWidth,"%")){$headerCol=$(headerCols[id]);if($headerCol.length){tempWidth=$headerCol[0].style.width;if(tempWidth===""||tempWidth==="0px"||tempWidth==="90px"||_.includes(tempWidth,"%")){width=$header.width();if(width<=0){var currentNode=$header;var elemWidth=width;var padding=0;while(elemWidth<=0){currentNode=currentNode.parent();elemWidth=currentNode.width();if(currentNode.find("table").length){padding=padding+parseFloat(currentNode.css("padding-left"))+parseFloat(currentNode.css("padding-right"))}}if(elemWidth>0){if(padding){elemWidth=elemWidth-padding}if(_.includes(tempWidth,"%")){var widthPercent=parseInt(tempWidth);var pixelWidth=elemWidth*(widthPercent/100);width=pixelWidth}else{var parentWidth=definedColWidth&&definedColWidth>0?elemWidth-definedColWidth:elemWidth;var totalCols=colsLen?colsLen:headerCols.length;width=parentWidth/totalCols;width=width>90?colLength===id+1?width-17:width:90}}else{width=width>90?colLength===id+1?width-17:width:90}}else{width=width>90?colLength===id+1?width-17:width:90}}else{width=tempWidth}}}else{width=definedWidth}}}$(headerCols[id]).css("width",width);$(bodyCols[id]).css("width",width)}));this.toggleRowFilter(true);this.gridElement.parent().prop("scrollLeft",scrollLeft);this.gridHeaderElement.parent().prop("scrollLeft",scrollLeft)},getSelectedColumns:function(){var selectedColsData={},headerData=[],self=this,multiSelectColIndex,radioColIndex,colIndex;$.extend(headerData,this.preparedHeaderData);if(this.options.multiselect){headerData.some((function(item,i){if(item.field==="checkbox"){multiSelectColIndex=i;return true}}));headerData.splice(multiSelectColIndex,1)}else if(this.options.showRadioColumn){headerData.some((function(item,i){if(item.field==="radio"){radioColIndex=i;return true}}));headerData.splice(radioColIndex,1)}if(this.options.showRowIndex){headerData.some((function(item,i){if(item.field==="rowIndex"){colIndex=i;return true}}));headerData.splice(colIndex,1)}headerData.forEach((function(colDef){var field=colDef.field;if(colDef.selected){selectedColsData[field]={colDef:colDef,colData:self.options.data.map((function(data){return data[field]}))}}}));return selectedColsData},_setOption:function(key,value){this._super(key,value);switch(key){case"showHeader":this._toggleHeader();this._toggleSearch();this.setColGroupWidths();this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":if(this.gridSearch){this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",value);this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",value)}break;case"selectFirstRow":this.selectFirstRow(value);break;case"data":if(!this.isResetSortIconsDone){this.setSortIconDefault()}this.refreshGridData();break;case"dataStates":if(this.dataStatus.state==="nodata"){this.setStatus("nodata",this.dataStatus.nodata)}else if(this.dataStatus.state==="loading"){this.setStatus("loading")}break;case"loadingicon":this.dataStatusContainer.find("i").removeClass().addClass(this.options.loadingicon);break;case"colDefs":if(this.options.isNavTypeScrollOrOndemand()&&this.options.isNextPageData){this.tableContainer.find("colgroup").remove();this._prepareHeaderData();this.setColGroupWidths();this._renderHeader();this._renderSearch();this.attachEventHandlers(this.gridElement);this._reselectColumns();this.addOrRemoveScroll();break}case"multiselect":case"showRadioColumn":case"rowActions":case"filterNullRecords":case"showRowIndex":this.refreshGrid();break;case"cssClassNames":var gridClass=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;if(this.options.rowExpansionEnabled){gridClass=gridClass+" "+this.options.cssClassNames.gridRowExpansionClass}this.tableContainer.attr("class",gridClass);if(this.options.spacing==="condensed"){this._toggleSpacingClasses("condensed")}break;case"spacing":this._toggleSpacingClasses(value);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(value&&value.selectField);break}},getOptions:function(){return this.options},_toggleHeader:function(){if(this.gridHeaderElement){this.gridHeaderElement.empty()}if(this.tableContainer){this.tableContainer.find("colgroup").remove();this.tableContainer.find("thead").remove()}this.setDefaultColsData();if(this.options.showHeader){this._renderHeader()}},_toggleSearch:function(){if(this.gridSearch){this.gridSearch.remove()}if(this.options.filtermode===this.CONSTANTS.SEARCH){this._renderSearch()}else if(this.options.filtermode===this.CONSTANTS.MULTI_COLUMN){this._renderRowFilter();this.setColGroupWidths()}},selectFirstRow:function(value,visible){var $row,id;if(visible&&this.gridElement.find("tr").is(":visible")){this.__setStatus();$row=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()}else{$row=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first()}id=$row.attr("data-row-id");if($row.length&&this.preparedData.length){this.preparedData[id]._selected=!value;$row[0].click()}},selectRow:function(row,value){var rowIndex=_.isNumber(row)?row:this.Utils.getObjectIndex(this.options.data,row),selector,$row;if(rowIndex!==-1){selector="tr.app-datagrid-row[data-row-id="+rowIndex+"]";$row=this.gridElement.find(selector);if($row.length){this.preparedData[rowIndex]._selected=!value}if(value){$row.trigger("click")}else{this.toggleRowSelection($row,value);this.options.callOnRowDeselectEvent(this.preparedData[rowIndex])}}},deselectRow:function(row){this.selectRow(row,false)},toggleRowSelection:function($row,selected,e,isSelectAll){if(!$row.length){return}var rowId=$row.attr("data-row-id"),$checkbox,$radio;if(!this.preparedData[rowId]){return}this.preparedData[rowId]._selected=selected;if(selected){$row.addClass("active")}else{$row.removeClass("active")}if(this.options.showRadioColumn){$radio=$row.find("td input[rowSelectInput]:radio:not(:disabled)");$radio.prop("checked",selected);this.preparedData[rowId]._checked=selected}if(this.options.multiselect){$checkbox=$row.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)');$checkbox.prop("checked",selected);this.preparedData[rowId]._checked=selected;if(!isSelectAll){this.updateSelectAllCheckboxState()}}else{this._deselectPreviousSelection($row,e)}},updateSelectAllCheckboxState:function(){if(!this.options.showHeader||!this.options.multiselect){return}this.__setStatus();var $headerCheckbox=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),$tbody=this.gridElement,checkedItemsLength=$tbody.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,visibleRowsLength=$tbody.find("tr.app-datagrid-row:visible").length;if(!visibleRowsLength){$headerCheckbox.prop("checked",false);return}if(checkedItemsLength===visibleRowsLength){$headerCheckbox.prop("checked",true)}else{$headerCheckbox.prop("checked",false)}},rowClickHandlerOnCapture:function(e,$row,options){if(this.getColInfo(e)&&e.target.type!="checkbox"){return}$row=$row||$(e.target).closest("tr.app-datagrid-row");var gridRow=this.gridElement.find($row);if(gridRow.length&&gridRow.closest("tbody").attr("id")===this.gridElement.attr("id")){var rowId=$row.attr("data-row-id");var rowData=this.preparedData[rowId];var data=this.options.data[rowId];this.options.assignSelectedItems(data,e,{rowId:rowId,_selected:rowData?._selected})}},rowSelectionHandler:function(e,$row,options){if(this.getColInfo(e)&&e.target.type!="checkbox"){return}options=options||{};var rowId,rowData,data,selected,self=this,action=options.action,$target=$(e.target),isQuickEdit=this.options.editmode===this.CONSTANTS.QUICK_EDIT;function callRowSelectionEvents(){if(selected&&_.isFunction(self.options.onRowSelect)){self.options.onRowSelect(data,e)}if(!selected&&_.isFunction(self.options.onRowDeselect)){self.options.onRowDeselect(data,e)}}$row=$row||$target.closest("tr.app-datagrid-row");if(action||isQuickEdit&&($target.hasClass("app-datagrid-cell")||$target.closest("td.app-datagrid-cell").length)&&!$row.hasClass("always-new-row")){options.action=options.action||"edit";if(options.operation==="new"||self.options.actionsEnabled.edit){self.toggleEditRow(e,options)}if(options.skipSelect){return}}rowId=$row.attr("data-row-id");rowData=this.preparedData[rowId];data=this.options.data[rowId];selected=rowData&&rowData._selected||false;if(!options.skipSingleCheck&&($row.hasClass("active")&&!this.options.multiselect||!rowData)){if(!isQuickEdit&&options.operation!=="new"){callRowSelectionEvents()}return}this.options.callOnRowClickEvent(data,e);selected=!selected;this.toggleRowSelection($row,selected,e);callRowSelectionEvents()},rowDblClickHandler:function(e,$row){e.stopPropagation();$row=$row||$(e.target).closest("tr.app-datagrid-row");var rowData,rowId=$row.attr("data-row-id");rowData=this.preparedData[rowId];if(!rowData){return}if(_.isFunction(this.options.onRowDblClick)){this.options.onRowDblClick(rowData,e)}},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(e){var $th=$(e.target).closest("th.app-datagrid-header-cell"),id=$th.attr("data-col-id");this.closePopover();this.options.onHeaderClick(this.preparedHeaderData[id],e)},columnSelectionHandler:function(e,$headerCell){if(e){e.stopImmediatePropagation()}var $th=e?$(e.target).closest("th.app-datagrid-header-cell"):$headerCell,id=$th.attr("data-col-id"),colDef=this.preparedHeaderData[id],field=colDef.field,selector='td[data-col-id="'+id+'"]',$column=this.gridElement.find(selector),selected=$column.data("selected")||false,colInfo={colDef:colDef,data:this.options.data.map((function(data){return data[field]})),sortDirection:this._getColumnSortDirection(colDef.field)},selectedClass=this.options.cssClassNames.selectedColumn;selected=!selected;colDef.selected=selected;$column.data("selected",selected);if(selected){$column.addClass(selectedClass);$th.addClass(selectedClass);if(_.isFunction(this.options.onColumnSelect)&&e){this.options.onColumnSelect(colInfo,e)}}else{$column.removeClass(selectedClass);$th.removeClass(selectedClass);if(_.isFunction(this.options.onColumnDeselect)&&e){this.options.onColumnDeselect(colInfo,e)}}},getTextValue:function(fieldName,alwaysNewRow){return this.options.getFieldValue(alwaysNewRow?fieldName+"_new":fieldName)},getUploadedFiles:function($el,fieldName){return _.get(document.forms,[$el.find("form").attr("name"),fieldName,"files",0])},isDataModified:function($editableElements,rowData,alwaysNewRow){var isDataChanged=false,self=this;function getEpoch(val){return val?moment(val).valueOf():val}$editableElements.each((function(){var $el=$(this),colId=$el.attr("data-col-id"),colDef=self.preparedHeaderData[colId],text=self.getTextValue(colDef.field,alwaysNewRow),originalData=_.get(rowData,colDef.field);if(colDef.editWidgetType==="upload"){isDataChanged=self.getUploadedFiles($el,colDef.field)instanceof File}else{if(!self.Utils.isDefined(text)&&(originalData===null||originalData===undefined)){isDataChanged=false}else{if(colDef.editWidgetType==="datetime"){isDataChanged=!(getEpoch(originalData)===getEpoch(text))}else{isDataChanged=!(originalData==text)}}}if(isDataChanged){return!isDataChanged}}));return isDataChanged},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var newRow=this.gridElement.find("tr.always-new-row");var newRowInputs=newRow&&newRow.find("input")||[];newRowInputs.length&&newRowInputs[0].focus()},disableActions:function(val){var $deleteBtns=this.gridElement.find(".delete-row-button"),$editBtns=this.gridElement.find(".edit-row-button");if(val){$editBtns.addClass("disabled-action");$deleteBtns.addClass("disabled-action")}else{$editBtns.removeClass("disabled-action");$deleteBtns.removeClass("disabled-action")}},setFocusOnElement:function(e,$el,skipDelay){var $firstEl,$target=e&&$(e.target),$focusEl;if($target&&$target.hasClass("app-datagrid-cell")){$firstEl=$target.find("input")}else{if(!$el){$el=$target.closest("tr.app-datagrid-row").find("td.cell-editing")}else if($el.hasClass("app-datagrid-row")){$el=$el.find("td.cell-editing")}$firstEl=$($el).first().find("input");if(!$firstEl.length){$firstEl=$($el).first().find("textarea")}if(!$firstEl.length){$firstEl=$($el).first().find("select")}}if($firstEl.length){$focusEl=$firstEl.first();if(skipDelay){$focusEl.focus();$focusEl.select()}else{this.options.timeoutCall((function(){$focusEl.focus();$focusEl.select()}))}}},removeNewRow:function($row){this.disableActions(false);this._setGridEditMode(false);if($row.hasClass("always-new-row")){return}$row.attr("data-removed",true);$row.remove();if(!this.preparedData.length){this.setStatus("nodata",this.dataStatus.nodata)}this.addOrRemoveScroll();this.toggleNewRowActions(false)},saveRow:function(callBack){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[undefined,{action:"save",skipSelect:true,noMsg:true,success:callBack}])}))},makeRowEditable:function($row,rowData,alwaysNewRow){var self=this,$originalElements=$row.find("td.app-datagrid-cell"),rowId=parseInt($row.attr("data-row-id"),10),$editableElements,_rowData=_.clone(rowData);_rowData.$index=rowId+1;this.options.removeValidations(alwaysNewRow);this.options.generateInlineEditRow(_rowData,alwaysNewRow);$originalElements.each((function(){var $el=$(this),cellText=$el.text(),id=$el.attr("data-col-id"),colDef=self.preparedHeaderData[id],value,editableTemplate;if(!colDef.readonly){value=_.get(rowData,colDef.field);editableTemplate=self.options.getInlineEditWidget(colDef.field,value,alwaysNewRow);if(!(colDef.customExpression||colDef.formatpattern&&colDef.formatpattern!=="None")){$el.addClass("cell-editing").html(editableTemplate).data("originalText",cellText)}else{$el.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:rowId,fieldName:colDef.field});$el.addClass("cell-editing editable-expression").html(editableTemplate).data("originalText",cellText)}$el.addClass("form-group");if(colDef.binding!=="rowOperations"){self.options.timeoutCall((function(){self.options.applyValidations(colDef,alwaysNewRow);if(colDef.required){$el.addClass("required-field")}}))}else if(colDef.required){$el.addClass("required-field")}}}));$editableElements=$row.find("td.cell-editing");$editableElements.on("click",(function(e){e.stopPropagation()}));$editableElements.on("keydown",(function(e){if((e.which===38||e.which===40)&&(e.currentTarget&&!e.currentTarget.closest(".always-new-row"))){e.stopPropagation()}}))},toggleNewRowActions:function(saveInd){var self=this,$gridActions=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),$newRow=this.gridElement.find("tr.app-datagrid-row.row-editing"),$newRowButton=$gridActions.find("i.wi-plus").closest(".app-button");if(this.options.editmode===this.CONSTANTS.INLINE&&(this.options.rowActions.length===0||!_.some(this.options.rowActions,{action:"editRow($event)"}))){if(saveInd){$gridActions.append('<button type="button" wmbutton="" class="btn app-button btn-default cancelNewRow" tabindex="0" accesskey="" title="Cancel">'+'<i aria-hidden="true" class="app-icon wi wi-cancel"></i>'+'<span class="sr-only">Cancel Icon</span><span class="btn-caption">Cancel</span>'+"</button>"+'<button type="button" wmbutton="" class="btn app-button btn-primary saveNewRow" tabindex="0" accesskey="" title="Save">'+'<i aria-hidden="true" class="app-icon wi wi-done"></i>'+'<span class="sr-only">Save Icon</span><span class="btn-caption">Save</span>'+"</button>");$gridActions.find(".cancelNewRow").on("click",(function(event){self.toggleEditRow(event,{action:"cancel",$row:$newRow})}));$gridActions.find(".saveNewRow").on("click",(function(event){self.toggleEditRow(event,{action:"save",$row:$newRow})}));$newRowButton.hide()}else{$("typeahead-container").removeClass("open");$gridActions.find(".cancelNewRow").remove();$gridActions.find(".saveNewRow").remove();$newRowButton.show()}}},_isNewRow:function($row){var rowId=parseInt($row.attr("data-row-id"),10);return rowId>=this.preparedData.length||$row.hasClass("always-new-row")},toggleEditRow:function(e,options){options=options||{};if(e){e.stopPropagation()}this.closePopover();var $row=options.$row||$(e.target).closest("tr.app-datagrid-row"),$editButton=$row.find(".edit-row-button"),$cancelButton=$row.find(".cancel-edit-row-button"),$saveButton=$row.find(".save-edit-row-button"),$deleteButton=$row.find(".delete-row-button"),rowData=_.cloneDeep(this.options.data[$row.attr("data-row-id")])||{},self=this,action,isNewRow,$editableElements,isDataChanged=false,isValid,$requiredEls,alwaysNewRow=$row.hasClass("always-new-row"),advancedEdit=self.options.editmode===self.CONSTANTS.QUICK_EDIT,editOptions={};this.options.setActionRowIndex($row.attr("data-row-id"));this.options.setLastActionPerformed(this.options.ACTIONS.EDIT);function onSaveSuccess(skipFocus,error){if(_.isFunction(options.success)){options.success(skipFocus,error)}if(!advancedEdit||self.options.actionsEnabled.edit){self.focusActiveRow()}}if($row.attr("data-removed")==="true"){return}if(options.selectRow){this.selectRow(rowData,true)}e=e||{};e.data=e.data||{};action=e.data.action||options.action;if(action==="edit"){if(this.options.editmode===this.CONSTANTS.INLINE){this.options.callLoadInlineWidgetData()}if(advancedEdit&&self.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length){self.saveRow((function(skipFocus,error){self.editSuccessHandler(skipFocus,error,e,$row,true)}));return}$row.addClass("row-editing");if(_.isFunction(this.options.beforeRowUpdate)){this.options.beforeRowUpdate(rowData,e)}if(self.options.editmode===self.CONSTANTS.FORM||self.options.editmode===self.CONSTANTS.DIALOG){return}if(options.operation==="new"){self.setDefaultRowData(rowData);self.toggleNewRowActions(true)}if(_.isFunction(this.options.onBeforeFormRender)){isValid=this.options.onBeforeFormRender(rowData,e,options.operation||action);if(isValid===false){return}}this._setGridEditMode(true);this.disableActions(true);$deleteButton.removeClass("disabled-action");this.options.runInNgZone((function(){self.makeRowEditable($row,rowData)}));$editButton.addClass("hidden");$cancelButton.removeClass("hidden");$saveButton.removeClass("hidden");$editableElements=$row.find("td.cell-editing");if(!options.skipFocus&&$editableElements){this.options.timeoutCall((function(){self.setFocusOnElement(e,$editableElements)}))}if(_.isFunction(this.options.onFormRender)){this.options.onFormRender($row,e,options.operation||action,$row.hasClass("always-new-row"))}}else{$editableElements=$row.find("td.cell-editing");isNewRow=self._isNewRow($row);if(action==="save"){if(isNewRow){isDataChanged=true}else{isDataChanged=this.isDataModified($editableElements,rowData,alwaysNewRow)}if(isDataChanged){$editableElements.each((function(){var $el=$(this),colId=$el.attr("data-col-id"),colDef=self.preparedHeaderData[colId],fields=_.split(colDef.field,"."),text;text=self.getTextValue(colDef.field,alwaysNewRow);if(fields.length===1&&colDef.editWidgetType==="upload"){_.set(rowData,colDef.field,self.getUploadedFiles($el,colDef.field))}else{text=(fields.length===1||isNewRow)&&text===""?undefined:text;if(self.Utils.isDefined(text)){text=text==="null"?null:text;if(text===null){if(fields.length>1){_.set(rowData,fields[0],text)}else{if(!isNewRow){_.set(rowData,colDef.field,"")}}}else{_.set(rowData,colDef.field,text)}}else{if(fields.length===1&&!isNewRow){_.set(rowData,colDef.field,text)}}}}));if($editableElements.find(".ng-pending").length>0){setTimeout(this.toggleEditRow.bind(this,e,options),200);return}$requiredEls=$editableElements.find(".ng-invalid");if($requiredEls.length>0){$requiredEls.each((function(index){var $invalidTd=$(this).closest("td.app-datagrid-cell");if(index===0){$invalidTd.find("[focus-target]").focus()}self.options.setTouched($invalidTd.find("[formcontrolname]").attr("formcontrolname"))}));if(_.isFunction(options.success)){options.success(false,true)}return}if(isNewRow&&advancedEdit&&_.isEmpty(rowData)){self.removeNewRow($row);if(_.isFunction(options.success)){options.success(false,undefined,true)}return}if(isNewRow){if(_.isFunction(this.options.onBeforeRowInsert)){isValid=this.options.onBeforeRowInsert(rowData,e,editOptions);if(isValid===false){return}}this.options.onRowInsert(rowData,e,onSaveSuccess,editOptions);self.toggleNewRowActions(false);if(!$row.hasClass("always-new-row")&&self.options.isNavTypeScrollOrOndemand()){self.removeNewRow($row)}}else{if(_.isFunction(this.options.onBeforeRowUpdate)){isValid=this.options.onBeforeRowUpdate(rowData,e,editOptions);if(isValid===false){return}}this.options.afterRowUpdate(rowData,e,onSaveSuccess,editOptions)}}else{this.cancelEdit($row);if(!options.noMsg){this.options.noChangesDetected()}if(_.isFunction(options.success)){options.success(false)}}}else{if(isNewRow){self.removeNewRow($row);return}this.cancelEdit($row)}}this.addOrRemoveScroll()},cancelEdit:function($row){var self=this,$editableElements=$row.find("td.cell-editing"),$cancelButton=$row.find(".cancel-edit-row-button"),$saveButton=$row.find(".save-edit-row-button"),$editButton=$row.find(".edit-row-button");this.options.clearActionRowIndex();this.disableActions(false);$row.removeClass("row-editing");$editableElements.off("click");$editableElements.each((function(){var $el=$(this),value=$el.data("originalValue");$el.removeClass("datetime-wrapper cell-editing required-field form-group");if(!value){$el.text($el.data("originalText")||"")}else{$el.html(self.options.getCustomExpression(value.fieldName,value.rowIndex))}}));$("typeahead-container").removeClass("open");$editButton.removeClass("hidden");$cancelButton.addClass("hidden");$saveButton.addClass("hidden");this._setGridEditMode(false)},closeEditedRow:function(){var $row=this.gridElement.find("tr.app-datagrid-row.row-editing");if($row.length){if(this._isNewRow($row)){this.removeNewRow($row)}else{this.cancelEdit($row)}}},hideRowEditMode:function($row){if($row.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand()){this.resetNewRow($row);return}var $editableElements=$row.find("td.cell-editing"),$editButton=$row.find(".edit-row-button"),$cancelButton=$row.find(".cancel-edit-row-button"),$saveButton=$row.find(".save-edit-row-button"),self=this;$row.removeClass("row-editing");$editableElements.off("click");this.disableActions(false);this._setGridEditMode(false);$editableElements.each((function(){var $el=$(this),value=$el.data("originalValue"),text,colDef;$el.removeClass("datetime-wrapper cell-editing required-field form-group");if(!value){colDef=self.preparedHeaderData[$el.attr("data-col-id")];text=self.getTextValue(colDef.field);$el.text(self.Utils.isDefined(text)?text:"")}else{$el.html(self.options.getCustomExpression(value.fieldName,value.rowIndex))}}));$editButton.removeClass("hidden");$cancelButton.addClass("hidden");$saveButton.addClass("hidden");this.addOrRemoveScroll()},deleteRow:function(e){e.stopPropagation();var $row=$(e.target).closest("tr.app-datagrid-row"),rowId=$row.attr("data-row-id"),rowData=this.options.data[rowId],isNewRow=this._isNewRow($row),className,isActiveRow,isValid,options={},self=this;this.options.setActionRowIndex(rowId);this.options.setLastActionPerformed(this.options.ACTIONS.DELETE);if(_.isFunction(this.options.beforeRowDelete)){this.options.beforeRowDelete(rowData,e)}if(isNewRow){this.disableActions(false);this._setGridEditMode(false);$row.attr("data-removed",true);$row.remove();if(!this.preparedData.length){this.setStatus("nodata",this.dataStatus.nodata)}this.addOrRemoveScroll();return}if(_.isFunction(this.options.onBeforeRowDelete)){isValid=this.options.onBeforeRowDelete(rowData,e,options);if(isValid===false){return}}if(_.isFunction(this.options.onRowDelete)){className=this.options.cssClassNames.deleteRow;isActiveRow=$row.attr("class").indexOf("active")!==-1;if(isActiveRow){$row.removeClass("active")}$row.addClass(className);this.options.onRowDelete(rowData,(function(){if(isActiveRow){$row.addClass("active")}$row.removeClass(className);self.addOrRemoveScroll()}),e,(function(skipFocus,error){if(self.options.isNavTypeScrollOrOndemand()){var rowId=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id");var $row=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowId+'"]');self.options.setDeletedRowIndex(rowId);self.preparedData.splice(rowId,1);self.options.data.splice(rowId,1);self.gridElement.find("tr.app-datagrid-row:gt("+rowId+")").each((function(index,row){if(!$row.is(":last-child")&&!$(row).hasClass("always-new-row")){$(row).attr("data-row-id",rowId);self.preparedData[rowId].$$pk--;self.preparedData[rowId].$$index--;self.preparedData[rowId].$index--;rowId++}}));$row.remove()}if(self.options.editmode!==self.CONSTANTS.QUICK_EDIT||!($(e.target).hasClass("delete-row-button")||self.Utils.isDeleteKey(e))){return}self.__setStatus();var rowID,$nextRow;if(error){return}rowID=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id");$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowID+'"]');if(!$nextRow.length){$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+(rowID-1)+'"]')}$nextRow.trigger("click",[undefined,{action:"edit",skipFocus:skipFocus}])}),options)}},deleteRowAndUpdateSelectAll:function(e){this.deleteRow(e);this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function($row,e){var selectedRows=this.gridElement.find("tr.app-datagrid-row.active"),rowId=$row.attr("data-row-id"),self=this;selectedRows.each((function(){var id=$(this).attr("data-row-id"),preparedData=self.preparedData[id];if(id!==rowId&&preparedData){$(this).find("input[rowSelectInput]:radio").prop("checked",false);preparedData._selected=preparedData._checked=false;$(this).removeClass("active");self.options.callOnRowDeselectEvent(preparedData,e)}}))},resetSortIcons:function($el){this.isResetSortIconsDone=true;var $sortContainer;if(!$el&&this.gridHeaderElement){$sortContainer=this.gridHeaderElement.find(".sort-buttons-container.active");$el=$sortContainer.find("i.sort-icon");$sortContainer.removeClass("active")}$el.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const sortInfo=this.options.sortInfo,$e=this.tableContainer,$th=$e.find("[data-col-field='"+sortInfo.field+"']"),$sortContainer=$th.find(".sort-buttons-container"),$sortIcon=$sortContainer.find("i.sort-icon"),direction=sortInfo.direction;if(direction==="asc"){$sortIcon.addClass(direction+" "+this.options.cssClassNames.ascIcon);$sortContainer.addClass("active")}else if(direction==="desc"){$sortIcon.addClass(direction+" "+this.options.cssClassNames.descIcon);$sortContainer.addClass("active")}},sortHandler:function(e){e.stopImmediatePropagation();if($(e.target).hasClass("header-data")&&this.options.enableColumnSelection){this.headerClickHandler(e)}var $e=$(e.target),$th=$e.closest("th.app-datagrid-header-cell"),id=$th.attr("data-col-id"),$sortContainer=$th.find(".sort-buttons-container"),$sortIcon=$sortContainer.find("i.sort-icon"),direction=$sortIcon.hasClass("asc")?"desc":"asc",sortInfo=this.options.sortInfo,$previousSortMarker=this.gridHeaderElement.find(".sort-buttons-container.active"),field=$th.attr("data-col-field"),$previousSortedColumn,$previousSortIcon,colId,colDef;this.resetSortIcons($sortIcon);$sortIcon.addClass(direction);if(direction==="asc"){$sortIcon.addClass(this.options.cssClassNames.ascIcon);$sortContainer.addClass("active")}else if(direction==="desc"){$sortIcon.addClass(this.options.cssClassNames.descIcon);$sortContainer.addClass("active")}if($previousSortMarker.length){$previousSortedColumn=$previousSortMarker.closest("th.app-datagrid-header-cell");colId=$previousSortedColumn.attr("data-col-id");colDef=this.preparedHeaderData[colId];$previousSortIcon=$previousSortMarker.find("i.sort-icon");if(colDef.field!==field){$previousSortMarker.removeClass("active");this.resetSortIcons($previousSortIcon)}colDef.sortInfo={sorted:false,direction:""}}sortInfo.direction=direction;sortInfo.field=field;if(direction!==""){this.preparedHeaderData[id].sortInfo={sorted:true,direction:direction}}this._setGridEditMode(false);this.closeEditedRow();this.options.sortHandler.call(this,this.options.sortInfo,e,"sort")},processUpDownKeys:function(event,$row,direction){var self=this;var rowData=$row.find("input").val();if($row.hasClass("row-editing")&&self.options.editmode===self.CONSTANTS.QUICK_EDIT&&rowData){self.toggleEditRow(event,{action:"save",noMsg:true,success:function(skipFocus,error){self.editSuccessHandler(skipFocus,error,event,$row,true,direction)}})}else{$row=direction==="down"?$row.next():$row.prev();if(this.options.rowExpansionEnabled&&!$row.is(":visible")){$row=direction==="down"?$row.next():$row.prev()}$row.focus()}},resetNewRow:function($row){var rowData={},self=this;this.options.clearForm(true);self.setDefaultRowData(rowData);$row.find("[data-field-name]").each((function(){var $input=$(this),fieldName=$input.attr("data-field-name")+"_new";self.options.setFieldValue(fieldName,rowData[$input.attr("data-field-name")]||"")}));self.options.safeApply();self.setFocusOnElement(undefined,$row,true)},_onEnter:function($target,$row,quickEdit,event){var self=this;if($target.is("button")){return}if(quickEdit&&$target.hasClass("app-datagrid-row")&&!$target.hasClass("row-editing")){$row.trigger("click",[undefined,{action:"edit"}])}else{if($row.hasClass("row-editing")&&$target.closest("[data-field-name]").length){$target.blur();self.toggleEditRow(event,{action:"save",success:function(skipFocus,error){if(error){$target.focus()}else{self.focusActiveRow();self.focusNewRow()}}})}else{$row.trigger("click");if(quickEdit&&$target.hasClass("always-new-row")&&$target.hasClass("row-editing")){self.focusNewRow()}}}if(!$target.is("button")){event.stopPropagation()}},onKeyDown:function(event){var $target=$(event.target),$row=$target.closest("tr.app-datagrid-row"),self=this,quickEdit=this.options.editmode===this.CONSTANTS.QUICK_EDIT,isNewRow;if(this.options.rowExpansionEnabled&&!$row.length){$row=$target.closest("tr.app-datagrid-detail-row")}if(this.Utils.isDeleteKey(event)){if(!this.options.actionsEnabled.delete||$target.is("input")||$target.hasClass("form-control")){return}this.deleteRow(event);return}if(event.which===27){isNewRow=this._isNewRow($row);if(isNewRow&&$row.hasClass("always-new-row")){$target.blur();self.resetNewRow($row)}else{$row.trigger("click",[undefined,{action:"cancel"}])}if(!isNewRow){$row.focus()}return}if(event.which===13){event.stopPropagation();this._debounceOnEnter($target,$row,quickEdit,event);return}if(event.which===38){this.processUpDownKeys(event,$row,"up");return}if(event.which===40){this.processUpDownKeys(event,$row,"down")}},editSuccessHandler:function(skipFocus,error,e,$row,isSameRow,direction){var self=this,rowID,$nextRow;self.__setStatus();if(error){self.setFocusOnElement(e);return}rowID=+$row.attr("data-row-id");if(direction){rowID=direction==="down"?++rowID:--rowID;$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowID+'"]');if($nextRow.length){$nextRow.focus()}else{$row.focus()}return}if(!isSameRow&&!_.isUndefined(isSameRow)){rowID++}$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowID+'"]');if($nextRow.hasClass("always-new-row")){if(self.options.formPosition!=="top"||$row.hasClass("always-new-row")){self.addNewRow(skipFocus)}}else if($nextRow.length){$nextRow.trigger("click",[undefined,{action:"edit",skipFocus:skipFocus,skipSelect:self.options.multiselect}])}else if(self.options.actionsEnabled.new){self.addNewRow(skipFocus)}},isLastColumn:function($target){var $cell=$target.closest("td.app-datagrid-cell"),$editCells;if($cell.is(":last-child")){return true}if($cell.hasClass("cell-editing")){$editCells=$cell.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])');return $cell.attr("data-col-id")===$editCells.last().attr("data-col-id")}return false},getColInfo:function(event){var row=$(event.target).closest("tr.app-datagrid-row");var rowId=row.attr("data-row-id");var column=$(event.target).closest("td.app-datagrid-cell");var colId=column.attr("data-col-id");if(this.columnClickInfo&&this.columnClickInfo[rowId]&&this.columnClickInfo[rowId][colId]){return this.columnClickInfo[rowId][colId]}return false},attachEventHandlers:function($htm){var $header=this.gridHeaderElement,self=this;if(this.options.enableRowSelection){$htm[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this));$htm.off();$htm[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this));$htm.on("click",this.rowSelectionHandler.bind(this));$htm.on("click","td *",(function(event){if(event.target.type!="checkbox"){var row=$(event.target).closest("tr.app-datagrid-row");var rowId=row.attr("data-row-id");var column=$(event.target).closest("td.app-datagrid-cell");var colId=column.attr("data-col-id");var id=Number(colId);var colDefination=self.preparedHeaderData[id];if(colDefination.readonly){self.columnClickInfo[rowId]={};self.columnClickInfo[rowId][colId]=true}}}));$htm.on("dblclick",this.rowDblClickHandler.bind(this));$htm.on("keydown",this.onKeyDown.bind(this))}if($header){if(this.options.enableColumnSelection){$header.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this));$header.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))}else{$header.find("th[data-col-selectable]").off("click")}if(this.options.enableSort){if(this.options.enableColumnSelection){$header.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this));$header.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))}else{$header.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this));$header.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))}}else{if(this.options.enableColumnSelection){$header.find("th[data-col-sortable] .header-data").off("click")}else{$header.find("th[data-col-sortable]").off("click")}}}if(this.options.rowActions.length){$htm.find(".cancel-edit-row-button").off("click");$htm.find(".save-edit-row-button").off("click");$htm.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this));$htm.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))}if(self.options.editmode===self.CONSTANTS.QUICK_EDIT){$htm.on("focusout","tr.app-datagrid-row",(function(e){var $target=$(e.target),$row=$target.closest("tr.app-datagrid-row"),$relatedTarget=$(e.relatedTarget),isLastColumn=self.isLastColumn($target,$relatedTarget),isTargetRowAction=$target.closest("span.actions-column").length>0,isRelatedTargetRowAction=$relatedTarget.closest("span.actions-column").length>0,isTargetGridAction=$relatedTarget.closest("div.app-datagrid-actions").length>0,isRelatedTargetGridAction=$relatedTarget.closest("div.app-datagrid-actions").length>0,invalidTargets='.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date';function isInvalidTarget(){if(!$relatedTarget.closest(".app-grid").length){return true}return $relatedTarget.is(invalidTargets)}if($relatedTarget.is("tr.app-datagrid-row")){if($relatedTarget.attr("data-row-id")===$row.attr("data-row-id")){return}}if(isRelatedTargetRowAction||$row.hasClass("danger")||isRelatedTargetGridAction||isTargetRowAction&&isRelatedTargetRowAction||isTargetRowAction&&e.relatedTarget===null||isInvalidTarget()||$relatedTarget.attr("focus-target")===""){return}if(!isTargetGridAction&&!isTargetRowAction){if(!isLastColumn||isLastColumn&&e.relatedTarget===null||$target.hasClass("file-upload")){return}}self.options.timeoutCall((function(){self.toggleEditRow(e,{action:"save",noMsg:true,success:function(skipFocus,error,isNewRow){if(!isNewRow){self.editSuccessHandler(skipFocus,error,e,$row)}}})}))}))}$htm.find('[data-identifier="rowExpansionButtons"]').off("click");$htm.find('[data-identifier="rowExpansionButtons"]').on("click",(function(e){var $row=$(e.target).closest("tr.app-datagrid-row");if($(this).find(".app-button").attr("disabled")){return}self.toggleExpandRow(+$row.attr("data-row-id"),undefined,e)}))},expandRow:function(rowId){this.toggleExpandRow(rowId,true)},collapseRow:function(rowId){this.toggleExpandRow(rowId,false)},_collapseRow:function(e,rowData,rowId,$nextDetailRow,$icon){var self=this,$tbody=self.gridElement,$row=$($tbody.find('> tr.app-datagrid-row[data-row-id="'+rowId+'"]'));$row.removeClass(self.options.cssClassNames.expandedRowClass);$row.find("button, a").attr("aria-expanded","false").attr("aria-live","polite");if(this.options.onBeforeRowCollapse(e,rowData,rowId)===false){return}if($icon.length&&$icon.hasClass(this.options.cssClassNames.rowExpandIcon)){$icon.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon)}$nextDetailRow.hide();this.options.onRowCollapse(e,rowData)},toggleExpandRow:function(rowId,isExpand,e){var self=this,$tbody=self.gridElement,$row=$($tbody.find('> tr.app-datagrid-row[data-row-id="'+rowId+'"]')),rowData=_.clone(self.options.data[rowId]),$nextDetailRow=$row.next("tr.app-datagrid-detail-row"),isClosed=!$nextDetailRow.is(":visible"),$icon=$row.find('[data-identifier="rowExpansionButtons"] i.app-icon');rowData.$index=rowId+1;if(isExpand&&!isClosed){return}if(isExpand===false&&isClosed){return}if(isClosed){$row.addClass(self.options.cssClassNames.expandedRowClass);$row.find("button, a").attr("aria-expanded","true");if(e&&self.preparedData[rowId]._selected){e.stopPropagation()}if(self.options.rowDef.closeothers){$tbody.find("> tr.app-datagrid-detail-row:visible").each((function(){var $otherDetailRow=$(this),$otherIcon=$otherDetailRow.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),otherRowId=+$otherDetailRow.attr("data-row-id"),otherRowData=self.options.data[otherRowId];$otherDetailRow.hide();self._collapseRow(e,otherRowData,otherRowId,$otherDetailRow,$otherIcon)}))}self.options.generateRowDetailView(e,rowData,rowId,$nextDetailRow.find("td.app-datagrid-row-details-cell .details-section"),$nextDetailRow.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){if($icon.length&&$icon.hasClass(self.options.cssClassNames.rowCollapseIcon)){$icon.removeClass(self.options.cssClassNames.rowCollapseIcon).addClass(self.options.cssClassNames.rowExpandIcon)}$nextDetailRow.show()}))}else{self._collapseRow(e,rowData,rowId,$nextDetailRow,$icon)}},_findAndReplaceCompiledTemplates:function(){if(!this.gridElement){return}var $compiledCells=this.gridElement.find("td[data-compiled-template]"),self=this;$compiledCells.each((function(){var $cell=$(this),id=$cell.attr("data-compiled-template");$cell.replaceWith(self.compiledCellTemplates[id])}))},_renderSearch:function(){var $htm=$(this._getSearchEl()),self=this,$searchBox;function search(e){e.stopPropagation();var searchText=$htm.find('[data-element="dgSearchText"]')[0].value,$filterField=$htm.find('[data-element="dgFilterValue"]'),field=$filterField[0].value,colDefIndex=$htm.find("option:selected").attr("data-coldef-index"),colDef=self.options.colDefs[colDefIndex],type=colDef&&colDef.type?colDef.type:"";self.searchObj={field:field,value:searchText,type:type,event:e};self.options.searchHandler.call(self,self.searchObj,e,"search")}this.element.find(".form-search").remove();$htm.insertBefore(this.gridContainer);this.gridSearch=this.element.find(".form-search");$searchBox=this.gridSearch.find('[data-element="dgSearchText"]');this.gridSearch.find(".app-search-button").on("click",search);this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(e){if(self.dataStatusContainer.find(".status").text()===self.options.dataStates.nodata){search(e)}}));$searchBox.on("keyup",(function(e){e.stopPropagation();if(!$(this).val()){self.emptySearch=true;if(self.searchObj.value){self.searchObj.value="";search(e)}}else{self.emptySearch=false}if(e.which===13||self.options.filteronkeypress){search(e)}}))},_renderRowFilter:function(){var $row=$('<tr class="filter-row"></tr>'),self=this,$headerElement=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;$headerElement.find(".filter-row").remove();this.options.generateFilterRow();this.preparedHeaderData.forEach((function(field,index){var fieldName=field.field,$th=$('<th data-col-id="'+index+'"></th>');if(!field.searchable){$row.append($th);return}$th.append(self.options.getFilterWidget(fieldName));$row.append($th)}),this);if(this.options.showHeader){this.gridHeaderElement.append($row)}else{if(this.options.isMobile){$headerElement.empty().append($row)}else{$headerElement.empty().append($row)}}this.gridSearch=$headerElement.find(".filter-row")},_renderHeader:function(){var headerTemplate=this._getHeaderTemplate(),$colgroup=headerTemplate.colgroup,self=this,$header;this.gridElement.parent().scroll((function(){self.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)}));if(!this.options.showHeader){this.tableContainer.append($colgroup);this.gridHeaderElement.hide();return}else{this.gridHeaderElement.show()}$header=headerTemplate.header;function toggleSelectAll(e){var $checkboxes=$('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox',self.gridElement),checked=this.checked;$checkboxes.prop("checked",checked);$checkboxes.each((function(){var $row=$(this).closest("tr.app-datagrid-row"),rowId=$row.attr("data-row-id"),rowData=self.options.data[rowId];self.options.assignSelectedItems(rowData,e,{rowId:rowId,_selected:self.preparedData[rowId]?._selected});self.toggleRowSelection($row,checked,e,true);if(checked&&_.isFunction(self.options.onRowSelect)){self.options.onRowSelect(rowData,e)}if(!checked&&_.isFunction(self.options.onRowDeselect)){self.options.onRowDeselect(rowData,e)}}))}var headerCells=$header.find("th.app-datagrid-header-cell");var headerCols=$colgroup.find("col");headerCells.each((function(){var id=Number($(this).attr("data-col-id")),colDef=self.preparedHeaderData[id],$headerCol=$(headerCols[id]);if(!colDef){return}if(!_.isUndefined(colDef.show)&&!colDef.show){$(this).hide();$headerCol.hide()}}));if(this.options.isMobile){this.tableContainer.append($colgroup)}else{this.tableContainer.append($colgroup)}$header.on("click",".app-datagrid-header-cell input:checkbox",toggleSelectAll);if(_.isFunction(this.options.onHeaderClick)){this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this))}if(!this.options.isMobile&&this.gridHeaderElement.length){this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(evt,ui){var $colElement,$colHeaderElement,$cellElements,colIndex=+ui.helper.attr("data-col-id")+1,originalWidth=ui.helper.width(),newWidth=ui.size.width,originalTableWidth,newTableWidth;$colHeaderElement=self.tableContainer.find("colgroup > col:nth-child("+colIndex+")");$colElement=self.tableContainer.find("colgroup > col:nth-child("+colIndex+")");$cellElements=self.gridElement.find("tr.app-datagrid-row > td:nth-child("+colIndex+") > div");$colElement.width(newWidth);$colHeaderElement.width(newWidth);$cellElements.width(newWidth);$(this).css("height","auto");if(newWidth>ui.originalSize.width){originalTableWidth=self.gridHeaderElement.width();newTableWidth=originalTableWidth+newWidth-originalWidth;self.gridHeaderElement.width(newTableWidth);self.gridElement.width(newTableWidth)}self.addOrRemoveScroll();self.options.redrawWidgets()}})}if(!this.isResetSortIconsDone){this.setSortIconDefault()}},addOrRemoveScroll:function(){var gridContent=this.gridContainer.find("tbody"),gridHeader=this.gridContainer.find(".table-header");if(gridContent.scrollHeight>gridContent.clientHeight&&!this.Utils.isMac()){gridHeader.addClass("scroll-visible")}else{gridHeader.removeClass("scroll-visible")}},_handleCustomEvents:function(e,options){this.options.handleCustomEvents(e,options)},_setActionsEnabled:function(){var self=this;_.forEach(this.options.rowActions,(function(def){if(_.includes(def.action,"editRow(")){self.options.actionsEnabled.edit=true}else if(_.includes(def.action,"deleteRow(")){self.options.actionsEnabled.delete=true}}))},_appendRowActions:function($htm,isNewRow,rowData){var self,rowOperationsCol=this._getRowActionsColumnDef();if(this.options.rowActions.length||rowOperationsCol){this._setActionsEnabled();self=this;$htm.find("[data-identifier='actionButtons']").each((function(index){var _rowData,$row,rowId,rowIndex=index;if(isNewRow){_rowData=rowData}else{$row=$(this).closest("tr.app-datagrid-row");rowId=parseInt($row.attr("data-row-id"),10);_rowData=_.clone(self.options.data[rowId]);_rowData.$index=rowIndex+1}self.options.generateRowActions(_rowData,rowIndex);$(this).empty().append(self.options.getRowAction(rowIndex))}))}},_renderGrid:function(isCreated){var $htm,isScrollorOnDemand=this.options.isNavTypeScrollOrOndemand(),pageStartIndex=this.getPageStartIndex();$("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border");if(isScrollorOnDemand){var $tbody=this.gridElement;var template=this._getGridTemplate();$htm=$(template);if(template&&!$tbody.length){this.gridElement.append($htm)}}else{var templates=this._getGridTemplate();$htm=$(templates);if(templates){this.gridElement.append($htm)}}if(this.options.summaryRow){var $summaryRowHtm=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove();if(this.options.data.length){this.tableContainer.append($summaryRowHtm)}}if(!this.options.data.length&&this.dataStatus.state==="nodata"){this.setStatus("nodata")}else{this.dataStatus.state=this.dataStatus.state||"loading";this.dataStatus.message=this.dataStatus.message||this.options.dataStates.loading;this.setStatus(this.dataStatus.state,this.dataStatus.message,isCreated)}this.gridBody=this.gridElement.find("tbody");this.gridFooter=this.tableContainer.find("tfoot");this._findAndReplaceCompiledTemplates();this.options.clearRowActions();this._appendRowExpansionButtons($htm);this._appendRowActions($htm);this.attachEventHandlers($htm);this.__setStatus(isCreated);if(this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow){this.addNewRow(false,true)}if(isCreated){this._setColSpan(this.options.headerConfig)}if(_.isFunction(this.options.onDataRender)){this.options.onDataRender()}if(!isCreated&&this.options.selectFirstRow){if(this.options.multiselect){this.options.selectFirstRow=false}if(this.gridElement.find("tr.app-datagrid-row.active").length<=0){this.selectFirstRow(true,true)}}},_render:function(isCreated){if(!this.tableId){this.tableId=this.Utils.generateGuid()}var overflow=this.options.isNavTypeScrollOrOndemand()&&(this.options.height==="100%"||this.options.height==="auto")?"hidden":"auto";var statusContainer='<div class="overlay">'+'<div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div>'+"</div>",table='<div class="table-container table-responsive">'+'<div class="app-grid-header">'+'<div class="app-grid-header-inner">'+'<table tabindex="0" class="'+this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid+'">'+'<thead tabindex="0" class="table-header thead-sticky" id="table_header_'+this.tableId+'">'+'</thead><tbody class="app-grid-content app-datagrid-body" id="table_'+this.tableId+'">'+"</tbody></table>"+"</div></div></div>",$statusContainer=$(statusContainer),$tableContainer=this.element.find(".table-container");this.gridContainer=$(table);this.gridHeaderElement=this.gridContainer.find(".table-header");this._setStyles($statusContainer.find("div.overlay"),"display:none");this._setStyles(this.gridContainer.find("div.app-grid-header-inner"),"height:"+this.options.height+"; overflow: auto;");this.tableContainer=this.gridContainer.find("table");this.gridElement=this.gridContainer.find(".app-grid-content");if(this.options.isNavTypeScrollOrOndemand()&&(!$tableContainer.length||!this.options.isNextPageData)||!this.options.isNavTypeScrollOrOndemand()){this.element.find(".table-container").remove();this.element.append(this.gridContainer)}this.options.setIsNextPageData(false);if(!this.gridContainer.find(".overlay").length){this.dataStatusContainer=$(statusContainer);this.gridContainer.append(this.dataStatusContainer)}if(this.gridHeaderElement){this.gridHeaderElement.empty();this.gridElement.find("colgroup").remove()}this._renderHeader();if(this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)){this._renderSearch()}else if(this.options.filtermode===this.CONSTANTS.MULTI_COLUMN){this._renderRowFilter()}if(this.options.spacing==="condensed"){this._toggleSpacingClasses("condensed")}this._renderGrid(isCreated);this.addNavigationControls()},addNavigationControls:function(){if(this.options.isdynamictable){this.element.find(".on-demand-datagrid").remove();if(this.options.navigation==="On-Demand"&&!this.element.find(".on-demand-datagrid").length){this.options.addLoadMoreBtn()}else if(this.options.navigation==="Scroll"){this.options.bindScrollEvt()}}},__setStatus:function(isCreated){var loadingIndicator=this.dataStatusContainer.find("i"),state=this.dataStatus.state,isScrollOrOndemand=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message);if(state==="loading"){loadingIndicator.removeClass("hidden")}else{loadingIndicator.addClass("hidden")}if(state==="ready"){this.dataStatusContainer.hide()}else{if(this.options.isNavTypeScrollOrOndemand()&&(state==="nodata"||this.options.getCurrentPage()==this.options.getPageCount()&&!this.options.showviewlessbutton)){this.element.find(".on-demand-datagrid a").hide()}this.dataStatusContainer.show()}if(state==="nodata"||state==="loading"||state==="error"){if(this.options.height==="100%"||this.options.height==="auto"){if(state==="nodata"){this.dataStatusContainer.css("height","auto");this.dataStatus.contentHeight=0}else if(this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1){this.dataStatusContainer.hide()}else{this.dataStatus.height=this.dataStatus.height||this.dataStatusContainer.outerHeight();this.dataStatus.contentHeight=this.gridElement.outerHeight()||this.dataStatus.contentHeight;this.dataStatusContainer.css("height",this.dataStatus.height>this.dataStatus.contentHeight?"auto":this.dataStatus.contentHeight)}}if(!isScrollOrOndemand||isScrollOrOndemand&&this.options.getCurrentPage()===1){this.gridContainer.addClass("show-msg")}}else{this.gridContainer.removeClass("show-msg");if(this.options.editmode===this.CONSTANTS.QUICK_EDIT){if(this.options.activeRow){this.attachHandlersToActiveRow(this.options.activeRow)}this.options.activeRow=undefined}}if(!isCreated){this.setColGroupWidths()}this.addOrRemoveScroll()},attachHandlersToActiveRow(rowObj){var rowIndex=this.Utils.getObjectIndex(this.options.data,rowObj);var row=this.gridElement.find("tr.app-datagrid-row[data-row-id="+rowIndex+"]");if(!row.length){return}else if(!row.hasClass("active")){row.addClass("active")}this.focusActiveRow();this.attachEventHandlers(row)},setActiveRow(row){this.options.activeRow=row},setStatus:function(state,message,isCreated){var $newRow;if(state==="nodata"){$newRow=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row");state=$newRow&&$newRow.length?"ready":state}this.dataStatus.state=state;this.options.setGridState(state);this.dataStatus.message=message||this.options.dataStates[state];if(this._setStatusCalled){this._setStatus(isCreated)}else{this.__setStatus(isCreated);this._setStatusCalled=true}},setGridDimensions:function(key,value){if(value.indexOf("px")===-1&&value.indexOf("%")===-1&&value.indexOf("em")===-1&&value!="auto"){value=value+"px"}this.options[key]=value;if(key==="height"){var elements=this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(key,value);if(this.options.isNavTypeScrollOrOndemand()&&(this.options.height!="100%"&&this.options.height!="auto")){this.gridContainer.find(".app-grid-header-inner").css("overflow","auto")}this.dataStatusContainer.css(key,value)}this.addOrRemoveScroll()},setColumnProp:function(fieldName,property,val,isGroup){var $col;if(property==="displayName"){if(isGroup){$col=this.gridHeaderElement.find('th[data-col-group="'+fieldName+'"]')}else{$col=this.gridHeaderElement.find('th[data-col-field="'+fieldName+'"]')}$col.attr("title",val);$col.find(".header-data").html(val);if(this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch){this.gridSearch.find('select option[value="'+fieldName+'"]').text(val)}}},applyRowNgClass:function(val,index){var $row=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+index+'"]');$row.removeClass(val.toRemove);$row.addClass(val.toAdd)},applyColNgClass:function(val,rowIndex,colIndex){var $cell=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowIndex+'"] td.app-datagrid-cell[data-col-id="'+colIndex+'"]');$cell.removeClass(val.toRemove);$cell.addClass(val.toAdd)},_destroy:function(){this.element.text("");window.clearTimeout(this.refreshGridTimeout)}});(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports,require("rxjs")):typeof define==="function"&&define.amd?define(["exports","rxjs"],factory):(global=typeof globalThis!=="undefined"?globalThis:global||self,factory((global.awesomeCordova=global.awesomeCordova||{},global.awesomeCordova.core={}),global.rxjs))})(this,(function(exports,rxjs){"use strict";function checkReady(){if(typeof process==="undefined"){var win_1=typeof window!=="undefined"?window:{};var DEVICE_READY_TIMEOUT_1=5e3;var before_1=Date.now();var didFireReady_1=false;win_1.document.addEventListener("deviceready",(function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-before_1)+" ms");didFireReady_1=true}));setTimeout((function(){if(!didFireReady_1&&win_1.cordova){console.warn("Ionic Native: deviceready did not fire within "+DEVICE_READY_TIMEOUT_1+"ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")}}),DEVICE_READY_TIMEOUT_1)}}var ERR_CORDOVA_NOT_AVAILABLE={error:"cordova_not_available"};var ERR_PLUGIN_NOT_INSTALLED={error:"plugin_not_installed"};function getPromise(callback){var tryNativePromise=function(){if(Promise){return new Promise((function(resolve,reject){callback(resolve,reject)}))}else{console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}};if(typeof window!=="undefined"&&window.angular){var doc=window.document;var injector=window.angular.element(doc.querySelector("[ng-app]")||doc.body).injector();if(injector){var $q=injector.get("$q");return $q((function(resolve,reject){callback(resolve,reject)}))}console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return tryNativePromise()}function wrapPromise(pluginObj,methodName,args,opts){if(opts===void 0){opts={}}var pluginResult,rej;var p=getPromise((function(resolve,reject){if(opts.destruct){pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return resolve(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return reject(args)}))}else{pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,resolve,reject)}rej=reject}));if(pluginResult&&pluginResult.error){p.catch((function(){}));typeof rej==="function"&&rej(pluginResult.error)}return p}function wrapOtherPromise(pluginObj,methodName,args,opts){if(opts===void 0){opts={}}return getPromise((function(resolve,reject){var pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts);if(pluginResult){if(pluginResult.error){reject(pluginResult.error)}else if(pluginResult.then){pluginResult.then(resolve).catch(reject)}}else{reject({error:"unexpected_error"})}}))}function wrapObservable(pluginObj,methodName,args,opts){if(opts===void 0){opts={}}return new rxjs.Observable((function(observer){var pluginResult;if(opts.destruct){pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.next(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.error(args)}))}else{pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,observer.next.bind(observer),observer.error.bind(observer))}if(pluginResult&&pluginResult.error){observer.error(pluginResult.error);observer.complete()}return function(){try{if(opts.clearFunction){if(opts.clearWithArgs){return callCordovaPlugin(pluginObj,opts.clearFunction,args,opts,observer.next.bind(observer),observer.error.bind(observer))}return callCordovaPlugin(pluginObj,opts.clearFunction,[])}}catch(e){console.warn("Unable to clear the previous observable watch for",pluginObj.constructor.getPluginName(),methodName);console.warn(e)}}}))}function wrapEventObservable(event,element){element=typeof window!=="undefined"&&element?get$1(window,element):element||(typeof window!=="undefined"?window:{});return rxjs.fromEvent(element,event)}function checkAvailability(plugin,methodName,pluginName){var pluginRef,pluginPackage;if(typeof plugin==="string"){pluginRef=plugin}else{pluginRef=plugin.constructor.getPluginRef();pluginName=plugin.constructor.getPluginName();pluginPackage=plugin.constructor.getPluginInstallName()}var pluginInstance=getPlugin(pluginRef);if(!pluginInstance||!!methodName&&typeof pluginInstance[methodName]==="undefined"){if(typeof window==="undefined"||!window.cordova){cordovaWarn(pluginName,methodName);return ERR_CORDOVA_NOT_AVAILABLE}pluginWarn(pluginName,pluginPackage,methodName);return ERR_PLUGIN_NOT_INSTALLED}return true}function instanceAvailability(pluginObj,methodName){return pluginObj._objectInstance&&(!methodName||typeof pluginObj._objectInstance[methodName]!=="undefined")}function setIndex(args,opts,resolve,reject){if(opts===void 0){opts={}}if(opts.sync){return args}if(opts.callbackOrder==="reverse"){args.unshift(reject);args.unshift(resolve)}else if(opts.callbackStyle==="node"){args.push((function(err,result){if(err){reject(err)}else{resolve(result)}}))}else if(opts.callbackStyle==="object"&&opts.successName&&opts.errorName){var obj={};obj[opts.successName]=resolve;obj[opts.errorName]=reject;args.push(obj)}else if(typeof opts.successIndex!=="undefined"||typeof opts.errorIndex!=="undefined"){var setSuccessIndex=function(){if(opts.successIndex>args.length){args[opts.successIndex]=resolve}else{args.splice(opts.successIndex,0,resolve)}};var setErrorIndex=function(){if(opts.errorIndex>args.length){args[opts.errorIndex]=reject}else{args.splice(opts.errorIndex,0,reject)}};if(opts.successIndex>opts.errorIndex){setErrorIndex();setSuccessIndex()}else{setSuccessIndex();setErrorIndex()}}else{args.push(resolve);args.push(reject)}return args}function callCordovaPlugin(pluginObj,methodName,args,opts,resolve,reject){if(opts===void 0){opts={}}args=setIndex(args,opts,resolve,reject);var availabilityCheck=checkAvailability(pluginObj,methodName);if(availabilityCheck===true){var pluginInstance=getPlugin(pluginObj.constructor.getPluginRef());return pluginInstance[methodName].apply(pluginInstance,args)}else{return availabilityCheck}}function callInstance(pluginObj,methodName,args,opts,resolve,reject){if(opts===void 0){opts={}}args=setIndex(args,opts,resolve,reject);if(instanceAvailability(pluginObj,methodName)){return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance,args)}}function getPlugin(pluginRef){if(typeof window!=="undefined"){return get$1(window,pluginRef)}return null}function get$1(element,path){var paths=path.split(".");var obj=element;for(var i=0;i<paths.length;i++){if(!obj){return null}obj=obj[paths[i]]}return obj}function pluginWarn(pluginName,plugin,method){if(method){console.warn("Native: tried calling "+pluginName+"."+method+", but the "+pluginName+" plugin is not installed.")}else{console.warn("Native: tried accessing the "+pluginName+" plugin but it's not installed.")}if(plugin){console.warn("Install the "+pluginName+" plugin: 'ionic cordova plugin add "+plugin+"'")}}function cordovaWarn(pluginName,method){if(typeof process==="undefined"){if(method){console.warn("Native: tried calling "+pluginName+"."+method+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}else{console.warn("Native: tried accessing the "+pluginName+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}}}var wrap=function(pluginObj,methodName,opts){if(opts===void 0){opts={}}return function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}if(opts.sync){return callCordovaPlugin(pluginObj,methodName,args,opts)}else if(opts.observable){return wrapObservable(pluginObj,methodName,args,opts)}else if(opts.eventObservable&&opts.event){return wrapEventObservable(opts.event,opts.element)}else if(opts.otherPromise){return wrapOtherPromise(pluginObj,methodName,args,opts)}else{return wrapPromise(pluginObj,methodName,args,opts)}}};function wrapInstance(pluginObj,methodName,opts){if(opts===void 0){opts={}}return function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}if(opts.sync){return callInstance(pluginObj,methodName,args,opts)}else if(opts.observable){return new rxjs.Observable((function(observer){var pluginResult;if(opts.destruct){pluginResult=callInstance(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.next(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.error(args)}))}else{pluginResult=callInstance(pluginObj,methodName,args,opts,observer.next.bind(observer),observer.error.bind(observer))}if(pluginResult&&pluginResult.error){observer.error(pluginResult.error)}return function(){try{if(opts.clearWithArgs){return callInstance(pluginObj,opts.clearFunction,args,opts,observer.next.bind(observer),observer.error.bind(observer))}return callInstance(pluginObj,opts.clearFunction,[])}catch(e){console.warn("Unable to clear the previous observable watch for",pluginObj.constructor.getPluginName(),methodName);console.warn(e)}}}))}else if(opts.otherPromise){return getPromise((function(resolve,reject){var result;if(opts.destruct){result=callInstance(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return resolve(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return reject(args)}))}else{result=callInstance(pluginObj,methodName,args,opts,resolve,reject)}if(result&&result.then){result.then(resolve,reject)}else{reject()}}))}else{var pluginResult_1,rej_1;var p=getPromise((function(resolve,reject){if(opts.destruct){pluginResult_1=callInstance(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return resolve(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return reject(args)}))}else{pluginResult_1=callInstance(pluginObj,methodName,args,opts,resolve,reject)}rej_1=reject}));if(pluginResult_1&&pluginResult_1.error){p.catch((function(){}));typeof rej_1==="function"&&rej_1(pluginResult_1.error)}return p}}}function get(element,path){var paths=path.split(".");var obj=element;for(var i=0;i<paths.length;i++){if(!obj){return null}obj=obj[paths[i]]}return obj}var AwesomeCordovaNativePlugin=function(){function AwesomeCordovaNativePlugin(){}AwesomeCordovaNativePlugin.installed=function(){var isAvailable=checkAvailability(this.pluginRef)===true;return isAvailable};AwesomeCordovaNativePlugin.getPlugin=function(){if(typeof window!=="undefined"){return get(window,this.pluginRef)}return null};AwesomeCordovaNativePlugin.getPluginName=function(){var pluginName=this.pluginName;return pluginName};AwesomeCordovaNativePlugin.getPluginRef=function(){var pluginRef=this.pluginRef;return pluginRef};AwesomeCordovaNativePlugin.getPluginInstallName=function(){var plugin=this.plugin;return plugin};AwesomeCordovaNativePlugin.getSupportedPlatforms=function(){var platform=this.platforms;return platform};AwesomeCordovaNativePlugin.pluginName="";AwesomeCordovaNativePlugin.pluginRef="";AwesomeCordovaNativePlugin.plugin="";AwesomeCordovaNativePlugin.repo="";AwesomeCordovaNativePlugin.platforms=[];AwesomeCordovaNativePlugin.install="";return AwesomeCordovaNativePlugin}();function cordova(pluginObj,methodName,config,args){return wrap(pluginObj,methodName,config).apply(this,args)}function overrideFunction(pluginObj,methodName){return new rxjs.Observable((function(observer){var availabilityCheck=checkAvailability(pluginObj,methodName);if(availabilityCheck===true){var pluginInstance_1=getPlugin(pluginObj.constructor.getPluginRef());pluginInstance_1[methodName]=observer.next.bind(observer);return function(){return pluginInstance_1[methodName]=function(){}}}else{observer.error(availabilityCheck);observer.complete()}}))}function cordovaFunctionOverride(pluginObj,methodName,args){return overrideFunction(pluginObj,methodName)}function cordovaInstance(pluginObj,methodName,config,args){args=Array.from(args);return wrapInstance(pluginObj,methodName,config).apply(this,args)}function cordovaPropertyGet(pluginObj,key){if(checkAvailability(pluginObj,key)===true){return getPlugin(pluginObj.constructor.getPluginRef())[key]}return null}function cordovaPropertySet(pluginObj,key,value){if(checkAvailability(pluginObj,key)===true){getPlugin(pluginObj.constructor.getPluginRef())[key]=value}}function instancePropertyGet(pluginObj,key){if(pluginObj._objectInstance&&pluginObj._objectInstance[key]){return pluginObj._objectInstance[key]}return null}function instancePropertySet(pluginObj,key,value){if(pluginObj._objectInstance){pluginObj._objectInstance[key]=value}}checkReady();window.rxjs._throw=window.rxjs.throwError;exports.AwesomeCordovaNativePlugin=AwesomeCordovaNativePlugin;exports.checkAvailability=checkAvailability;exports.cordova=cordova;exports.cordovaFunctionOverride=cordovaFunctionOverride;exports.cordovaInstance=cordovaInstance;exports.cordovaPropertyGet=cordovaPropertyGet;exports.cordovaPropertySet=cordovaPropertySet;exports.getPromise=getPromise;exports.instanceAvailability=instanceAvailability;exports.instancePropertyGet=instancePropertyGet;exports.instancePropertySet=instancePropertySet;exports.wrap=wrap}));(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory(require("tslib"),require("@angular/core"),require("@awesome-cordova-plugins/core"),require("rxjs"),require("rxjs/operators")):typeof define==="function"&&define.amd?define(["tslib","@angular/core","@awesome-cordova-plugins/core","rxjs","rxjs/operators"],factory):(global=typeof globalThis!=="undefined"?globalThis:global||self,global.awesomeCordova=global.awesomeCordova||{},global.awesomeCordova.plugins=factory(global.tslib,global.ng.core,global.awesomeCordova.core,global.rxjs,global.rxjs.operators))})(this,(function(tslib,core$1,core,rxjs,operators){"use strict";var AppVersion=function(_super){tslib.__extends(AppVersion,_super);function AppVersion(){return _super!==null&&_super.apply(this,arguments)||this}AppVersion.prototype.getAppName=function(){return core.cordova(this,"getAppName",{},arguments)};AppVersion.prototype.getPackageName=function(){return core.cordova(this,"getPackageName",{},arguments)};AppVersion.prototype.getVersionCode=function(){return core.cordova(this,"getVersionCode",{},arguments)};AppVersion.prototype.getVersionNumber=function(){return core.cordova(this,"getVersionNumber",{},arguments)};AppVersion.pluginName="AppVersion";AppVersion.plugin="cordova-plugin-app-version";AppVersion.pluginRef="cordova.getAppVersion";AppVersion.repo="https://github.com/whiteoctober/cordova-plugin-app-version";AppVersion.platforms=["Android","iOS","Windows"];AppVersion.decorators=[{type:core$1.Injectable}];return AppVersion}(core.AwesomeCordovaNativePlugin);var AppVersion$1=Object.freeze({__proto__:null,AppVersion:AppVersion});var BarcodeScanner=function(_super){tslib.__extends(BarcodeScanner,_super);function BarcodeScanner(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.Encode={TEXT_TYPE:"TEXT_TYPE",EMAIL_TYPE:"EMAIL_TYPE",PHONE_TYPE:"PHONE_TYPE",SMS_TYPE:"SMS_TYPE"};return _this}BarcodeScanner.prototype.scan=function(options){return core.cordova(this,"scan",{callbackOrder:"reverse"},arguments)};BarcodeScanner.prototype.encode=function(type,data){return core.cordova(this,"encode",{},arguments)};BarcodeScanner.pluginName="BarcodeScanner";BarcodeScanner.plugin="phonegap-plugin-barcodescanner";BarcodeScanner.pluginRef="cordova.plugins.barcodeScanner";BarcodeScanner.repo="https://github.com/phonegap/phonegap-plugin-barcodescanner";BarcodeScanner.platforms=["Android","BlackBerry 10","Browser","iOS","Windows"];BarcodeScanner.decorators=[{type:core$1.Injectable}];return BarcodeScanner}(core.AwesomeCordovaNativePlugin);var BarcodeScanner$1=Object.freeze({__proto__:null,BarcodeScanner:BarcodeScanner});var Calendar=function(_super){tslib.__extends(Calendar,_super);function Calendar(){return _super!==null&&_super.apply(this,arguments)||this}Calendar.prototype.hasReadWritePermission=function(){return core.cordova(this,"hasReadWritePermission",{},arguments)};Calendar.prototype.hasReadPermission=function(){return core.cordova(this,"hasReadPermission",{},arguments)};Calendar.prototype.hasWritePermission=function(){return core.cordova(this,"hasWritePermission",{},arguments)};Calendar.prototype.requestWritePermission=function(){return core.cordova(this,"requestWritePermission",{},arguments)};Calendar.prototype.requestReadPermission=function(){return core.cordova(this,"requestReadPermission",{},arguments)};Calendar.prototype.requestReadWritePermission=function(){return core.cordova(this,"requestReadWritePermission",{},arguments)};Calendar.prototype.createCalendar=function(nameOrOptions){return core.cordova(this,"createCalendar",{},arguments)};Calendar.prototype.deleteCalendar=function(name){return core.cordova(this,"deleteCalendar",{},arguments)};Calendar.prototype.getCalendarOptions=function(){return core.cordova(this,"getCalendarOptions",{sync:true},arguments)};Calendar.prototype.getCreateCalendarOptions=function(){return core.cordova(this,"getCreateCalendarOptions",{sync:true},arguments)};Calendar.prototype.createEvent=function(title,location,notes,startDate,endDate){return core.cordova(this,"createEvent",{},arguments)};Calendar.prototype.createEventWithOptions=function(title,location,notes,startDate,endDate,options){return core.cordova(this,"createEventWithOptions",{},arguments)};Calendar.prototype.createEventInteractively=function(title,location,notes,startDate,endDate){return core.cordova(this,"createEventInteractively",{},arguments)};Calendar.prototype.createEventInteractivelyWithOptions=function(title,location,notes,startDate,endDate,options){return core.cordova(this,"createEventInteractivelyWithOptions",{},arguments)};Calendar.prototype.findEvent=function(title,location,notes,startDate,endDate){return core.cordova(this,"findEvent",{},arguments)};Calendar.prototype.findEventWithOptions=function(title,location,notes,startDate,endDate,options){return core.cordova(this,"findEventWithOptions",{},arguments)};Calendar.prototype.listEventsInRange=function(startDate,endDate){return core.cordova(this,"listEventsInRange",{platforms:["Android"]},arguments)};Calendar.prototype.listCalendars=function(){return core.cordova(this,"listCalendars",{},arguments)};Calendar.prototype.findAllEventsInNamedCalendar=function(calendarName){return core.cordova(this,"findAllEventsInNamedCalendar",{platforms:["iOS"]},arguments)};Calendar.prototype.modifyEvent=function(title,location,notes,startDate,endDate,newTitle,newLocation,newNotes,newStartDate,newEndDate){return core.cordova(this,"modifyEvent",{platforms:["iOS"]},arguments)};Calendar.prototype.modifyEventWithOptions=function(title,location,notes,startDate,endDate,newTitle,newLocation,newNotes,newStartDate,newEndDate,filterOptions,newOptions){return core.cordova(this,"modifyEventWithOptions",{platforms:["iOS"]},arguments)};Calendar.prototype.deleteEvent=function(title,location,notes,startDate,endDate){return core.cordova(this,"deleteEvent",{},arguments)};Calendar.prototype.deleteEventFromNamedCalendar=function(title,location,notes,startDate,endDate,calendarName){return core.cordova(this,"deleteEventFromNamedCalendar",{platforms:["iOS"]},arguments)};Calendar.prototype.deleteEventById=function(id,fromDate){return core.cordova(this,"deleteEventById",{},arguments)};Calendar.prototype.openCalendar=function(date){return core.cordova(this,"openCalendar",{},arguments)};Calendar.pluginName="Calendar";Calendar.plugin="cordova-plugin-calendar";Calendar.pluginRef="plugins.calendar";Calendar.repo="https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin";Calendar.platforms=["Android","iOS"];Calendar.decorators=[{type:core$1.Injectable}];return Calendar}(core.AwesomeCordovaNativePlugin);var Calendar$1=Object.freeze({__proto__:null,Calendar:Calendar});var DestinationType;(function(DestinationType){DestinationType[DestinationType["DATA_URL"]=0]="DATA_URL";DestinationType[DestinationType["FILE_URL"]=1]="FILE_URL";DestinationType[DestinationType["NATIVE_URI"]=2]="NATIVE_URI"})(DestinationType||(DestinationType={}));var EncodingType;(function(EncodingType){EncodingType[EncodingType["JPEG"]=0]="JPEG";EncodingType[EncodingType["PNG"]=1]="PNG"})(EncodingType||(EncodingType={}));var MediaType;(function(MediaType){MediaType[MediaType["PICTURE"]=0]="PICTURE";MediaType[MediaType["VIDEO"]=1]="VIDEO";MediaType[MediaType["ALLMEDIA"]=2]="ALLMEDIA"})(MediaType||(MediaType={}));var PictureSourceType;(function(PictureSourceType){PictureSourceType[PictureSourceType["PHOTOLIBRARY"]=0]="PHOTOLIBRARY";PictureSourceType[PictureSourceType["CAMERA"]=1]="CAMERA";PictureSourceType[PictureSourceType["SAVEDPHOTOALBUM"]=2]="SAVEDPHOTOALBUM"})(PictureSourceType||(PictureSourceType={}));var PopoverArrowDirection;(function(PopoverArrowDirection){PopoverArrowDirection[PopoverArrowDirection["ARROW_UP"]=1]="ARROW_UP";PopoverArrowDirection[PopoverArrowDirection["ARROW_DOWN"]=2]="ARROW_DOWN";PopoverArrowDirection[PopoverArrowDirection["ARROW_LEFT"]=3]="ARROW_LEFT";PopoverArrowDirection[PopoverArrowDirection["ARROW_RIGHT"]=4]="ARROW_RIGHT";PopoverArrowDirection[PopoverArrowDirection["ARROW_ANY"]=5]="ARROW_ANY"})(PopoverArrowDirection||(PopoverArrowDirection={}));var Direction;(function(Direction){Direction[Direction["BACK"]=0]="BACK";Direction[Direction["FRONT"]=1]="FRONT"})(Direction||(Direction={}));var Camera=function(_super){tslib.__extends(Camera,_super);function Camera(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.DestinationType={DATA_URL:0,FILE_URI:1,NATIVE_URI:2};_this.EncodingType={JPEG:0,PNG:1};_this.MediaType={PICTURE:0,VIDEO:1,ALLMEDIA:2};_this.PictureSourceType={PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2};_this.PopoverArrowDirection={ARROW_UP:1,ARROW_DOWN:2,ARROW_LEFT:4,ARROW_RIGHT:8,ARROW_ANY:15};_this.Direction={BACK:0,FRONT:1};return _this}Camera.prototype.getPicture=function(options){return core.cordova(this,"getPicture",{callbackOrder:"reverse"},arguments)};Camera.prototype.cleanup=function(){return core.cordova(this,"cleanup",{platforms:["iOS"]},arguments)};Camera.pluginName="Camera";Camera.plugin="cordova-plugin-camera";Camera.pluginRef="navigator.camera";Camera.repo="https://github.com/apache/cordova-plugin-camera";Camera.platforms=["Android","Browser","iOS","Windows"];Camera.decorators=[{type:core$1.Injectable}];return Camera}(core.AwesomeCordovaNativePlugin);var Camera$1=Object.freeze({__proto__:null,Camera:Camera,get DestinationType(){return DestinationType},get Direction(){return Direction},get EncodingType(){return EncodingType},get MediaType(){return MediaType},get PictureSourceType(){return PictureSourceType},get PopoverArrowDirection(){return PopoverArrowDirection}});var Device=function(_super){tslib.__extends(Device,_super);function Device(){return _super!==null&&_super.apply(this,arguments)||this}Object.defineProperty(Device.prototype,"cordova",{get:function(){return core.cordovaPropertyGet(this,"cordova")},set:function(value){core.cordovaPropertySet(this,"cordova",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"model",{get:function(){return core.cordovaPropertyGet(this,"model")},set:function(value){core.cordovaPropertySet(this,"model",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"platform",{get:function(){return core.cordovaPropertyGet(this,"platform")},set:function(value){core.cordovaPropertySet(this,"platform",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"uuid",{get:function(){return core.cordovaPropertyGet(this,"uuid")},set:function(value){core.cordovaPropertySet(this,"uuid",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"version",{get:function(){return core.cordovaPropertyGet(this,"version")},set:function(value){core.cordovaPropertySet(this,"version",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"manufacturer",{get:function(){return core.cordovaPropertyGet(this,"manufacturer")},set:function(value){core.cordovaPropertySet(this,"manufacturer",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"isVirtual",{get:function(){return core.cordovaPropertyGet(this,"isVirtual")},set:function(value){core.cordovaPropertySet(this,"isVirtual",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"serial",{get:function(){return core.cordovaPropertyGet(this,"serial")},set:function(value){core.cordovaPropertySet(this,"serial",value)},enumerable:false,configurable:true});Device.pluginName="Device";Device.plugin="cordova-plugin-device";Device.pluginRef="device";Device.repo="https://github.com/apache/cordova-plugin-device";Device.platforms=["Android","Browser","iOS","macOS","Windows"];Device.decorators=[{type:core$1.Injectable}];return Device}(core.AwesomeCordovaNativePlugin);var Device$1=Object.freeze({__proto__:null,Device:Device});var File=function(_super){tslib.__extends(File,_super);function File(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.cordovaFileError={1:"NOT_FOUND_ERR",2:"SECURITY_ERR",3:"ABORT_ERR",4:"NOT_READABLE_ERR",5:"ENCODING_ERR",6:"NO_MODIFICATION_ALLOWED_ERR",7:"INVALID_STATE_ERR",8:"SYNTAX_ERR",9:"INVALID_MODIFICATION_ERR",10:"QUOTA_EXCEEDED_ERR",11:"TYPE_MISMATCH_ERR",12:"PATH_EXISTS_ERR",13:"WRONG_ENTRY_TYPE",14:"DIR_READ_ERR"};return _this}File.prototype.getFreeDiskSpace=function(){var _this=this;return function(){if(core.checkAvailability(_this)===true){return core.getPromise((function(resolve,reject){cordova.exec(resolve,reject,"File","getFreeDiskSpace",[])}))}}()};File.prototype.checkDir=function(path,dir){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dir)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}var fullPath=path+dir;return _this.resolveDirectoryUrl(fullPath).then((function(){return true}))}}()};File.prototype.createDir=function(path,dirName,replace){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}var options={create:true};if(!replace){options.exclusive=true}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,options)}))}}()};File.prototype.removeDir=function(path,dirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(de){return _this.remove(de)}))}}()};File.prototype.moveDir=function(path,dirName,newPath,newDirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){newDirName=newDirName||dirName;if(/^\//.test(newDirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(srcde){return _this.resolveDirectoryUrl(newPath).then((function(destenation){return _this.move(srcde,destenation,newDirName)}))}))}}()};File.prototype.copyDir=function(path,dirName,newPath,newDirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(newDirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(srcde){return _this.resolveDirectoryUrl(newPath).then((function(deste){return _this.copy(srcde,deste,newDirName)}))}))}}()};File.prototype.listDir=function(path,dirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false,exclusive:false})})).then((function(de){var reader=de.createReader();return _this.readEntries(reader)}))}}()};File.prototype.removeRecursively=function(path,dirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(de){return _this.rimraf(de)}))}}()};File.prototype.checkFile=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(file)){var err=new FileError(5);err.message="file cannot start with /";return Promise.reject(err)}return _this.resolveLocalFilesystemUrl(path+file).then((function(fse){if(fse.isFile){return true}else{var err=new FileError(13);err.message="input is not a file";return Promise.reject(err)}}))}}()};File.prototype.createFile=function(path,fileName,replace){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(fileName)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}var options={create:true};if(!replace){options.exclusive=true}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,options)}))}}()};File.prototype.removeFile=function(path,fileName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(fileName)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,{create:false})})).then((function(fe){return _this.remove(fe)}))}}()};File.prototype.writeFile=function(path,fileName,text,options){var _this=this;if(options===void 0){options={}}return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(fileName)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}var getFileOpts={create:!options.append,exclusive:!options.replace};return _this.resolveDirectoryUrl(path).then((function(directoryEntry){return _this.getFile(directoryEntry,fileName,getFileOpts)})).then((function(fileEntry){return _this.writeFileEntry(fileEntry,text,options)}))}}()};File.prototype.writeFileEntry=function(fe,text,options){var _this=this;return this.createWriter(fe).then((function(writer){if(options.append){writer.seek(writer.length)}if(options.truncate){writer.truncate(options.truncate)}return _this.write(writer,text)})).then((function(){return fe}))};File.prototype.writeExistingFile=function(path,fileName,text){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.writeFile(path,fileName,text,{replace:true})}}()};File.prototype.readAsText=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"Text")}}()};File.prototype.readAsDataURL=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"DataURL")}}()};File.prototype.readAsBinaryString=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"BinaryString")}}()};File.prototype.readAsArrayBuffer=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"ArrayBuffer")}}()};File.prototype.moveFile=function(path,fileName,newPath,newFileName){var _this=this;return function(){if(core.checkAvailability(_this)===true){newFileName=newFileName||fileName;if(/^\//.test(newFileName)){var err=new FileError(5);err.message="file name cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,{create:false})})).then((function(srcfe){return _this.resolveDirectoryUrl(newPath).then((function(deste){return _this.move(srcfe,deste,newFileName)}))}))}}()};File.prototype.copyFile=function(path,fileName,newPath,newFileName){var _this=this;return function(){if(core.checkAvailability(_this)===true){newFileName=newFileName||fileName;if(/^\//.test(newFileName)){var err=new FileError(5);err.message="file name cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,{create:false})})).then((function(srcfe){return _this.resolveDirectoryUrl(newPath).then((function(deste){return _this.copy(srcfe,deste,newFileName)}))}))}}()};File.prototype.fillErrorMessage=function(err){try{err.message=this.cordovaFileError[err.code]}catch(e){}};File.prototype.resolveLocalFilesystemUrl=function(fileUrl){var _this=this;return function(){if(core.checkAvailability(_this)===true){return core.getPromise((function(resolve,reject){try{window.resolveLocalFileSystemURL(fileUrl,(function(entry){resolve(entry)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}catch(xc){_this.fillErrorMessage(xc);reject(xc)}}))}}()};File.prototype.resolveDirectoryUrl=function(directoryUrl){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.resolveLocalFilesystemUrl(directoryUrl).then((function(de){if(de.isDirectory){return de}else{var err=new FileError(13);err.message="input is not a directory";return Promise.reject(err)}}))}}()};File.prototype.getDirectory=function(directoryEntry,directoryName,flags){var _this=this;return function(){if(core.checkAvailability(_this)===true){return new Promise((function(resolve,reject){try{directoryEntry.getDirectory(directoryName,flags,(function(de){resolve(de)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}catch(xc){_this.fillErrorMessage(xc);reject(xc)}}))}}()};File.prototype.getFile=function(directoryEntry,fileName,flags){var _this=this;return function(){if(core.checkAvailability(_this)===true){return new Promise((function(resolve,reject){try{directoryEntry.getFile(fileName,flags,resolve,(function(err){_this.fillErrorMessage(err);reject(err)}))}catch(xc){_this.fillErrorMessage(xc);reject(xc)}}))}}()};File.prototype.readFile=function(path,file,readAs){var _this=this;if(/^\//.test(file)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}return this.resolveDirectoryUrl(path).then((function(directoryEntry){return _this.getFile(directoryEntry,file,{create:false})})).then((function(fileEntry){var reader=new FileReader;return core.getPromise((function(resolve,reject){reader.onloadend=function(){if(reader.result!==undefined||reader.result!==null){resolve(reader.result)}else if(reader.error!==undefined||reader.error!==null){reject(reader.error)}else{reject({code:null,message:"READER_ONLOADEND_ERR"})}};fileEntry.file((function(file){reader["readAs"+readAs].call(reader,file)}),(function(error){reject(error)}))}))}))};File.prototype.remove=function(fe){var _this=this;return new Promise((function(resolve,reject){fe.remove((function(){resolve({success:true,fileRemoved:fe})}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.move=function(srce,destdir,newName){var _this=this;return new Promise((function(resolve,reject){srce.moveTo(destdir,newName,(function(deste){resolve(deste)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.copy=function(srce,destdir,newName){var _this=this;return new Promise((function(resolve,reject){srce.copyTo(destdir,newName,(function(deste){resolve(deste)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.readEntries=function(dr){var _this=this;return new Promise((function(resolve,reject){dr.readEntries((function(entries){resolve(entries)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.rimraf=function(de){var _this=this;return new Promise((function(resolve,reject){de.removeRecursively((function(){resolve({success:true,fileRemoved:de})}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.createWriter=function(fe){var _this=this;return new Promise((function(resolve,reject){fe.createWriter((function(writer){resolve(writer)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.write=function(writer,gu){if(gu instanceof Blob){return this.writeFileInChunks(writer,gu)}return new Promise((function(resolve,reject){writer.onwriteend=function(evt){if(writer.error){reject(writer.error)}else{resolve(evt)}};writer.write(gu)}))};File.prototype.writeFileInChunks=function(writer,file){var BLOCK_SIZE=1024*1024;var writtenSize=0;function writeNextChunk(){var size=Math.min(BLOCK_SIZE,file.size-writtenSize);var chunk=file.slice(writtenSize,writtenSize+size);writtenSize+=size;writer.write(chunk)}return core.getPromise((function(resolve,reject){writer.onerror=reject;writer.onwrite=function(){if(writtenSize<file.size){writeNextChunk()}else{resolve()}};writeNextChunk()}))};Object.defineProperty(File.prototype,"applicationDirectory",{get:function(){return core.cordovaPropertyGet(this,"applicationDirectory")},set:function(value){core.cordovaPropertySet(this,"applicationDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"applicationStorageDirectory",{get:function(){return core.cordovaPropertyGet(this,"applicationStorageDirectory")},set:function(value){core.cordovaPropertySet(this,"applicationStorageDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"dataDirectory",{get:function(){return core.cordovaPropertyGet(this,"dataDirectory")},set:function(value){core.cordovaPropertySet(this,"dataDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"cacheDirectory",{get:function(){return core.cordovaPropertyGet(this,"cacheDirectory")},set:function(value){core.cordovaPropertySet(this,"cacheDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalApplicationStorageDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalApplicationStorageDirectory")},set:function(value){core.cordovaPropertySet(this,"externalApplicationStorageDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalDataDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalDataDirectory")},set:function(value){core.cordovaPropertySet(this,"externalDataDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalCacheDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalCacheDirectory")},set:function(value){core.cordovaPropertySet(this,"externalCacheDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalRootDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalRootDirectory")},set:function(value){core.cordovaPropertySet(this,"externalRootDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"tempDirectory",{get:function(){return core.cordovaPropertyGet(this,"tempDirectory")},set:function(value){core.cordovaPropertySet(this,"tempDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"syncedDataDirectory",{get:function(){return core.cordovaPropertyGet(this,"syncedDataDirectory")},set:function(value){core.cordovaPropertySet(this,"syncedDataDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"documentsDirectory",{get:function(){return core.cordovaPropertyGet(this,"documentsDirectory")},set:function(value){core.cordovaPropertySet(this,"documentsDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"sharedDirectory",{get:function(){return core.cordovaPropertyGet(this,"sharedDirectory")},set:function(value){core.cordovaPropertySet(this,"sharedDirectory",value)},enumerable:false,configurable:true});File.pluginName="File";File.plugin="cordova-plugin-file";File.pluginRef="cordova.file";File.repo="https://github.com/apache/cordova-plugin-file";File.platforms=["Android","Browser","iOS","macOS","Windows"];File.decorators=[{type:core$1.Injectable}];return File}(core.AwesomeCordovaNativePlugin);var File$1=Object.freeze({__proto__:null,File:File});var FileOpener=function(_super){tslib.__extends(FileOpener,_super);function FileOpener(){return _super!==null&&_super.apply(this,arguments)||this}FileOpener.prototype.open=function(filePath,fileMIMEType){return core.cordova(this,"open",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.prototype.uninstall=function(packageId){return core.cordova(this,"uninstall",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.prototype.appIsInstalled=function(packageId){return core.cordova(this,"appIsInstalled",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.prototype.showOpenWithDialog=function(filePath,fileMIMEType){return core.cordova(this,"showOpenWithDialog",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.pluginName="FileOpener";FileOpener.plugin="cordova-plugin-file-opener2";FileOpener.pluginRef="cordova.plugins.fileOpener2";FileOpener.repo="https://github.com/pwlin/cordova-plugin-file-opener2";FileOpener.platforms=["Android","iOS","Windows","Windows Phone 8"];FileOpener.decorators=[{type:core$1.Injectable}];return FileOpener}(core.AwesomeCordovaNativePlugin);var FileOpener$1=Object.freeze({__proto__:null,FileOpener:FileOpener});var Geolocation=function(_super){tslib.__extends(Geolocation,_super);function Geolocation(){return _super!==null&&_super.apply(this,arguments)||this}Geolocation.prototype.getCurrentPosition=function(options){return core.cordova(this,"getCurrentPosition",{callbackOrder:"reverse"},arguments)};Geolocation.prototype.watchPosition=function(options){return new rxjs.Observable((function(observer){var watchId=navigator.geolocation.watchPosition(observer.next.bind(observer),observer.next.bind(observer),options);return function(){return navigator.geolocation.clearWatch(watchId)}}))};Geolocation.pluginName="Geolocation";Geolocation.plugin="cordova-plugin-geolocation";Geolocation.pluginRef="navigator.geolocation";Geolocation.repo="https://github.com/apache/cordova-plugin-geolocation";Geolocation.install='ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"';Geolocation.installVariables=["GEOLOCATION_USAGE_DESCRIPTION"];Geolocation.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"];Geolocation.decorators=[{type:core$1.Injectable}];return Geolocation}(core.AwesomeCordovaNativePlugin);var GeoLocation=Object.freeze({__proto__:null,Geolocation:Geolocation});var MediaCapture=function(_super){tslib.__extends(MediaCapture,_super);function MediaCapture(){return _super!==null&&_super.apply(this,arguments)||this}MediaCapture.prototype.captureAudio=function(options){return core.cordova(this,"captureAudio",{callbackOrder:"reverse"},arguments)};MediaCapture.prototype.captureImage=function(options){return core.cordova(this,"captureImage",{callbackOrder:"reverse"},arguments)};MediaCapture.prototype.captureVideo=function(options){return core.cordova(this,"captureVideo",{callbackOrder:"reverse"},arguments)};MediaCapture.prototype.onPendingCaptureResult=function(){return core.cordova(this,"onPendingCaptureResult",{eventObservable:true,event:"pendingcaptureresult"},arguments)};MediaCapture.prototype.onPendingCaptureError=function(){return core.cordova(this,"onPendingCaptureError",{eventObservable:true,event:"pendingcaptureerror"},arguments)};Object.defineProperty(MediaCapture.prototype,"supportedImageModes",{get:function(){return core.cordovaPropertyGet(this,"supportedImageModes")},set:function(value){core.cordovaPropertySet(this,"supportedImageModes",value)},enumerable:false,configurable:true});Object.defineProperty(MediaCapture.prototype,"supportedAudioModes",{get:function(){return core.cordovaPropertyGet(this,"supportedAudioModes")},set:function(value){core.cordovaPropertySet(this,"supportedAudioModes",value)},enumerable:false,configurable:true});Object.defineProperty(MediaCapture.prototype,"supportedVideoModes",{get:function(){return core.cordovaPropertyGet(this,"supportedVideoModes")},set:function(value){core.cordovaPropertySet(this,"supportedVideoModes",value)},enumerable:false,configurable:true});MediaCapture.pluginName="MediaCapture";MediaCapture.plugin="cordova-plugin-media-capture";MediaCapture.pluginRef="navigator.device.capture";MediaCapture.repo="https://github.com/apache/cordova-plugin-media-capture";MediaCapture.platforms=["Android","Browser","iOS","Windows"];MediaCapture.decorators=[{type:core$1.Injectable}];return MediaCapture}(core.AwesomeCordovaNativePlugin);var MediaCapture$1=Object.freeze({__proto__:null,MediaCapture:MediaCapture});var Connection;(function(Connection){Connection["UNKNOWN"]="unknown";Connection["ETHERNET"]="ethernet";Connection["WIFI"]="wifi";Connection["CELL_2G"]="2g";Connection["CELL_3G"]="3g";Connection["CELL_4G"]="4g";Connection["CELL"]="cellular";Connection["NONE"]="none"})(Connection||(Connection={}));var Network=function(_super){tslib.__extends(Network,_super);function Network(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.Connection={UNKNOWN:"unknown",ETHERNET:"ethernet",WIFI:"wifi",CELL_2G:"2g",CELL_3G:"3g",CELL_4G:"4g",CELL:"cellular",NONE:"none"};return _this}Network.prototype.onChange=function(){var _this=this;return function(){if(core.checkAvailability(_this)===true){return rxjs.merge(_this.onConnect().pipe(operators.mapTo("connected")),_this.onDisconnect().pipe(operators.mapTo("disconnected")))}}()};Network.prototype.onDisconnect=function(){return core.cordova(this,"onDisconnect",{eventObservable:true,event:"offline",element:"document"},arguments)};Network.prototype.onConnect=function(){return core.cordova(this,"onConnect",{eventObservable:true,event:"online",element:"document"},arguments)};Object.defineProperty(Network.prototype,"type",{get:function(){return core.cordovaPropertyGet(this,"type")},set:function(value){core.cordovaPropertySet(this,"type",value)},enumerable:false,configurable:true});Object.defineProperty(Network.prototype,"downlinkMax",{get:function(){return core.cordovaPropertyGet(this,"downlinkMax")},set:function(value){core.cordovaPropertySet(this,"downlinkMax",value)},enumerable:false,configurable:true});Network.pluginName="Network";Network.plugin="cordova-plugin-network-information";Network.pluginRef="navigator.connection";Network.repo="https://github.com/apache/cordova-plugin-network-information";Network.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"];Network.decorators=[{type:core$1.Injectable}];return Network}(core.AwesomeCordovaNativePlugin);var Network$1=Object.freeze({__proto__:null,get Connection(){return Connection},Network:Network});var SQLiteObject=function(){function SQLiteObject(_objectInstance){this._objectInstance=_objectInstance}SQLiteObject.prototype.addTransaction=function(transaction){return core.cordovaInstance(this,"addTransaction",{sync:true},arguments)};SQLiteObject.prototype.transaction=function(fn){return core.cordovaInstance(this,"transaction",{successIndex:2,errorIndex:1},arguments)};SQLiteObject.prototype.readTransaction=function(fn){return core.cordovaInstance(this,"readTransaction",{},arguments)};SQLiteObject.prototype.startNextTransaction=function(){return core.cordovaInstance(this,"startNextTransaction",{sync:true},arguments)};SQLiteObject.prototype.open=function(){return core.cordovaInstance(this,"open",{},arguments)};SQLiteObject.prototype.close=function(){return core.cordovaInstance(this,"close",{},arguments)};SQLiteObject.prototype.executeSql=function(statement,params){return core.cordovaInstance(this,"executeSql",{},arguments)};SQLiteObject.prototype.sqlBatch=function(sqlStatements){return core.cordovaInstance(this,"sqlBatch",{},arguments)};SQLiteObject.prototype.abortallPendingTransactions=function(){return core.cordovaInstance(this,"abortallPendingTransactions",{sync:true},arguments)};Object.defineProperty(SQLiteObject.prototype,"databaseFeatures",{get:function(){return core.instancePropertyGet(this,"databaseFeatures")},set:function(value){core.instancePropertySet(this,"databaseFeatures",value)},enumerable:false,configurable:true});Object.defineProperty(SQLiteObject.prototype,"openDBs",{get:function(){return core.instancePropertyGet(this,"openDBs")},set:function(value){core.instancePropertySet(this,"openDBs",value)},enumerable:false,configurable:true});return SQLiteObject}();var SQLite=function(_super){tslib.__extends(SQLite,_super);function SQLite(){return _super!==null&&_super.apply(this,arguments)||this}SQLite.prototype.create=function(config){var _this=this;return function(){if(core.checkAvailability(_this)===true){return new Promise((function(resolve,reject){sqlitePlugin.openDatabase(config,(function(db){return resolve(new SQLiteObject(db))}),reject)}))}}()};SQLite.prototype.echoTest=function(){return core.cordova(this,"echoTest",{},arguments)};SQLite.prototype.selfTest=function(){return core.cordova(this,"selfTest",{},arguments)};SQLite.prototype.deleteDatabase=function(config){return core.cordova(this,"deleteDatabase",{},arguments)};SQLite.pluginName="SQLite";SQLite.pluginRef="sqlitePlugin";SQLite.plugin="cordova-sqlite-storage";SQLite.repo="https://github.com/litehelpers/Cordova-sqlite-storage";SQLite.platforms=["Android","iOS","macOS","Windows"];SQLite.decorators=[{type:core$1.Injectable}];return SQLite}(core.AwesomeCordovaNativePlugin);var Sqlite=Object.freeze({__proto__:null,SQLite:SQLite,SQLiteObject:SQLiteObject});var Vibration=function(_super){tslib.__extends(Vibration,_super);function Vibration(){return _super!==null&&_super.apply(this,arguments)||this}Vibration.prototype.vibrate=function(time){return core.cordova(this,"vibrate",{sync:true},arguments)};Vibration.pluginName="Vibration";Vibration.plugin="cordova-plugin-vibration";Vibration.pluginRef="navigator";Vibration.repo="https://github.com/apache/cordova-plugin-vibration";Vibration.platforms=["Android","iOS","Windows"];Vibration.decorators=[{type:core$1.Injectable}];return Vibration}(core.AwesomeCordovaNativePlugin);var Vibration$1=Object.freeze({__proto__:null,Vibration:Vibration});var LocationAccuracy=function(_super){tslib.__extends(LocationAccuracy,_super);function LocationAccuracy(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.REQUEST_PRIORITY_NO_POWER=0;_this.REQUEST_PRIORITY_LOW_POWER=1;_this.REQUEST_PRIORITY_BALANCED_POWER_ACCURACY=2;_this.REQUEST_PRIORITY_HIGH_ACCURACY=3;_this.SUCCESS_SETTINGS_SATISFIED=0;_this.SUCCESS_USER_AGREED=1;_this.ERROR_ALREADY_REQUESTING=-1;_this.ERROR_INVALID_ACTION=0;_this.ERROR_INVALID_ACCURACY=1;_this.ERROR_EXCEPTION=1;_this.ERROR_CANNOT_CHANGE_ACCURACY=3;_this.ERROR_USER_DISAGREED=4;_this.ERROR_GOOGLE_API_CONNECTION_FAILED=4;return _this}LocationAccuracy.prototype.canRequest=function(){return core.cordova(this,"canRequest",{},arguments)};LocationAccuracy.prototype.isRequesting=function(){return core.cordova(this,"isRequesting",{},arguments)};LocationAccuracy.prototype.request=function(accuracy){return core.cordova(this,"request",{callbackOrder:"reverse"},arguments)};LocationAccuracy.pluginName="LocationAccuracy";LocationAccuracy.plugin="cordova-plugin-request-location-accuracy";LocationAccuracy.pluginRef="cordova.plugins.locationAccuracy";LocationAccuracy.repo="https://github.com/dpa99c/cordova-plugin-request-location-accuracy";LocationAccuracy.platforms=["Android","iOS"];LocationAccuracy.decorators=[{type:core$1.Injectable}];return LocationAccuracy}(core.AwesomeCordovaNativePlugin);var LocationAccuracy$1=Object.freeze({__proto__:null,LocationAccuracy:LocationAccuracy});var Diagnostic=function(_super){tslib.__extends(Diagnostic,_super);function Diagnostic(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.permission={READ_CALENDAR:"READ_CALENDAR",WRITE_CALENDAR:"WRITE_CALENDAR",CAMERA:"CAMERA",READ_CONTACTS:"READ_CONTACTS",WRITE_CONTACTS:"WRITE_CONTACTS",GET_ACCOUNTS:"GET_ACCOUNTS",ACCESS_FINE_LOCATION:"ACCESS_FINE_LOCATION",ACCESS_COARSE_LOCATION:"ACCESS_COARSE_LOCATION",RECORD_AUDIO:"RECORD_AUDIO",READ_PHONE_STATE:"READ_PHONE_STATE",CALL_PHONE:"CALL_PHONE",ADD_VOICEMAIL:"ADD_VOICEMAIL",USE_SIP:"USE_SIP",PROCESS_OUTGOING_CALLS:"PROCESS_OUTGOING_CALLS",READ_CALL_LOG:"READ_CALL_LOG",WRITE_CALL_LOG:"WRITE_CALL_LOG",SEND_SMS:"SEND_SMS",RECEIVE_SMS:"RECEIVE_SMS",READ_SMS:"READ_SMS",RECEIVE_WAP_PUSH:"RECEIVE_WAP_PUSH",RECEIVE_MMS:"RECEIVE_MMS",WRITE_EXTERNAL_STORAGE:"WRITE_EXTERNAL_STORAGE",READ_EXTERNAL_STORAGE:"READ_EXTERNAL_STORAGE",BODY_SENSORS:"BODY_SENSORS"};_this.locationAuthorizationMode={ALWAYS:"always",WHEN_IN_USE:"when_in_use"};_this.permissionGroups={CALENDAR:["READ_CALENDAR","WRITE_CALENDAR"],CAMERA:["CAMERA"],CONTACTS:["READ_CONTACTS","WRITE_CONTACTS","GET_ACCOUNTS"],LOCATION:["ACCESS_FINE_LOCATION","ACCESS_COARSE_LOCATION"],MICROPHONE:["RECORD_AUDIO"],PHONE:["READ_PHONE_STATE","CALL_PHONE","ADD_VOICEMAIL","USE_SIP","PROCESS_OUTGOING_CALLS","READ_CALL_LOG","WRITE_CALL_LOG"],SENSORS:["BODY_SENSORS"],SMS:["SEND_SMS","RECEIVE_SMS","READ_SMS","RECEIVE_WAP_PUSH","RECEIVE_MMS"],STORAGE:["READ_EXTERNAL_STORAGE","WRITE_EXTERNAL_STORAGE"]};_this.locationMode={HIGH_ACCURACY:"high_accuracy",DEVICE_ONLY:"device_only",BATTERY_SAVING:"battery_saving",LOCATION_OFF:"location_off"};_this.bluetoothState={UNKNOWN:"unknown",RESETTING:"resetting",UNSUPPORTED:"unsupported",UNAUTHORIZED:"unauthorized",POWERED_OFF:"powered_off",POWERED_ON:"powered_on",POWERING_OFF:"powering_off",POWERING_ON:"powering_on"};return _this}Diagnostic.prototype.isLocationAvailable=function(){return core.cordova(this,"isLocationAvailable",{},arguments)};Diagnostic.prototype.isWifiAvailable=function(){return core.cordova(this,"isWifiAvailable",{},arguments)};Diagnostic.prototype.isCameraAvailable=function(externalStorage){return core.cordova(this,"isCameraAvailable",{callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isBluetoothAvailable=function(){return core.cordova(this,"isBluetoothAvailable",{},arguments)};Diagnostic.prototype.switchToLocationSettings=function(){return core.cordova(this,"switchToLocationSettings",{sync:true,platforms:["Android","Windows 10","iOS"]},arguments)};Diagnostic.prototype.switchToMobileDataSettings=function(){return core.cordova(this,"switchToMobileDataSettings",{sync:true,platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.switchToBluetoothSettings=function(){return core.cordova(this,"switchToBluetoothSettings",{sync:true,platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.switchToWifiSettings=function(){return core.cordova(this,"switchToWifiSettings",{sync:true,platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.isWifiEnabled=function(){return core.cordova(this,"isWifiEnabled",{platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.setWifiState=function(state){return core.cordova(this,"setWifiState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.setBluetoothState=function(state){return core.cordova(this,"setBluetoothState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.isLocationEnabled=function(){return core.cordova(this,"isLocationEnabled",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isLocationAuthorized=function(){return core.cordova(this,"isLocationAuthorized",{},arguments)};Diagnostic.prototype.getLocationAuthorizationStatus=function(){return core.cordova(this,"getLocationAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestLocationAuthorization=function(mode){return core.cordova(this,"requestLocationAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isCameraPresent=function(){return core.cordova(this,"isCameraPresent",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isCameraAuthorized=function(externalStorage){return core.cordova(this,"isCameraAuthorized",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.getCameraAuthorizationStatus=function(externalStorage){return core.cordova(this,"getCameraAuthorizationStatus",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.requestCameraAuthorization=function(externalStorage){return core.cordova(this,"requestCameraAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isMicrophoneAuthorized=function(){return core.cordova(this,"isMicrophoneAuthorized",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getMicrophoneAuthorizationStatus=function(){return core.cordova(this,"getMicrophoneAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestMicrophoneAuthorization=function(){return core.cordova(this,"requestMicrophoneAuthorization",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isContactsAuthorized=function(){return core.cordova(this,"isContactsAuthorized",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getContactsAuthorizationStatus=function(){return core.cordova(this,"getContactsAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestContactsAuthorization=function(){return core.cordova(this,"requestContactsAuthorization",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isCalendarAuthorized=function(){return core.cordova(this,"isCalendarAuthorized",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getCalendarAuthorizationStatus=function(){return core.cordova(this,"getCalendarAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestCalendarAuthorization=function(){return core.cordova(this,"requestCalendarAuthorization",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.switchToSettings=function(){return core.cordova(this,"switchToSettings",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getBluetoothState=function(){return core.cordova(this,"getBluetoothState",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.registerBluetoothStateChangeHandler=function(handler){return core.cordova(this,"registerBluetoothStateChangeHandler",{platforms:["Android","iOS"],sync:true},arguments)};Diagnostic.prototype.registerLocationStateChangeHandler=function(handler){return core.cordova(this,"registerLocationStateChangeHandler",{platforms:["Android","iOS"],sync:true},arguments)};Diagnostic.prototype.isGpsLocationAvailable=function(){return core.cordova(this,"isGpsLocationAvailable",{platforms:["Android"]},arguments)};Diagnostic.prototype.isGpsLocationEnabled=function(){return core.cordova(this,"isGpsLocationEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNetworkLocationAvailable=function(){return core.cordova(this,"isNetworkLocationAvailable",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNetworkLocationEnabled=function(){return core.cordova(this,"isNetworkLocationEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.getLocationMode=function(){return core.cordova(this,"getLocationMode",{platforms:["Android"]},arguments)};Diagnostic.prototype.getPermissionAuthorizationStatus=function(permission){return core.cordova(this,"getPermissionAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.getPermissionsAuthorizationStatus=function(permissions){return core.cordova(this,"getPermissionsAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.requestRuntimePermission=function(permission){return core.cordova(this,"requestRuntimePermission",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.requestRuntimePermissions=function(permissions){return core.cordova(this,"requestRuntimePermissions",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isRequestingPermission=function(){return core.cordova(this,"isRequestingPermission",{sync:true},arguments)};Diagnostic.prototype.registerPermissionRequestCompleteHandler=function(handler){return core.cordova(this,"registerPermissionRequestCompleteHandler",{sync:true},arguments)};Diagnostic.prototype.isBluetoothEnabled=function(){return core.cordova(this,"isBluetoothEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.hasBluetoothSupport=function(){return core.cordova(this,"hasBluetoothSupport",{platforms:["Android"]},arguments)};Diagnostic.prototype.hasBluetoothLESupport=function(){return core.cordova(this,"hasBluetoothLESupport",{platforms:["Android"]},arguments)};Diagnostic.prototype.hasBluetoothLEPeripheralSupport=function(){return core.cordova(this,"hasBluetoothLEPeripheralSupport",{platforms:["Android"]},arguments)};Diagnostic.prototype.isExternalStorageAuthorized=function(){return core.cordova(this,"isExternalStorageAuthorized",{platforms:["Android"]},arguments)};Diagnostic.prototype.getExternalStorageAuthorizationStatus=function(){return core.cordova(this,"getExternalStorageAuthorizationStatus",{platforms:["Android"]},arguments)};Diagnostic.prototype.requestExternalStorageAuthorization=function(){return core.cordova(this,"requestExternalStorageAuthorization",{platforms:["Android"]},arguments)};Diagnostic.prototype.getExternalSdCardDetails=function(){return core.cordova(this,"getExternalSdCardDetails",{platforms:["Android"]},arguments)};Diagnostic.prototype.switchToWirelessSettings=function(){return core.cordova(this,"switchToWirelessSettings",{platforms:["Android"],sync:true},arguments)};Diagnostic.prototype.switchToNFCSettings=function(){return core.cordova(this,"switchToNFCSettings",{platforms:["Android"],sync:true},arguments)};Diagnostic.prototype.isNFCPresent=function(){return core.cordova(this,"isNFCPresent",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNFCEnabled=function(){return core.cordova(this,"isNFCEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNFCAvailable=function(){return core.cordova(this,"isNFCAvailable",{platforms:["Android"]},arguments)};Diagnostic.prototype.registerNFCStateChangeHandler=function(handler){return core.cordova(this,"registerNFCStateChangeHandler",{platforms:["Android"],sync:true},arguments)};Diagnostic.prototype.isDataRoamingEnabled=function(){return core.cordova(this,"isDataRoamingEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isADBModeEnabled=function(){return core.cordova(this,"isADBModeEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isDeviceRooted=function(){return core.cordova(this,"isDeviceRooted",{platforms:["Android"]},arguments)};Diagnostic.prototype.isCameraRollAuthorized=function(){return core.cordova(this,"isCameraRollAuthorized",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getCameraRollAuthorizationStatus=function(){return core.cordova(this,"getCameraRollAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestCameraRollAuthorization=function(){return core.cordova(this,"requestCameraRollAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isRemoteNotificationsEnabled=function(){return core.cordova(this,"isRemoteNotificationsEnabled",{platforms:["iOS","Android"]},arguments)};Diagnostic.prototype.isRegisteredForRemoteNotifications=function(){return core.cordova(this,"isRegisteredForRemoteNotifications",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getRemoteNotificationsAuthorizationStatus=function(){return core.cordova(this,"getRemoteNotificationsAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestRemoteNotificationsAuthorization=function(types,omitRegistration){return core.cordova(this,"requestRemoteNotificationsAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getRemoteNotificationTypes=function(){return core.cordova(this,"getRemoteNotificationTypes",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isRemindersAuthorized=function(){return core.cordova(this,"isRemindersAuthorized",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getRemindersAuthorizationStatus=function(){return core.cordova(this,"getRemindersAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestRemindersAuthorization=function(){return core.cordova(this,"requestRemindersAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isBackgroundRefreshAuthorized=function(){return core.cordova(this,"isBackgroundRefreshAuthorized",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getBackgroundRefreshStatus=function(){return core.cordova(this,"getBackgroundRefreshStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestBluetoothAuthorization=function(){return core.cordova(this,"requestBluetoothAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isMotionAvailable=function(){return core.cordova(this,"isMotionAvailable",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isMotionRequestOutcomeAvailable=function(){return core.cordova(this,"isMotionRequestOutcomeAvailable",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestMotionAuthorization=function(){return core.cordova(this,"requestMotionAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getMotionAuthorizationStatus=function(){return core.cordova(this,"getMotionAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getLocationAccuracyAuthorization=function(){return core.cordova(this,"getLocationAccuracyAuthorization",{platform:["iOS"]},arguments)};Diagnostic.prototype.requestTemporaryFullAccuracyAuthorization=function(purpose){return core.cordova(this,"requestTemporaryFullAccuracyAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.registerLocationAccuracyAuthorizationChangeHandler=function(handler){return core.cordova(this,"registerLocationAccuracyAuthorizationChangeHandler",{platforms:["iOS"],sync:true},arguments)};Object.defineProperty(Diagnostic.prototype,"permissionStatus",{get:function(){return core.cordovaPropertyGet(this,"permissionStatus")},set:function(value){core.cordovaPropertySet(this,"permissionStatus",value)},enumerable:false,configurable:true});Object.defineProperty(Diagnostic.prototype,"NFCState",{get:function(){return core.cordovaPropertyGet(this,"NFCState")},set:function(value){core.cordovaPropertySet(this,"NFCState",value)},enumerable:false,configurable:true});Object.defineProperty(Diagnostic.prototype,"motionStatus",{get:function(){return core.cordovaPropertyGet(this,"motionStatus")},set:function(value){core.cordovaPropertySet(this,"motionStatus",value)},enumerable:false,configurable:true});Diagnostic.pluginName="Diagnostic";Diagnostic.plugin="cordova.plugins.diagnostic";Diagnostic.pluginRef="cordova.plugins.diagnostic";Diagnostic.repo="https://github.com/dpa99c/cordova-diagnostic-plugin";Diagnostic.platforms=["Android","iOS","Windows"];Diagnostic.decorators=[{type:core$1.Injectable}];return Diagnostic}(core.AwesomeCordovaNativePlugin);var Diagnostic$1=Object.freeze({__proto__:null,Diagnostic:Diagnostic});var awesomeCordovaPlugins={...AppVersion$1,...BarcodeScanner$1,...Calendar$1,...Camera$1,...Device$1,...File$1,...FileOpener$1,...GeoLocation,...MediaCapture$1,...Network$1,...Sqlite,...Vibration$1,...LocationAccuracy$1,...Diagnostic$1};return awesomeCordovaPlugins}));/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
847
+ !function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(j(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function h(b,c,d){var e="DEPRECATED METHOD: "+c+"\n"+d+" AT \n";return function(){var c=new Error("get-stack-trace"),d=c&&c.stack?c.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&la(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==oa?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),(function(b){a.addEventListener(b,c,!1)}))}function n(a,b,c){g(q(b),(function(b){a.removeEventListener(b,c,!1)}))}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function s(a){return Array.prototype.slice.call(a,0)}function t(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];r(e,g)<0&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort((function(a,c){return a[b]>c[b]})):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g<ma.length;){if(c=ma[g],e=c?c+f:b,e in a)return e;g++}return d}function v(){return ua++}function w(b){var c=b.ownerDocument||b;return c.defaultView||c.parentWindow||a}function x(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){k(a.options.enable,[a])&&c.handler(b)},this.init()}function y(a){var b,c=a.options.inputClass;return new(b=c?c:xa?M:ya?P:wa?R:L)(a,z)}function z(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=b&Ea&&d-e===0,g=b&(Ga|Ha)&&d-e===0;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,A(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function A(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=D(b)),e>1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=ra(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=qa(j.x)>qa(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};b.eventType!==Ea&&f.eventType!==Ga||(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Ha&&(i>Da||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=qa(l.x)>qa(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:pa(a.pointers[c].clientX),clientY:pa(a.pointers[c].clientY)},c++;return{timeStamp:ra(),pointers:b,center:E(b),deltaX:a.deltaX,deltaY:a.deltaY}}function E(a){var b=a.length;if(1===b)return{x:pa(a[0].clientX),y:pa(a[0].clientY)};for(var c=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:pa(c/b),y:pa(d/b)}}function F(a,b,c){return{x:b/a||0,y:c/a||0}}function G(a,b){return a===b?Ia:qa(a)>=qa(b)?0>a?Ja:Ka:0>b?La:Ma}function H(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Ra)+I(a[1],a[0],Ra)}function K(a,b){return H(b[0],b[1],Ra)/H(a[0],a[1],Ra)}function L(){this.evEl=Ta,this.evWin=Ua,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Xa,this.evWin=Ya,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=$a,this.evWin=_a,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Ga|Ha)&&(c=t(c.concat(d),"identifier",!0)),[c,d]}function P(){this.evTarget=bb,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(Ea|Fa)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter((function(a){return o(a.target,i)})),b===Ea)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Ga|Ha)&&delete d[g[e].identifier],e++;return h.length?[t(f.concat(h),"identifier",!0),h]:void 0}function R(){x.apply(this,arguments);var a=j(this.handler,this);this.touch=new P(this.manager,a),this.mouse=new L(this.manager,a),this.primaryTouch=null,this.lastTouches=[]}function S(a,b){a&Ea?(this.primaryTouch=b.changedPointers[0].identifier,T.call(this,b)):a&(Ga|Ha)&&T.call(this,b)}function T(a){var b=a.changedPointers[0];if(b.identifier===this.primaryTouch){var c={x:b.clientX,y:b.clientY};this.lastTouches.push(c);var d=this.lastTouches,e=function(){var a=d.indexOf(c);a>-1&&d.splice(a,1)};setTimeout(e,cb)}}function U(a){for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d<this.lastTouches.length;d++){var e=this.lastTouches[d],f=Math.abs(b-e.x),g=Math.abs(c-e.y);if(db>=f&&db>=g)return!0}return!1}function V(a,b){this.manager=a,this.set(b)}function W(a){if(p(a,jb))return jb;var b=p(a,kb),c=p(a,lb);return b&&c?jb:b||c?b?kb:lb:p(a,ib)?ib:hb}function X(){if(!fb)return!1;var b={},c=a.CSS&&a.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(d){b[d]=c?a.CSS.supports("touch-action",d):!0})),b}function Y(a){this.options=la({},this.defaults,a||{}),this.id=v(),this.manager=null,this.options.enable=l(this.options.enable,!0),this.state=nb,this.simultaneous={},this.requireFail=[]}function Z(a){return a&sb?"cancel":a&qb?"end":a&pb?"move":a&ob?"start":""}function $(a){return a==Ma?"down":a==La?"up":a==Ja?"left":a==Ka?"right":""}function _(a,b){var c=b.manager;return c?c.get(a):a}function aa(){Y.apply(this,arguments)}function ba(){aa.apply(this,arguments),this.pX=null,this.pY=null}function ca(){aa.apply(this,arguments)}function da(){Y.apply(this,arguments),this._timer=null,this._input=null}function ea(){aa.apply(this,arguments)}function fa(){aa.apply(this,arguments)}function ga(){Y.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ha(a,b){return b=b||{},b.recognizers=l(b.recognizers,ha.defaults.preset),new ia(a,b)}function ia(a,b){this.options=la({},ha.defaults,b||{}),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=a,this.input=y(this),this.touchAction=new V(this,this.options.touchAction),ja(this,!0),g(this.options.recognizers,(function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])}),this)}function ja(a,b){var c=a.element;if(c.style){var d;g(a.options.cssProps,(function(e,f){d=u(c.style,f),b?(a.oldCssProps[d]=c.style[d],c.style[d]=e):c.style[d]=a.oldCssProps[d]||""})),b||(a.oldCssProps={})}}function ka(a,c){var d=b.createEvent("Event");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var la,ma=["","webkit","Moz","MS","ms","o"],na=b.createElement("div"),oa="function",pa=Math.round,qa=Math.abs,ra=Date.now;la="function"!=typeof Object.assign?function(a){if(a===d||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var e=arguments[c];if(e!==d&&null!==e)for(var f in e)e.hasOwnProperty(f)&&(b[f]=e[f])}return b}:Object.assign;var sa=h((function(a,b,c){for(var e=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;return a}),"extend","Use `assign`."),ta=h((function(a,b){return sa(a,b,!0)}),"merge","Use `assign`."),ua=1,va=/mobile|tablet|ip(ad|hone|od)|android/i,wa="ontouchstart"in a,xa=u(a,"PointerEvent")!==d,ya=wa&&va.test(navigator.userAgent),za="touch",Aa="pen",Ba="mouse",Ca="kinect",Da=25,Ea=1,Fa=2,Ga=4,Ha=8,Ia=1,Ja=2,Ka=4,La=8,Ma=16,Na=Ja|Ka,Oa=La|Ma,Pa=Na|Oa,Qa=["x","y"],Ra=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&n(this.element,this.evEl,this.domHandler),this.evTarget&&n(this.target,this.evTarget,this.domHandler),this.evWin&&n(w(this.element),this.evWin,this.domHandler)}};var Sa={mousedown:Ea,mousemove:Fa,mouseup:Ga},Ta="mousedown",Ua="mousemove mouseup";i(L,x,{handler:function(a){var b=Sa[a.type];b&Ea&&0===a.button&&(this.pressed=!0),b&Fa&&1!==a.which&&(b=Ga),this.pressed&&(b&Ga&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:Ba,srcEvent:a}))}});var Va={pointerdown:Ea,pointermove:Fa,pointerup:Ga,pointercancel:Ha,pointerout:Ha},Wa={2:za,3:Aa,4:Ba,5:Ca},Xa="pointerdown",Ya="pointermove pointerup pointercancel";a.MSPointerEvent&&!a.PointerEvent&&(Xa="MSPointerDown",Ya="MSPointerMove MSPointerUp MSPointerCancel"),i(M,x,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms",""),e=Va[d],f=Wa[a.pointerType]||a.pointerType,g=f==za,h=r(b,a.pointerId,"pointerId");e&Ea&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Ga|Ha)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Za={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},$a="touchstart",_a="touchstart touchmove touchend touchcancel";i(N,x,{handler:function(a){var b=Za[a.type];if(b===Ea&&(this.started=!0),this.started){var c=O.call(this,a,b);b&(Ga|Ha)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}}});var ab={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},bb="touchstart touchmove touchend touchcancel";i(P,x,{handler:function(a){var b=ab[a.type],c=Q.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}});var cb=2500,db=25;i(R,x,{handler:function(a,b,c){var d=c.pointerType==za,e=c.pointerType==Ba;if(!(e&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(d)S.call(this,b,c);else if(e&&U.call(this,c))return;this.callback(a,b,c)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var eb=u(na.style,"touchAction"),fb=eb!==d,gb="compute",hb="auto",ib="manipulation",jb="none",kb="pan-x",lb="pan-y",mb=X();V.prototype={set:function(a){a==gb&&(a=this.compute()),fb&&this.manager.element.style&&mb[a]&&(this.manager.element.style[eb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,(function(b){k(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))})),W(a.join(" "))},preventDefaults:function(a){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=p(d,jb)&&!mb[jb],f=p(d,lb)&&!mb[lb],g=p(d,kb)&&!mb[kb];if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}return g&&f?void 0:e||f&&c&Na||g&&c&Oa?this.preventSrc(b):void 0},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var nb=1,ob=2,pb=4,qb=8,rb=qb,sb=16,tb=32;Y.prototype={defaults:{},set:function(a){return la(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=_(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=_(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=_(a,this),-1===r(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=_(a,this);var b=r(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;qb>d&&b(c.options.event+Z(d)),b(c.options.event),a.additionalEvent&&b(a.additionalEvent),d>=qb&&b(c.options.event+Z(d))},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=tb)},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(tb|nb)))return!1;a++}return!0},recognize:function(a){var b=la({},a);return k(this.options.enable,[this,b])?(this.state&(rb|sb|tb)&&(this.state=nb),this.state=this.process(b),void(this.state&(ob|pb|qb|sb)&&this.tryEmit(b))):(this.reset(),void(this.state=tb))},process:function(a){},getTouchAction:function(){},reset:function(){}},i(aa,Y,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&(ob|pb),e=this.attrTest(a);return d&&(c&Ha||!e)?b|sb:d||e?c&Ga?b|qb:b&ob?b|pb:ob:tb}}),i(ba,aa,{defaults:{event:"pan",threshold:10,pointers:1,direction:Pa},getTouchAction:function(){var a=this.options.direction,b=[];return a&Na&&b.push(lb),a&Oa&&b.push(kb),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(b.direction&Na?(e=0===f?Ia:0>f?Ja:Ka,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Ia:0>g?La:Ma,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return aa.prototype.attrTest.call(this,a)&&(this.state&ob||!(this.state&ob)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=$(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i(ca,aa,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&ob)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(da,Y,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[hb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Ga|Ha)&&!f)this.reset();else if(a.eventType&Ea)this.reset(),this._timer=e((function(){this.state=rb,this.tryEmit()}),b.time,this);else if(a.eventType&Ga)return rb;return tb},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===rb&&(a&&a.eventType&Ga?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=ra(),this.manager.emit(this.options.event,this._input)))}}),i(ea,aa,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&ob)}}),i(fa,aa,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Na|Oa,pointers:1},getTouchAction:function(){return ba.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Na|Oa)?b=a.overallVelocity:c&Na?b=a.overallVelocityX:c&Oa&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&qa(b)>this.options.velocity&&a.eventType&Ga},emit:function(a){var b=$(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(ga,Y,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ib]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,f=a.deltaTime<b.time;if(this.reset(),a.eventType&Ea&&0===this.count)return this.failTimeout();if(d&&f&&c){if(a.eventType!=Ga)return this.failTimeout();var g=this.pTime?a.timeStamp-this.pTime<b.interval:!0,h=!this.pCenter||H(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,h&&g?this.count+=1:this.count=1,this._input=a;var i=this.count%b.taps;if(0===i)return this.hasRequireFailures()?(this._timer=e((function(){this.state=rb,this.tryEmit()}),b.interval,this),ob):rb}return tb},failTimeout:function(){return this._timer=e((function(){this.state=tb}),this.options.interval,this),tb},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==rb&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ha.VERSION="2.0.7",ha.defaults={domEvents:!1,touchAction:gb,enable:!0,inputTarget:null,inputClass:null,preset:[[ea,{enable:!1}],[ca,{enable:!1},["rotate"]],[fa,{direction:Na}],[ba,{direction:Na},["swipe"]],[ga],[ga,{event:"doubletap",taps:2},["tap"]],[da]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var ub=1,vb=2;ia.prototype={set:function(a){return la(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?vb:ub},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&rb)&&(e=b.curRecognizer=null);for(var f=0;f<d.length;)c=d[f],b.stopped===vb||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(ob|pb|qb)&&(e=b.curRecognizer=c),f++}},get:function(a){if(a instanceof Y)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(f(a,"add",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(f(a,"remove",this))return this;if(a=this.get(a)){var b=this.recognizers,c=r(b,a);-1!==c&&(b.splice(c,1),this.touchAction.update())}return this},on:function(a,b){if(a!==d&&b!==d){var c=this.handlers;return g(q(a),(function(a){c[a]=c[a]||[],c[a].push(b)})),this}},off:function(a,b){if(a!==d){var c=this.handlers;return g(q(a),(function(a){b?c[a]&&c[a].splice(r(c[a],b),1):delete c[a]})),this}},emit:function(a,b){this.options.domEvents&&ka(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&ja(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},la(ha,{INPUT_START:Ea,INPUT_MOVE:Fa,INPUT_END:Ga,INPUT_CANCEL:Ha,STATE_POSSIBLE:nb,STATE_BEGAN:ob,STATE_CHANGED:pb,STATE_ENDED:qb,STATE_RECOGNIZED:rb,STATE_CANCELLED:sb,STATE_FAILED:tb,DIRECTION_NONE:Ia,DIRECTION_LEFT:Ja,DIRECTION_RIGHT:Ka,DIRECTION_UP:La,DIRECTION_DOWN:Ma,DIRECTION_HORIZONTAL:Na,DIRECTION_VERTICAL:Oa,DIRECTION_ALL:Pa,Manager:ia,Input:x,TouchAction:V,TouchInput:P,MouseInput:L,PointerEventInput:M,TouchMouseInput:R,SingleTouchInput:N,Recognizer:Y,AttrRecognizer:aa,Tap:ga,Pan:ba,Swipe:fa,Pinch:ca,Rotate:ea,Press:da,on:m,off:n,each:g,merge:ta,extend:sa,assign:la,inherit:i,bindFn:j,prefixed:u});var wb="undefined"!=typeof a?a:"undefined"!=typeof self?self:{};wb.Hammer=ha,"function"==typeof define&&define.amd?define((function(){return ha})):"undefined"!=typeof module&&module.exports?module.exports=ha:a[c]=ha}(window,document,"Hammer");"use strict";$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:false,enableSort:true,filtermode:"",filteronkeypress:false,activeRow:undefined,height:"100%",showHeader:true,selectFirstRow:false,showNewRow:true,showRowIndex:false,enableRowSelection:true,enableColumnSelection:false,multiselect:false,filterNullRecords:true,navigation:"",isdynamictable:"",cssClassNames:{tableRow:"app-datagrid-row",headerCell:"app-datagrid-header-cell",groupHeaderCell:"app-datagrid-group-header-cell",tableCell:"app-datagrid-cell",grid:"",gridDefault:"table",gridBody:"app-datagrid-body",gridFooter:"app-datagrid-footer",deleteRow:"danger",ascIcon:"wi wi-long-arrow-up",descIcon:"wi wi-long-arrow-down",selectedColumn:"selected-column",rowExpandIcon:"wi wi-minus-square",rowCollapseIcon:"wi wi-plus-square",gridRowExpansionClass:"table-row-expansion",expandedRowClass:"expanded"},dataStates:{loading:"Loading...",ready:"",error:"An error occurred in loading the data.",nodata:"No data found."},messages:{selectField:"Select Field"},loadingicon:"",startRowIndex:1,editmode:"",actionsEnabled:{edit:true,new:true},rowExpansionEnabled:false,rowDef:{position:"0",closeothers:false,columnwidth:"30px"},summaryRow:false,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:false,searchable:false,resizable:false,selectable:false,readonly:true,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:true,show:true},radio:{field:"radio",type:"custom",displayName:"",sortable:false,searchable:false,resizable:false,selectable:false,readonly:true,style:"width: 50px; text-align: center;",textAlignment:"center",show:true},__expand:{field:"__expand",type:"custom",displayName:"",sortable:false,searchable:false,resizable:false,selectable:false,readonly:true,style:"text-align: center;",textAlignment:"center",show:true,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:false,searchable:false,selectable:false,readonly:true,style:"text-align: left;",textAlignment:"left",show:true}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)},isDefined:function(value){return value!==undefined},isObject:function(value){return value!==null&&typeof value==="object"},getObjectIndex:function(data,obj){var matchIndex=-1;if(!Array.isArray(data)){return-1}data.some((function(data,index){if(_.isEqual(data,obj)){matchIndex=index;return true}}));return matchIndex},generateGuid:function(){var random=this.random;return random()+random()+"-"+random()+"-"+random()+"-"+random()+"-"+random()+random()+random()},isValidHtml:function(htm){var validHtmlRegex=/<[a-z][\s\S]*>/i;return validHtmlRegex.test(htm)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(event){return this.isMac()&&event.which===8||event.which===46}},_setStyles:function($el,styleString){if(!styleString){return}var styles=styleString.split(";");styles.forEach((function(styleBit){var parts=styleBit.split(":");var property,value;if(parts.length===2){property=parts[0].trim();value=parts[1].trim();$el.css(property,value)}}));return styleString},_getColumnSortDirection:function(field){var sortInfo=this.options.sortInfo;return field===sortInfo.field?sortInfo.direction:""},_toggleSpacingClasses:function(value){switch(value){case"normal":this.tableContainer.removeClass("table-condensed");if(this.gridSearch){this.gridSearch.find(".form-group").removeClass("form-group-sm");this.gridSearch.find("select").removeClass("input-sm");this.gridSearch.find(".input-group").removeClass("input-group-sm")}break;case"condensed":this.tableContainer.addClass("table-condensed");if(this.gridSearch){this.gridSearch.find(".form-group").addClass("form-group-sm");this.gridSearch.find("select").addClass("input-sm");this.gridSearch.find(".input-group").addClass("input-group-sm")}break}},_getColSpan:function(cols){var colSpan=0,self=this;_.forEach(cols,(function(col){var colDef;if(col.isGroup){colSpan+=self._getColSpan(col.columns)}else{colDef=_.find(self.preparedHeaderData,{field:col.field});colSpan=!_.isUndefined(colDef.show)&&!colDef.show?colSpan:colSpan+1}}));return colSpan},_setColSpan:function(config){var self=this;_.forEach(config,(function(col){if(col.isGroup){col.colspan=self._getColSpan(col.columns);self.gridHeaderElement.find('th[data-col-group="'+col.field+'"]').attr("colspan",col.colspan);self._setColSpan(col.columns)}}))},_getHeaderTemplate:function(){var $colgroup=$("<colgroup></colgroup>"),$htm=this.gridHeaderElement.empty(),isDefined=this.Utils.isDefined,sortInfo=this.options.sortInfo,sortField=sortInfo.field,self=this,rowTemplates=[],headerConfig=this.options.headerConfig,headerGroupClass=self.options.cssClassNames.groupHeaderCell,$row;function generateHeaderCell(value,index){var id=index,field=value.field,headerLabel=self.Utils.isDefined(value.displayName)?value.displayName:field||"",titleLabel=headerLabel,sortEnabled=self.options.enableSort&&(_.isUndefined(value.show)||value.show)&&(_.isUndefined(value.sortable)||value.sortable),headerClasses=self.options.cssClassNames.headerCell,sortClass,tl="",$th,$col,$sortSpan,$sortIcon;headerLabel=!self.Utils.isDefined(headerLabel)||headerLabel===""?"&nbsp;":headerLabel;$col=$("<col/>");if(value.style){self._setStyles($col,value.style)}$colgroup.append($col);if(isDefined(value.class)){headerClasses+=" "+value.class}if(value.selected){headerClasses+=" "+self.options.cssClassNames.selectedColumn+" "}if(field==="checkbox"||field==="radio"){headerClasses+=" grid-col-small"}tl+="<th";if((_.isUndefined(value.resizable)||value.resizable)&&(_.isUndefined(value.show)||value.show)){tl+=" data-col-resizable"}if(self.options.enableColumnSelection&&(_.isUndefined(value.selectable)||value.selectable)){tl+=" data-col-selectable"}if(sortEnabled){tl+=" data-col-sortable"}tl+="></th>";$th=$(tl);$th.attr({"data-col-id":id,"data-col-field":field,title:titleLabel});self._setStyles($th,"text-align: "+value.textAlignment);$th.addClass(headerClasses);if(field==="checkbox"){$th.append('<input type="checkbox" />')}$th.append('<span class="header-data">'+headerLabel+"</span>");if(sortEnabled){$sortSpan=$('<span class="sort-buttons-container"></span>');$sortIcon=$('<i class="sort-icon"></i>');if(sortField&&sortField===value.field&&sortInfo.direction){sortClass=sortInfo.direction==="asc"?self.options.cssClassNames.ascIcon:self.options.cssClassNames.descIcon;$sortSpan.addClass("active");$sortIcon.addClass(sortClass+" "+sortInfo.direction)}$th.append($sortSpan.append($sortIcon))}return $th}function generateRow(cols,i){var $thList=[];_.forEach(cols,(function(col){var index,value,classes,styles,$groupTl;if(col.columns&&col.columns.length){$groupTl=$("<th></th>");classes=headerGroupClass+" "+(col.class||"");styles="text-align: "+col.textAlignment+";background-color: "+(col.backgroundColor||"")+";";$groupTl.attr({"data-col-group":col.field,class:classes,title:col.displayName});self._setStyles($groupTl,styles);$groupTl.append('<span class="header-data">'+col.displayName+"</span>");$thList.push($groupTl);generateRow(col.columns,i+1)}else{index=_.findIndex(self.preparedHeaderData,{field:col.field});value=self.preparedHeaderData[index];if(value){$thList.push(generateHeaderCell(value,index))}}}));rowTemplates[i]=rowTemplates[i]||[];rowTemplates[i]=rowTemplates[i].concat($thList)}if(_.isEmpty(headerConfig)){$row=$("<tr></tr>");self.preparedHeaderData.forEach((function(value,index){$row.append(generateHeaderCell(value,index))}));$htm.append($row)}else{generateRow(headerConfig,0);rowTemplates.forEach((function($thList,index){$row=$('<tr role="row" tabindex="0"></tr>');var rowSpan=rowTemplates.length-index;$thList.forEach((function($th){if(rowSpan>1&&$th.hasClass("app-datagrid-header-cell")){$th.attr("rowspan",rowSpan)}$row.append($th)}));$htm.append($row)}))}return{colgroup:$colgroup,header:$htm}},_getSearchEl:function(){var htm,sel='<select name="wm-datatable" data-element="dgFilterValue" '+'class="form-control app-select">'+'<option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",searchLabel=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(colDef,index){if(colDef.field!=="none"&&colDef.field!=="rowOperations"&&colDef.searchable&&_.toString(colDef.showinfilter)!=="false"){sel+='<option value="'+colDef.field+'" data-coldef-index="'+index+'">'+(colDef.displayName||colDef.field)+"</option>"}}));sel+="</select>";htm='<form class="form-search form-inline" onsubmit="return false;"><div class="form-group">'+'<input type="text" data-element="dgSearchText" class="form-control app-textbox" value="" placeholder="'+searchLabel+'"/>'+'</div><div class="input-append input-group">'+sel+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+searchLabel+'">'+'<i class="wi wi-search"></i>'+"</button></span>"+"</div>"+"</div></form>";var $htm=$(htm);this._setStyles($htm.find('[data-element="dgSearchText"]'),"display: inline-block;");return $htm},_appendRowExpansionButtons:function($htm){var self=this;$htm.find("[data-identifier='rowExpansionButtons']").each((function(index){var _rowData,$row,rowId,rowIndex=index;$row=$(this).closest("tr.app-datagrid-row");rowId=parseInt($row.attr("data-row-id"),10);_rowData=_.clone(self.options.data[rowId]);_rowData.$index=rowIndex+1;self.options.generateRowExpansionCell(_rowData,rowIndex);$(this).empty().append(self.options.getRowExpansionAction(rowIndex))}))},setSummaryRowDef:function(key,data,rowIndex,refreshIndicator){this.options.summaryRow=true;if(this.options.summaryRowDefs[rowIndex]==undefined){this.options.summaryRowDefs[rowIndex]={};this.options.summaryRowDefsObject[rowIndex]={}}this.options.summaryRowDefsObject[rowIndex][key]=data;this.options.summaryRowDefs[rowIndex][key]=data&&data.value?data.value:data;if(refreshIndicator)this.refreshGridData()},_getSummaryRowTemplate:function(){var self=this,$tfoot=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');this._setStyles($tfoot,"border-top: 3px solid #eee;");_.forEach(this.options.summaryRowDefs,(function(row,index){row.$$pk=index;$tfoot.append(self._getRowTemplate(row,index,true))}));return $tfoot},getPageStartIndex:function(){var currentPage=this.options.getCurrentPage(),pagesize=this.options.getPageSize();var isPrevPageUpdated=this.options.actionRowPage<currentPage;var pageIndex=isPrevPageUpdated?this.options.actionRowPage:currentPage;return(pageIndex-1)*pagesize},_getPreparedDataForInfiniteScroll:function($tbody,preparedData){preparedData=preparedData.filter((function(row,index){var isExists=$tbody.find("tr.app-datagrid-row[data-row-id="+row.$$pk+"]");if(!isExists.length){return row}}));return preparedData},_updateTrData:function($tbody){var editedRow,updatedRowData,self=this;editedRow=$tbody.find("tr.app-datagrid-row[data-row-id="+self.options.actionRowIndex+"]");updatedRowData=self.preparedData[self.options.actionRowIndex];self.options.generateCustomExpressions(updatedRowData,self.options.actionRowIndex);var rowTemplate=self._getRowTemplate(updatedRowData,self.options.actionRowIndex);editedRow.replaceWith(rowTemplate[0])},_handleCRUDForInfiniteScroll:function($tbody){var self=this;if((self.options.lastActionPerformed===self.options.ACTIONS.SEARCH_OR_SORT||self.options.lastActionPerformed===self.options.ACTIONS.FILTER_CRITERIA||self.options.lastActionPerformed===self.options.ACTIONS.DATASET_UPDATE)&&(self.options.isSearchTrigerred||self.options.isDatasetUpdated||self.options.isDataUpdatedByUser)){$tbody.html("");if(this.options.navigation==="On-Demand"&&!this.options.isLastPage)this.element.find(".on-demand-datagrid").show();self.options.clearCustomExpression();self.options.clearRowDetailExpression();self.options.setIsSearchTrigerred(false);self.options.setIsDatasetUpdated(false)}else if(self.options.lastActionPerformed===self.options.ACTIONS.EDIT&&self.options.actionRowIndex!==undefined&&self.options.editmode!==this.CONSTANTS.QUICK_EDIT){self._updateTrData($tbody)}},_getGridTemplate:function(){var self=this,preparedData,$tbody,pageStartIndex=self.getPageStartIndex(),startRowIndex=self.options.startRowIndex,isScrollorOnDemand=self.options.isNavTypeScrollOrOndemand();if(isScrollorOnDemand){$tbody=this.gridElement;if(this.renderTableOnViewLess){$tbody=this.gridElement.empty();this.hideLoadingIndicator();this.renderTableOnViewLess=false}}else{$tbody=this.gridElement.empty()}if(isScrollorOnDemand){this._handleCRUDForInfiniteScroll($tbody);if(self.options.lastActionPerformed===self.options.ACTIONS.DELETE){startRowIndex=self.options.actionRowIndex+1}preparedData=this._getPreparedDataForInfiniteScroll($tbody,this.preparedData.slice(pageStartIndex))}else{this.options.clearCustomExpression();this.options.clearRowDetailExpression();preparedData=this.preparedData}_.forEach(preparedData,(function(row,index){var _row=_.clone(row),rowIndex=isScrollorOnDemand?startRowIndex+index-1:index,rowTemplate;_row.$index=rowIndex+1;self.options.generateCustomExpressions(_row,rowIndex);self.options.registerRowNgClassWatcher(_row,rowIndex);rowTemplate=self._getRowTemplate(row,rowIndex);$tbody.append(rowTemplate);if(self.options.rowExpansionEnabled){var rowHeight=self.options.rowDef.height;var rowPosition=self.options.rowDef.position;var colSpanLength=_.filter(self.preparedHeaderData,(function(c){return c.show})).length-1;var $tr=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+row.$$pk+'"><td></td><td colspan="'+colSpanLength+'" class="app-datagrid-row-details-cell">'+'<div class="row-overlay"><div class="row-status"><i class="'+self.options.loadingicon+'"></i></div></div><div class="details-section"></div>'+"</td></tr>");if(rowPosition==="-1"){$tr=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+row.$$pk+'"><td colspan="'+colSpanLength+'" class="app-datagrid-row-details-cell">'+'<div class="row-overlay"><div class="row-status"><i class="'+self.options.loadingicon+'"></i></div></div><div class="details-section"></div>'+"</td><td></td></tr>")}if(rowHeight){$tr.find("div.row-overlay").css("min-height",rowHeight)}$tr.css("display","none");$tr.find(".details-section").css("display","none");$tbody.append($tr)}}));if(!this.options.isdynamictable){this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT);this.options.setIsDataUpdatedByUser(false);this.options.clearActionRowIndex()}return $tbody},_getRowTemplate:function(row,rowIndex,summaryRow){var $htm,self=this,gridOptions=self.options;$htm=$('<tr role="row" tabindex="0" class="'+gridOptions.cssClassNames.tableRow+" "+(gridOptions.rowClass||"")+'" data-row-id="'+row.$$pk+'"></tr>');this.preparedHeaderData.forEach((function(current,colIndex){$htm.append(self._getColumnTemplate(row,colIndex,current,rowIndex,summaryRow))}));return $htm},_getRowActionsColumnDefIndex:function(){var i,len=this.preparedHeaderData.length;for(i=0;i<len;i+=1){if(this.preparedHeaderData[i].field==="rowOperations"){return i}}return-1},_getRowActionsColumnDef:function(){var index=this._getRowActionsColumnDefIndex();if(index!==-1){return this.preparedHeaderData[index]}return null},_getCheckboxTemplate:function(row,isMultiSelectCol){var checked=row._checked===true?" checked":"",disabled=row.disabed?" disabled":"",chkBoxName=isMultiSelectCol?"gridMultiSelect":"";return'<input name="'+chkBoxName+'" type="checkbox"'+checked+disabled+"/>"},_getRadioTemplate:function(row){var checked=row._checked===true?" checked":"",disabled=row.disabed?" disabled":"";return'<input type="radio" rowSelectInput name="" value=""'+checked+disabled+"/>"},_getColumnTemplate:function(row,colId,colDef,rowIndex,summaryRow){var $htm,columnValue,columnValueObject,cellPreloader='<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',customExpressionHtml,innerTmpl,classes=this.options.cssClassNames.tableCell+" "+(colDef.class||""),colExpression=colDef.customExpression,styles="text-align: "+colDef.textAlignment+";position: relative;";$htm=$('<td class="'+classes+'" data-col-id="'+colId+'" role="cell"></td>');this._setStyles($htm,styles);columnValue=_.get(row,colDef.field);if(summaryRow){columnValueObject=this.options.summaryRowDefsObject[rowIndex][colDef.field];if(columnValueObject instanceof Object){if(columnValueObject.class){$htm.addClass(columnValueObject.class)}}if(columnValue instanceof Promise){customExpressionHtml=cellPreloader;$htm.html(customExpressionHtml)}else{innerTmpl=_.isUndefined(columnValue)||columnValue===null?"":columnValue;$htm.html(innerTmpl)}}else if(colExpression){$htm.html(this.options.getCustomExpression(colDef.field,rowIndex))}else{if(colDef.type!=="custom"){columnValue=_.get(row,colDef.field);if(this.options.filterNullRecords&&columnValue===null||_.isUndefined(columnValue)){columnValue=""}$htm.attr("title",columnValue);$htm.text(""+columnValue)}else{switch(colDef.field){case"checkbox":innerTmpl=this._getCheckboxTemplate(row,colDef.isMultiSelectCol);break;case"__expand":innerTmpl='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":innerTmpl=this._getRadioTemplate(row);break;case"rowOperations":innerTmpl='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":innerTmpl=row.$$index;break;case"none":innerTmpl="";break;default:innerTmpl=_.isUndefined(columnValue)||columnValue===null?"":columnValue}$htm.html(innerTmpl)}}row.$index=rowIndex+1;this.options.registerColNgClassWatcher(row,colDef,rowIndex,colId);return $htm},_getEventTemplate:function(colDef){var events=_.filter(_.keys(colDef),(function(key){return _.startsWith(key,"on")})),changeEvt,template="";changeEvt=colDef.editWidgetType==="autocomplete"?"onSubmit":"onChange";events=_.union(events,[changeEvt]);_.forEach(events,(function(eventName){template+=" "+_.kebabCase(eventName)+'="';if(eventName==="onSubmit"||eventName==="onChange"){template+="_"+eventName+"Field($event, $scope, newVal, oldVal);"}template+=(colDef[eventName]||"")+'" '}));return template},_insertFieldInHeaderConfig:function(headerConfig,fieldName,position){var index=_.findIndex(headerConfig,{field:position}),self=this;if(index===-1){_.forEach(headerConfig,(function(config){if(config.isGroup){self._insertFieldInHeaderConfig(config.columns,fieldName,position)}}))}else{headerConfig.splice(index+1,0,{field:fieldName,isPredefined:true})}},setHeaderConfigForDefaultFields:function(name,position){if(_.isEmpty(this.options.headerConfig)){return}var fieldName=this.customColumnDefs[name].field;_.remove(this.options.headerConfig,{field:fieldName});if(position==="0"){this.options.headerConfig.unshift({field:fieldName,isPredefined:true})}else if(position==="-1"){this.options.headerConfig.push({field:fieldName,isPredefined:true})}else{this._insertFieldInHeaderConfig(this.options.headerConfig,fieldName,position)}},setDefaultColsData:function(header){if(_.isEmpty(this.preparedHeaderData)){return}var rowExpandPosition,rowExpandCol;if(this.options.rowExpansionEnabled){rowExpandPosition=this.options.rowDef.position;rowExpandCol=_.clone(this.customColumnDefs.__expand);rowExpandCol.width=this.options.rowDef.columnwidth;if(header){if(rowExpandPosition==="-1"){this.preparedHeaderData.push(rowExpandCol)}else if(rowExpandPosition==="0"){this.preparedHeaderData.unshift(rowExpandCol)}else{var index=_.findIndex(this.preparedHeaderData,{field:rowExpandPosition});this.preparedHeaderData.splice(index+1,0,rowExpandCol)}}this.setHeaderConfigForDefaultFields("__expand",rowExpandPosition)}if(this.options.showRowIndex){if(header){this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex)}this.setHeaderConfigForDefaultFields("rowIndex","0")}if(this.options.multiselect){if(header){this.preparedHeaderData.unshift(this.customColumnDefs.checkbox)}this.setHeaderConfigForDefaultFields("checkbox","0")}if(!this.options.multiselect&&this.options.showRadioColumn){if(header){this.preparedHeaderData.unshift(this.customColumnDefs.radio)}this.setHeaderConfigForDefaultFields("radio","0")}},_prepareHeaderData:function(){this.preparedHeaderData=[];$.extend(this.preparedHeaderData,this.options.colDefs);this.setDefaultColsData(true)},_generateCustomColDefs:function(){var colDefs=[],generatedColDefs={};function generateColumnDef(key){if(!generatedColDefs[key]){var colDef={type:"string",field:key};colDefs.push(colDef);generatedColDefs[key]=true}}this.options.data.forEach((function(item){_.keys(item).forEach(generateColumnDef)}));this.options.colDefs=colDefs;this._prepareHeaderData()},_prepareData:function(){var data=[],colDefs=this.options.colDefs,self=this,gridData=[],pageStartIndex=self.getPageStartIndex(),isObject=this.Utils.isObject,isDefined=this.Utils.isDefined;if(!this.options.colDefs.length&&this.options.data.length){this._generateCustomColDefs()}gridData=this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(pageStartIndex):this.options.data;gridData.forEach((function(item,i){var rowData=$.extend(true,{},item);colDefs.forEach((function(colDef){if(!colDef.field){return}var fields=colDef.field.split("."),text=item,j,len=fields.length,key,isArray;for(j=0;j<len;j++){key=fields[j];isArray=undefined;if(key.indexOf("[0]")!==-1){key=key.replace("[0]","");isArray=true}if(isObject(text)&&!isArray){text=_.get(text,key)}else if(isArray){text=_.get(text,key+"[0]")}else{text=undefined;break}}if(isDefined(text)){rowData[colDef.field]=text}else if(fields.length>1&&_.has(item,colDef.field)){rowData[colDef.field]=item[colDef.field]}}));rowData.$$index=pageStartIndex+i+1;rowData.$$pk=self.options.isNavTypeScrollOrOndemand()?pageStartIndex+i:i;data.push(rowData)}));if(self.options.isNavTypeScrollOrOndemand()){if(self.options.isSearchTrigerred&&!self.emptySearch||self.options.isDatasetUpdated){self.preparedData=data}else if(self.preparedData.length){data.forEach((function(rowData,index){var rowId=pageStartIndex+index;if(self.preparedData[rowId]&&rowData.$$index===self.preparedData[rowId].$$index){self.preparedData[rowId]=rowData}else{self.preparedData.push(rowData)}}))}else{self.preparedData.push(...data)}}else{self.preparedData=data}},_reselectColumns:function(){var selectedColumns=[],self=this;if(this.gridHeaderElement&&this.options.enableColumnSelection){selectedColumns=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn);if(selectedColumns.length){selectedColumns.each((function(){self.columnSelectionHandler(undefined,$(this))}))}}if(this.options.multiselect){this.updateSelectAllCheckboxState()}},_create:function(){$.extend(this,{dataStatus:{message:"",state:"ready"},preparedData:[],preparedHeaderData:[],dataStatusContainer:null,gridContainer:null,gridElement:null,gridHeader:null,gridBody:null,columnClickInfo:{},gridFooter:null,gridSearch:null,tableId:null,searchObj:{field:"",value:"",event:null},compiledCellTemplates:{}});this._setStatus=_.debounce((function(isCreated){this.__setStatus(isCreated)}),100);this._debounceOnEnter=_.debounce((function($target,$row,quickEdit,event){this._onEnter($target,$row,quickEdit,event)}),150);this.options.summaryRow=false;this.options.summaryRowDefs=[];this._prepareHeaderData();this._prepareData();this._render(true)},_setGridEditMode:function(val){if(_.isFunction(this.options.setGridEditMode)){this.options.setGridEditMode(val)}},_refreshGrid:function(){this._prepareHeaderData();this._prepareData();this._render();this.addOrRemoveScroll();this._setGridEditMode(false)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout);this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var $alwaysNewRow=this.gridElement.find("> tr.app-datagrid-row.always-new-row");if($alwaysNewRow.length){$alwaysNewRow.remove()}this._renderGrid(undefined)},refreshGridData:function(){this._prepareData();if(!this.options.isNavTypeScrollOrOndemand()){this.gridFooter.remove();this._renderGrid()}else{this.callRenderGridForInfiniteScroll()}this._reselectColumns();this.addOrRemoveScroll();this._setGridEditMode(false);this.toggleNewRowActions(false)},setDefaultRowData:function(rowData){_.forEach(this.preparedHeaderData,(function(colDef){rowData[colDef.field]=colDef.defaultvalue}))},addNewRow:function(skipFocus,alwaysNewRow){var rowId=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,self=this,rowData={},$row,$gridBody,$alwaysNewRow;if(!alwaysNewRow&&_.isFunction(this.options.beforeRowInsert)){this.options.beforeRowInsert()}$gridBody=this.gridElement;$alwaysNewRow=$gridBody.find("> tr.app-datagrid-row.always-new-row");if($alwaysNewRow.length){this.setFocusOnElement(undefined,$alwaysNewRow);if(this.options.editmode===this.CONSTANTS.QUICK_EDIT){var $qTarget=$alwaysNewRow.find("input").length>0?$($alwaysNewRow.find("input")[0]):null;if($qTarget!==null){var event=$.Event("keydown");event.which=13;$qTarget.trigger(event)}}return}rowData.$index=rowId;rowData.$$pk=rowId;if(this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG){$row=$(this._getRowTemplate(rowData,rowData.$index));if(!this.preparedData.length){this.setStatus("ready",this.dataStatus.ready)}if(this.options.formPosition==="top"){$gridBody.prepend($row)}else{$gridBody.append($row)}this._appendRowActions($row,true,rowData);this.attachEventHandlers($row);if(alwaysNewRow||this.options.editmode!==this.CONSTANTS.QUICK_EDIT){$row.find(".delete-row-button").hide();if(alwaysNewRow){$row.find(".edit-row-button").hide()}}this._findAndReplaceCompiledTemplates();if(alwaysNewRow){this.setDefaultRowData(rowData);$row.addClass("always-new-row").addClass("row-editing");this.options.runInNgZone((function(){self.makeRowEditable($row,rowData,true)}))}else{$row.trigger("click",[undefined,{action:"edit",operation:"new",skipFocus:skipFocus}])}this.updateSelectAllCheckboxState();this.addOrRemoveScroll();this.options.timeoutCall((function(){self.setColGroupWidths()}),100)}},addLoadMoreBtn:function(onDemandMsg,loadingdatamsg,cb,infScroll){var $btnEl;if(!this.options.isLastPage||infScroll){var self=this;var $parenEl=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');$btnEl=$parenEl.find("a");$btnEl.append(onDemandMsg);this.element.find(".app-grid-header-inner").append($parenEl);if(infScroll){if(this.element.find(".on-demand-load-btn").length){this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage)}}$btnEl.on("click",(function(e){var lastPage=self.options.getCurrentPage()==self.options.getPageCount();if(!lastPage){self.showLoadingIndicator(loadingdatamsg,false)}if(!self.options.showviewlessbutton){$btnEl.hide()}if(infScroll){if(lastPage){self.element.find(".on-demand-datagrid").remove()}}if(lastPage&&self.options.showviewlessbutton){$btnEl.hide();self.renderTableOnViewLess=true;self.renderPaginationOnViewLess=true;self.options.enableNavigation();self._renderGrid()}if(cb&&typeof cb==="function"){cb(e)}}))}},showLoadingIndicator:function(loadingdatamsg,infScroll){var hasLoadingEl=this.element.find(".loading-data-msg");var $dataGrid=this.element.find(".on-demand-datagrid");if(hasLoadingEl.length&&!infScroll){hasLoadingEl.show()}else if(infScroll&&$dataGrid.length){$dataGrid.show()}else{var $loadingEl=$('<div class="loading-data-msg spin-icon-in-center"><span><i class="app-icon panel-icon fa-spin '+this.options.loadingicon+'"></i>'+'<span class="sr-only">Loading</span><span class="loading-text"></span></span></div>');$loadingEl.find(".loading-text").html(loadingdatamsg);if($dataGrid.length){$dataGrid.append($loadingEl)}else{var gridEl=$('<div class="on-demand-datagrid">'+$loadingEl[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(gridEl)}}},hideLoadingIndicator:function(showLoadBtn,infScroll){if(!showLoadBtn&&!infScroll){this.element.find(".loading-data-msg").hide();this.element.find(".on-demand-load-btn").text(this.options.ondemandmessage);this.element.find(".on-demand-load-btn").show()}else if(this.options.getCurrentPage()==this.options.getPageCount()&&this.options.showviewlessbutton){this.element.find(".on-demand-load-btn").show().text(this.options.viewlessmessage);this.element.find(".loading-data-msg").hide();if(infScroll){if(!this.element.find(".on-demand-load-btn").length){this.options.addLoadMoreBtn()}this.element.find(".loading-data-msg").hide()}}else{this.element.find(".on-demand-datagrid").hide()}},getSelectedRows:function(){this.getSelectedColumns();var selectedRowsData=[],self=this;this.preparedData.forEach((function(data,i){if(data._selected){selectedRowsData.push(self.options.data[i])}}));return selectedRowsData},selectRows:function(rows){var self=this;self.gridElement.find("tr.app-datagrid-row").each((function(index){if(self.preparedData[index]&&self.preparedData[index]._selected===true){$(this).trigger("click",[$(this),{skipSingleCheck:true}])}}));if(_.isArray(rows)){_.forEach(rows,(function(row){self.selectRow(row,true)}))}else{self.selectRow(rows,true)}},toggleRowFilter:function(show){if(this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch){if(show){this.gridSearch.show()}else{this.gridSearch.hide()}}},setColGroupWidths:function(){var self=this,headerCols=this.options.isMobile?this.tableContainer.find("col"):this.tableContainer.find("col"),bodyCols=this.tableContainer.find("col"),headerCells=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),colLength=this.preparedHeaderData.length,scrollLeft=this.gridElement.parent().prop("scrollLeft");if(!headerCols.length&&!headerCells.length){return}this._setColSpan(this.options.headerConfig);this.toggleRowFilter();var definedColWidth=0;var colsLen=headerCols.length;headerCols.each((function(){var eachColWidth=$(this).width();if(eachColWidth){definedColWidth=definedColWidth+eachColWidth;colsLen=colsLen-1}}));headerCells.each((function(){var id=Number($(this).attr("data-col-id")),colDef=self.preparedHeaderData[id],$headerCell=self.gridContainer.find('th[data-col-id="'+id+'"]'),$tdCell=self.gridElement.find('td.app-datagrid-cell[data-col-id="'+id+'"]'),$footCell=self.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+id+'"]'),$headerCol=$(headerCols[id]),$bodyCol=$(bodyCols[id]),definedWidth,width;if(!colDef){return}definedWidth=colDef.width;if(!_.isUndefined(colDef.show)&&!colDef.show){$headerCell.hide();$tdCell.hide();$headerCol.hide();$bodyCol.hide();$footCell.hide()}else{$headerCell.show();$tdCell.show();$headerCol.show();$bodyCol.show();$footCell.show()}if($headerCol.length&&$headerCol[0].style.width==="90px"){width=_.isUndefined(definedWidth)?"":definedWidth;$headerCol.css("width",width);$bodyCol.css("width",width)}}));headerCells.each((function(){var $header=$(this),id=Number($header.attr("data-col-id")),colDef=self.preparedHeaderData[id],definedWidth,width,tempWidth,$headerCol;if(!colDef){return}definedWidth=colDef.width;if(!_.isUndefined(colDef.show)&&!colDef.show){width=0}else{if($header.hasClass("grid-col-small")){width=50}else{if(_.isUndefined(definedWidth)||definedWidth===""||_.includes(definedWidth,"%")){$headerCol=$(headerCols[id]);if($headerCol.length){tempWidth=$headerCol[0].style.width;if(tempWidth===""||tempWidth==="0px"||tempWidth==="90px"||_.includes(tempWidth,"%")){width=$header.width();if(width<=0){var currentNode=$header;var elemWidth=width;var padding=0;while(elemWidth<=0){currentNode=currentNode.parent();elemWidth=currentNode.width();if(currentNode.find("table").length&&currentNode.prop("style")){padding=padding+parseFloat(currentNode.css("padding-left"))+parseFloat(currentNode.css("padding-right"))}}if(elemWidth>0){if(padding){elemWidth=elemWidth-padding}if(_.includes(tempWidth,"%")){var widthPercent=parseInt(tempWidth);var pixelWidth=elemWidth*(widthPercent/100);width=pixelWidth}else{var parentWidth=definedColWidth&&definedColWidth>0?elemWidth-definedColWidth:elemWidth;var totalCols=colsLen?colsLen:headerCols.length;width=parentWidth/totalCols;width=width>90?colLength===id+1?width-17:width:90}}else{width=width>90?colLength===id+1?width-17:width:90}}else{width=width>90?colLength===id+1?width-17:width:90}}else{width=tempWidth}}}else{width=definedWidth}}}$(headerCols[id]).css("width",width);$(bodyCols[id]).css("width",width)}));this.toggleRowFilter(true);this.gridElement.parent().prop("scrollLeft",scrollLeft);this.gridHeaderElement.parent().prop("scrollLeft",scrollLeft)},getSelectedColumns:function(){var selectedColsData={},headerData=[],self=this,multiSelectColIndex,radioColIndex,colIndex;$.extend(headerData,this.preparedHeaderData);if(this.options.multiselect){headerData.some((function(item,i){if(item.field==="checkbox"){multiSelectColIndex=i;return true}}));headerData.splice(multiSelectColIndex,1)}else if(this.options.showRadioColumn){headerData.some((function(item,i){if(item.field==="radio"){radioColIndex=i;return true}}));headerData.splice(radioColIndex,1)}if(this.options.showRowIndex){headerData.some((function(item,i){if(item.field==="rowIndex"){colIndex=i;return true}}));headerData.splice(colIndex,1)}headerData.forEach((function(colDef){var field=colDef.field;if(colDef.selected){selectedColsData[field]={colDef:colDef,colData:self.options.data.map((function(data){return data[field]}))}}}));return selectedColsData},_setOption:function(key,value){this._super(key,value);switch(key){case"showHeader":this._toggleHeader();this._toggleSearch();this.setColGroupWidths();this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":if(this.gridSearch){this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",value);this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",value)}break;case"selectFirstRow":this.selectFirstRow(value);break;case"data":if(!this.isResetSortIconsDone){this.setSortIconDefault()}this.refreshGridData();break;case"dataStates":if(this.dataStatus.state==="nodata"){this.setStatus("nodata",this.dataStatus.nodata)}else if(this.dataStatus.state==="loading"){this.setStatus("loading")}break;case"loadingicon":this.dataStatusContainer.find("i").removeClass().addClass(this.options.loadingicon);break;case"colDefs":if(this.options.isNavTypeScrollOrOndemand()&&this.options.isNextPageData){this.tableContainer.find("colgroup").remove();this._prepareHeaderData();this.setColGroupWidths();this._renderHeader();this._renderSearch();this.attachEventHandlers(this.gridElement);this._reselectColumns();this.addOrRemoveScroll();break}case"multiselect":case"showRadioColumn":case"rowActions":case"filterNullRecords":case"showRowIndex":this.refreshGrid();break;case"cssClassNames":var gridClass=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;if(this.options.rowExpansionEnabled){gridClass=gridClass+" "+this.options.cssClassNames.gridRowExpansionClass}this.tableContainer.attr("class",gridClass);if(this.options.spacing==="condensed"){this._toggleSpacingClasses("condensed")}break;case"spacing":this._toggleSpacingClasses(value);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(value&&value.selectField);break}},getOptions:function(){return this.options},_toggleHeader:function(){if(this.gridHeaderElement){this.gridHeaderElement.empty()}if(this.tableContainer){this.tableContainer.find("colgroup").remove();this.tableContainer.find("thead").remove()}this.setDefaultColsData();if(this.options.showHeader){this._renderHeader()}},_toggleSearch:function(){if(this.gridSearch){this.gridSearch.remove()}if(this.options.filtermode===this.CONSTANTS.SEARCH){this._renderSearch()}else if(this.options.filtermode===this.CONSTANTS.MULTI_COLUMN){this._renderRowFilter();this.setColGroupWidths()}},selectFirstRow:function(value,visible){var $row,id;if(visible&&this.gridElement.find("tr").is(":visible")){this.__setStatus();$row=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()}else{$row=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first()}id=$row.attr("data-row-id");if($row.length&&this.preparedData.length){this.preparedData[id]._selected=!value;$row[0].click()}},selectRow:function(row,value){var rowIndex=_.isNumber(row)?row:this.Utils.getObjectIndex(this.options.data,row),selector,$row;if(rowIndex!==-1){selector="tr.app-datagrid-row[data-row-id="+rowIndex+"]";$row=this.gridElement.find(selector);if($row.length){this.preparedData[rowIndex]._selected=!value}if(value){$row.trigger("click")}else{this.toggleRowSelection($row,value);this.options.callOnRowDeselectEvent(this.preparedData[rowIndex])}}},deselectRow:function(row){this.selectRow(row,false)},toggleRowSelection:function($row,selected,e,isSelectAll){if(!$row.length){return}var rowId=$row.attr("data-row-id"),$checkbox,$radio;if(!this.preparedData[rowId]){return}this.preparedData[rowId]._selected=selected;if(selected){$row.addClass("active")}else{$row.removeClass("active")}if(this.options.showRadioColumn){$radio=$row.find("td input[rowSelectInput]:radio:not(:disabled)");$radio.prop("checked",selected);this.preparedData[rowId]._checked=selected}if(this.options.multiselect){$checkbox=$row.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)');$checkbox.prop("checked",selected);this.preparedData[rowId]._checked=selected;if(!isSelectAll){this.updateSelectAllCheckboxState()}}else{this._deselectPreviousSelection($row,e)}},updateSelectAllCheckboxState:function(){if(!this.options.showHeader||!this.options.multiselect){return}this.__setStatus();var $headerCheckbox=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),$tbody=this.gridElement,checkedItemsLength=$tbody.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,visibleRowsLength=$tbody.find("tr.app-datagrid-row:visible").length;if(!visibleRowsLength){$headerCheckbox.prop("checked",false);return}if(checkedItemsLength===visibleRowsLength){$headerCheckbox.prop("checked",true)}else{$headerCheckbox.prop("checked",false)}},rowClickHandlerOnCapture:function(e,$row,options){if(this.getColInfo(e)&&e.target.type!="checkbox"){return}$row=$row||$(e.target).closest("tr.app-datagrid-row");var gridRow=this.gridElement.find($row);if(gridRow.length&&gridRow.closest("tbody").attr("id")===this.gridElement.attr("id")){var rowId=$row.attr("data-row-id");var rowData=this.preparedData[rowId];var data=this.options.data[rowId];this.options.assignSelectedItems(data,e,{rowId:rowId,_selected:rowData?._selected})}},rowSelectionHandler:function(e,$row,options){if(this.getColInfo(e)&&e.target.type!="checkbox"){return}options=options||{};var rowId,rowData,data,selected,self=this,action=options.action,$target=$(e.target),isQuickEdit=this.options.editmode===this.CONSTANTS.QUICK_EDIT;function callRowSelectionEvents(){if(selected&&_.isFunction(self.options.onRowSelect)){self.options.onRowSelect(data,e)}if(!selected&&_.isFunction(self.options.onRowDeselect)){self.options.onRowDeselect(data,e)}}$row=$row||$target.closest("tr.app-datagrid-row");if(action||isQuickEdit&&($target.hasClass("app-datagrid-cell")||$target.closest("td.app-datagrid-cell").length)&&!$row.hasClass("always-new-row")){options.action=options.action||"edit";if(options.operation==="new"||self.options.actionsEnabled.edit){self.toggleEditRow(e,options)}if(options.skipSelect){return}}rowId=$row.attr("data-row-id");rowData=this.preparedData[rowId];data=this.options.data[rowId];selected=rowData&&rowData._selected||false;if(!options.skipSingleCheck&&($row.hasClass("active")&&!this.options.multiselect||!rowData)){if(!isQuickEdit&&options.operation!=="new"){callRowSelectionEvents()}return}this.options.callOnRowClickEvent(data,e);selected=!selected;this.toggleRowSelection($row,selected,e);callRowSelectionEvents()},rowDblClickHandler:function(e,$row){e.stopPropagation();$row=$row||$(e.target).closest("tr.app-datagrid-row");var rowData,rowId=$row.attr("data-row-id");rowData=this.preparedData[rowId];if(!rowData){return}if(_.isFunction(this.options.onRowDblClick)){this.options.onRowDblClick(rowData,e)}},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(e){var $th=$(e.target).closest("th.app-datagrid-header-cell"),id=$th.attr("data-col-id");this.closePopover();this.options.onHeaderClick(this.preparedHeaderData[id],e)},columnSelectionHandler:function(e,$headerCell){if(e){e.stopImmediatePropagation()}var $th=e?$(e.target).closest("th.app-datagrid-header-cell"):$headerCell,id=$th.attr("data-col-id"),colDef=this.preparedHeaderData[id],field=colDef.field,selector='td[data-col-id="'+id+'"]',$column=this.gridElement.find(selector),selected=$column.data("selected")||false,colInfo={colDef:colDef,data:this.options.data.map((function(data){return data[field]})),sortDirection:this._getColumnSortDirection(colDef.field)},selectedClass=this.options.cssClassNames.selectedColumn;selected=!selected;colDef.selected=selected;$column.data("selected",selected);if(selected){$column.addClass(selectedClass);$th.addClass(selectedClass);if(_.isFunction(this.options.onColumnSelect)&&e){this.options.onColumnSelect(colInfo,e)}}else{$column.removeClass(selectedClass);$th.removeClass(selectedClass);if(_.isFunction(this.options.onColumnDeselect)&&e){this.options.onColumnDeselect(colInfo,e)}}},getTextValue:function(fieldName,alwaysNewRow){return this.options.getFieldValue(alwaysNewRow?fieldName+"_new":fieldName)},getUploadedFiles:function($el,fieldName){return _.get(document.forms,[$el.find("form").attr("name"),fieldName,"files",0])},isDataModified:function($editableElements,rowData,alwaysNewRow){var isDataChanged=false,self=this;function getEpoch(val){return val?moment(val).valueOf():val}$editableElements.each((function(){var $el=$(this),colId=$el.attr("data-col-id"),colDef=self.preparedHeaderData[colId],text=self.getTextValue(colDef.field,alwaysNewRow),originalData=_.get(rowData,colDef.field);if(colDef.editWidgetType==="upload"){isDataChanged=self.getUploadedFiles($el,colDef.field)instanceof File}else{if(!self.Utils.isDefined(text)&&(originalData===null||originalData===undefined)){isDataChanged=false}else{if(colDef.editWidgetType==="datetime"){isDataChanged=!(getEpoch(originalData)===getEpoch(text))}else{isDataChanged=!(originalData==text)}}}if(isDataChanged){return!isDataChanged}}));return isDataChanged},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var newRow=this.gridElement.find("tr.always-new-row");var newRowInputs=newRow&&newRow.find("input")||[];newRowInputs.length&&newRowInputs[0].focus()},disableActions:function(val){var $deleteBtns=this.gridElement.find(".delete-row-button"),$editBtns=this.gridElement.find(".edit-row-button");if(val){$editBtns.addClass("disabled-action");$deleteBtns.addClass("disabled-action")}else{$editBtns.removeClass("disabled-action");$deleteBtns.removeClass("disabled-action")}},setFocusOnElement:function(e,$el,skipDelay){var $firstEl,$target=e&&$(e.target),$focusEl;if($target&&$target.hasClass("app-datagrid-cell")){$firstEl=$target.find("input")}else{if(!$el){$el=$target.closest("tr.app-datagrid-row").find("td.cell-editing")}else if($el.hasClass("app-datagrid-row")){$el=$el.find("td.cell-editing")}$firstEl=$($el).first().find("input");if(!$firstEl.length){$firstEl=$($el).first().find("textarea")}if(!$firstEl.length){$firstEl=$($el).first().find("select")}}if($firstEl.length){$focusEl=$firstEl.first();if(skipDelay){$focusEl.focus();$focusEl.select()}else{this.options.timeoutCall((function(){$focusEl.focus();$focusEl.select()}))}}},removeNewRow:function($row){this.disableActions(false);this._setGridEditMode(false);if($row.hasClass("always-new-row")){return}$row.attr("data-removed",true);$row.remove();if(!this.preparedData.length){this.setStatus("nodata",this.dataStatus.nodata)}this.addOrRemoveScroll();this.toggleNewRowActions(false)},saveRow:function(callBack){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[undefined,{action:"save",skipSelect:true,noMsg:true,success:callBack}])}))},makeRowEditable:function($row,rowData,alwaysNewRow){var self=this,$originalElements=$row.find("td.app-datagrid-cell"),rowId=parseInt($row.attr("data-row-id"),10),$editableElements,_rowData=_.clone(rowData);_rowData.$index=rowId+1;this.options.removeValidations(alwaysNewRow);this.options.generateInlineEditRow(_rowData,alwaysNewRow);$originalElements.each((function(){var $el=$(this),cellText=$el.text(),id=$el.attr("data-col-id"),colDef=self.preparedHeaderData[id],value,editableTemplate;if(!colDef.readonly){value=_.get(rowData,colDef.field);editableTemplate=self.options.getInlineEditWidget(colDef.field,value,alwaysNewRow);if(!(colDef.customExpression||colDef.formatpattern&&colDef.formatpattern!=="None")){$el.addClass("cell-editing").html(editableTemplate).data("originalText",cellText)}else{$el.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:rowId,fieldName:colDef.field});$el.addClass("cell-editing editable-expression").html(editableTemplate).data("originalText",cellText)}$el.addClass("form-group");if(colDef.binding!=="rowOperations"){self.options.timeoutCall((function(){self.options.applyValidations(colDef,alwaysNewRow);if(colDef.required){$el.addClass("required-field")}}))}else if(colDef.required){$el.addClass("required-field")}}}));$editableElements=$row.find("td.cell-editing");$editableElements.on("click",(function(e){e.stopPropagation()}));$editableElements.on("keydown",(function(e){if((e.which===38||e.which===40)&&(e.currentTarget&&!e.currentTarget.closest(".always-new-row"))){e.stopPropagation()}}))},toggleNewRowActions:function(saveInd){var self=this,$gridActions=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),$newRow=this.gridElement.find("tr.app-datagrid-row.row-editing"),$newRowButton=$gridActions.find("i.wi-plus").closest(".app-button");if(this.options.editmode===this.CONSTANTS.INLINE&&(this.options.rowActions.length===0||!_.some(this.options.rowActions,{action:"editRow($event)"}))){if(saveInd){$gridActions.append('<button type="button" wmbutton="" class="btn app-button btn-default cancelNewRow" tabindex="0" accesskey="" title="Cancel">'+'<i aria-hidden="true" class="app-icon wi wi-cancel"></i>'+'<span class="sr-only">Cancel Icon</span><span class="btn-caption">Cancel</span>'+"</button>"+'<button type="button" wmbutton="" class="btn app-button btn-primary saveNewRow" tabindex="0" accesskey="" title="Save">'+'<i aria-hidden="true" class="app-icon wi wi-done"></i>'+'<span class="sr-only">Save Icon</span><span class="btn-caption">Save</span>'+"</button>");$gridActions.find(".cancelNewRow").on("click",(function(event){self.toggleEditRow(event,{action:"cancel",$row:$newRow})}));$gridActions.find(".saveNewRow").on("click",(function(event){self.toggleEditRow(event,{action:"save",$row:$newRow})}));$newRowButton.hide()}else{$("typeahead-container").removeClass("open");$gridActions.find(".cancelNewRow").remove();$gridActions.find(".saveNewRow").remove();$newRowButton.show()}}},_isNewRow:function($row){var rowId=parseInt($row.attr("data-row-id"),10);return rowId>=this.preparedData.length||$row.hasClass("always-new-row")},toggleEditRow:function(e,options){options=options||{};if(e){e.stopPropagation()}this.closePopover();var $row=options.$row||$(e.target).closest("tr.app-datagrid-row"),$editButton=$row.find(".edit-row-button"),$cancelButton=$row.find(".cancel-edit-row-button"),$saveButton=$row.find(".save-edit-row-button"),$deleteButton=$row.find(".delete-row-button"),rowData=_.cloneDeep(this.options.data[$row.attr("data-row-id")])||{},self=this,action,isNewRow,$editableElements,isDataChanged=false,isValid,$requiredEls,alwaysNewRow=$row.hasClass("always-new-row"),advancedEdit=self.options.editmode===self.CONSTANTS.QUICK_EDIT,editOptions={};this.options.setActionRowIndex($row.attr("data-row-id"));this.options.setLastActionPerformed(this.options.ACTIONS.EDIT);function onSaveSuccess(skipFocus,error){if(_.isFunction(options.success)){options.success(skipFocus,error)}if(!advancedEdit||self.options.actionsEnabled.edit){self.focusActiveRow()}}if($row.attr("data-removed")==="true"){return}if(options.selectRow){this.selectRow(rowData,true)}e=e||{};e.data=e.data||{};action=e.data.action||options.action;if(action==="edit"){if(this.options.editmode===this.CONSTANTS.INLINE){this.options.callLoadInlineWidgetData()}if(advancedEdit&&self.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length){self.saveRow((function(skipFocus,error){self.editSuccessHandler(skipFocus,error,e,$row,true)}));return}$row.addClass("row-editing");if(_.isFunction(this.options.beforeRowUpdate)){this.options.beforeRowUpdate(rowData,e)}if(self.options.editmode===self.CONSTANTS.FORM||self.options.editmode===self.CONSTANTS.DIALOG){return}if(options.operation==="new"){self.setDefaultRowData(rowData);self.toggleNewRowActions(true)}if(_.isFunction(this.options.onBeforeFormRender)){isValid=this.options.onBeforeFormRender(rowData,e,options.operation||action);if(isValid===false){return}}this._setGridEditMode(true);this.disableActions(true);$deleteButton.removeClass("disabled-action");this.options.runInNgZone((function(){self.makeRowEditable($row,rowData)}));$editButton.addClass("hidden");$cancelButton.removeClass("hidden");$saveButton.removeClass("hidden");$editableElements=$row.find("td.cell-editing");if(!options.skipFocus&&$editableElements){this.options.timeoutCall((function(){self.setFocusOnElement(e,$editableElements)}))}if(_.isFunction(this.options.onFormRender)){this.options.onFormRender($row,e,options.operation||action,$row.hasClass("always-new-row"))}}else{$editableElements=$row.find("td.cell-editing");isNewRow=self._isNewRow($row);if(action==="save"){if(isNewRow){isDataChanged=true}else{isDataChanged=this.isDataModified($editableElements,rowData,alwaysNewRow)}if(isDataChanged){$editableElements.each((function(){var $el=$(this),colId=$el.attr("data-col-id"),colDef=self.preparedHeaderData[colId],fields=_.split(colDef.field,"."),text;text=self.getTextValue(colDef.field,alwaysNewRow);if(fields.length===1&&colDef.editWidgetType==="upload"){_.set(rowData,colDef.field,self.getUploadedFiles($el,colDef.field))}else{text=(fields.length===1||isNewRow)&&text===""?undefined:text;if(self.Utils.isDefined(text)){text=text==="null"?null:text;if(text===null){if(fields.length>1){_.set(rowData,fields[0],text)}else{if(!isNewRow){_.set(rowData,colDef.field,"")}}}else{_.set(rowData,colDef.field,text)}}else{if(fields.length===1&&!isNewRow){_.set(rowData,colDef.field,text)}}}}));if($editableElements.find(".ng-pending").length>0){setTimeout(this.toggleEditRow.bind(this,e,options),200);return}$requiredEls=$editableElements.find(".ng-invalid");if($requiredEls.length>0){$requiredEls.each((function(index){var $invalidTd=$(this).closest("td.app-datagrid-cell");if(index===0){$invalidTd.find("[focus-target]").focus()}self.options.setTouched($invalidTd.find("[formcontrolname]").attr("formcontrolname"))}));if(_.isFunction(options.success)){options.success(false,true)}return}if(isNewRow&&advancedEdit&&_.isEmpty(rowData)){self.removeNewRow($row);if(_.isFunction(options.success)){options.success(false,undefined,true)}return}if(isNewRow){if(_.isFunction(this.options.onBeforeRowInsert)){isValid=this.options.onBeforeRowInsert(rowData,e,editOptions);if(isValid===false){return}}this.options.onRowInsert(rowData,e,onSaveSuccess,editOptions);self.toggleNewRowActions(false);if(!$row.hasClass("always-new-row")&&self.options.isNavTypeScrollOrOndemand()){self.removeNewRow($row)}}else{if(_.isFunction(this.options.onBeforeRowUpdate)){isValid=this.options.onBeforeRowUpdate(rowData,e,editOptions);if(isValid===false){return}}this.options.afterRowUpdate(rowData,e,onSaveSuccess,editOptions)}}else{this.cancelEdit($row);if(!options.noMsg){this.options.noChangesDetected()}if(_.isFunction(options.success)){options.success(false)}}}else{if(isNewRow){self.removeNewRow($row);return}this.cancelEdit($row)}}this.addOrRemoveScroll()},cancelEdit:function($row){var self=this,$editableElements=$row.find("td.cell-editing"),$cancelButton=$row.find(".cancel-edit-row-button"),$saveButton=$row.find(".save-edit-row-button"),$editButton=$row.find(".edit-row-button");this.options.clearActionRowIndex();this.disableActions(false);$row.removeClass("row-editing");$editableElements.off("click");$editableElements.each((function(){var $el=$(this),value=$el.data("originalValue");$el.removeClass("datetime-wrapper cell-editing required-field form-group");if(!value){$el.text($el.data("originalText")||"")}else{$el.html(self.options.getCustomExpression(value.fieldName,value.rowIndex))}}));$("typeahead-container").removeClass("open");$editButton.removeClass("hidden");$cancelButton.addClass("hidden");$saveButton.addClass("hidden");this._setGridEditMode(false)},closeEditedRow:function(){var $row=this.gridElement.find("tr.app-datagrid-row.row-editing");if($row.length){if(this._isNewRow($row)){this.removeNewRow($row)}else{this.cancelEdit($row)}}},hideRowEditMode:function($row){if($row.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand()){this.resetNewRow($row);return}var $editableElements=$row.find("td.cell-editing"),$editButton=$row.find(".edit-row-button"),$cancelButton=$row.find(".cancel-edit-row-button"),$saveButton=$row.find(".save-edit-row-button"),self=this;$row.removeClass("row-editing");$editableElements.off("click");this.disableActions(false);this._setGridEditMode(false);$editableElements.each((function(){var $el=$(this),value=$el.data("originalValue"),text,colDef;$el.removeClass("datetime-wrapper cell-editing required-field form-group");if(!value){colDef=self.preparedHeaderData[$el.attr("data-col-id")];text=self.getTextValue(colDef.field);$el.text(self.Utils.isDefined(text)?text:"")}else{$el.html(self.options.getCustomExpression(value.fieldName,value.rowIndex))}}));$editButton.removeClass("hidden");$cancelButton.addClass("hidden");$saveButton.addClass("hidden");this.addOrRemoveScroll()},deleteRow:function(e){e.stopPropagation();var $row=$(e.target).closest("tr.app-datagrid-row"),rowId=$row.attr("data-row-id"),rowData=this.options.data[rowId],isNewRow=this._isNewRow($row),className,isActiveRow,isValid,options={},self=this;this.options.setActionRowIndex(rowId);this.options.setLastActionPerformed(this.options.ACTIONS.DELETE);if(_.isFunction(this.options.beforeRowDelete)){this.options.beforeRowDelete(rowData,e)}if(isNewRow){this.disableActions(false);this._setGridEditMode(false);$row.attr("data-removed",true);$row.remove();if(!this.preparedData.length){this.setStatus("nodata",this.dataStatus.nodata)}this.addOrRemoveScroll();return}if(_.isFunction(this.options.onBeforeRowDelete)){isValid=this.options.onBeforeRowDelete(rowData,e,options);if(isValid===false){return}}if(_.isFunction(this.options.onRowDelete)){className=this.options.cssClassNames.deleteRow;isActiveRow=$row.attr("class").indexOf("active")!==-1;if(isActiveRow){$row.removeClass("active")}$row.addClass(className);this.options.onRowDelete(rowData,(function(){if(isActiveRow){$row.addClass("active")}$row.removeClass(className);self.addOrRemoveScroll()}),e,(function(skipFocus,error){if(self.options.isNavTypeScrollOrOndemand()){var rowId=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id");var $row=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowId+'"]');self.options.setDeletedRowIndex(rowId);self.preparedData.splice(rowId,1);self.options.data.splice(rowId,1);self.gridElement.find("tr.app-datagrid-row:gt("+rowId+")").each((function(index,row){if(!$row.is(":last-child")&&!$(row).hasClass("always-new-row")){$(row).attr("data-row-id",rowId);self.preparedData[rowId].$$pk--;self.preparedData[rowId].$$index--;self.preparedData[rowId].$index--;rowId++}}));$row.remove()}if(self.options.editmode!==self.CONSTANTS.QUICK_EDIT||!($(e.target).hasClass("delete-row-button")||self.Utils.isDeleteKey(e))){return}self.__setStatus();var rowID,$nextRow;if(error){return}rowID=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id");$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowID+'"]');if(!$nextRow.length){$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+(rowID-1)+'"]')}$nextRow.trigger("click",[undefined,{action:"edit",skipFocus:skipFocus}])}),options)}},deleteRowAndUpdateSelectAll:function(e){this.deleteRow(e);this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function($row,e){var selectedRows=this.gridElement.find("tr.app-datagrid-row.active"),rowId=$row.attr("data-row-id"),self=this;selectedRows.each((function(){var id=$(this).attr("data-row-id"),preparedData=self.preparedData[id];if(id!==rowId&&preparedData){$(this).find("input[rowSelectInput]:radio").prop("checked",false);preparedData._selected=preparedData._checked=false;$(this).removeClass("active");self.options.callOnRowDeselectEvent(preparedData,e)}}))},resetSortIcons:function($el){this.isResetSortIconsDone=true;var $sortContainer;if(!$el&&this.gridHeaderElement){$sortContainer=this.gridHeaderElement.find(".sort-buttons-container.active");$el=$sortContainer.find("i.sort-icon");$sortContainer.removeClass("active")}$el.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const sortInfo=this.options.sortInfo,$e=this.tableContainer,$th=$e.find("[data-col-field='"+sortInfo.field+"']"),$sortContainer=$th.find(".sort-buttons-container"),$sortIcon=$sortContainer.find("i.sort-icon"),direction=sortInfo.direction;if(direction==="asc"){$sortIcon.addClass(direction+" "+this.options.cssClassNames.ascIcon);$sortContainer.addClass("active")}else if(direction==="desc"){$sortIcon.addClass(direction+" "+this.options.cssClassNames.descIcon);$sortContainer.addClass("active")}},sortHandler:function(e){e.stopImmediatePropagation();if($(e.target).hasClass("header-data")&&this.options.enableColumnSelection){this.headerClickHandler(e)}var $e=$(e.target),$th=$e.closest("th.app-datagrid-header-cell"),id=$th.attr("data-col-id"),$sortContainer=$th.find(".sort-buttons-container"),$sortIcon=$sortContainer.find("i.sort-icon"),direction=$sortIcon.hasClass("asc")?"desc":"asc",sortInfo=this.options.sortInfo,$previousSortMarker=this.gridHeaderElement.find(".sort-buttons-container.active"),field=$th.attr("data-col-field"),$previousSortedColumn,$previousSortIcon,colId,colDef;this.resetSortIcons($sortIcon);$sortIcon.addClass(direction);if(direction==="asc"){$sortIcon.addClass(this.options.cssClassNames.ascIcon);$sortContainer.addClass("active")}else if(direction==="desc"){$sortIcon.addClass(this.options.cssClassNames.descIcon);$sortContainer.addClass("active")}if($previousSortMarker.length){$previousSortedColumn=$previousSortMarker.closest("th.app-datagrid-header-cell");colId=$previousSortedColumn.attr("data-col-id");colDef=this.preparedHeaderData[colId];$previousSortIcon=$previousSortMarker.find("i.sort-icon");if(colDef.field!==field){$previousSortMarker.removeClass("active");this.resetSortIcons($previousSortIcon)}colDef.sortInfo={sorted:false,direction:""}}sortInfo.direction=direction;sortInfo.field=field;if(direction!==""){this.preparedHeaderData[id].sortInfo={sorted:true,direction:direction}}this._setGridEditMode(false);this.closeEditedRow();this.options.sortHandler.call(this,this.options.sortInfo,e,"sort")},processUpDownKeys:function(event,$row,direction){var self=this;var rowData=$row.find("input").val();if($row.hasClass("row-editing")&&self.options.editmode===self.CONSTANTS.QUICK_EDIT&&rowData){self.toggleEditRow(event,{action:"save",noMsg:true,success:function(skipFocus,error){self.editSuccessHandler(skipFocus,error,event,$row,true,direction)}})}else{$row=direction==="down"?$row.next():$row.prev();if(this.options.rowExpansionEnabled&&!$row.is(":visible")){$row=direction==="down"?$row.next():$row.prev()}$row.focus()}},resetNewRow:function($row){var rowData={},self=this;this.options.clearForm(true);self.setDefaultRowData(rowData);$row.find("[data-field-name]").each((function(){var $input=$(this),fieldName=$input.attr("data-field-name")+"_new";self.options.setFieldValue(fieldName,rowData[$input.attr("data-field-name")]||"")}));self.options.safeApply();self.setFocusOnElement(undefined,$row,true)},_onEnter:function($target,$row,quickEdit,event){var self=this;if($target.is("button")){return}if(quickEdit&&$target.hasClass("app-datagrid-row")&&!$target.hasClass("row-editing")){$row.trigger("click",[undefined,{action:"edit"}])}else{if($row.hasClass("row-editing")&&$target.closest("[data-field-name]").length){$target.blur();self.toggleEditRow(event,{action:"save",success:function(skipFocus,error){if(error){$target.focus()}else{self.focusActiveRow();self.focusNewRow()}}})}else{$row.trigger("click");if(quickEdit&&$target.hasClass("always-new-row")&&$target.hasClass("row-editing")){self.focusNewRow()}}}if(!$target.is("button")){event.stopPropagation()}},onKeyDown:function(event){var $target=$(event.target),$row=$target.closest("tr.app-datagrid-row"),self=this,quickEdit=this.options.editmode===this.CONSTANTS.QUICK_EDIT,isNewRow;if(this.options.rowExpansionEnabled&&!$row.length){$row=$target.closest("tr.app-datagrid-detail-row")}if(this.Utils.isDeleteKey(event)){if(!this.options.actionsEnabled.delete||$target.is("input")||$target.hasClass("form-control")){return}this.deleteRow(event);return}if(event.which===27){isNewRow=this._isNewRow($row);if(isNewRow&&$row.hasClass("always-new-row")){$target.blur();self.resetNewRow($row)}else{$row.trigger("click",[undefined,{action:"cancel"}])}if(!isNewRow){$row.focus()}return}if(event.which===13){event.stopPropagation();this._debounceOnEnter($target,$row,quickEdit,event);return}if(event.which===38){this.processUpDownKeys(event,$row,"up");return}if(event.which===40){this.processUpDownKeys(event,$row,"down")}},editSuccessHandler:function(skipFocus,error,e,$row,isSameRow,direction){var self=this,rowID,$nextRow;self.__setStatus();if(error){self.setFocusOnElement(e);return}rowID=+$row.attr("data-row-id");if(direction){rowID=direction==="down"?++rowID:--rowID;$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowID+'"]');if($nextRow.length){$nextRow.focus()}else{$row.focus()}return}if(!isSameRow&&!_.isUndefined(isSameRow)){rowID++}$nextRow=self.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowID+'"]');if($nextRow.hasClass("always-new-row")){if(self.options.formPosition!=="top"||$row.hasClass("always-new-row")){self.addNewRow(skipFocus)}}else if($nextRow.length){$nextRow.trigger("click",[undefined,{action:"edit",skipFocus:skipFocus,skipSelect:self.options.multiselect}])}else if(self.options.actionsEnabled.new){self.addNewRow(skipFocus)}},isLastColumn:function($target){var $cell=$target.closest("td.app-datagrid-cell"),$editCells;if($cell.is(":last-child")){return true}if($cell.hasClass("cell-editing")){$editCells=$cell.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])');return $cell.attr("data-col-id")===$editCells.last().attr("data-col-id")}return false},getColInfo:function(event){var row=$(event.target).closest("tr.app-datagrid-row");var rowId=row.attr("data-row-id");var column=$(event.target).closest("td.app-datagrid-cell");var colId=column.attr("data-col-id");if(this.columnClickInfo&&this.columnClickInfo[rowId]&&this.columnClickInfo[rowId][colId]){return this.columnClickInfo[rowId][colId]}return false},attachEventHandlers:function($htm){var $header=this.gridHeaderElement,self=this;if(this.options.enableRowSelection){$htm[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this));$htm.off();$htm[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this));$htm.on("click",this.rowSelectionHandler.bind(this));$htm.on("click","td *",(function(event){if(event.target.type!="checkbox"){var row=$(event.target).closest("tr.app-datagrid-row");var rowId=row.attr("data-row-id");var column=$(event.target).closest("td.app-datagrid-cell");var colId=column.attr("data-col-id");var id=Number(colId);var colDefination=self.preparedHeaderData[id];if(colDefination.readonly){self.columnClickInfo[rowId]={};self.columnClickInfo[rowId][colId]=true}}}));$htm.on("dblclick",this.rowDblClickHandler.bind(this));$htm.on("keydown",this.onKeyDown.bind(this))}if($header){if(this.options.enableColumnSelection){$header.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this));$header.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))}else{$header.find("th[data-col-selectable]").off("click")}if(this.options.enableSort){if(this.options.enableColumnSelection){$header.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this));$header.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))}else{$header.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this));$header.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))}}else{if(this.options.enableColumnSelection){$header.find("th[data-col-sortable] .header-data").off("click")}else{$header.find("th[data-col-sortable]").off("click")}}}if(this.options.rowActions.length){$htm.find(".cancel-edit-row-button").off("click");$htm.find(".save-edit-row-button").off("click");$htm.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this));$htm.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))}if(self.options.editmode===self.CONSTANTS.QUICK_EDIT){$htm.on("focusout","tr.app-datagrid-row",(function(e){var $target=$(e.target),$row=$target.closest("tr.app-datagrid-row"),$relatedTarget=$(e.relatedTarget),isLastColumn=self.isLastColumn($target,$relatedTarget),isTargetRowAction=$target.closest("span.actions-column").length>0,isRelatedTargetRowAction=$relatedTarget.closest("span.actions-column").length>0,isTargetGridAction=$relatedTarget.closest("div.app-datagrid-actions").length>0,isRelatedTargetGridAction=$relatedTarget.closest("div.app-datagrid-actions").length>0,invalidTargets='.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date';function isInvalidTarget(){if(!$relatedTarget.closest(".app-grid").length){return true}return $relatedTarget.is(invalidTargets)}if($relatedTarget.is("tr.app-datagrid-row")){if($relatedTarget.attr("data-row-id")===$row.attr("data-row-id")){return}}if(isRelatedTargetRowAction||$row.hasClass("danger")||isRelatedTargetGridAction||isTargetRowAction&&isRelatedTargetRowAction||isTargetRowAction&&e.relatedTarget===null||isInvalidTarget()||$relatedTarget.attr("focus-target")===""){return}if(!isTargetGridAction&&!isTargetRowAction){if(!isLastColumn||isLastColumn&&e.relatedTarget===null||$target.hasClass("file-upload")){return}}self.options.timeoutCall((function(){self.toggleEditRow(e,{action:"save",noMsg:true,success:function(skipFocus,error,isNewRow){if(!isNewRow){self.editSuccessHandler(skipFocus,error,e,$row)}}})}))}))}$htm.find('[data-identifier="rowExpansionButtons"]').off("click");$htm.find('[data-identifier="rowExpansionButtons"]').on("click",(function(e){var $row=$(e.target).closest("tr.app-datagrid-row");if($(this).find(".app-button").attr("disabled")){return}self.toggleExpandRow(+$row.attr("data-row-id"),undefined,e)}))},expandRow:function(rowId){this.toggleExpandRow(rowId,true)},collapseRow:function(rowId){this.toggleExpandRow(rowId,false)},_collapseRow:function(e,rowData,rowId,$nextDetailRow,$icon){var self=this,$tbody=self.gridElement,$row=$($tbody.find('> tr.app-datagrid-row[data-row-id="'+rowId+'"]'));$row.removeClass(self.options.cssClassNames.expandedRowClass);$row.find("button, a").attr("aria-expanded","false").attr("aria-live","polite");if(this.options.onBeforeRowCollapse(e,rowData,rowId)===false){return}if($icon.length&&$icon.hasClass(this.options.cssClassNames.rowExpandIcon)){$icon.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon)}$nextDetailRow.hide();this.options.onRowCollapse(e,rowData)},toggleExpandRow:function(rowId,isExpand,e){var self=this,$tbody=self.gridElement,$row=$($tbody.find('> tr.app-datagrid-row[data-row-id="'+rowId+'"]')),rowData=_.clone(self.options.data[rowId]),$nextDetailRow=$row.next("tr.app-datagrid-detail-row"),isClosed=!$nextDetailRow.is(":visible"),$icon=$row.find('[data-identifier="rowExpansionButtons"] i.app-icon');rowData.$index=rowId+1;if(isExpand&&!isClosed){return}if(isExpand===false&&isClosed){return}if(isClosed){$row.addClass(self.options.cssClassNames.expandedRowClass);$row.find("button, a").attr("aria-expanded","true");if(e&&self.preparedData[rowId]._selected){e.stopPropagation()}if(self.options.rowDef.closeothers){$tbody.find("> tr.app-datagrid-detail-row:visible").each((function(){var $otherDetailRow=$(this),$otherIcon=$otherDetailRow.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),otherRowId=+$otherDetailRow.attr("data-row-id"),otherRowData=self.options.data[otherRowId];$otherDetailRow.hide();self._collapseRow(e,otherRowData,otherRowId,$otherDetailRow,$otherIcon)}))}self.options.generateRowDetailView(e,rowData,rowId,$nextDetailRow.find("td.app-datagrid-row-details-cell .details-section"),$nextDetailRow.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){if($icon.length&&$icon.hasClass(self.options.cssClassNames.rowCollapseIcon)){$icon.removeClass(self.options.cssClassNames.rowCollapseIcon).addClass(self.options.cssClassNames.rowExpandIcon)}$nextDetailRow.show()}))}else{self._collapseRow(e,rowData,rowId,$nextDetailRow,$icon)}},_findAndReplaceCompiledTemplates:function(){if(!this.gridElement){return}var $compiledCells=this.gridElement.find("td[data-compiled-template]"),self=this;$compiledCells.each((function(){var $cell=$(this),id=$cell.attr("data-compiled-template");$cell.replaceWith(self.compiledCellTemplates[id])}))},_renderSearch:function(){var $htm=$(this._getSearchEl()),self=this,$searchBox;function search(e){e.stopPropagation();var searchText=$htm.find('[data-element="dgSearchText"]')[0].value,$filterField=$htm.find('[data-element="dgFilterValue"]'),field=$filterField[0].value,colDefIndex=$htm.find("option:selected").attr("data-coldef-index"),colDef=self.options.colDefs[colDefIndex],type=colDef&&colDef.type?colDef.type:"";self.searchObj={field:field,value:searchText,type:type,event:e};self.options.searchHandler.call(self,self.searchObj,e,"search")}this.element.find(".form-search").remove();$htm.insertBefore(this.gridContainer);this.gridSearch=this.element.find(".form-search");$searchBox=this.gridSearch.find('[data-element="dgSearchText"]');this.gridSearch.find(".app-search-button").on("click",search);this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(e){if(self.dataStatusContainer.find(".status").text()===self.options.dataStates.nodata){search(e)}}));$searchBox.on("keyup",(function(e){e.stopPropagation();if(!$(this).val()){self.emptySearch=true;if(self.searchObj.value){self.searchObj.value="";search(e)}}else{self.emptySearch=false}if(e.which===13||self.options.filteronkeypress){search(e)}}))},_renderRowFilter:function(){var $row=$('<tr class="filter-row"></tr>'),self=this,$headerElement=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;$headerElement.find(".filter-row").remove();this.options.generateFilterRow();this.preparedHeaderData.forEach((function(field,index){var fieldName=field.field,$th=$('<th data-col-id="'+index+'"></th>');if(!field.searchable){$row.append($th);return}$th.append(self.options.getFilterWidget(fieldName));$row.append($th)}),this);if(this.options.showHeader){this.gridHeaderElement.append($row)}else{if(this.options.isMobile){$headerElement.empty().append($row)}else{$headerElement.empty().append($row)}}this.gridSearch=$headerElement.find(".filter-row")},_renderHeader:function(){var headerTemplate=this._getHeaderTemplate(),$colgroup=headerTemplate.colgroup,self=this,$header;this.gridElement.parent().scroll((function(){self.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)}));if(!this.options.showHeader){this.tableContainer.append($colgroup);this.gridHeaderElement.hide();return}else{this.gridHeaderElement.show()}$header=headerTemplate.header;function toggleSelectAll(e){var $checkboxes=$('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox',self.gridElement),checked=this.checked;$checkboxes.prop("checked",checked);$checkboxes.each((function(){var $row=$(this).closest("tr.app-datagrid-row"),rowId=$row.attr("data-row-id"),rowData=self.options.data[rowId];self.options.assignSelectedItems(rowData,e,{rowId:rowId,_selected:self.preparedData[rowId]?._selected});self.toggleRowSelection($row,checked,e,true);if(checked&&_.isFunction(self.options.onRowSelect)){self.options.onRowSelect(rowData,e)}if(!checked&&_.isFunction(self.options.onRowDeselect)){self.options.onRowDeselect(rowData,e)}}))}var headerCells=$header.find("th.app-datagrid-header-cell");var headerCols=$colgroup.find("col");headerCells.each((function(){var id=Number($(this).attr("data-col-id")),colDef=self.preparedHeaderData[id],$headerCol=$(headerCols[id]);if(!colDef){return}if(!_.isUndefined(colDef.show)&&!colDef.show){$(this).hide();$headerCol.hide()}}));if(this.options.isMobile){this.tableContainer.append($colgroup)}else{this.tableContainer.append($colgroup)}$header.on("click",".app-datagrid-header-cell input:checkbox",toggleSelectAll);if(_.isFunction(this.options.onHeaderClick)){this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this))}if(!this.options.isMobile&&this.gridHeaderElement.length){this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(evt,ui){var $colElement,$colHeaderElement,$cellElements,colIndex=+ui.helper.attr("data-col-id")+1,originalWidth=ui.helper.width(),newWidth=ui.size.width,originalTableWidth,newTableWidth;$colHeaderElement=self.tableContainer.find("colgroup > col:nth-child("+colIndex+")");$colElement=self.tableContainer.find("colgroup > col:nth-child("+colIndex+")");$cellElements=self.gridElement.find("tr.app-datagrid-row > td:nth-child("+colIndex+") > div");$colElement.width(newWidth);$colHeaderElement.width(newWidth);$cellElements.width(newWidth);$(this).css("height","auto");if(newWidth>ui.originalSize.width){originalTableWidth=self.gridHeaderElement.width();newTableWidth=originalTableWidth+newWidth-originalWidth;self.gridHeaderElement.width(newTableWidth);self.gridElement.width(newTableWidth)}self.addOrRemoveScroll();self.options.redrawWidgets()}})}if(!this.isResetSortIconsDone){this.setSortIconDefault()}},addOrRemoveScroll:function(){var gridContent=this.gridContainer.find("tbody"),gridHeader=this.gridContainer.find(".table-header");if(gridContent.scrollHeight>gridContent.clientHeight&&!this.Utils.isMac()){gridHeader.addClass("scroll-visible")}else{gridHeader.removeClass("scroll-visible")}},_handleCustomEvents:function(e,options){this.options.handleCustomEvents(e,options)},_setActionsEnabled:function(){var self=this;_.forEach(this.options.rowActions,(function(def){if(_.includes(def.action,"editRow(")){self.options.actionsEnabled.edit=true}else if(_.includes(def.action,"deleteRow(")){self.options.actionsEnabled.delete=true}}))},_appendRowActions:function($htm,isNewRow,rowData){var self,rowOperationsCol=this._getRowActionsColumnDef();if(this.options.rowActions.length||rowOperationsCol){this._setActionsEnabled();self=this;$htm.find("[data-identifier='actionButtons']").each((function(index){var _rowData,$row,rowId,rowIndex=index;if(isNewRow){_rowData=rowData}else{$row=$(this).closest("tr.app-datagrid-row");rowId=parseInt($row.attr("data-row-id"),10);_rowData=_.clone(self.options.data[rowId]);_rowData.$index=rowIndex+1}self.options.generateRowActions(_rowData,rowIndex);$(this).empty().append(self.options.getRowAction(rowIndex))}))}},_renderGrid:function(isCreated){var $htm,isScrollorOnDemand=this.options.isNavTypeScrollOrOndemand(),pageStartIndex=this.getPageStartIndex();$("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border");if(isScrollorOnDemand){var $tbody=this.gridElement;var template=this._getGridTemplate();$htm=$(template);if(template&&!$tbody.length){this.gridElement.append($htm)}}else{var templates=this._getGridTemplate();$htm=$(templates);if(templates){this.gridElement.append($htm)}}if(this.options.summaryRow){var $summaryRowHtm=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove();if(this.options.data.length){this.tableContainer.append($summaryRowHtm)}}if(!this.options.data.length&&this.dataStatus.state==="nodata"){this.setStatus("nodata")}else{this.dataStatus.state=this.dataStatus.state||"loading";this.dataStatus.message=this.dataStatus.message||this.options.dataStates.loading;this.setStatus(this.dataStatus.state,this.dataStatus.message,isCreated)}this.gridBody=this.gridElement.find("tbody");this.gridFooter=this.tableContainer.find("tfoot");this._findAndReplaceCompiledTemplates();this.options.clearRowActions();this._appendRowExpansionButtons($htm);this._appendRowActions($htm);this.attachEventHandlers($htm);this.__setStatus(isCreated);if(this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow){this.addNewRow(false,true)}if(isCreated){this._setColSpan(this.options.headerConfig)}if(_.isFunction(this.options.onDataRender)){this.options.onDataRender()}if(!isCreated&&this.options.selectFirstRow){if(this.options.multiselect){this.options.selectFirstRow=false}if(this.gridElement.find("tr.app-datagrid-row.active").length<=0){this.selectFirstRow(true,true)}}},_render:function(isCreated){if(!this.tableId){this.tableId=this.Utils.generateGuid()}var overflow=this.options.isNavTypeScrollOrOndemand()&&(this.options.height==="100%"||this.options.height==="auto")?"hidden":"auto";var statusContainer='<div class="overlay">'+'<div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div>'+"</div>",table='<div class="table-container table-responsive">'+'<div class="app-grid-header">'+'<div class="app-grid-header-inner">'+'<table tabindex="0" class="'+this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid+'">'+'<thead tabindex="0" class="table-header thead-sticky" id="table_header_'+this.tableId+'">'+'</thead><tbody class="app-grid-content app-datagrid-body" id="table_'+this.tableId+'">'+"</tbody></table>"+"</div></div></div>",$statusContainer=$(statusContainer),$tableContainer=this.element.find(".table-container");this.gridContainer=$(table);this.gridHeaderElement=this.gridContainer.find(".table-header");this._setStyles($statusContainer.find("div.overlay"),"display:none");this._setStyles(this.gridContainer.find("div.app-grid-header-inner"),"height:"+this.options.height+"; overflow: auto;");this.tableContainer=this.gridContainer.find("table");this.gridElement=this.gridContainer.find(".app-grid-content");if(this.options.isNavTypeScrollOrOndemand()&&(!$tableContainer.length||!this.options.isNextPageData)||!this.options.isNavTypeScrollOrOndemand()){this.element.find(".table-container").remove();this.element.append(this.gridContainer)}this.options.setIsNextPageData(false);if(!this.gridContainer.find(".overlay").length){this.dataStatusContainer=$(statusContainer);this.gridContainer.append(this.dataStatusContainer)}if(this.gridHeaderElement){this.gridHeaderElement.empty();this.gridElement.find("colgroup").remove()}this._renderHeader();if(this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)){this._renderSearch()}else if(this.options.filtermode===this.CONSTANTS.MULTI_COLUMN){this._renderRowFilter()}if(this.options.spacing==="condensed"){this._toggleSpacingClasses("condensed")}this._renderGrid(isCreated);this.addNavigationControls()},addNavigationControls:function(){if(this.options.isdynamictable){this.element.find(".on-demand-datagrid").remove();if(this.options.navigation==="On-Demand"&&!this.element.find(".on-demand-datagrid").length){this.options.addLoadMoreBtn()}else if(this.options.navigation==="Scroll"){this.options.bindScrollEvt()}}},__setStatus:function(isCreated){var loadingIndicator=this.dataStatusContainer.find("i"),state=this.dataStatus.state,isScrollOrOndemand=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message);if(state==="loading"){loadingIndicator.removeClass("hidden")}else{loadingIndicator.addClass("hidden")}if(state==="ready"){this.dataStatusContainer.hide()}else{if(this.options.isNavTypeScrollOrOndemand()&&(state==="nodata"||this.options.getCurrentPage()==this.options.getPageCount()&&!this.options.showviewlessbutton)){this.element.find(".on-demand-datagrid a").hide()}this.dataStatusContainer.show()}if(state==="nodata"||state==="loading"||state==="error"){if(this.options.height==="100%"||this.options.height==="auto"){if(state==="nodata"){this.dataStatusContainer.css("height","auto");this.dataStatus.contentHeight=0}else if(this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1){this.dataStatusContainer.hide()}else{this.dataStatus.height=this.dataStatus.height||this.dataStatusContainer.outerHeight();this.dataStatus.contentHeight=this.gridElement.outerHeight()||this.dataStatus.contentHeight;this.dataStatusContainer.css("height",this.dataStatus.height>this.dataStatus.contentHeight?"auto":this.dataStatus.contentHeight)}}if(!isScrollOrOndemand||isScrollOrOndemand&&this.options.getCurrentPage()===1){this.gridContainer.addClass("show-msg")}}else{this.gridContainer.removeClass("show-msg");if(this.options.editmode===this.CONSTANTS.QUICK_EDIT){if(this.options.activeRow){this.attachHandlersToActiveRow(this.options.activeRow)}this.options.activeRow=undefined}}if(!isCreated){this.setColGroupWidths()}this.addOrRemoveScroll()},attachHandlersToActiveRow(rowObj){var rowIndex=this.Utils.getObjectIndex(this.options.data,rowObj);var row=this.gridElement.find("tr.app-datagrid-row[data-row-id="+rowIndex+"]");if(!row.length){return}else if(!row.hasClass("active")){row.addClass("active")}this.focusActiveRow();this.attachEventHandlers(row)},setActiveRow(row){this.options.activeRow=row},setStatus:function(state,message,isCreated){var $newRow;if(state==="nodata"){$newRow=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row");state=$newRow&&$newRow.length?"ready":state}this.dataStatus.state=state;this.options.setGridState(state);this.dataStatus.message=message||this.options.dataStates[state];if(this._setStatusCalled){this._setStatus(isCreated)}else{this.__setStatus(isCreated);this._setStatusCalled=true}},setGridDimensions:function(key,value){if(value.indexOf("px")===-1&&value.indexOf("%")===-1&&value.indexOf("em")===-1&&value!="auto"){value=value+"px"}this.options[key]=value;if(key==="height"){var elements=this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(key,value);if(this.options.isNavTypeScrollOrOndemand()&&(this.options.height!="100%"&&this.options.height!="auto")){this.gridContainer.find(".app-grid-header-inner").css("overflow","auto")}this.dataStatusContainer.css(key,value)}this.addOrRemoveScroll()},setColumnProp:function(fieldName,property,val,isGroup){var $col;if(property==="displayName"){if(isGroup){$col=this.gridHeaderElement.find('th[data-col-group="'+fieldName+'"]')}else{$col=this.gridHeaderElement.find('th[data-col-field="'+fieldName+'"]')}$col.attr("title",val);$col.find(".header-data").html(val);if(this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch){this.gridSearch.find('select option[value="'+fieldName+'"]').text(val)}}},applyRowNgClass:function(val,index){var $row=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+index+'"]');$row.removeClass(val.toRemove);$row.addClass(val.toAdd)},applyColNgClass:function(val,rowIndex,colIndex){var $cell=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+rowIndex+'"] td.app-datagrid-cell[data-col-id="'+colIndex+'"]');$cell.removeClass(val.toRemove);$cell.addClass(val.toAdd)},_destroy:function(){this.element.text("");window.clearTimeout(this.refreshGridTimeout)}});(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports,require("rxjs")):typeof define==="function"&&define.amd?define(["exports","rxjs"],factory):(global=typeof globalThis!=="undefined"?globalThis:global||self,factory((global.awesomeCordova=global.awesomeCordova||{},global.awesomeCordova.core={}),global.rxjs))})(this,(function(exports,rxjs){"use strict";function checkReady(){if(typeof process==="undefined"){var win_1=typeof window!=="undefined"?window:{};var DEVICE_READY_TIMEOUT_1=5e3;var before_1=Date.now();var didFireReady_1=false;win_1.document.addEventListener("deviceready",(function(){console.log("Ionic Native: deviceready event fired after "+(Date.now()-before_1)+" ms");didFireReady_1=true}));setTimeout((function(){if(!didFireReady_1&&win_1.cordova){console.warn("Ionic Native: deviceready did not fire within "+DEVICE_READY_TIMEOUT_1+"ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.")}}),DEVICE_READY_TIMEOUT_1)}}var ERR_CORDOVA_NOT_AVAILABLE={error:"cordova_not_available"};var ERR_PLUGIN_NOT_INSTALLED={error:"plugin_not_installed"};function getPromise(callback){var tryNativePromise=function(){if(Promise){return new Promise((function(resolve,reject){callback(resolve,reject)}))}else{console.error("No Promise support or polyfill found. To enable Ionic Native support, please add the es6-promise polyfill before this script, or run with a library like Angular or on a recent browser.")}};if(typeof window!=="undefined"&&window.angular){var doc=window.document;var injector=window.angular.element(doc.querySelector("[ng-app]")||doc.body).injector();if(injector){var $q=injector.get("$q");return $q((function(resolve,reject){callback(resolve,reject)}))}console.warn("Angular 1 was detected but $q couldn't be retrieved. This is usually when the app is not bootstrapped on the html or body tag. Falling back to native promises which won't trigger an automatic digest when promises resolve.")}return tryNativePromise()}function wrapPromise(pluginObj,methodName,args,opts){if(opts===void 0){opts={}}var pluginResult,rej;var p=getPromise((function(resolve,reject){if(opts.destruct){pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return resolve(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return reject(args)}))}else{pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,resolve,reject)}rej=reject}));if(pluginResult&&pluginResult.error){p.catch((function(){}));typeof rej==="function"&&rej(pluginResult.error)}return p}function wrapOtherPromise(pluginObj,methodName,args,opts){if(opts===void 0){opts={}}return getPromise((function(resolve,reject){var pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts);if(pluginResult){if(pluginResult.error){reject(pluginResult.error)}else if(pluginResult.then){pluginResult.then(resolve).catch(reject)}}else{reject({error:"unexpected_error"})}}))}function wrapObservable(pluginObj,methodName,args,opts){if(opts===void 0){opts={}}return new rxjs.Observable((function(observer){var pluginResult;if(opts.destruct){pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.next(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.error(args)}))}else{pluginResult=callCordovaPlugin(pluginObj,methodName,args,opts,observer.next.bind(observer),observer.error.bind(observer))}if(pluginResult&&pluginResult.error){observer.error(pluginResult.error);observer.complete()}return function(){try{if(opts.clearFunction){if(opts.clearWithArgs){return callCordovaPlugin(pluginObj,opts.clearFunction,args,opts,observer.next.bind(observer),observer.error.bind(observer))}return callCordovaPlugin(pluginObj,opts.clearFunction,[])}}catch(e){console.warn("Unable to clear the previous observable watch for",pluginObj.constructor.getPluginName(),methodName);console.warn(e)}}}))}function wrapEventObservable(event,element){element=typeof window!=="undefined"&&element?get$1(window,element):element||(typeof window!=="undefined"?window:{});return rxjs.fromEvent(element,event)}function checkAvailability(plugin,methodName,pluginName){var pluginRef,pluginPackage;if(typeof plugin==="string"){pluginRef=plugin}else{pluginRef=plugin.constructor.getPluginRef();pluginName=plugin.constructor.getPluginName();pluginPackage=plugin.constructor.getPluginInstallName()}var pluginInstance=getPlugin(pluginRef);if(!pluginInstance||!!methodName&&typeof pluginInstance[methodName]==="undefined"){if(typeof window==="undefined"||!window.cordova){cordovaWarn(pluginName,methodName);return ERR_CORDOVA_NOT_AVAILABLE}pluginWarn(pluginName,pluginPackage,methodName);return ERR_PLUGIN_NOT_INSTALLED}return true}function instanceAvailability(pluginObj,methodName){return pluginObj._objectInstance&&(!methodName||typeof pluginObj._objectInstance[methodName]!=="undefined")}function setIndex(args,opts,resolve,reject){if(opts===void 0){opts={}}if(opts.sync){return args}if(opts.callbackOrder==="reverse"){args.unshift(reject);args.unshift(resolve)}else if(opts.callbackStyle==="node"){args.push((function(err,result){if(err){reject(err)}else{resolve(result)}}))}else if(opts.callbackStyle==="object"&&opts.successName&&opts.errorName){var obj={};obj[opts.successName]=resolve;obj[opts.errorName]=reject;args.push(obj)}else if(typeof opts.successIndex!=="undefined"||typeof opts.errorIndex!=="undefined"){var setSuccessIndex=function(){if(opts.successIndex>args.length){args[opts.successIndex]=resolve}else{args.splice(opts.successIndex,0,resolve)}};var setErrorIndex=function(){if(opts.errorIndex>args.length){args[opts.errorIndex]=reject}else{args.splice(opts.errorIndex,0,reject)}};if(opts.successIndex>opts.errorIndex){setErrorIndex();setSuccessIndex()}else{setSuccessIndex();setErrorIndex()}}else{args.push(resolve);args.push(reject)}return args}function callCordovaPlugin(pluginObj,methodName,args,opts,resolve,reject){if(opts===void 0){opts={}}args=setIndex(args,opts,resolve,reject);var availabilityCheck=checkAvailability(pluginObj,methodName);if(availabilityCheck===true){var pluginInstance=getPlugin(pluginObj.constructor.getPluginRef());return pluginInstance[methodName].apply(pluginInstance,args)}else{return availabilityCheck}}function callInstance(pluginObj,methodName,args,opts,resolve,reject){if(opts===void 0){opts={}}args=setIndex(args,opts,resolve,reject);if(instanceAvailability(pluginObj,methodName)){return pluginObj._objectInstance[methodName].apply(pluginObj._objectInstance,args)}}function getPlugin(pluginRef){if(typeof window!=="undefined"){return get$1(window,pluginRef)}return null}function get$1(element,path){var paths=path.split(".");var obj=element;for(var i=0;i<paths.length;i++){if(!obj){return null}obj=obj[paths[i]]}return obj}function pluginWarn(pluginName,plugin,method){if(method){console.warn("Native: tried calling "+pluginName+"."+method+", but the "+pluginName+" plugin is not installed.")}else{console.warn("Native: tried accessing the "+pluginName+" plugin but it's not installed.")}if(plugin){console.warn("Install the "+pluginName+" plugin: 'ionic cordova plugin add "+plugin+"'")}}function cordovaWarn(pluginName,method){if(typeof process==="undefined"){if(method){console.warn("Native: tried calling "+pluginName+"."+method+", but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}else{console.warn("Native: tried accessing the "+pluginName+" plugin but Cordova is not available. Make sure to include cordova.js or run in a device/simulator")}}}var wrap=function(pluginObj,methodName,opts){if(opts===void 0){opts={}}return function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}if(opts.sync){return callCordovaPlugin(pluginObj,methodName,args,opts)}else if(opts.observable){return wrapObservable(pluginObj,methodName,args,opts)}else if(opts.eventObservable&&opts.event){return wrapEventObservable(opts.event,opts.element)}else if(opts.otherPromise){return wrapOtherPromise(pluginObj,methodName,args,opts)}else{return wrapPromise(pluginObj,methodName,args,opts)}}};function wrapInstance(pluginObj,methodName,opts){if(opts===void 0){opts={}}return function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}if(opts.sync){return callInstance(pluginObj,methodName,args,opts)}else if(opts.observable){return new rxjs.Observable((function(observer){var pluginResult;if(opts.destruct){pluginResult=callInstance(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.next(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return observer.error(args)}))}else{pluginResult=callInstance(pluginObj,methodName,args,opts,observer.next.bind(observer),observer.error.bind(observer))}if(pluginResult&&pluginResult.error){observer.error(pluginResult.error)}return function(){try{if(opts.clearWithArgs){return callInstance(pluginObj,opts.clearFunction,args,opts,observer.next.bind(observer),observer.error.bind(observer))}return callInstance(pluginObj,opts.clearFunction,[])}catch(e){console.warn("Unable to clear the previous observable watch for",pluginObj.constructor.getPluginName(),methodName);console.warn(e)}}}))}else if(opts.otherPromise){return getPromise((function(resolve,reject){var result;if(opts.destruct){result=callInstance(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return resolve(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return reject(args)}))}else{result=callInstance(pluginObj,methodName,args,opts,resolve,reject)}if(result&&result.then){result.then(resolve,reject)}else{reject()}}))}else{var pluginResult_1,rej_1;var p=getPromise((function(resolve,reject){if(opts.destruct){pluginResult_1=callInstance(pluginObj,methodName,args,opts,(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return resolve(args)}),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}return reject(args)}))}else{pluginResult_1=callInstance(pluginObj,methodName,args,opts,resolve,reject)}rej_1=reject}));if(pluginResult_1&&pluginResult_1.error){p.catch((function(){}));typeof rej_1==="function"&&rej_1(pluginResult_1.error)}return p}}}function get(element,path){var paths=path.split(".");var obj=element;for(var i=0;i<paths.length;i++){if(!obj){return null}obj=obj[paths[i]]}return obj}var AwesomeCordovaNativePlugin=function(){function AwesomeCordovaNativePlugin(){}AwesomeCordovaNativePlugin.installed=function(){var isAvailable=checkAvailability(this.pluginRef)===true;return isAvailable};AwesomeCordovaNativePlugin.getPlugin=function(){if(typeof window!=="undefined"){return get(window,this.pluginRef)}return null};AwesomeCordovaNativePlugin.getPluginName=function(){var pluginName=this.pluginName;return pluginName};AwesomeCordovaNativePlugin.getPluginRef=function(){var pluginRef=this.pluginRef;return pluginRef};AwesomeCordovaNativePlugin.getPluginInstallName=function(){var plugin=this.plugin;return plugin};AwesomeCordovaNativePlugin.getSupportedPlatforms=function(){var platform=this.platforms;return platform};AwesomeCordovaNativePlugin.pluginName="";AwesomeCordovaNativePlugin.pluginRef="";AwesomeCordovaNativePlugin.plugin="";AwesomeCordovaNativePlugin.repo="";AwesomeCordovaNativePlugin.platforms=[];AwesomeCordovaNativePlugin.install="";return AwesomeCordovaNativePlugin}();function cordova(pluginObj,methodName,config,args){return wrap(pluginObj,methodName,config).apply(this,args)}function overrideFunction(pluginObj,methodName){return new rxjs.Observable((function(observer){var availabilityCheck=checkAvailability(pluginObj,methodName);if(availabilityCheck===true){var pluginInstance_1=getPlugin(pluginObj.constructor.getPluginRef());pluginInstance_1[methodName]=observer.next.bind(observer);return function(){return pluginInstance_1[methodName]=function(){}}}else{observer.error(availabilityCheck);observer.complete()}}))}function cordovaFunctionOverride(pluginObj,methodName,args){return overrideFunction(pluginObj,methodName)}function cordovaInstance(pluginObj,methodName,config,args){args=Array.from(args);return wrapInstance(pluginObj,methodName,config).apply(this,args)}function cordovaPropertyGet(pluginObj,key){if(checkAvailability(pluginObj,key)===true){return getPlugin(pluginObj.constructor.getPluginRef())[key]}return null}function cordovaPropertySet(pluginObj,key,value){if(checkAvailability(pluginObj,key)===true){getPlugin(pluginObj.constructor.getPluginRef())[key]=value}}function instancePropertyGet(pluginObj,key){if(pluginObj._objectInstance&&pluginObj._objectInstance[key]){return pluginObj._objectInstance[key]}return null}function instancePropertySet(pluginObj,key,value){if(pluginObj._objectInstance){pluginObj._objectInstance[key]=value}}checkReady();window.rxjs._throw=window.rxjs.throwError;exports.AwesomeCordovaNativePlugin=AwesomeCordovaNativePlugin;exports.checkAvailability=checkAvailability;exports.cordova=cordova;exports.cordovaFunctionOverride=cordovaFunctionOverride;exports.cordovaInstance=cordovaInstance;exports.cordovaPropertyGet=cordovaPropertyGet;exports.cordovaPropertySet=cordovaPropertySet;exports.getPromise=getPromise;exports.instanceAvailability=instanceAvailability;exports.instancePropertyGet=instancePropertyGet;exports.instancePropertySet=instancePropertySet;exports.wrap=wrap}));(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory(require("tslib"),require("@angular/core"),require("@awesome-cordova-plugins/core"),require("rxjs"),require("rxjs/operators")):typeof define==="function"&&define.amd?define(["tslib","@angular/core","@awesome-cordova-plugins/core","rxjs","rxjs/operators"],factory):(global=typeof globalThis!=="undefined"?globalThis:global||self,global.awesomeCordova=global.awesomeCordova||{},global.awesomeCordova.plugins=factory(global.tslib,global.ng.core,global.awesomeCordova.core,global.rxjs,global.rxjs.operators))})(this,(function(tslib,core$1,core,rxjs,operators){"use strict";var AppVersion=function(_super){tslib.__extends(AppVersion,_super);function AppVersion(){return _super!==null&&_super.apply(this,arguments)||this}AppVersion.prototype.getAppName=function(){return core.cordova(this,"getAppName",{},arguments)};AppVersion.prototype.getPackageName=function(){return core.cordova(this,"getPackageName",{},arguments)};AppVersion.prototype.getVersionCode=function(){return core.cordova(this,"getVersionCode",{},arguments)};AppVersion.prototype.getVersionNumber=function(){return core.cordova(this,"getVersionNumber",{},arguments)};AppVersion.pluginName="AppVersion";AppVersion.plugin="cordova-plugin-app-version";AppVersion.pluginRef="cordova.getAppVersion";AppVersion.repo="https://github.com/whiteoctober/cordova-plugin-app-version";AppVersion.platforms=["Android","iOS","Windows"];AppVersion.decorators=[{type:core$1.Injectable}];return AppVersion}(core.AwesomeCordovaNativePlugin);var AppVersion$1=Object.freeze({__proto__:null,AppVersion:AppVersion});var BarcodeScanner=function(_super){tslib.__extends(BarcodeScanner,_super);function BarcodeScanner(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.Encode={TEXT_TYPE:"TEXT_TYPE",EMAIL_TYPE:"EMAIL_TYPE",PHONE_TYPE:"PHONE_TYPE",SMS_TYPE:"SMS_TYPE"};return _this}BarcodeScanner.prototype.scan=function(options){return core.cordova(this,"scan",{callbackOrder:"reverse"},arguments)};BarcodeScanner.prototype.encode=function(type,data){return core.cordova(this,"encode",{},arguments)};BarcodeScanner.pluginName="BarcodeScanner";BarcodeScanner.plugin="phonegap-plugin-barcodescanner";BarcodeScanner.pluginRef="cordova.plugins.barcodeScanner";BarcodeScanner.repo="https://github.com/phonegap/phonegap-plugin-barcodescanner";BarcodeScanner.platforms=["Android","BlackBerry 10","Browser","iOS","Windows"];BarcodeScanner.decorators=[{type:core$1.Injectable}];return BarcodeScanner}(core.AwesomeCordovaNativePlugin);var BarcodeScanner$1=Object.freeze({__proto__:null,BarcodeScanner:BarcodeScanner});var Calendar=function(_super){tslib.__extends(Calendar,_super);function Calendar(){return _super!==null&&_super.apply(this,arguments)||this}Calendar.prototype.hasReadWritePermission=function(){return core.cordova(this,"hasReadWritePermission",{},arguments)};Calendar.prototype.hasReadPermission=function(){return core.cordova(this,"hasReadPermission",{},arguments)};Calendar.prototype.hasWritePermission=function(){return core.cordova(this,"hasWritePermission",{},arguments)};Calendar.prototype.requestWritePermission=function(){return core.cordova(this,"requestWritePermission",{},arguments)};Calendar.prototype.requestReadPermission=function(){return core.cordova(this,"requestReadPermission",{},arguments)};Calendar.prototype.requestReadWritePermission=function(){return core.cordova(this,"requestReadWritePermission",{},arguments)};Calendar.prototype.createCalendar=function(nameOrOptions){return core.cordova(this,"createCalendar",{},arguments)};Calendar.prototype.deleteCalendar=function(name){return core.cordova(this,"deleteCalendar",{},arguments)};Calendar.prototype.getCalendarOptions=function(){return core.cordova(this,"getCalendarOptions",{sync:true},arguments)};Calendar.prototype.getCreateCalendarOptions=function(){return core.cordova(this,"getCreateCalendarOptions",{sync:true},arguments)};Calendar.prototype.createEvent=function(title,location,notes,startDate,endDate){return core.cordova(this,"createEvent",{},arguments)};Calendar.prototype.createEventWithOptions=function(title,location,notes,startDate,endDate,options){return core.cordova(this,"createEventWithOptions",{},arguments)};Calendar.prototype.createEventInteractively=function(title,location,notes,startDate,endDate){return core.cordova(this,"createEventInteractively",{},arguments)};Calendar.prototype.createEventInteractivelyWithOptions=function(title,location,notes,startDate,endDate,options){return core.cordova(this,"createEventInteractivelyWithOptions",{},arguments)};Calendar.prototype.findEvent=function(title,location,notes,startDate,endDate){return core.cordova(this,"findEvent",{},arguments)};Calendar.prototype.findEventWithOptions=function(title,location,notes,startDate,endDate,options){return core.cordova(this,"findEventWithOptions",{},arguments)};Calendar.prototype.listEventsInRange=function(startDate,endDate){return core.cordova(this,"listEventsInRange",{platforms:["Android"]},arguments)};Calendar.prototype.listCalendars=function(){return core.cordova(this,"listCalendars",{},arguments)};Calendar.prototype.findAllEventsInNamedCalendar=function(calendarName){return core.cordova(this,"findAllEventsInNamedCalendar",{platforms:["iOS"]},arguments)};Calendar.prototype.modifyEvent=function(title,location,notes,startDate,endDate,newTitle,newLocation,newNotes,newStartDate,newEndDate){return core.cordova(this,"modifyEvent",{platforms:["iOS"]},arguments)};Calendar.prototype.modifyEventWithOptions=function(title,location,notes,startDate,endDate,newTitle,newLocation,newNotes,newStartDate,newEndDate,filterOptions,newOptions){return core.cordova(this,"modifyEventWithOptions",{platforms:["iOS"]},arguments)};Calendar.prototype.deleteEvent=function(title,location,notes,startDate,endDate){return core.cordova(this,"deleteEvent",{},arguments)};Calendar.prototype.deleteEventFromNamedCalendar=function(title,location,notes,startDate,endDate,calendarName){return core.cordova(this,"deleteEventFromNamedCalendar",{platforms:["iOS"]},arguments)};Calendar.prototype.deleteEventById=function(id,fromDate){return core.cordova(this,"deleteEventById",{},arguments)};Calendar.prototype.openCalendar=function(date){return core.cordova(this,"openCalendar",{},arguments)};Calendar.pluginName="Calendar";Calendar.plugin="cordova-plugin-calendar";Calendar.pluginRef="plugins.calendar";Calendar.repo="https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin";Calendar.platforms=["Android","iOS"];Calendar.decorators=[{type:core$1.Injectable}];return Calendar}(core.AwesomeCordovaNativePlugin);var Calendar$1=Object.freeze({__proto__:null,Calendar:Calendar});var DestinationType;(function(DestinationType){DestinationType[DestinationType["DATA_URL"]=0]="DATA_URL";DestinationType[DestinationType["FILE_URL"]=1]="FILE_URL";DestinationType[DestinationType["NATIVE_URI"]=2]="NATIVE_URI"})(DestinationType||(DestinationType={}));var EncodingType;(function(EncodingType){EncodingType[EncodingType["JPEG"]=0]="JPEG";EncodingType[EncodingType["PNG"]=1]="PNG"})(EncodingType||(EncodingType={}));var MediaType;(function(MediaType){MediaType[MediaType["PICTURE"]=0]="PICTURE";MediaType[MediaType["VIDEO"]=1]="VIDEO";MediaType[MediaType["ALLMEDIA"]=2]="ALLMEDIA"})(MediaType||(MediaType={}));var PictureSourceType;(function(PictureSourceType){PictureSourceType[PictureSourceType["PHOTOLIBRARY"]=0]="PHOTOLIBRARY";PictureSourceType[PictureSourceType["CAMERA"]=1]="CAMERA";PictureSourceType[PictureSourceType["SAVEDPHOTOALBUM"]=2]="SAVEDPHOTOALBUM"})(PictureSourceType||(PictureSourceType={}));var PopoverArrowDirection;(function(PopoverArrowDirection){PopoverArrowDirection[PopoverArrowDirection["ARROW_UP"]=1]="ARROW_UP";PopoverArrowDirection[PopoverArrowDirection["ARROW_DOWN"]=2]="ARROW_DOWN";PopoverArrowDirection[PopoverArrowDirection["ARROW_LEFT"]=3]="ARROW_LEFT";PopoverArrowDirection[PopoverArrowDirection["ARROW_RIGHT"]=4]="ARROW_RIGHT";PopoverArrowDirection[PopoverArrowDirection["ARROW_ANY"]=5]="ARROW_ANY"})(PopoverArrowDirection||(PopoverArrowDirection={}));var Direction;(function(Direction){Direction[Direction["BACK"]=0]="BACK";Direction[Direction["FRONT"]=1]="FRONT"})(Direction||(Direction={}));var Camera=function(_super){tslib.__extends(Camera,_super);function Camera(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.DestinationType={DATA_URL:0,FILE_URI:1,NATIVE_URI:2};_this.EncodingType={JPEG:0,PNG:1};_this.MediaType={PICTURE:0,VIDEO:1,ALLMEDIA:2};_this.PictureSourceType={PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2};_this.PopoverArrowDirection={ARROW_UP:1,ARROW_DOWN:2,ARROW_LEFT:4,ARROW_RIGHT:8,ARROW_ANY:15};_this.Direction={BACK:0,FRONT:1};return _this}Camera.prototype.getPicture=function(options){return core.cordova(this,"getPicture",{callbackOrder:"reverse"},arguments)};Camera.prototype.cleanup=function(){return core.cordova(this,"cleanup",{platforms:["iOS"]},arguments)};Camera.pluginName="Camera";Camera.plugin="cordova-plugin-camera";Camera.pluginRef="navigator.camera";Camera.repo="https://github.com/apache/cordova-plugin-camera";Camera.platforms=["Android","Browser","iOS","Windows"];Camera.decorators=[{type:core$1.Injectable}];return Camera}(core.AwesomeCordovaNativePlugin);var Camera$1=Object.freeze({__proto__:null,Camera:Camera,get DestinationType(){return DestinationType},get Direction(){return Direction},get EncodingType(){return EncodingType},get MediaType(){return MediaType},get PictureSourceType(){return PictureSourceType},get PopoverArrowDirection(){return PopoverArrowDirection}});var Device=function(_super){tslib.__extends(Device,_super);function Device(){return _super!==null&&_super.apply(this,arguments)||this}Object.defineProperty(Device.prototype,"cordova",{get:function(){return core.cordovaPropertyGet(this,"cordova")},set:function(value){core.cordovaPropertySet(this,"cordova",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"model",{get:function(){return core.cordovaPropertyGet(this,"model")},set:function(value){core.cordovaPropertySet(this,"model",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"platform",{get:function(){return core.cordovaPropertyGet(this,"platform")},set:function(value){core.cordovaPropertySet(this,"platform",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"uuid",{get:function(){return core.cordovaPropertyGet(this,"uuid")},set:function(value){core.cordovaPropertySet(this,"uuid",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"version",{get:function(){return core.cordovaPropertyGet(this,"version")},set:function(value){core.cordovaPropertySet(this,"version",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"manufacturer",{get:function(){return core.cordovaPropertyGet(this,"manufacturer")},set:function(value){core.cordovaPropertySet(this,"manufacturer",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"isVirtual",{get:function(){return core.cordovaPropertyGet(this,"isVirtual")},set:function(value){core.cordovaPropertySet(this,"isVirtual",value)},enumerable:false,configurable:true});Object.defineProperty(Device.prototype,"serial",{get:function(){return core.cordovaPropertyGet(this,"serial")},set:function(value){core.cordovaPropertySet(this,"serial",value)},enumerable:false,configurable:true});Device.pluginName="Device";Device.plugin="cordova-plugin-device";Device.pluginRef="device";Device.repo="https://github.com/apache/cordova-plugin-device";Device.platforms=["Android","Browser","iOS","macOS","Windows"];Device.decorators=[{type:core$1.Injectable}];return Device}(core.AwesomeCordovaNativePlugin);var Device$1=Object.freeze({__proto__:null,Device:Device});var File=function(_super){tslib.__extends(File,_super);function File(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.cordovaFileError={1:"NOT_FOUND_ERR",2:"SECURITY_ERR",3:"ABORT_ERR",4:"NOT_READABLE_ERR",5:"ENCODING_ERR",6:"NO_MODIFICATION_ALLOWED_ERR",7:"INVALID_STATE_ERR",8:"SYNTAX_ERR",9:"INVALID_MODIFICATION_ERR",10:"QUOTA_EXCEEDED_ERR",11:"TYPE_MISMATCH_ERR",12:"PATH_EXISTS_ERR",13:"WRONG_ENTRY_TYPE",14:"DIR_READ_ERR"};return _this}File.prototype.getFreeDiskSpace=function(){var _this=this;return function(){if(core.checkAvailability(_this)===true){return core.getPromise((function(resolve,reject){cordova.exec(resolve,reject,"File","getFreeDiskSpace",[])}))}}()};File.prototype.checkDir=function(path,dir){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dir)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}var fullPath=path+dir;return _this.resolveDirectoryUrl(fullPath).then((function(){return true}))}}()};File.prototype.createDir=function(path,dirName,replace){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}var options={create:true};if(!replace){options.exclusive=true}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,options)}))}}()};File.prototype.removeDir=function(path,dirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(de){return _this.remove(de)}))}}()};File.prototype.moveDir=function(path,dirName,newPath,newDirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){newDirName=newDirName||dirName;if(/^\//.test(newDirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(srcde){return _this.resolveDirectoryUrl(newPath).then((function(destenation){return _this.move(srcde,destenation,newDirName)}))}))}}()};File.prototype.copyDir=function(path,dirName,newPath,newDirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(newDirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(srcde){return _this.resolveDirectoryUrl(newPath).then((function(deste){return _this.copy(srcde,deste,newDirName)}))}))}}()};File.prototype.listDir=function(path,dirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false,exclusive:false})})).then((function(de){var reader=de.createReader();return _this.readEntries(reader)}))}}()};File.prototype.removeRecursively=function(path,dirName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(dirName)){var err=new FileError(5);err.message="directory cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getDirectory(fse,dirName,{create:false})})).then((function(de){return _this.rimraf(de)}))}}()};File.prototype.checkFile=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(file)){var err=new FileError(5);err.message="file cannot start with /";return Promise.reject(err)}return _this.resolveLocalFilesystemUrl(path+file).then((function(fse){if(fse.isFile){return true}else{var err=new FileError(13);err.message="input is not a file";return Promise.reject(err)}}))}}()};File.prototype.createFile=function(path,fileName,replace){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(fileName)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}var options={create:true};if(!replace){options.exclusive=true}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,options)}))}}()};File.prototype.removeFile=function(path,fileName){var _this=this;return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(fileName)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,{create:false})})).then((function(fe){return _this.remove(fe)}))}}()};File.prototype.writeFile=function(path,fileName,text,options){var _this=this;if(options===void 0){options={}}return function(){if(core.checkAvailability(_this)===true){if(/^\//.test(fileName)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}var getFileOpts={create:!options.append,exclusive:!options.replace};return _this.resolveDirectoryUrl(path).then((function(directoryEntry){return _this.getFile(directoryEntry,fileName,getFileOpts)})).then((function(fileEntry){return _this.writeFileEntry(fileEntry,text,options)}))}}()};File.prototype.writeFileEntry=function(fe,text,options){var _this=this;return this.createWriter(fe).then((function(writer){if(options.append){writer.seek(writer.length)}if(options.truncate){writer.truncate(options.truncate)}return _this.write(writer,text)})).then((function(){return fe}))};File.prototype.writeExistingFile=function(path,fileName,text){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.writeFile(path,fileName,text,{replace:true})}}()};File.prototype.readAsText=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"Text")}}()};File.prototype.readAsDataURL=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"DataURL")}}()};File.prototype.readAsBinaryString=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"BinaryString")}}()};File.prototype.readAsArrayBuffer=function(path,file){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.readFile(path,file,"ArrayBuffer")}}()};File.prototype.moveFile=function(path,fileName,newPath,newFileName){var _this=this;return function(){if(core.checkAvailability(_this)===true){newFileName=newFileName||fileName;if(/^\//.test(newFileName)){var err=new FileError(5);err.message="file name cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,{create:false})})).then((function(srcfe){return _this.resolveDirectoryUrl(newPath).then((function(deste){return _this.move(srcfe,deste,newFileName)}))}))}}()};File.prototype.copyFile=function(path,fileName,newPath,newFileName){var _this=this;return function(){if(core.checkAvailability(_this)===true){newFileName=newFileName||fileName;if(/^\//.test(newFileName)){var err=new FileError(5);err.message="file name cannot start with /";return Promise.reject(err)}return _this.resolveDirectoryUrl(path).then((function(fse){return _this.getFile(fse,fileName,{create:false})})).then((function(srcfe){return _this.resolveDirectoryUrl(newPath).then((function(deste){return _this.copy(srcfe,deste,newFileName)}))}))}}()};File.prototype.fillErrorMessage=function(err){try{err.message=this.cordovaFileError[err.code]}catch(e){}};File.prototype.resolveLocalFilesystemUrl=function(fileUrl){var _this=this;return function(){if(core.checkAvailability(_this)===true){return core.getPromise((function(resolve,reject){try{window.resolveLocalFileSystemURL(fileUrl,(function(entry){resolve(entry)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}catch(xc){_this.fillErrorMessage(xc);reject(xc)}}))}}()};File.prototype.resolveDirectoryUrl=function(directoryUrl){var _this=this;return function(){if(core.checkAvailability(_this)===true){return _this.resolveLocalFilesystemUrl(directoryUrl).then((function(de){if(de.isDirectory){return de}else{var err=new FileError(13);err.message="input is not a directory";return Promise.reject(err)}}))}}()};File.prototype.getDirectory=function(directoryEntry,directoryName,flags){var _this=this;return function(){if(core.checkAvailability(_this)===true){return new Promise((function(resolve,reject){try{directoryEntry.getDirectory(directoryName,flags,(function(de){resolve(de)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}catch(xc){_this.fillErrorMessage(xc);reject(xc)}}))}}()};File.prototype.getFile=function(directoryEntry,fileName,flags){var _this=this;return function(){if(core.checkAvailability(_this)===true){return new Promise((function(resolve,reject){try{directoryEntry.getFile(fileName,flags,resolve,(function(err){_this.fillErrorMessage(err);reject(err)}))}catch(xc){_this.fillErrorMessage(xc);reject(xc)}}))}}()};File.prototype.readFile=function(path,file,readAs){var _this=this;if(/^\//.test(file)){var err=new FileError(5);err.message="file-name cannot start with /";return Promise.reject(err)}return this.resolveDirectoryUrl(path).then((function(directoryEntry){return _this.getFile(directoryEntry,file,{create:false})})).then((function(fileEntry){var reader=new FileReader;return core.getPromise((function(resolve,reject){reader.onloadend=function(){if(reader.result!==undefined||reader.result!==null){resolve(reader.result)}else if(reader.error!==undefined||reader.error!==null){reject(reader.error)}else{reject({code:null,message:"READER_ONLOADEND_ERR"})}};fileEntry.file((function(file){reader["readAs"+readAs].call(reader,file)}),(function(error){reject(error)}))}))}))};File.prototype.remove=function(fe){var _this=this;return new Promise((function(resolve,reject){fe.remove((function(){resolve({success:true,fileRemoved:fe})}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.move=function(srce,destdir,newName){var _this=this;return new Promise((function(resolve,reject){srce.moveTo(destdir,newName,(function(deste){resolve(deste)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.copy=function(srce,destdir,newName){var _this=this;return new Promise((function(resolve,reject){srce.copyTo(destdir,newName,(function(deste){resolve(deste)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.readEntries=function(dr){var _this=this;return new Promise((function(resolve,reject){dr.readEntries((function(entries){resolve(entries)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.rimraf=function(de){var _this=this;return new Promise((function(resolve,reject){de.removeRecursively((function(){resolve({success:true,fileRemoved:de})}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.createWriter=function(fe){var _this=this;return new Promise((function(resolve,reject){fe.createWriter((function(writer){resolve(writer)}),(function(err){_this.fillErrorMessage(err);reject(err)}))}))};File.prototype.write=function(writer,gu){if(gu instanceof Blob){return this.writeFileInChunks(writer,gu)}return new Promise((function(resolve,reject){writer.onwriteend=function(evt){if(writer.error){reject(writer.error)}else{resolve(evt)}};writer.write(gu)}))};File.prototype.writeFileInChunks=function(writer,file){var BLOCK_SIZE=1024*1024;var writtenSize=0;function writeNextChunk(){var size=Math.min(BLOCK_SIZE,file.size-writtenSize);var chunk=file.slice(writtenSize,writtenSize+size);writtenSize+=size;writer.write(chunk)}return core.getPromise((function(resolve,reject){writer.onerror=reject;writer.onwrite=function(){if(writtenSize<file.size){writeNextChunk()}else{resolve()}};writeNextChunk()}))};Object.defineProperty(File.prototype,"applicationDirectory",{get:function(){return core.cordovaPropertyGet(this,"applicationDirectory")},set:function(value){core.cordovaPropertySet(this,"applicationDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"applicationStorageDirectory",{get:function(){return core.cordovaPropertyGet(this,"applicationStorageDirectory")},set:function(value){core.cordovaPropertySet(this,"applicationStorageDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"dataDirectory",{get:function(){return core.cordovaPropertyGet(this,"dataDirectory")},set:function(value){core.cordovaPropertySet(this,"dataDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"cacheDirectory",{get:function(){return core.cordovaPropertyGet(this,"cacheDirectory")},set:function(value){core.cordovaPropertySet(this,"cacheDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalApplicationStorageDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalApplicationStorageDirectory")},set:function(value){core.cordovaPropertySet(this,"externalApplicationStorageDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalDataDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalDataDirectory")},set:function(value){core.cordovaPropertySet(this,"externalDataDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalCacheDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalCacheDirectory")},set:function(value){core.cordovaPropertySet(this,"externalCacheDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"externalRootDirectory",{get:function(){return core.cordovaPropertyGet(this,"externalRootDirectory")},set:function(value){core.cordovaPropertySet(this,"externalRootDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"tempDirectory",{get:function(){return core.cordovaPropertyGet(this,"tempDirectory")},set:function(value){core.cordovaPropertySet(this,"tempDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"syncedDataDirectory",{get:function(){return core.cordovaPropertyGet(this,"syncedDataDirectory")},set:function(value){core.cordovaPropertySet(this,"syncedDataDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"documentsDirectory",{get:function(){return core.cordovaPropertyGet(this,"documentsDirectory")},set:function(value){core.cordovaPropertySet(this,"documentsDirectory",value)},enumerable:false,configurable:true});Object.defineProperty(File.prototype,"sharedDirectory",{get:function(){return core.cordovaPropertyGet(this,"sharedDirectory")},set:function(value){core.cordovaPropertySet(this,"sharedDirectory",value)},enumerable:false,configurable:true});File.pluginName="File";File.plugin="cordova-plugin-file";File.pluginRef="cordova.file";File.repo="https://github.com/apache/cordova-plugin-file";File.platforms=["Android","Browser","iOS","macOS","Windows"];File.decorators=[{type:core$1.Injectable}];return File}(core.AwesomeCordovaNativePlugin);var File$1=Object.freeze({__proto__:null,File:File});var FileOpener=function(_super){tslib.__extends(FileOpener,_super);function FileOpener(){return _super!==null&&_super.apply(this,arguments)||this}FileOpener.prototype.open=function(filePath,fileMIMEType){return core.cordova(this,"open",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.prototype.uninstall=function(packageId){return core.cordova(this,"uninstall",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.prototype.appIsInstalled=function(packageId){return core.cordova(this,"appIsInstalled",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.prototype.showOpenWithDialog=function(filePath,fileMIMEType){return core.cordova(this,"showOpenWithDialog",{callbackStyle:"object",successName:"success",errorName:"error"},arguments)};FileOpener.pluginName="FileOpener";FileOpener.plugin="cordova-plugin-file-opener2";FileOpener.pluginRef="cordova.plugins.fileOpener2";FileOpener.repo="https://github.com/pwlin/cordova-plugin-file-opener2";FileOpener.platforms=["Android","iOS","Windows","Windows Phone 8"];FileOpener.decorators=[{type:core$1.Injectable}];return FileOpener}(core.AwesomeCordovaNativePlugin);var FileOpener$1=Object.freeze({__proto__:null,FileOpener:FileOpener});var Geolocation=function(_super){tslib.__extends(Geolocation,_super);function Geolocation(){return _super!==null&&_super.apply(this,arguments)||this}Geolocation.prototype.getCurrentPosition=function(options){return core.cordova(this,"getCurrentPosition",{callbackOrder:"reverse"},arguments)};Geolocation.prototype.watchPosition=function(options){return new rxjs.Observable((function(observer){var watchId=navigator.geolocation.watchPosition(observer.next.bind(observer),observer.next.bind(observer),options);return function(){return navigator.geolocation.clearWatch(watchId)}}))};Geolocation.pluginName="Geolocation";Geolocation.plugin="cordova-plugin-geolocation";Geolocation.pluginRef="navigator.geolocation";Geolocation.repo="https://github.com/apache/cordova-plugin-geolocation";Geolocation.install='ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="To locate you"';Geolocation.installVariables=["GEOLOCATION_USAGE_DESCRIPTION"];Geolocation.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"];Geolocation.decorators=[{type:core$1.Injectable}];return Geolocation}(core.AwesomeCordovaNativePlugin);var GeoLocation=Object.freeze({__proto__:null,Geolocation:Geolocation});var MediaCapture=function(_super){tslib.__extends(MediaCapture,_super);function MediaCapture(){return _super!==null&&_super.apply(this,arguments)||this}MediaCapture.prototype.captureAudio=function(options){return core.cordova(this,"captureAudio",{callbackOrder:"reverse"},arguments)};MediaCapture.prototype.captureImage=function(options){return core.cordova(this,"captureImage",{callbackOrder:"reverse"},arguments)};MediaCapture.prototype.captureVideo=function(options){return core.cordova(this,"captureVideo",{callbackOrder:"reverse"},arguments)};MediaCapture.prototype.onPendingCaptureResult=function(){return core.cordova(this,"onPendingCaptureResult",{eventObservable:true,event:"pendingcaptureresult"},arguments)};MediaCapture.prototype.onPendingCaptureError=function(){return core.cordova(this,"onPendingCaptureError",{eventObservable:true,event:"pendingcaptureerror"},arguments)};Object.defineProperty(MediaCapture.prototype,"supportedImageModes",{get:function(){return core.cordovaPropertyGet(this,"supportedImageModes")},set:function(value){core.cordovaPropertySet(this,"supportedImageModes",value)},enumerable:false,configurable:true});Object.defineProperty(MediaCapture.prototype,"supportedAudioModes",{get:function(){return core.cordovaPropertyGet(this,"supportedAudioModes")},set:function(value){core.cordovaPropertySet(this,"supportedAudioModes",value)},enumerable:false,configurable:true});Object.defineProperty(MediaCapture.prototype,"supportedVideoModes",{get:function(){return core.cordovaPropertyGet(this,"supportedVideoModes")},set:function(value){core.cordovaPropertySet(this,"supportedVideoModes",value)},enumerable:false,configurable:true});MediaCapture.pluginName="MediaCapture";MediaCapture.plugin="cordova-plugin-media-capture";MediaCapture.pluginRef="navigator.device.capture";MediaCapture.repo="https://github.com/apache/cordova-plugin-media-capture";MediaCapture.platforms=["Android","Browser","iOS","Windows"];MediaCapture.decorators=[{type:core$1.Injectable}];return MediaCapture}(core.AwesomeCordovaNativePlugin);var MediaCapture$1=Object.freeze({__proto__:null,MediaCapture:MediaCapture});var Connection;(function(Connection){Connection["UNKNOWN"]="unknown";Connection["ETHERNET"]="ethernet";Connection["WIFI"]="wifi";Connection["CELL_2G"]="2g";Connection["CELL_3G"]="3g";Connection["CELL_4G"]="4g";Connection["CELL"]="cellular";Connection["NONE"]="none"})(Connection||(Connection={}));var Network=function(_super){tslib.__extends(Network,_super);function Network(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.Connection={UNKNOWN:"unknown",ETHERNET:"ethernet",WIFI:"wifi",CELL_2G:"2g",CELL_3G:"3g",CELL_4G:"4g",CELL:"cellular",NONE:"none"};return _this}Network.prototype.onChange=function(){var _this=this;return function(){if(core.checkAvailability(_this)===true){return rxjs.merge(_this.onConnect().pipe(operators.mapTo("connected")),_this.onDisconnect().pipe(operators.mapTo("disconnected")))}}()};Network.prototype.onDisconnect=function(){return core.cordova(this,"onDisconnect",{eventObservable:true,event:"offline",element:"document"},arguments)};Network.prototype.onConnect=function(){return core.cordova(this,"onConnect",{eventObservable:true,event:"online",element:"document"},arguments)};Object.defineProperty(Network.prototype,"type",{get:function(){return core.cordovaPropertyGet(this,"type")},set:function(value){core.cordovaPropertySet(this,"type",value)},enumerable:false,configurable:true});Object.defineProperty(Network.prototype,"downlinkMax",{get:function(){return core.cordovaPropertyGet(this,"downlinkMax")},set:function(value){core.cordovaPropertySet(this,"downlinkMax",value)},enumerable:false,configurable:true});Network.pluginName="Network";Network.plugin="cordova-plugin-network-information";Network.pluginRef="navigator.connection";Network.repo="https://github.com/apache/cordova-plugin-network-information";Network.platforms=["Amazon Fire OS","Android","Browser","iOS","Windows"];Network.decorators=[{type:core$1.Injectable}];return Network}(core.AwesomeCordovaNativePlugin);var Network$1=Object.freeze({__proto__:null,get Connection(){return Connection},Network:Network});var SQLiteObject=function(){function SQLiteObject(_objectInstance){this._objectInstance=_objectInstance}SQLiteObject.prototype.addTransaction=function(transaction){return core.cordovaInstance(this,"addTransaction",{sync:true},arguments)};SQLiteObject.prototype.transaction=function(fn){return core.cordovaInstance(this,"transaction",{successIndex:2,errorIndex:1},arguments)};SQLiteObject.prototype.readTransaction=function(fn){return core.cordovaInstance(this,"readTransaction",{},arguments)};SQLiteObject.prototype.startNextTransaction=function(){return core.cordovaInstance(this,"startNextTransaction",{sync:true},arguments)};SQLiteObject.prototype.open=function(){return core.cordovaInstance(this,"open",{},arguments)};SQLiteObject.prototype.close=function(){return core.cordovaInstance(this,"close",{},arguments)};SQLiteObject.prototype.executeSql=function(statement,params){return core.cordovaInstance(this,"executeSql",{},arguments)};SQLiteObject.prototype.sqlBatch=function(sqlStatements){return core.cordovaInstance(this,"sqlBatch",{},arguments)};SQLiteObject.prototype.abortallPendingTransactions=function(){return core.cordovaInstance(this,"abortallPendingTransactions",{sync:true},arguments)};Object.defineProperty(SQLiteObject.prototype,"databaseFeatures",{get:function(){return core.instancePropertyGet(this,"databaseFeatures")},set:function(value){core.instancePropertySet(this,"databaseFeatures",value)},enumerable:false,configurable:true});Object.defineProperty(SQLiteObject.prototype,"openDBs",{get:function(){return core.instancePropertyGet(this,"openDBs")},set:function(value){core.instancePropertySet(this,"openDBs",value)},enumerable:false,configurable:true});return SQLiteObject}();var SQLite=function(_super){tslib.__extends(SQLite,_super);function SQLite(){return _super!==null&&_super.apply(this,arguments)||this}SQLite.prototype.create=function(config){var _this=this;return function(){if(core.checkAvailability(_this)===true){return new Promise((function(resolve,reject){sqlitePlugin.openDatabase(config,(function(db){return resolve(new SQLiteObject(db))}),reject)}))}}()};SQLite.prototype.echoTest=function(){return core.cordova(this,"echoTest",{},arguments)};SQLite.prototype.selfTest=function(){return core.cordova(this,"selfTest",{},arguments)};SQLite.prototype.deleteDatabase=function(config){return core.cordova(this,"deleteDatabase",{},arguments)};SQLite.pluginName="SQLite";SQLite.pluginRef="sqlitePlugin";SQLite.plugin="cordova-sqlite-storage";SQLite.repo="https://github.com/litehelpers/Cordova-sqlite-storage";SQLite.platforms=["Android","iOS","macOS","Windows"];SQLite.decorators=[{type:core$1.Injectable}];return SQLite}(core.AwesomeCordovaNativePlugin);var Sqlite=Object.freeze({__proto__:null,SQLite:SQLite,SQLiteObject:SQLiteObject});var Vibration=function(_super){tslib.__extends(Vibration,_super);function Vibration(){return _super!==null&&_super.apply(this,arguments)||this}Vibration.prototype.vibrate=function(time){return core.cordova(this,"vibrate",{sync:true},arguments)};Vibration.pluginName="Vibration";Vibration.plugin="cordova-plugin-vibration";Vibration.pluginRef="navigator";Vibration.repo="https://github.com/apache/cordova-plugin-vibration";Vibration.platforms=["Android","iOS","Windows"];Vibration.decorators=[{type:core$1.Injectable}];return Vibration}(core.AwesomeCordovaNativePlugin);var Vibration$1=Object.freeze({__proto__:null,Vibration:Vibration});var LocationAccuracy=function(_super){tslib.__extends(LocationAccuracy,_super);function LocationAccuracy(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.REQUEST_PRIORITY_NO_POWER=0;_this.REQUEST_PRIORITY_LOW_POWER=1;_this.REQUEST_PRIORITY_BALANCED_POWER_ACCURACY=2;_this.REQUEST_PRIORITY_HIGH_ACCURACY=3;_this.SUCCESS_SETTINGS_SATISFIED=0;_this.SUCCESS_USER_AGREED=1;_this.ERROR_ALREADY_REQUESTING=-1;_this.ERROR_INVALID_ACTION=0;_this.ERROR_INVALID_ACCURACY=1;_this.ERROR_EXCEPTION=1;_this.ERROR_CANNOT_CHANGE_ACCURACY=3;_this.ERROR_USER_DISAGREED=4;_this.ERROR_GOOGLE_API_CONNECTION_FAILED=4;return _this}LocationAccuracy.prototype.canRequest=function(){return core.cordova(this,"canRequest",{},arguments)};LocationAccuracy.prototype.isRequesting=function(){return core.cordova(this,"isRequesting",{},arguments)};LocationAccuracy.prototype.request=function(accuracy){return core.cordova(this,"request",{callbackOrder:"reverse"},arguments)};LocationAccuracy.pluginName="LocationAccuracy";LocationAccuracy.plugin="cordova-plugin-request-location-accuracy";LocationAccuracy.pluginRef="cordova.plugins.locationAccuracy";LocationAccuracy.repo="https://github.com/dpa99c/cordova-plugin-request-location-accuracy";LocationAccuracy.platforms=["Android","iOS"];LocationAccuracy.decorators=[{type:core$1.Injectable}];return LocationAccuracy}(core.AwesomeCordovaNativePlugin);var LocationAccuracy$1=Object.freeze({__proto__:null,LocationAccuracy:LocationAccuracy});var Diagnostic=function(_super){tslib.__extends(Diagnostic,_super);function Diagnostic(){var _this=_super!==null&&_super.apply(this,arguments)||this;_this.permission={READ_CALENDAR:"READ_CALENDAR",WRITE_CALENDAR:"WRITE_CALENDAR",CAMERA:"CAMERA",READ_CONTACTS:"READ_CONTACTS",WRITE_CONTACTS:"WRITE_CONTACTS",GET_ACCOUNTS:"GET_ACCOUNTS",ACCESS_FINE_LOCATION:"ACCESS_FINE_LOCATION",ACCESS_COARSE_LOCATION:"ACCESS_COARSE_LOCATION",RECORD_AUDIO:"RECORD_AUDIO",READ_PHONE_STATE:"READ_PHONE_STATE",CALL_PHONE:"CALL_PHONE",ADD_VOICEMAIL:"ADD_VOICEMAIL",USE_SIP:"USE_SIP",PROCESS_OUTGOING_CALLS:"PROCESS_OUTGOING_CALLS",READ_CALL_LOG:"READ_CALL_LOG",WRITE_CALL_LOG:"WRITE_CALL_LOG",SEND_SMS:"SEND_SMS",RECEIVE_SMS:"RECEIVE_SMS",READ_SMS:"READ_SMS",RECEIVE_WAP_PUSH:"RECEIVE_WAP_PUSH",RECEIVE_MMS:"RECEIVE_MMS",WRITE_EXTERNAL_STORAGE:"WRITE_EXTERNAL_STORAGE",READ_EXTERNAL_STORAGE:"READ_EXTERNAL_STORAGE",BODY_SENSORS:"BODY_SENSORS"};_this.locationAuthorizationMode={ALWAYS:"always",WHEN_IN_USE:"when_in_use"};_this.permissionGroups={CALENDAR:["READ_CALENDAR","WRITE_CALENDAR"],CAMERA:["CAMERA"],CONTACTS:["READ_CONTACTS","WRITE_CONTACTS","GET_ACCOUNTS"],LOCATION:["ACCESS_FINE_LOCATION","ACCESS_COARSE_LOCATION"],MICROPHONE:["RECORD_AUDIO"],PHONE:["READ_PHONE_STATE","CALL_PHONE","ADD_VOICEMAIL","USE_SIP","PROCESS_OUTGOING_CALLS","READ_CALL_LOG","WRITE_CALL_LOG"],SENSORS:["BODY_SENSORS"],SMS:["SEND_SMS","RECEIVE_SMS","READ_SMS","RECEIVE_WAP_PUSH","RECEIVE_MMS"],STORAGE:["READ_EXTERNAL_STORAGE","WRITE_EXTERNAL_STORAGE"]};_this.locationMode={HIGH_ACCURACY:"high_accuracy",DEVICE_ONLY:"device_only",BATTERY_SAVING:"battery_saving",LOCATION_OFF:"location_off"};_this.bluetoothState={UNKNOWN:"unknown",RESETTING:"resetting",UNSUPPORTED:"unsupported",UNAUTHORIZED:"unauthorized",POWERED_OFF:"powered_off",POWERED_ON:"powered_on",POWERING_OFF:"powering_off",POWERING_ON:"powering_on"};return _this}Diagnostic.prototype.isLocationAvailable=function(){return core.cordova(this,"isLocationAvailable",{},arguments)};Diagnostic.prototype.isWifiAvailable=function(){return core.cordova(this,"isWifiAvailable",{},arguments)};Diagnostic.prototype.isCameraAvailable=function(externalStorage){return core.cordova(this,"isCameraAvailable",{callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isBluetoothAvailable=function(){return core.cordova(this,"isBluetoothAvailable",{},arguments)};Diagnostic.prototype.switchToLocationSettings=function(){return core.cordova(this,"switchToLocationSettings",{sync:true,platforms:["Android","Windows 10","iOS"]},arguments)};Diagnostic.prototype.switchToMobileDataSettings=function(){return core.cordova(this,"switchToMobileDataSettings",{sync:true,platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.switchToBluetoothSettings=function(){return core.cordova(this,"switchToBluetoothSettings",{sync:true,platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.switchToWifiSettings=function(){return core.cordova(this,"switchToWifiSettings",{sync:true,platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.isWifiEnabled=function(){return core.cordova(this,"isWifiEnabled",{platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.setWifiState=function(state){return core.cordova(this,"setWifiState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.setBluetoothState=function(state){return core.cordova(this,"setBluetoothState",{callbackOrder:"reverse",platforms:["Android","Windows 10"]},arguments)};Diagnostic.prototype.isLocationEnabled=function(){return core.cordova(this,"isLocationEnabled",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isLocationAuthorized=function(){return core.cordova(this,"isLocationAuthorized",{},arguments)};Diagnostic.prototype.getLocationAuthorizationStatus=function(){return core.cordova(this,"getLocationAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestLocationAuthorization=function(mode){return core.cordova(this,"requestLocationAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isCameraPresent=function(){return core.cordova(this,"isCameraPresent",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isCameraAuthorized=function(externalStorage){return core.cordova(this,"isCameraAuthorized",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.getCameraAuthorizationStatus=function(externalStorage){return core.cordova(this,"getCameraAuthorizationStatus",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.requestCameraAuthorization=function(externalStorage){return core.cordova(this,"requestCameraAuthorization",{platforms:["Android","iOS"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isMicrophoneAuthorized=function(){return core.cordova(this,"isMicrophoneAuthorized",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getMicrophoneAuthorizationStatus=function(){return core.cordova(this,"getMicrophoneAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestMicrophoneAuthorization=function(){return core.cordova(this,"requestMicrophoneAuthorization",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isContactsAuthorized=function(){return core.cordova(this,"isContactsAuthorized",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getContactsAuthorizationStatus=function(){return core.cordova(this,"getContactsAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestContactsAuthorization=function(){return core.cordova(this,"requestContactsAuthorization",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.isCalendarAuthorized=function(){return core.cordova(this,"isCalendarAuthorized",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getCalendarAuthorizationStatus=function(){return core.cordova(this,"getCalendarAuthorizationStatus",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.requestCalendarAuthorization=function(){return core.cordova(this,"requestCalendarAuthorization",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.switchToSettings=function(){return core.cordova(this,"switchToSettings",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.getBluetoothState=function(){return core.cordova(this,"getBluetoothState",{platforms:["Android","iOS"]},arguments)};Diagnostic.prototype.registerBluetoothStateChangeHandler=function(handler){return core.cordova(this,"registerBluetoothStateChangeHandler",{platforms:["Android","iOS"],sync:true},arguments)};Diagnostic.prototype.registerLocationStateChangeHandler=function(handler){return core.cordova(this,"registerLocationStateChangeHandler",{platforms:["Android","iOS"],sync:true},arguments)};Diagnostic.prototype.isGpsLocationAvailable=function(){return core.cordova(this,"isGpsLocationAvailable",{platforms:["Android"]},arguments)};Diagnostic.prototype.isGpsLocationEnabled=function(){return core.cordova(this,"isGpsLocationEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNetworkLocationAvailable=function(){return core.cordova(this,"isNetworkLocationAvailable",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNetworkLocationEnabled=function(){return core.cordova(this,"isNetworkLocationEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.getLocationMode=function(){return core.cordova(this,"getLocationMode",{platforms:["Android"]},arguments)};Diagnostic.prototype.getPermissionAuthorizationStatus=function(permission){return core.cordova(this,"getPermissionAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.getPermissionsAuthorizationStatus=function(permissions){return core.cordova(this,"getPermissionsAuthorizationStatus",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.requestRuntimePermission=function(permission){return core.cordova(this,"requestRuntimePermission",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.requestRuntimePermissions=function(permissions){return core.cordova(this,"requestRuntimePermissions",{platforms:["Android"],callbackOrder:"reverse"},arguments)};Diagnostic.prototype.isRequestingPermission=function(){return core.cordova(this,"isRequestingPermission",{sync:true},arguments)};Diagnostic.prototype.registerPermissionRequestCompleteHandler=function(handler){return core.cordova(this,"registerPermissionRequestCompleteHandler",{sync:true},arguments)};Diagnostic.prototype.isBluetoothEnabled=function(){return core.cordova(this,"isBluetoothEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.hasBluetoothSupport=function(){return core.cordova(this,"hasBluetoothSupport",{platforms:["Android"]},arguments)};Diagnostic.prototype.hasBluetoothLESupport=function(){return core.cordova(this,"hasBluetoothLESupport",{platforms:["Android"]},arguments)};Diagnostic.prototype.hasBluetoothLEPeripheralSupport=function(){return core.cordova(this,"hasBluetoothLEPeripheralSupport",{platforms:["Android"]},arguments)};Diagnostic.prototype.isExternalStorageAuthorized=function(){return core.cordova(this,"isExternalStorageAuthorized",{platforms:["Android"]},arguments)};Diagnostic.prototype.getExternalStorageAuthorizationStatus=function(){return core.cordova(this,"getExternalStorageAuthorizationStatus",{platforms:["Android"]},arguments)};Diagnostic.prototype.requestExternalStorageAuthorization=function(){return core.cordova(this,"requestExternalStorageAuthorization",{platforms:["Android"]},arguments)};Diagnostic.prototype.getExternalSdCardDetails=function(){return core.cordova(this,"getExternalSdCardDetails",{platforms:["Android"]},arguments)};Diagnostic.prototype.switchToWirelessSettings=function(){return core.cordova(this,"switchToWirelessSettings",{platforms:["Android"],sync:true},arguments)};Diagnostic.prototype.switchToNFCSettings=function(){return core.cordova(this,"switchToNFCSettings",{platforms:["Android"],sync:true},arguments)};Diagnostic.prototype.isNFCPresent=function(){return core.cordova(this,"isNFCPresent",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNFCEnabled=function(){return core.cordova(this,"isNFCEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isNFCAvailable=function(){return core.cordova(this,"isNFCAvailable",{platforms:["Android"]},arguments)};Diagnostic.prototype.registerNFCStateChangeHandler=function(handler){return core.cordova(this,"registerNFCStateChangeHandler",{platforms:["Android"],sync:true},arguments)};Diagnostic.prototype.isDataRoamingEnabled=function(){return core.cordova(this,"isDataRoamingEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isADBModeEnabled=function(){return core.cordova(this,"isADBModeEnabled",{platforms:["Android"]},arguments)};Diagnostic.prototype.isDeviceRooted=function(){return core.cordova(this,"isDeviceRooted",{platforms:["Android"]},arguments)};Diagnostic.prototype.isCameraRollAuthorized=function(){return core.cordova(this,"isCameraRollAuthorized",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getCameraRollAuthorizationStatus=function(){return core.cordova(this,"getCameraRollAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestCameraRollAuthorization=function(){return core.cordova(this,"requestCameraRollAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isRemoteNotificationsEnabled=function(){return core.cordova(this,"isRemoteNotificationsEnabled",{platforms:["iOS","Android"]},arguments)};Diagnostic.prototype.isRegisteredForRemoteNotifications=function(){return core.cordova(this,"isRegisteredForRemoteNotifications",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getRemoteNotificationsAuthorizationStatus=function(){return core.cordova(this,"getRemoteNotificationsAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestRemoteNotificationsAuthorization=function(types,omitRegistration){return core.cordova(this,"requestRemoteNotificationsAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getRemoteNotificationTypes=function(){return core.cordova(this,"getRemoteNotificationTypes",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isRemindersAuthorized=function(){return core.cordova(this,"isRemindersAuthorized",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getRemindersAuthorizationStatus=function(){return core.cordova(this,"getRemindersAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestRemindersAuthorization=function(){return core.cordova(this,"requestRemindersAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isBackgroundRefreshAuthorized=function(){return core.cordova(this,"isBackgroundRefreshAuthorized",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getBackgroundRefreshStatus=function(){return core.cordova(this,"getBackgroundRefreshStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestBluetoothAuthorization=function(){return core.cordova(this,"requestBluetoothAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isMotionAvailable=function(){return core.cordova(this,"isMotionAvailable",{platforms:["iOS"]},arguments)};Diagnostic.prototype.isMotionRequestOutcomeAvailable=function(){return core.cordova(this,"isMotionRequestOutcomeAvailable",{platforms:["iOS"]},arguments)};Diagnostic.prototype.requestMotionAuthorization=function(){return core.cordova(this,"requestMotionAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getMotionAuthorizationStatus=function(){return core.cordova(this,"getMotionAuthorizationStatus",{platforms:["iOS"]},arguments)};Diagnostic.prototype.getLocationAccuracyAuthorization=function(){return core.cordova(this,"getLocationAccuracyAuthorization",{platform:["iOS"]},arguments)};Diagnostic.prototype.requestTemporaryFullAccuracyAuthorization=function(purpose){return core.cordova(this,"requestTemporaryFullAccuracyAuthorization",{platforms:["iOS"]},arguments)};Diagnostic.prototype.registerLocationAccuracyAuthorizationChangeHandler=function(handler){return core.cordova(this,"registerLocationAccuracyAuthorizationChangeHandler",{platforms:["iOS"],sync:true},arguments)};Object.defineProperty(Diagnostic.prototype,"permissionStatus",{get:function(){return core.cordovaPropertyGet(this,"permissionStatus")},set:function(value){core.cordovaPropertySet(this,"permissionStatus",value)},enumerable:false,configurable:true});Object.defineProperty(Diagnostic.prototype,"NFCState",{get:function(){return core.cordovaPropertyGet(this,"NFCState")},set:function(value){core.cordovaPropertySet(this,"NFCState",value)},enumerable:false,configurable:true});Object.defineProperty(Diagnostic.prototype,"motionStatus",{get:function(){return core.cordovaPropertyGet(this,"motionStatus")},set:function(value){core.cordovaPropertySet(this,"motionStatus",value)},enumerable:false,configurable:true});Diagnostic.pluginName="Diagnostic";Diagnostic.plugin="cordova.plugins.diagnostic";Diagnostic.pluginRef="cordova.plugins.diagnostic";Diagnostic.repo="https://github.com/dpa99c/cordova-diagnostic-plugin";Diagnostic.platforms=["Android","iOS","Windows"];Diagnostic.decorators=[{type:core$1.Injectable}];return Diagnostic}(core.AwesomeCordovaNativePlugin);var Diagnostic$1=Object.freeze({__proto__:null,Diagnostic:Diagnostic});var awesomeCordovaPlugins={...AppVersion$1,...BarcodeScanner$1,...Calendar$1,...Camera$1,...Device$1,...File$1,...FileOpener$1,...GeoLocation,...MediaCapture$1,...Network$1,...Sqlite,...Vibration$1,...LocationAccuracy$1,...Diagnostic$1};return awesomeCordovaPlugins}));/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
848
848
  (function(window,document,Math){var rAF=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/60)};var utils=function(){var me={};var _elementStyle=document.createElement("div").style;var _vendor=function(){var vendors=["t","webkitT","MozT","msT","OT"],transform,i=0,l=vendors.length;for(;i<l;i++){transform=vendors[i]+"ransform";if(transform in _elementStyle)return vendors[i].substr(0,vendors[i].length-1)}return false}();function _prefixStyle(style){if(_vendor===false)return false;if(_vendor==="")return style;return _vendor+style.charAt(0).toUpperCase()+style.substr(1)}me.getTime=Date.now||function getTime(){return(new Date).getTime()};me.extend=function(target,obj){for(var i in obj){target[i]=obj[i]}};me.addEvent=function(el,type,fn,capture){el.addEventListener(type,fn,!!capture)};me.removeEvent=function(el,type,fn,capture){el.removeEventListener(type,fn,!!capture)};me.prefixPointerEvent=function(pointerEvent){return window.MSPointerEvent?"MSPointer"+pointerEvent.charAt(7).toUpperCase()+pointerEvent.substr(8):pointerEvent};me.momentum=function(current,start,time,lowerMargin,wrapperSize,deceleration){var distance=current-start,speed=Math.abs(distance)/time,destination,duration;deceleration=deceleration===undefined?6e-4:deceleration;destination=current+speed*speed/(2*deceleration)*(distance<0?-1:1);duration=speed/deceleration;if(destination<lowerMargin){destination=wrapperSize?lowerMargin-wrapperSize/2.5*(speed/8):lowerMargin;distance=Math.abs(destination-current);duration=distance/speed}else if(destination>0){destination=wrapperSize?wrapperSize/2.5*(speed/8):0;distance=Math.abs(current)+destination;duration=distance/speed}return{destination:Math.round(destination),duration:duration}};var _transform=_prefixStyle("transform");me.extend(me,{hasTransform:_transform!==false,hasPerspective:_prefixStyle("perspective")in _elementStyle,hasTouch:"ontouchstart"in window,hasPointer:!!(window.PointerEvent||window.MSPointerEvent),hasTransition:_prefixStyle("transition")in _elementStyle});me.isBadAndroid=function(){var appVersion=window.navigator.appVersion;if(/Android/.test(appVersion)&&!/Chrome\/\d/.test(appVersion)){var safariVersion=appVersion.match(/Safari\/(\d+.\d)/);if(safariVersion&&typeof safariVersion==="object"&&safariVersion.length>=2){return parseFloat(safariVersion[1])<535.19}else{return true}}else{return false}}();me.extend(me.style={},{transform:_transform,transitionTimingFunction:_prefixStyle("transitionTimingFunction"),transitionDuration:_prefixStyle("transitionDuration"),transitionDelay:_prefixStyle("transitionDelay"),transformOrigin:_prefixStyle("transformOrigin")});me.hasClass=function(e,c){var re=new RegExp("(^|\\s)"+c+"(\\s|$)");return re.test(e.className)};me.addClass=function(e,c){if(me.hasClass(e,c)){return}var newclass=e.className.split(" ");newclass.push(c);e.className=newclass.join(" ")};me.removeClass=function(e,c){if(!me.hasClass(e,c)){return}var re=new RegExp("(^|\\s)"+c+"(\\s|$)","g");e.className=e.className.replace(re," ")};me.offset=function(el){var left=-el.offsetLeft,top=-el.offsetTop;while(el=el.offsetParent){left-=el.offsetLeft;top-=el.offsetTop}return{left:left,top:top}};me.preventDefaultException=function(el,exceptions){for(var i in exceptions){if(exceptions[i].test(el[i])){return true}}return false};me.extend(me.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3});me.extend(me.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(k){return k*(2-k)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(k){return Math.sqrt(1- --k*k)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(k){var b=4;return(k=k-1)*k*((b+1)*k+b)+1}},bounce:{style:"",fn:function(k){if((k/=1)<1/2.75){return 7.5625*k*k}else if(k<2/2.75){return 7.5625*(k-=1.5/2.75)*k+.75}else if(k<2.5/2.75){return 7.5625*(k-=2.25/2.75)*k+.9375}else{return 7.5625*(k-=2.625/2.75)*k+.984375}}},elastic:{style:"",fn:function(k){var f=.22,e=.4;if(k===0){return 0}if(k==1){return 1}return e*Math.pow(2,-10*k)*Math.sin((k-f/4)*(2*Math.PI)/f)+1}}});me.tap=function(e,eventName){var ev=document.createEvent("Event");ev.initEvent(eventName,true,true);ev.pageX=e.pageX;ev.pageY=e.pageY;e.target.dispatchEvent(ev)};me.click=function(e){var target=e.target,ev;if(!/(SELECT|INPUT|TEXTAREA)/i.test(target.tagName)){ev=document.createEvent("MouseEvents");ev.initMouseEvent("click",true,true,e.view,1,target.screenX,target.screenY,target.clientX,target.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null);ev._constructed=true;target.dispatchEvent(ev)}};return me}();function IScroll(el,options){this.wrapper=typeof el=="string"?document.querySelector(el):el;this.scroller=this.wrapper.children[0];this.scrollerStyle=this.scroller.style;this.options={resizeScrollbars:true,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!utils.hasPointer,disableTouch:utils.hasPointer||!utils.hasTouch,disableMouse:utils.hasPointer||utils.hasTouch,startX:0,startY:0,scrollY:true,directionLockThreshold:5,momentum:true,bounce:true,bounceTime:600,bounceEasing:"",preventDefault:true,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:true,useTransition:true,useTransform:true,bindToWrapper:typeof window.onmousedown==="undefined"};for(var i in options){this.options[i]=options[i]}this.translateZ=this.options.HWCompositing&&utils.hasPerspective?" translateZ(0)":"";this.options.useTransition=utils.hasTransition&&this.options.useTransition;this.options.useTransform=utils.hasTransform&&this.options.useTransform;this.options.eventPassthrough=this.options.eventPassthrough===true?"vertical":this.options.eventPassthrough;this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault;this.options.scrollY=this.options.eventPassthrough=="vertical"?false:this.options.scrollY;this.options.scrollX=this.options.eventPassthrough=="horizontal"?false:this.options.scrollX;this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough;this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold;this.options.bounceEasing=typeof this.options.bounceEasing=="string"?utils.ease[this.options.bounceEasing]||utils.ease.circular:this.options.bounceEasing;this.options.resizePolling=this.options.resizePolling===undefined?60:this.options.resizePolling;if(this.options.tap===true){this.options.tap="tap"}if(this.options.shrinkScrollbars=="scale"){this.options.useTransition=false}this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1;this.x=0;this.y=0;this.directionX=0;this.directionY=0;this._events={};this._init();this.refresh();this.scrollTo(this.options.startX,this.options.startY);this.enable()}IScroll.prototype={version:"5.2.0",_init:function(){this._initEvents();if(this.options.scrollbars||this.options.indicators){this._initIndicators()}if(this.options.mouseWheel){this._initWheel()}if(this.options.snap){this._initSnap()}if(this.options.keyBindings){this._initKeys()}},destroy:function(){this._initEvents(true);clearTimeout(this.resizeTimeout);this.resizeTimeout=null;this._execEvent("destroy")},_transitionEnd:function(e){if(e.target!=this.scroller||!this.isInTransition){return}this._transitionTime();if(!this.resetPosition(this.options.bounceTime)){this.isInTransition=false;this._execEvent("scrollEnd")}},_start:function(e){if(utils.eventType[e.type]!=1){var button;if(!e.which){button=e.button<2?0:e.button==4?1:2}else{button=e.button}if(button!==0){return}}if(!this.enabled||this.initiated&&utils.eventType[e.type]!==this.initiated){return}if(this.options.preventDefault&&!utils.isBadAndroid&&!utils.preventDefaultException(e.target,this.options.preventDefaultException)){e.preventDefault()}var point=e.touches?e.touches[0]:e,pos;this.initiated=utils.eventType[e.type];this.moved=false;this.distX=0;this.distY=0;this.directionX=0;this.directionY=0;this.directionLocked=0;this.startTime=utils.getTime();if(this.options.useTransition&&this.isInTransition){this._transitionTime();this.isInTransition=false;pos=this.getComputedPosition();this._translate(Math.round(pos.x),Math.round(pos.y));this._execEvent("scrollEnd")}else if(!this.options.useTransition&&this.isAnimating){this.isAnimating=false;this._execEvent("scrollEnd")}this.startX=this.x;this.startY=this.y;this.absStartX=this.x;this.absStartY=this.y;this.pointX=point.pageX;this.pointY=point.pageY;this._execEvent("beforeScrollStart")},_move:function(e){if(!this.enabled||utils.eventType[e.type]!==this.initiated){return}if(this.options.preventDefault){e.preventDefault()}var point=e.touches?e.touches[0]:e,deltaX=point.pageX-this.pointX,deltaY=point.pageY-this.pointY,timestamp=utils.getTime(),newX,newY,absDistX,absDistY;this.pointX=point.pageX;this.pointY=point.pageY;this.distX+=deltaX;this.distY+=deltaY;absDistX=Math.abs(this.distX);absDistY=Math.abs(this.distY);if(timestamp-this.endTime>300&&(absDistX<10&&absDistY<10)){return}if(!this.directionLocked&&!this.options.freeScroll){if(absDistX>absDistY+this.options.directionLockThreshold){this.directionLocked="h"}else if(absDistY>=absDistX+this.options.directionLockThreshold){this.directionLocked="v"}else{this.directionLocked="n"}}if(this.directionLocked=="h"){if(this.options.eventPassthrough=="vertical"){e.preventDefault()}else if(this.options.eventPassthrough=="horizontal"){this.initiated=false;return}deltaY=0}else if(this.directionLocked=="v"){if(this.options.eventPassthrough=="horizontal"){e.preventDefault()}else if(this.options.eventPassthrough=="vertical"){this.initiated=false;return}deltaX=0}deltaX=this.hasHorizontalScroll?deltaX:0;deltaY=this.hasVerticalScroll?deltaY:0;newX=this.x+deltaX;newY=this.y+deltaY;if(newX>0||newX<this.maxScrollX){newX=this.options.bounce?this.x+deltaX/3:newX>0?0:this.maxScrollX}if(newY>0||newY<this.maxScrollY){newY=this.options.bounce?this.y+deltaY/3:newY>0?0:this.maxScrollY}this.directionX=deltaX>0?-1:deltaX<0?1:0;this.directionY=deltaY>0?-1:deltaY<0?1:0;if(!this.moved){this._execEvent("scrollStart")}this.moved=true;this._translate(newX,newY);if(timestamp-this.startTime>300){this.startTime=timestamp;this.startX=this.x;this.startY=this.y}},_end:function(e){if(!this.enabled||utils.eventType[e.type]!==this.initiated){return}if(this.options.preventDefault&&!utils.preventDefaultException(e.target,this.options.preventDefaultException)){e.preventDefault()}var point=e.changedTouches?e.changedTouches[0]:e,momentumX,momentumY,duration=utils.getTime()-this.startTime,newX=Math.round(this.x),newY=Math.round(this.y),distanceX=Math.abs(newX-this.startX),distanceY=Math.abs(newY-this.startY),time=0,easing="";this.isInTransition=0;this.initiated=0;this.endTime=utils.getTime();if(this.resetPosition(this.options.bounceTime)){return}this.scrollTo(newX,newY);if(!this.moved){if(this.options.tap){utils.tap(e,this.options.tap)}if(this.options.click){utils.click(e)}this._execEvent("scrollCancel");return}if(this._events.flick&&duration<200&&distanceX<100&&distanceY<100){this._execEvent("flick");return}if(this.options.momentum&&duration<300){momentumX=this.hasHorizontalScroll?utils.momentum(this.x,this.startX,duration,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:newX,duration:0};momentumY=this.hasVerticalScroll?utils.momentum(this.y,this.startY,duration,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:newY,duration:0};newX=momentumX.destination;newY=momentumY.destination;time=Math.max(momentumX.duration,momentumY.duration);this.isInTransition=1}if(this.options.snap){var snap=this._nearestSnap(newX,newY);this.currentPage=snap;time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(newX-snap.x),1e3),Math.min(Math.abs(newY-snap.y),1e3)),300);newX=snap.x;newY=snap.y;this.directionX=0;this.directionY=0;easing=this.options.bounceEasing}if(newX!=this.x||newY!=this.y){if(newX>0||newX<this.maxScrollX||newY>0||newY<this.maxScrollY){easing=utils.ease.quadratic}this.scrollTo(newX,newY,time,easing);return}this._execEvent("scrollEnd")},_resize:function(){var that=this;clearTimeout(this.resizeTimeout);this.resizeTimeout=setTimeout((function(){that.refresh()}),this.options.resizePolling)},resetPosition:function(time){var x=this.x,y=this.y;time=time||0;if(!this.hasHorizontalScroll||this.x>0){x=0}else if(this.x<this.maxScrollX){x=this.maxScrollX}if(!this.hasVerticalScroll||this.y>0){y=0}else if(this.y<this.maxScrollY){y=this.maxScrollY}if(x==this.x&&y==this.y){return false}this.scrollTo(x,y,time,this.options.bounceEasing);return true},disable:function(){this.enabled=false},enable:function(){this.enabled=true},refresh:function(){var rf=this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth;this.wrapperHeight=this.wrapper.clientHeight;this.scrollerWidth=this.scroller.offsetWidth;this.scrollerHeight=this.scroller.offsetHeight;this.maxScrollX=this.wrapperWidth-this.scrollerWidth;this.maxScrollY=this.wrapperHeight-this.scrollerHeight;this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0;this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0;if(!this.hasHorizontalScroll){this.maxScrollX=0;this.scrollerWidth=this.wrapperWidth}if(!this.hasVerticalScroll){this.maxScrollY=0;this.scrollerHeight=this.wrapperHeight}this.endTime=0;this.directionX=0;this.directionY=0;this.wrapperOffset=utils.offset(this.wrapper);this._execEvent("refresh");this.resetPosition()},on:function(type,fn){if(!this._events[type]){this._events[type]=[]}this._events[type].push(fn)},off:function(type,fn){if(!this._events[type]){return}var index=this._events[type].indexOf(fn);if(index>-1){this._events[type].splice(index,1)}},_execEvent:function(type){if(!this._events[type]){return}var i=0,l=this._events[type].length;if(!l){return}for(;i<l;i++){this._events[type][i].apply(this,[].slice.call(arguments,1))}},scrollBy:function(x,y,time,easing){x=this.x+x;y=this.y+y;time=time||0;this.scrollTo(x,y,time,easing)},scrollTo:function(x,y,time,easing){easing=easing||utils.ease.circular;this.isInTransition=this.options.useTransition&&time>0;var transitionType=this.options.useTransition&&easing.style;if(!time||transitionType){if(transitionType){this._transitionTimingFunction(easing.style);this._transitionTime(time)}this._translate(x,y)}else{this._animate(x,y,time,easing.fn)}},scrollToElement:function(el,time,offsetX,offsetY,easing){el=el.nodeType?el:this.scroller.querySelector(el);if(!el){return}var pos=utils.offset(el);pos.left-=this.wrapperOffset.left;pos.top-=this.wrapperOffset.top;if(offsetX===true){offsetX=Math.round(el.offsetWidth/2-this.wrapper.offsetWidth/2)}if(offsetY===true){offsetY=Math.round(el.offsetHeight/2-this.wrapper.offsetHeight/2)}pos.left-=offsetX||0;pos.top-=offsetY||0;pos.left=pos.left>0?0:pos.left<this.maxScrollX?this.maxScrollX:pos.left;pos.top=pos.top>0?0:pos.top<this.maxScrollY?this.maxScrollY:pos.top;time=time===undefined||time===null||time==="auto"?Math.max(Math.abs(this.x-pos.left),Math.abs(this.y-pos.top)):time;this.scrollTo(pos.left,pos.top,time,easing)},_transitionTime:function(time){time=time||0;var durationProp=utils.style.transitionDuration;this.scrollerStyle[durationProp]=time+"ms";if(!time&&utils.isBadAndroid){this.scrollerStyle[durationProp]="0.0001ms";var self=this;rAF((function(){if(self.scrollerStyle[durationProp]==="0.0001ms"){self.scrollerStyle[durationProp]="0s"}}))}if(this.indicators){for(var i=this.indicators.length;i--;){this.indicators[i].transitionTime(time)}}},_transitionTimingFunction:function(easing){this.scrollerStyle[utils.style.transitionTimingFunction]=easing;if(this.indicators){for(var i=this.indicators.length;i--;){this.indicators[i].transitionTimingFunction(easing)}}},_translate:function(x,y){if(this.options.useTransform){this.scrollerStyle[utils.style.transform]="translate("+x+"px,"+y+"px)"+this.translateZ}else{x=Math.round(x);y=Math.round(y);this.scrollerStyle.left=x+"px";this.scrollerStyle.top=y+"px"}this.x=x;this.y=y;if(this.indicators){for(var i=this.indicators.length;i--;){this.indicators[i].updatePosition()}}},_initEvents:function(remove){var eventType=remove?utils.removeEvent:utils.addEvent,target=this.options.bindToWrapper?this.wrapper:window;eventType(window,"orientationchange",this);eventType(window,"resize",this);if(this.options.click){eventType(this.wrapper,"click",this,true)}if(!this.options.disableMouse){eventType(this.wrapper,"mousedown",this);eventType(target,"mousemove",this);eventType(target,"mousecancel",this);eventType(target,"mouseup",this)}if(utils.hasPointer&&!this.options.disablePointer){eventType(this.wrapper,utils.prefixPointerEvent("pointerdown"),this);eventType(target,utils.prefixPointerEvent("pointermove"),this);eventType(target,utils.prefixPointerEvent("pointercancel"),this);eventType(target,utils.prefixPointerEvent("pointerup"),this)}if(utils.hasTouch&&!this.options.disableTouch){eventType(this.wrapper,"touchstart",this);eventType(target,"touchmove",this);eventType(target,"touchcancel",this);eventType(target,"touchend",this)}eventType(this.scroller,"transitionend",this);eventType(this.scroller,"webkitTransitionEnd",this);eventType(this.scroller,"oTransitionEnd",this);eventType(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var matrix=window.getComputedStyle(this.scroller,null),x,y;if(this.options.useTransform){matrix=matrix[utils.style.transform].split(")")[0].split(", ");x=+(matrix[12]||matrix[4]);y=+(matrix[13]||matrix[5])}else{x=+matrix.left.replace(/[^-\d.]/g,"");y=+matrix.top.replace(/[^-\d.]/g,"")}return{x:x,y:y}},_initIndicators:function(){var interactive=this.options.interactiveScrollbars,customStyle=typeof this.options.scrollbars!="string",indicators=[],indicator;var that=this;this.indicators=[];if(this.options.scrollbars){if(this.options.scrollY){indicator={el:createDefaultScrollbar("v",interactive,this.options.scrollbars),interactive:interactive,defaultScrollbars:true,customStyle:customStyle,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:false};this.wrapper.appendChild(indicator.el);indicators.push(indicator)}if(this.options.scrollX){indicator={el:createDefaultScrollbar("h",interactive,this.options.scrollbars),interactive:interactive,defaultScrollbars:true,customStyle:customStyle,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:false};this.wrapper.appendChild(indicator.el);indicators.push(indicator)}}if(this.options.indicators){indicators=indicators.concat(this.options.indicators)}for(var i=indicators.length;i--;){this.indicators.push(new Indicator(this,indicators[i]))}function _indicatorsMap(fn){if(that.indicators){for(var i=that.indicators.length;i--;){fn.call(that.indicators[i])}}}if(this.options.fadeScrollbars){this.on("scrollEnd",(function(){_indicatorsMap((function(){this.fade()}))}));this.on("scrollCancel",(function(){_indicatorsMap((function(){this.fade()}))}));this.on("scrollStart",(function(){_indicatorsMap((function(){this.fade(1)}))}));this.on("beforeScrollStart",(function(){_indicatorsMap((function(){this.fade(1,true)}))}))}this.on("refresh",(function(){_indicatorsMap((function(){this.refresh()}))}));this.on("destroy",(function(){_indicatorsMap((function(){this.destroy()}));delete this.indicators}))},_initWheel:function(){utils.addEvent(this.wrapper,"wheel",this);utils.addEvent(this.wrapper,"mousewheel",this);utils.addEvent(this.wrapper,"DOMMouseScroll",this);this.on("destroy",(function(){clearTimeout(this.wheelTimeout);this.wheelTimeout=null;utils.removeEvent(this.wrapper,"wheel",this);utils.removeEvent(this.wrapper,"mousewheel",this);utils.removeEvent(this.wrapper,"DOMMouseScroll",this)}))},_wheel:function(e){if(!this.enabled){return}e.preventDefault();var wheelDeltaX,wheelDeltaY,newX,newY,that=this;if(this.wheelTimeout===undefined){that._execEvent("scrollStart")}clearTimeout(this.wheelTimeout);this.wheelTimeout=setTimeout((function(){if(!that.options.snap){that._execEvent("scrollEnd")}that.wheelTimeout=undefined}),400);if("deltaX"in e){if(e.deltaMode===1){wheelDeltaX=-e.deltaX*this.options.mouseWheelSpeed;wheelDeltaY=-e.deltaY*this.options.mouseWheelSpeed}else{wheelDeltaX=-e.deltaX;wheelDeltaY=-e.deltaY}}else if("wheelDeltaX"in e){wheelDeltaX=e.wheelDeltaX/120*this.options.mouseWheelSpeed;wheelDeltaY=e.wheelDeltaY/120*this.options.mouseWheelSpeed}else if("wheelDelta"in e){wheelDeltaX=wheelDeltaY=e.wheelDelta/120*this.options.mouseWheelSpeed}else if("detail"in e){wheelDeltaX=wheelDeltaY=-e.detail/3*this.options.mouseWheelSpeed}else{return}wheelDeltaX*=this.options.invertWheelDirection;wheelDeltaY*=this.options.invertWheelDirection;if(!this.hasVerticalScroll){wheelDeltaX=wheelDeltaY;wheelDeltaY=0}if(this.options.snap){newX=this.currentPage.pageX;newY=this.currentPage.pageY;if(wheelDeltaX>0){newX--}else if(wheelDeltaX<0){newX++}if(wheelDeltaY>0){newY--}else if(wheelDeltaY<0){newY++}this.goToPage(newX,newY);return}newX=this.x+Math.round(this.hasHorizontalScroll?wheelDeltaX:0);newY=this.y+Math.round(this.hasVerticalScroll?wheelDeltaY:0);this.directionX=wheelDeltaX>0?-1:wheelDeltaX<0?1:0;this.directionY=wheelDeltaY>0?-1:wheelDeltaY<0?1:0;if(newX>0){newX=0}else if(newX<this.maxScrollX){newX=this.maxScrollX}if(newY>0){newY=0}else if(newY<this.maxScrollY){newY=this.maxScrollY}this.scrollTo(newX,newY,0)},_initSnap:function(){this.currentPage={};if(typeof this.options.snap=="string"){this.options.snap=this.scroller.querySelectorAll(this.options.snap)}this.on("refresh",(function(){var i=0,l,m=0,n,cx,cy,x=0,y,stepX=this.options.snapStepX||this.wrapperWidth,stepY=this.options.snapStepY||this.wrapperHeight,el;this.pages=[];if(!this.wrapperWidth||!this.wrapperHeight||!this.scrollerWidth||!this.scrollerHeight){return}if(this.options.snap===true){cx=Math.round(stepX/2);cy=Math.round(stepY/2);while(x>-this.scrollerWidth){this.pages[i]=[];l=0;y=0;while(y>-this.scrollerHeight){this.pages[i][l]={x:Math.max(x,this.maxScrollX),y:Math.max(y,this.maxScrollY),width:stepX,height:stepY,cx:x-cx,cy:y-cy};y-=stepY;l++}x-=stepX;i++}}else{el=this.options.snap;l=el.length;n=-1;for(;i<l;i++){if(i===0||el[i].offsetLeft<=el[i-1].offsetLeft){m=0;n++}if(!this.pages[m]){this.pages[m]=[]}x=Math.max(-el[i].offsetLeft,this.maxScrollX);y=Math.max(-el[i].offsetTop,this.maxScrollY);cx=x-Math.round(el[i].offsetWidth/2);cy=y-Math.round(el[i].offsetHeight/2);this.pages[m][n]={x:x,y:y,width:el[i].offsetWidth,height:el[i].offsetHeight,cx:cx,cy:cy};if(x>this.maxScrollX){m++}}}this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0);if(this.options.snapThreshold%1===0){this.snapThresholdX=this.options.snapThreshold;this.snapThresholdY=this.options.snapThreshold}else{this.snapThresholdX=Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold);this.snapThresholdY=Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold)}}));this.on("flick",(function(){var time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(this.x-this.startX),1e3),Math.min(Math.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,time)}))},_nearestSnap:function(x,y){if(!this.pages.length){return{x:0,y:0,pageX:0,pageY:0}}var i=0,l=this.pages.length,m=0;if(Math.abs(x-this.absStartX)<this.snapThresholdX&&Math.abs(y-this.absStartY)<this.snapThresholdY){return this.currentPage}if(x>0){x=0}else if(x<this.maxScrollX){x=this.maxScrollX}if(y>0){y=0}else if(y<this.maxScrollY){y=this.maxScrollY}for(;i<l;i++){if(x>=this.pages[i][0].cx){x=this.pages[i][0].x;break}}l=this.pages[i].length;for(;m<l;m++){if(y>=this.pages[0][m].cy){y=this.pages[0][m].y;break}}if(i==this.currentPage.pageX){i+=this.directionX;if(i<0){i=0}else if(i>=this.pages.length){i=this.pages.length-1}x=this.pages[i][0].x}if(m==this.currentPage.pageY){m+=this.directionY;if(m<0){m=0}else if(m>=this.pages[0].length){m=this.pages[0].length-1}y=this.pages[0][m].y}return{x:x,y:y,pageX:i,pageY:m}},goToPage:function(x,y,time,easing){easing=easing||this.options.bounceEasing;if(x>=this.pages.length){x=this.pages.length-1}else if(x<0){x=0}if(y>=this.pages[x].length){y=this.pages[x].length-1}else if(y<0){y=0}var posX=this.pages[x][y].x,posY=this.pages[x][y].y;time=time===undefined?this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(posX-this.x),1e3),Math.min(Math.abs(posY-this.y),1e3)),300):time;this.currentPage={x:posX,y:posY,pageX:x,pageY:y};this.scrollTo(posX,posY,time,easing)},next:function(time,easing){var x=this.currentPage.pageX,y=this.currentPage.pageY;x++;if(x>=this.pages.length&&this.hasVerticalScroll){x=0;y++}this.goToPage(x,y,time,easing)},prev:function(time,easing){var x=this.currentPage.pageX,y=this.currentPage.pageY;x--;if(x<0&&this.hasVerticalScroll){x=0;y--}this.goToPage(x,y,time,easing)},_initKeys:function(e){var keys={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};var i;if(typeof this.options.keyBindings=="object"){for(i in this.options.keyBindings){if(typeof this.options.keyBindings[i]=="string"){this.options.keyBindings[i]=this.options.keyBindings[i].toUpperCase().charCodeAt(0)}}}else{this.options.keyBindings={}}for(i in keys){this.options.keyBindings[i]=this.options.keyBindings[i]||keys[i]}utils.addEvent(window,"keydown",this);this.on("destroy",(function(){utils.removeEvent(window,"keydown",this)}))},_key:function(e){if(!this.enabled){return}var snap=this.options.snap,newX=snap?this.currentPage.pageX:this.x,newY=snap?this.currentPage.pageY:this.y,now=utils.getTime(),prevTime=this.keyTime||0,acceleration=.25,pos;if(this.options.useTransition&&this.isInTransition){pos=this.getComputedPosition();this._translate(Math.round(pos.x),Math.round(pos.y));this.isInTransition=false}this.keyAcceleration=now-prevTime<200?Math.min(this.keyAcceleration+acceleration,50):0;switch(e.keyCode){case this.options.keyBindings.pageUp:if(this.hasHorizontalScroll&&!this.hasVerticalScroll){newX+=snap?1:this.wrapperWidth}else{newY+=snap?1:this.wrapperHeight}break;case this.options.keyBindings.pageDown:if(this.hasHorizontalScroll&&!this.hasVerticalScroll){newX-=snap?1:this.wrapperWidth}else{newY-=snap?1:this.wrapperHeight}break;case this.options.keyBindings.end:newX=snap?this.pages.length-1:this.maxScrollX;newY=snap?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:newX=0;newY=0;break;case this.options.keyBindings.left:newX+=snap?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:newY+=snap?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:newX-=snap?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:newY-=snap?1:5+this.keyAcceleration>>0;break;default:return}if(snap){this.goToPage(newX,newY);return}if(newX>0){newX=0;this.keyAcceleration=0}else if(newX<this.maxScrollX){newX=this.maxScrollX;this.keyAcceleration=0}if(newY>0){newY=0;this.keyAcceleration=0}else if(newY<this.maxScrollY){newY=this.maxScrollY;this.keyAcceleration=0}this.scrollTo(newX,newY,0);this.keyTime=now},_animate:function(destX,destY,duration,easingFn){var that=this,startX=this.x,startY=this.y,startTime=utils.getTime(),destTime=startTime+duration;function step(){var now=utils.getTime(),newX,newY,easing;if(now>=destTime){that.isAnimating=false;that._translate(destX,destY);if(!that.resetPosition(that.options.bounceTime)){that._execEvent("scrollEnd")}return}now=(now-startTime)/duration;easing=easingFn(now);newX=(destX-startX)*easing+startX;newY=(destY-startY)*easing+startY;that._translate(newX,newY);if(that.isAnimating){rAF(step)}}this.isAnimating=true;step()},handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(e);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(e);break;case"keydown":this._key(e);break;case"click":if(this.enabled&&!e._constructed){e.preventDefault();e.stopPropagation()}break}}};function createDefaultScrollbar(direction,interactive,type){var scrollbar=document.createElement("div"),indicator=document.createElement("div");if(type===true){scrollbar.style.cssText="position:absolute;z-index:9999";indicator.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"}indicator.className="iScrollIndicator";if(direction=="h"){if(type===true){scrollbar.style.cssText+=";height:7px;left:2px;right:2px;bottom:0";indicator.style.height="100%"}scrollbar.className="iScrollHorizontalScrollbar"}else{if(type===true){scrollbar.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px";indicator.style.width="100%"}scrollbar.className="iScrollVerticalScrollbar"}scrollbar.style.cssText+=";overflow:hidden";if(!interactive){scrollbar.style.pointerEvents="none"}scrollbar.appendChild(indicator);return scrollbar}function Indicator(scroller,options){this.wrapper=typeof options.el=="string"?document.querySelector(options.el):options.el;this.wrapperStyle=this.wrapper.style;this.indicator=this.wrapper.children[0];this.indicatorStyle=this.indicator.style;this.scroller=scroller;this.options={listenX:true,listenY:true,interactive:false,resize:true,defaultScrollbars:false,shrink:false,fade:false,speedRatioX:0,speedRatioY:0};for(var i in options){this.options[i]=options[i]}this.sizeRatioX=1;this.sizeRatioY=1;this.maxPosX=0;this.maxPosY=0;if(this.options.interactive){if(!this.options.disableTouch){utils.addEvent(this.indicator,"touchstart",this);utils.addEvent(window,"touchend",this)}if(!this.options.disablePointer){utils.addEvent(this.indicator,utils.prefixPointerEvent("pointerdown"),this);utils.addEvent(window,utils.prefixPointerEvent("pointerup"),this)}if(!this.options.disableMouse){utils.addEvent(this.indicator,"mousedown",this);utils.addEvent(window,"mouseup",this)}}if(this.options.fade){this.wrapperStyle[utils.style.transform]=this.scroller.translateZ;var durationProp=utils.style.transitionDuration;this.wrapperStyle[durationProp]=utils.isBadAndroid?"0.0001ms":"0ms";var self=this;if(utils.isBadAndroid){rAF((function(){if(self.wrapperStyle[durationProp]==="0.0001ms"){self.wrapperStyle[durationProp]="0s"}}))}this.wrapperStyle.opacity="0"}}Indicator.prototype={handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e);break}},destroy:function(){if(this.options.fadeScrollbars){clearTimeout(this.fadeTimeout);this.fadeTimeout=null}if(this.options.interactive){utils.removeEvent(this.indicator,"touchstart",this);utils.removeEvent(this.indicator,utils.prefixPointerEvent("pointerdown"),this);utils.removeEvent(this.indicator,"mousedown",this);utils.removeEvent(window,"touchmove",this);utils.removeEvent(window,utils.prefixPointerEvent("pointermove"),this);utils.removeEvent(window,"mousemove",this);utils.removeEvent(window,"touchend",this);utils.removeEvent(window,utils.prefixPointerEvent("pointerup"),this);utils.removeEvent(window,"mouseup",this)}if(this.options.defaultScrollbars){this.wrapper.parentNode.removeChild(this.wrapper)}},_start:function(e){var point=e.touches?e.touches[0]:e;e.preventDefault();e.stopPropagation();this.transitionTime();this.initiated=true;this.moved=false;this.lastPointX=point.pageX;this.lastPointY=point.pageY;this.startTime=utils.getTime();if(!this.options.disableTouch){utils.addEvent(window,"touchmove",this)}if(!this.options.disablePointer){utils.addEvent(window,utils.prefixPointerEvent("pointermove"),this)}if(!this.options.disableMouse){utils.addEvent(window,"mousemove",this)}this.scroller._execEvent("beforeScrollStart")},_move:function(e){var point=e.touches?e.touches[0]:e,deltaX,deltaY,newX,newY,timestamp=utils.getTime();if(!this.moved){this.scroller._execEvent("scrollStart")}this.moved=true;deltaX=point.pageX-this.lastPointX;this.lastPointX=point.pageX;deltaY=point.pageY-this.lastPointY;this.lastPointY=point.pageY;newX=this.x+deltaX;newY=this.y+deltaY;this._pos(newX,newY);e.preventDefault();e.stopPropagation()},_end:function(e){if(!this.initiated){return}this.initiated=false;e.preventDefault();e.stopPropagation();utils.removeEvent(window,"touchmove",this);utils.removeEvent(window,utils.prefixPointerEvent("pointermove"),this);utils.removeEvent(window,"mousemove",this);if(this.scroller.options.snap){var snap=this.scroller._nearestSnap(this.scroller.x,this.scroller.y);var time=this.options.snapSpeed||Math.max(Math.max(Math.min(Math.abs(this.scroller.x-snap.x),1e3),Math.min(Math.abs(this.scroller.y-snap.y),1e3)),300);if(this.scroller.x!=snap.x||this.scroller.y!=snap.y){this.scroller.directionX=0;this.scroller.directionY=0;this.scroller.currentPage=snap;this.scroller.scrollTo(snap.x,snap.y,time,this.scroller.options.bounceEasing)}}if(this.moved){this.scroller._execEvent("scrollEnd")}},transitionTime:function(time){time=time||0;var durationProp=utils.style.transitionDuration;this.indicatorStyle[durationProp]=time+"ms";if(!time&&utils.isBadAndroid){this.indicatorStyle[durationProp]="0.0001ms";var self=this;rAF((function(){if(self.indicatorStyle[durationProp]==="0.0001ms"){self.indicatorStyle[durationProp]="0s"}}))}},transitionTimingFunction:function(easing){this.indicatorStyle[utils.style.transitionTimingFunction]=easing},refresh:function(){this.transitionTime();if(this.options.listenX&&!this.options.listenY){this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none"}else if(this.options.listenY&&!this.options.listenX){this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none"}else{this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none"}if(this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll){utils.addClass(this.wrapper,"iScrollBothScrollbars");utils.removeClass(this.wrapper,"iScrollLoneScrollbar");if(this.options.defaultScrollbars&&this.options.customStyle){if(this.options.listenX){this.wrapper.style.right="8px"}else{this.wrapper.style.bottom="8px"}}}else{utils.removeClass(this.wrapper,"iScrollBothScrollbars");utils.addClass(this.wrapper,"iScrollLoneScrollbar");if(this.options.defaultScrollbars&&this.options.customStyle){if(this.options.listenX){this.wrapper.style.right="2px"}else{this.wrapper.style.bottom="2px"}}}var r=this.wrapper.offsetHeight;if(this.options.listenX){this.wrapperWidth=this.wrapper.clientWidth;if(this.options.resize){this.indicatorWidth=Math.max(Math.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8);this.indicatorStyle.width=this.indicatorWidth+"px"}else{this.indicatorWidth=this.indicator.clientWidth}this.maxPosX=this.wrapperWidth-this.indicatorWidth;if(this.options.shrink=="clip"){this.minBoundaryX=-this.indicatorWidth+8;this.maxBoundaryX=this.wrapperWidth-8}else{this.minBoundaryX=0;this.maxBoundaryX=this.maxPosX}this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX}if(this.options.listenY){this.wrapperHeight=this.wrapper.clientHeight;if(this.options.resize){this.indicatorHeight=Math.max(Math.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8);this.indicatorStyle.height=this.indicatorHeight+"px"}else{this.indicatorHeight=this.indicator.clientHeight}this.maxPosY=this.wrapperHeight-this.indicatorHeight;if(this.options.shrink=="clip"){this.minBoundaryY=-this.indicatorHeight+8;this.maxBoundaryY=this.wrapperHeight-8}else{this.minBoundaryY=0;this.maxBoundaryY=this.maxPosY}this.maxPosY=this.wrapperHeight-this.indicatorHeight;this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY}this.updatePosition()},updatePosition:function(){var x=this.options.listenX&&Math.round(this.sizeRatioX*this.scroller.x)||0,y=this.options.listenY&&Math.round(this.sizeRatioY*this.scroller.y)||0;if(!this.options.ignoreBoundaries){if(x<this.minBoundaryX){if(this.options.shrink=="scale"){this.width=Math.max(this.indicatorWidth+x,8);this.indicatorStyle.width=this.width+"px"}x=this.minBoundaryX}else if(x>this.maxBoundaryX){if(this.options.shrink=="scale"){this.width=Math.max(this.indicatorWidth-(x-this.maxPosX),8);this.indicatorStyle.width=this.width+"px";x=this.maxPosX+this.indicatorWidth-this.width}else{x=this.maxBoundaryX}}else if(this.options.shrink=="scale"&&this.width!=this.indicatorWidth){this.width=this.indicatorWidth;this.indicatorStyle.width=this.width+"px"}if(y<this.minBoundaryY){if(this.options.shrink=="scale"){this.height=Math.max(this.indicatorHeight+y*3,8);this.indicatorStyle.height=this.height+"px"}y=this.minBoundaryY}else if(y>this.maxBoundaryY){if(this.options.shrink=="scale"){this.height=Math.max(this.indicatorHeight-(y-this.maxPosY)*3,8);this.indicatorStyle.height=this.height+"px";y=this.maxPosY+this.indicatorHeight-this.height}else{y=this.maxBoundaryY}}else if(this.options.shrink=="scale"&&this.height!=this.indicatorHeight){this.height=this.indicatorHeight;this.indicatorStyle.height=this.height+"px"}}this.x=x;this.y=y;if(this.scroller.options.useTransform){this.indicatorStyle[utils.style.transform]="translate("+x+"px,"+y+"px)"+this.scroller.translateZ}else{this.indicatorStyle.left=x+"px";this.indicatorStyle.top=y+"px"}},_pos:function(x,y){if(x<0){x=0}else if(x>this.maxPosX){x=this.maxPosX}if(y<0){y=0}else if(y>this.maxPosY){y=this.maxPosY}x=this.options.listenX?Math.round(x/this.sizeRatioX):this.scroller.x;y=this.options.listenY?Math.round(y/this.sizeRatioY):this.scroller.y;this.scroller.scrollTo(x,y)},fade:function(val,hold){if(hold&&!this.visible){return}clearTimeout(this.fadeTimeout);this.fadeTimeout=null;var time=val?250:500,delay=val?0:300;val=val?"1":"0";this.wrapperStyle[utils.style.transitionDuration]=time+"ms";this.fadeTimeout=setTimeout(function(val){this.wrapperStyle.opacity=val;this.visible=+val}.bind(this,val),delay)}};IScroll.utils=utils;if(typeof module!="undefined"&&module.exports){module.exports=IScroll}else if(typeof define=="function"&&define.amd){define((function(){return IScroll}))}else{window.IScroll=IScroll}})(window,document,Math);(function(factory){var registeredInModuleLoader=false;if(typeof define==="function"&&define.amd){define(factory);registeredInModuleLoader=true}if(typeof exports==="object"){module.exports=factory();registeredInModuleLoader=true}if(!registeredInModuleLoader){var OldCookies=window.Cookies;var api=window.Cookies=factory();api.noConflict=function(){window.Cookies=OldCookies;return api}}})((function(){function extend(){var i=0;var result={};for(;i<arguments.length;i++){var attributes=arguments[i];for(var key in attributes){result[key]=attributes[key]}}return result}function init(converter){function api(key,value,attributes){var result;if(typeof document==="undefined"){return}if(arguments.length>1){attributes=extend({path:"/"},api.defaults,attributes);if(typeof attributes.expires==="number"){var expires=new Date;expires.setMilliseconds(expires.getMilliseconds()+attributes.expires*864e5);attributes.expires=expires}attributes.expires=attributes.expires?attributes.expires.toUTCString():"";try{result=JSON.stringify(value);if(/^[\{\[]/.test(result)){value=result}}catch(e){}if(!converter.write){value=encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)}else{value=converter.write(value,key)}key=encodeURIComponent(String(key));key=key.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);key=key.replace(/[\(\)]/g,escape);var stringifiedAttributes="";for(var attributeName in attributes){if(!attributes[attributeName]){continue}stringifiedAttributes+="; "+attributeName;if(attributes[attributeName]===true){continue}stringifiedAttributes+="="+attributes[attributeName]}return document.cookie=key+"="+value+stringifiedAttributes}if(!key){result={}}var cookies=document.cookie?document.cookie.split("; "):[];var rdecode=/(%[0-9A-Z]{2})+/g;var i=0;for(;i<cookies.length;i++){var parts=cookies[i].split("=");var cookie=parts.slice(1).join("=");if(!this.json&&cookie.charAt(0)==='"'){cookie=cookie.slice(1,-1)}try{var name=parts[0].replace(rdecode,decodeURIComponent);cookie=converter.read?converter.read(cookie,name):converter(cookie,name)||cookie.replace(rdecode,decodeURIComponent);if(this.json){try{cookie=JSON.parse(cookie)}catch(e){}}if(key===name){result=cookie;break}if(!key){result[name]=cookie}}catch(e){}}return result}api.set=api;api.get=function(key){return api.call(api,key)};api.getJSON=function(){return api.apply({json:true},[].slice.call(arguments))};api.defaults={};api.remove=function(key,attributes){api(key,"",extend(attributes,{expires:-1}))};api.withConverter=init;return api}return init((function(){}))}));"use strict";window.requestAnimationFrame=function(){"use strict";return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimaitonFrame||function(callback){window.setTimeout(callback,1e3/60)}}();(function($){"use strict";var DIRECTIONS={NONE:0,HORIZONTAL:1,LEFT_TO_RIGHT:2,RIGHT_TO_LEFT:3,VERTICAL:4,TOP_TO_DOWN:5,DOWN_TO_TOP:6};var abs=Math.abs;var max=Math.max;var TAG_WHITE_LIST=["INPUT","SELECT","OPTION"];var SwipeTracer;var activeEventProcessor;var swipeMask=$("<div></div>");swipeMask.css({"background-color":"rgba(0, 0, 0, 0)",position:"fixed",top:0,width:"100vw",height:"100vh","z-index":1e5});var touchMoveListeners=[];var touchEndListeners=[];var pointerId=null;var onTouch=function(e){if(e&&(e.pointerId&&e.pointerId!==pointerId||e.touches&&e.touches.length>1)){onTouchEnd(e)}$.each(touchMoveListeners,(function(i,fn){return fn(e)}))};var onTouchEnd=function(e){pointerId=null;$.each(touchEndListeners,(function(i,fn){return fn(e)}));touchMoveListeners.length=0;touchEndListeners.length=0};function addEventListener(target,event,callback){(target.__zone_symbol__addEventListener||target.addEventListener).call(target,event,callback,{passive:true})}function iOSversion(){if(/iP(hone|od|ad)/.test(navigator.platform)){var v=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(v[1],10)}}if(window["PointerEvent"]&&iOSversion()>=13){addEventListener(document,"pointerdown",(function(e){if(pointerId&&pointerId!==e.pointerId){onTouchEnd(e)}else{pointerId=e.pointerId}}));addEventListener(document,"pointermove",onTouch);addEventListener(document,"pointerup",onTouchEnd);addEventListener(document,"pointercancel",onTouchEnd)}else{addEventListener(document,"mousemove",onTouch);addEventListener(document,"touchmove",onTouch);addEventListener(document,"mouseup",onTouchEnd);addEventListener(document,"touchcancel",onTouchEnd);addEventListener(document,"touchend",onTouchEnd)}function ScrollObserver(parent,child,direction){var elementsToObserve=function(array){var iter=child;while(iter){array.push({$ele:$(iter),last:{scrollLeft:iter.iscroll?iter.iscroll.x:iter.scrollLeft,scrollTop:iter.iscroll?iter.iscroll.y:iter.scrollTop}});iter=iter.parentElement}return array}([]);function isVerticalScroll(){var result;$.each(elementsToObserve,(function(){if(this.$ele[0].iscroll){if(!isNaN(this.$ele[0].iscroll.y)&&this.$ele[0].iscroll.y!==0){result=true}}else if(this.$ele[0].scrollTop!==0){result=true}}));return result}function isHorizontalScroll(){var result;$.each(elementsToObserve,(function(){if(this.$ele[0].iscroll){if(!isNaN(this.$ele[0].iscroll.x)&&this.$ele[0].iscroll.x!==0){result=true}}else if(this.$ele[0].scrollLeft!==0){result=true}}));return result}this.hasSrcolled=function(){if(direction===$.fn.swipey.DIRECTIONS.VERTICAL){return isVerticalScroll()}if(direction===$.fn.swipey.DIRECTIONS.HORIZONTAL){return isHorizontalScroll()}}}function SwipeEventSmoother(){var queue=[];var isProcessing=false;var time;function process(){if(queue.length>0){try{queue.shift()()}catch(e){console.error("Function invocation failed",e)}window.requestAnimationFrame(process)}else{isProcessing=false}}this.push=function(fn){queue.push(fn)};this.process=function(){if(!isProcessing){isProcessing=true;process()}}}activeEventProcessor=new SwipeEventSmoother;function getTouchEvent(event){if(event.originalEvent&&event.originalEvent.pointerType!=="mouse"){return event.originalEvent}return event.originalEvent&&event.originalEvent.touches&&event.originalEvent.touches[0]||event&&event.touches&&event.touches[0]||event}function computeDistance(startPoint,endPoint,direction){var distance=0,deltaX,deltaY;if(direction===DIRECTIONS.HORIZONTAL){distance=endPoint.x-startPoint.x}else if(direction===DIRECTIONS.LEFT_TO_RIGHT){distance=max(endPoint.x-startPoint.x,0)}else if(direction===DIRECTIONS.RIGHT_TO_LEFT){distance=max(startPoint.x-endPoint.x,0)}else if(direction===DIRECTIONS.VERTICAL){distance=endPoint.y-startPoint.y}else if(direction===DIRECTIONS.TOP_TO_DOWN){distance=max(endPoint.y-startPoint.y,0)}else if(direction===DIRECTIONS.DOWN_TO_TOP){distance=max(startPoint.y-endPoint.y,0)}else{deltaX=endPoint.x-startPoint.x;deltaY=endPoint.y-startPoint.y;distance=max(abs(deltaX),abs(deltaY));if(deltaX<0&&abs(deltaX)===distance||deltaY<0&&abs(deltaY)===distance){distance=-distance}}return distance}function onActiveSwipe(event,settings){var touch=getTouchEvent(event);var startPoint=settings.data.path[0];var point={x:touch.pageX,y:touch.pageY};var distance=computeDistance(startPoint,point,settings.direction);var eventSplits=[];var increment;var limit;settings.renderInProgress=false;if(distance!==settings.lastDistance){increment=(distance<settings.lastDistance?-1:1)*30;limit=distance-settings.lastDistance;for(var i=increment;increment>0&&i<=limit||increment<0&&i>=limit;i+=increment){eventSplits.push(i+settings.lastDistance)}if(limit%increment!==0){eventSplits.push(limit%abs(increment)+(eventSplits.length===0?settings.lastDistance:eventSplits[eventSplits.length-1]))}settings.lastDistance=distance;$.each(eventSplits,(function(){var d=this;activeEventProcessor.push((function(){settings.data.length=d;settings.data.totalLength+=abs(d);settings.data.velocity=abs(settings.data.totalLength/(Date.now()-settings.data.startTime));settings.data.path.push(point);if(settings.onSwipe.call(settings.target,event,settings.data)===false){onActiveSwipeEnd(event,settings)}SwipeTracer.onSwipe(event,settings.data)}))}));activeEventProcessor.process()}}function onActiveSwipeEnd(event,settings){var touch=getTouchEvent(event);if(touch){settings.data.path.push({x:touch.pageX,y:touch.pageY})}activeEventProcessor.push((function(){SwipeTracer.onSwipeEnd(event,settings.data);settings.onSwipeEnd.call(settings.target,event,settings.data)}));activeEventProcessor.process()}function listenActiveSwipe(event,settings){var touch=getTouchEvent(event);var swipeHandler;var swipeEndHandler;var passiveDistance;var passiveSwipeStartPoint=settings.data.path[0];var activeSwipeStartPoint={x:touch.pageX,y:touch.pageY};passiveDistance=computeDistance(passiveSwipeStartPoint,activeSwipeStartPoint,settings.direction);settings.data.length=passiveDistance<0?-1:1;settings.lastDistance=settings.data.length;settings.data.path=[activeSwipeStartPoint];settings.data.totalLength=abs(settings.data.length);settings.data.startTime=Date.now();if(settings.onSwipeStart.call(settings.target,event,settings.data)===false){return false}swipeMask.appendTo($("body"));swipeHandler=function(em){onActiveSwipe(em,settings)};swipeEndHandler=function(ee){swipeMask.remove();onActiveSwipeEnd(ee,settings)};touchMoveListeners=[];touchMoveListeners.push(swipeHandler);touchEndListeners=[];touchEndListeners.push(swipeEndHandler);SwipeTracer.onSwipeStart(event,settings.data);return true}function isThresholdAngleReached(startPoint,endPoint,direction){if(direction===DIRECTIONS.HORIZONTAL){if(Math.abs((endPoint.y-startPoint.y)/(endPoint.x-startPoint.x))<=.36397023426){return true}}else if(direction===DIRECTIONS.VERTICAL){if(Math.abs((endPoint.y-startPoint.y)/(endPoint.x-startPoint.x))>=2.74747741945){return true}}return false}function isThresholdReached(touch,settings){var startPoint=settings.data.path[0];var endPoint={x:touch.pageX,y:touch.pageY};var distance=computeDistance(startPoint,endPoint,settings.direction);return abs(distance)>settings.threshold&&isThresholdAngleReached(startPoint,endPoint,settings.direction)}function listenPassiveSwipe(touch,settings){var passiveSwipeHandler;settings.scrollObserver=new ScrollObserver(event.currentTarget,event.target,settings.direction);passiveSwipeHandler=function(em){if(isThresholdReached(getTouchEvent(em),settings)){if(settings.scrollObserver.hasSrcolled()||listenActiveSwipe(em,settings)){return false}}};touchMoveListeners.push(passiveSwipeHandler);settings.data={path:[{x:touch.pageX,y:touch.pageY}]}}function bind(settings){var events=settings.bindEvents;var listenFor="";if(_.includes(events,"touch")){listenFor+="touchstart"}else if(_.includes(events,"mouse")){listenFor+="mousedown"}else if(_.includes(events,"pointer")){listenFor+="pointerdown"}if(!listenFor){return}addEventListener(settings.target[0],listenFor,(function(es){if(settings.disableMouse&&es.pointerType==="mouse"){return}if(es.pointerType!=="mouse"&&es.MSPOINTER_TYPE_MOUSE&&es.pointerType!==es.MSPOINTER_TYPE_MOUSE){if(TAG_WHITE_LIST.indexOf(es.target.tagName)<0){es.preventDefault()}else{return}}var touch=getTouchEvent(es);if(touch){listenPassiveSwipe(touch,settings)}}))}$.fn.swipey=function(settings){this.each((function(){bind($.extend({direction:DIRECTIONS.NONE,target:$(this),bindEvents:["touch","mouse"],swipeTarget:document,threshold:30,onSwipeStart:$.noop,onSwipe:$.noop,onSwipeEnd:$.noop,disableMouse:true},settings))}));return this};SwipeTracer={onSwipeStart:function(e,data){if($.fn.swipey.trace){var $svg='<svg height="100vh" width="100vw" id ="canvas">'+' <path stroke="rgba(0, 0, 0, 0.5)" stroke-linecap="round" stroke-width="20" fill-opacity="0" '+' stroke-opacity="0.8" d="M'+data.path[0].x+" "+data.path[0].y+' " />'+" </svg>";$svg.css({position:"fixed",top:0,left:0,width:"100vw",height:"100vh","z-index":1e4});$("body").append($svg);data.tracer={pathd:$("#canvas path")}}},onSwipe:function(e,data){if(data.tracer){var d=data.tracer.pathd.attr("d");var p=data.path[data.path.length-1];data.tracer.pathd.attr("d",d+" L"+p.x+" "+p.y+" ")}},onSwipeEnd:function(e,data){if(data.tracer){var firstPoint=data.path[0];var expected_1=[firstPoint,{y:firstPoint.y-50},{x:firstPoint.x+50},{y:firstPoint.y+50}];var trace_1=0;_.forEach(data.path,(function(p){var ep;if(trace_1!==expected_1.length){ep=expected_1[trace_1];if((!ep.x||ep.x<=p.x)&&(!ep.y||ep.y<=p.y)){trace_1++}}}));setTimeout((function(){$("body >#canvas").remove()}),500)}}};$.fn.swipey.DIRECTIONS=DIRECTIONS})(jQuery);(function($){var $parse;var expressionRegex=/\$\{\{[a-zA-Z\+-/%\.\*\s\(\)\d,\\'"\$_]*\}\}/;function getParseService(){if($.fn.swipeAnimation.expressionEvaluator){return $.fn.swipeAnimation.expressionEvaluator}if(window.exprEval&&window.exprEval.Parser){return function(exp){var parser=(new window.exprEval.Parser).parse(exp);return function(context){return parser.evaluate(context)}}}}function compile(script){var tArr=[];var match;$parse=$parse||getParseService();if(_.isFunction(script)){return script}else if($parse){while((match=expressionRegex.exec(script))!==null){var expression=match[0];var prefix=script.substring(0,match.index);script=script.substring(match.index+expression.length);expression=expression.substring(3,expression.length-2);tArr.push(prefix);tArr.push($parse(expression).bind({}))}tArr.push(script);return function(){var args=arguments;return _.map(tArr,(function(v){return _.isFunction(v)?v.apply(undefined,args):v})).join("")}}}function getObject(obj,$ele,args){if(_.isFunction(obj)){return obj.apply($ele,args)}return obj}function VelocityComputator(){var lastDistance=0;var lastTime=0;var v=0;return{addDistance:function(d){var currentTime=Date.now();if(Math.abs(d-lastDistance)>10&&currentTime!==lastTime){v=(d-lastDistance)/(currentTime-lastTime);lastDistance=d;lastTime=currentTime}if(v<0){v=Math.min(v,-1)}else{v=Math.max(v,1)}return this},getVelocity:function(){return v},getTime:function(d){return Math.abs(d/v)}}}function calculateBounds($el,settings,args){var centerVal=0;var bounds=getObject(settings.bounds,$el,args);if(!_.isUndefined(bounds.center)){centerVal=bounds.center}if(!_.isUndefined(bounds.lower)){bounds.lower=bounds.lower+centerVal}if(!_.isUndefined(bounds.upper)){bounds.upper=bounds.upper+centerVal}return bounds}function retrieveTargets(settings){_.forEach(settings.animation,(function(a){if(_.isFunction(a.target)||a.targetFn){a.targetFn=_.isUndefined(a.targetFn)?a.target:a.targetFn;a.target=a.targetFn()}}))}function SettingsProperty(){this.setSettings=function(settings,$el){$el.data("swipeAnimationDefaults",settings)};this.getSettings=function($el){return $el.data("swipeAnimationDefaults")}}function animate(settings,metaData,time,$el,distanceMoved,e){_.forEach(settings.animation,(function(a){if(!a.target){return}if(a.target.length>1){a.target.each((function(i){metaData.$i=i;$(this).css(_.mapValues(a.css,(function(v,k){return v(metaData)})))}))}else{metaData.$i=0;a.target.css(_.mapValues(a.css,(function(v,k){return v(metaData)})))}a.target.css({transition:"all ease-out "+time+"ms"});a.target.one("webkitTransitionEnd transitionend",(function(){a.target.css({transition:""})}))}));setTimeout((function(){window.requestAnimationFrame((function(){if(metaData.$D===metaData.bounds.lower){settings.onLower.call($el,e)}else if(metaData.$D===metaData.bounds.upper){settings.onUpper.call($el,e)}settings.onAnimation(e,distanceMoved)}))}),time)}var methods={gotoUpper:function(){swipeToEnd(this,"upper",arguments[1])},gotoLower:function(time){swipeToEnd(this,"lower",arguments[1])}};function swipeToEnd($ele,moveTo,time){var settingsObj=new SettingsProperty;var settings=settingsObj.getSettings($ele);var metaData={};var bounds=calculateBounds($ele,settings);var context;retrieveTargets(settings);time=time||300;context=getObject(settings.context,$ele);metaData=_.extend({},context);metaData.$d=0;metaData.$D=moveTo==="lower"?bounds.lower:bounds.upper;metaData.bounds=bounds;animate(settings,metaData,time,$ele)}function addSwipey($ele,settings){var state={$D:0};var baseContext={max:Math.max,min:Math.min,abs:Math.abs};if(!_.isArray(settings.animation)){var target=settings.animation.target||$ele;var css=settings.animation.css||settings.animation;delete css[$ele];settings.animation=[{target:target,css:css}]}_.forEach(settings.animation,(function(a){a.css=_.mapValues(a.css,(function(v,k){return compile(v)}))}));var settingsObj=new SettingsProperty;settingsObj.setSettings(settings,$ele);$ele.swipey({direction:settings.direction,threshold:settings.threshold,bindEvents:settings.bindEvents,target:settings.target,onSwipeStart:function(e,data){var cd;state.$d=0;state.bounds=calculateBounds(this,settings,[e,data.length]);if(!_.isUndefined(state.bounds.center)){state.$D=state.bounds.center}else{state.$D=0}cd=state.$D+data.length;state.bounds.strictLower=!(state.bounds.strict===false||state.bounds.strictLower===false);state.bounds.strictUpper=!(state.bounds.strict===false||state.bounds.strictUpper===false);if(!settings.enableGestures()||state.bounds.strictLower&&(_.isUndefined(state.bounds.lower)&&data.length<0||!_.isUndefined(state.bounds.lower)&&state.bounds.lower>cd)||state.bounds.strictUpper&&(_.isUndefined(state.bounds.upper)&&data.length>0||!_.isUndefined(state.bounds.upper)&&state.bounds.upper<cd)){return false}state.vc=VelocityComputator();state.context=_.extend(baseContext,getObject(settings.context,$ele));state.localState=_.extend({},state.context);retrieveTargets(settings);_.forEach(settings.animation,(function(a){if(a.target){a.target.css({transition:"none"})}}))},onSwipe:function(e,data){var localState=state.localState;var cd=state.$D+data.length;localState.$d=data.length;localState.$D=state.$D;if(state.bounds.strictLower&&!_.isUndefined(state.bounds.lower)&&state.bounds.lower>cd){localState.$d=state.bounds.lower-state.$D}else if(state.bounds.strictUpper&&!_.isUndefined(state.bounds.upper)&&state.bounds.upper<cd){localState.$d=state.bounds.upper-state.$D}state.vc.addDistance(data.length);_.forEach(settings.animation,(function(a){if(a.target){if(a.target.length>1){a.target.each((function(i){localState.$i=i;$(this).css(_.mapValues(a.css,(function(v,k){return v(localState)})))}))}else{localState.$i=0;a.target.css(_.mapValues(a.css,(function(v,k){return v(localState)})))}}}))},onSwipeEnd:function(e,data){var localState=state.localState;var cd=state.$D+data.length;var v=state.vc.getVelocity();var time;localState.$d=data.length;localState.$D=state.$D;if(!_.isUndefined(state.bounds.lower)&&v<=0&&state.$D>cd){localState.$D=state.bounds.lower}else if(!_.isUndefined(state.bounds.upper)&&v>=0&&state.$D<cd){localState.$D=state.bounds.upper}localState.$d=0;localState.bounds=state.bounds;state.$D=localState.$D;time=state.vc.getTime(localState.$D-cd);animate(settings,localState,time,$ele,cd,e)}})}$.fn.swipeAnimation=function(settings){if(methods[settings]){return methods[settings].apply(this,arguments)}this.each((function(){addSwipey($(this),$.extend({direction:$.fn.swipey.DIRECTIONS.HORIZONTAL,target:$(this),threshold:30,enableGestures:function(){return true},bindEvents:["touch"],bounds:{},context:{},animation:{},onLower:$.noop,onUpper:$.noop,onAnimation:$.noop},settings))}));return this}})(jQuery);
849
849
  /*!
850
850
  * jQuery UI Touch Punch 0.2.3
@@ -856,7 +856,7 @@ var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.se
856
856
  * jquery.ui.widget.js
857
857
  * jquery.ui.mouse.js
858
858
  */
859
- !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){$(a.target).is("input")||$(a.target).is("textarea")||$(a.target).is("select")||$(a.target).is("button")||$(a.target).is("option")?a.stopPropagation():a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).IMask={})}(this,(function(t){"use strict";function e(t){return"string"==typeof t||t instanceof String}function s(t){var e;return"object"==typeof t&&null!=t&&"Object"===(null==t||null==(e=t.constructor)?void 0:e.name)}function i(t,e){return Array.isArray(e)?i(t,((t,s)=>e.includes(s))):Object.entries(t).reduce(((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t}),{})}const a={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function u(t){switch(t){case a.LEFT:return a.FORCE_LEFT;case a.RIGHT:return a.FORCE_RIGHT;default:return t}}function n(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function r(t,e){if(e===t)return!0;const s=Array.isArray(e),i=Array.isArray(t);let a;if(s&&i){if(e.length!=t.length)return!1;for(a=0;a<e.length;a++)if(!r(e[a],t[a]))return!1;return!0}if(s!=i)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){const s=e instanceof Date,i=t instanceof Date;if(s&&i)return e.getTime()==t.getTime();if(s!=i)return!1;const u=e instanceof RegExp,n=t instanceof RegExp;if(u&&n)return e.toString()==t.toString();if(u!=n)return!1;const h=Object.keys(e);for(a=0;a<h.length;a++)if(!Object.prototype.hasOwnProperty.call(t,h[a]))return!1;for(a=0;a<h.length;a++)if(!r(t[h[a]],e[h[a]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}class h{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?a.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?a.LEFT:a.RIGHT}}function o(t,e){return new o.InputMask(t,e)}function l(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?o.MaskedRegExp:e(t)?o.MaskedPattern:t===Date?o.MaskedDate:t===Number?o.MaskedNumber:Array.isArray(t)||t===Array?o.MaskedDynamic:o.Masked&&t.prototype instanceof o.Masked?t:o.Masked&&t instanceof o.Masked?t.constructor:t instanceof Function?o.MaskedFunction:(console.warn("Mask not found for mask",t),o.Masked)}function p(t){if(!t)throw new Error("Options in not defined");if(o.Masked){if(t.prototype instanceof o.Masked)return{mask:t};const{mask:e,...a}=t instanceof o.Masked?{mask:t}:s(t)&&t.mask instanceof o.Masked?t:{};if(e){const t=e.mask;return{...i(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...a}}}return s(t)?{...t}:{mask:t}}function d(t){if(o.Masked&&t instanceof o.Masked)return t;const e=p(t),s=l(e.mask);if(!s)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}o.createMask=d;class c{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return null!=t?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return null!=t?t:this.value.length}select(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}}o.MaskElement=c;class g extends c{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,s;return null!=(t=null==(e=(s=this.input).getRootNode)?void 0:e.call(s))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){return this._handlers.redo&&(90===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)||89===t.keyCode&&t.ctrlKey)?(t.preventDefault(),this._handlers.redo(t)):this._handlers.undo&&90===t.keyCode&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),this._handlers.undo(t)):void(t.isComposing||this._handlers.selectionChange(t))}_onBeforeinput(t){return"historyUndo"===t.inputType&&this._handlers.undo?(t.preventDefault(),this._handlers.undo(t)):"historyRedo"===t.inputType&&this._handlers.redo?(t.preventDefault(),this._handlers.redo(t)):void 0}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}o.HTMLMaskElement=g;class k extends g{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}o.HTMLMaskElement=g;class m extends g{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,t),s.setEnd(this.input.lastChild||this.input,e);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}o.HTMLContenteditableMaskElement=m;class _{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>_.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}_.MAX_LENGTH=100;class f{constructor(t,e){this.el=t instanceof c?t:t.isContentEditable&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName?new m(t):new k(t),this.masked=d(e),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new _,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(t){var e;return null==t||(null==(e=this.masked)?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof o.Masked)&&this.masked.constructor===l(t))return void this.masked.updateOptions({mask:t});const e=t instanceof o.Masked?t:d({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,e){const s=this._listeners[t];s&&s.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,u=this.unmaskedValue!==e||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=e,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),"auto"===t?this.alignCursor():null!=t&&(this.cursorPos=t),u&&this._fireChangeEvents(),this._historyChanging||!u&&!this.history.isEmpty||this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...s}=t,i=!this.maskEquals(e),a=this.masked.optionsIsChanged(s);i&&(this.mask=e),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,a.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const s=this._listeners[t].indexOf(e);return s>=0&&this._listeners[t].splice(s,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const e=new h({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,u=s===this.masked.rawInputValue?e.removeDirection:a.NONE;let n=this.masked.nearestInputPos(e.startChangePos+i,u);u!==a.NONE&&(n=this.masked.nearestInputPos(n,a.NONE)),this.updateControl(n),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}o.InputMask=f;class v{static normalize(t){return Array.isArray(t)?t:[t,new v]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}o.ChangeDetails=v;class E{constructor(t,e,s){void 0===t&&(t=""),void 0===e&&(e=0),this.value=t,this.from=e,this.stop=s}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||null!=t&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class C{constructor(t){this._value="",this._update({...C.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){void 0===e&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new E(this.extractInput(t,e),t)}appendTail(t){return e(t)&&(t=new E(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new v({inserted:t,rawInserted:t})):new v}_appendChar(t,e,s){void 0===e&&(e={});const i=this.state;let a;if([t,a]=this.doPrepareChar(t,e),t&&(a=a.aggregate(this._appendCharRaw(t,e)),!a.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let u=this.pad(e);const n=this._appendCharRaw(t,e);u=u.aggregate(n),n.rawInserted||u.equals(a)?a=u:this.state=s}if(a.inserted){let t,u=!1!==this.doValidate(e);if(u&&null!=s){const e=this.state;if(!0===this.overwrite){t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.unshift(this.displayValue.length-a.tailShift)}let i=this.appendTail(s);if(u=i.rawInserted.length===s.toString().length,!(u&&i.inserted||"shift"!==this.overwrite)){this.state=e,t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.shift();i=this.appendTail(s),u=i.rawInserted.length===s.toString().length}u&&i.inserted&&(this.state=e)}u||(a=new v,this.state=i,s&&t&&(s.state=t))}return a}_appendPlaceholder(){return new v}_appendEager(){return new v}append(t,s,i){if(!e(t))throw new Error("value should be string");const a=e(i)?new E(String(i)):i;let u;null!=s&&s.tail&&(s._beforeTailState=this.state),[t,u]=this.doPrepare(t,s);for(let e=0;e<t.length;++e){const i=this._appendChar(t[e],s,a);if(!i.rawInserted&&!this.doSkipInvalid(t[e],s,a))break;u.aggregate(i)}return(!0===this.eager||"append"===this.eager)&&null!=s&&s.input&&t&&u.aggregate(this._appendEager()),null!=a&&(u.tailShift+=this.appendTail(a).tailShift),u}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new v}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,s=this.value,i=t();return this.rawInputValue=e,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,s=t(this);return this.state=e,delete this._isolated,s}doSkipInvalid(t,e,s){return Boolean(this.skipInvalid)}doPrepare(t,e){return void 0===e&&(e={}),v.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return void 0===e&&(e={}),v.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,s,i,n){void 0===s&&(s=""),void 0===i&&(i=a.NONE),void 0===n&&(n={input:!0});const r=t+e,h=this.extractTail(r),o=!0===this.eager||"remove"===this.eager;let l;o&&(i=u(i),l=this.extractInput(0,r,{raw:!0}));let p=t;const d=new v;if(i!==a.NONE&&(p=this.nearestInputPos(t,e>1&&0!==t&&!o?a.NONE:i),d.tailShift=p-t),d.aggregate(this.remove(p)),o&&i!==a.NONE&&l===this.rawInputValue)if(i===a.FORCE_LEFT){let t;for(;l===this.rawInputValue&&(t=this.displayValue.length);)d.aggregate(new v({tailShift:-1})).aggregate(this.remove(t-1))}else i===a.FORCE_RIGHT&&h.unshift();return d.aggregate(this.append(s,n,h))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!r(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||C.EMPTY_VALUES.includes(t)&&C.EMPTY_VALUES.includes(e)||!!this.format&&this.format(t,this)===this.format(this.typedValue,this)}pad(t){return new v}}C.DEFAULTS={skipInvalid:!0},C.EMPTY_VALUES=[void 0,null,""],o.Masked=C;class A{constructor(t,e){void 0===t&&(t=[]),void 0===e&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=e(t)?new E(String(t)):t;const s=this.chunks[this.chunks.length-1],i=s&&(s.stop===t.stop||null==t.stop)&&t.from===s.from+s.toString().length;if(t instanceof E)i?s.extend(t.toString()):this.chunks.push(t);else if(t instanceof A){if(null==t.stop){let e;for(;t.chunks.length&&null==t.chunks[0].stop;)e=t.chunks.shift(),e.from+=t.from,this.extend(e)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof o.MaskedPattern)){return new E(this.toString()).appendTo(t)}const e=new v;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=t._mapPosToBlock(t.displayValue.length),u=i.stop;let n;if(null!=u&&(!a||a.index<=u)&&((i instanceof A||t._stops.indexOf(u)>=0)&&e.aggregate(t._appendPlaceholder(u)),n=i instanceof A&&t._blocks[u]),n){const s=n.appendTail(i);e.aggregate(s);const a=i.toString().slice(s.rawInserted.length);a&&e.aggregate(t.append(a,{tail:!0}))}else e.aggregate(t.append(i.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...s}=t;Object.assign(this,s),this.chunks=e.map((t=>{const e="chunks"in t?new A:new E;return e.state=t,e}))}unshift(t){if(!this.chunks.length||null!=t&&this.from>=t)return"";const e=null!=t?t-this.from:t;let s=0;for(;s<this.chunks.length;){const t=this.chunks[s],i=t.unshift(e);if(t.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],s=e.shift();if(e.toString()){if(!s)break;--t}else this.chunks.splice(t,1);if(s)return s}return""}}class F{constructor(t,e){this.masked=t,this._log=[];const{offset:s,index:i}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(e=this.block)?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,a.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,a.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,a.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,a.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,a.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,a.NONE),!0}))}}class x{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new v}nearestInputPos(t,e){void 0===e&&(e=a.NONE);const s=this._value.length;switch(e){case a.LEFT:case a.FORCE_LEFT:return 0;default:return s}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new v;const s=!0===this.eager||"append"===this.eager,i=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!s)&&!e.tail,a=new v({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(e.raw||e.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new v;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new E("")}appendTail(t){return e(t)&&(t=new E(String(t))),t.appendTo(this)}append(t,e,s){const i=this._appendChar(t[0],e);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class S{constructor(t){const{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:n,...r}=t;this.masked=d(r),Object.assign(this,{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:n})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),0===t&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new v}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new v;const s=this.masked.state;let i=this.masked._appendChar(t,this.currentMaskFlags(e));return i.inserted&&!1===this.doValidate(e)&&(i=new v,this.masked.state=s),i.inserted||this.isOptional||this.lazy||e.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(t,e,s){return this.masked.append(t,this.currentMaskFlags(e),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new v:(this.isFilled=!0,new v({inserted:this.placeholderChar}))}_appendEager(){return new v}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.masked.extractInput(t,e,s)}nearestInputPos(t,e){void 0===e&&(e=a.NONE);const s=this.value.length,i=Math.min(Math.max(t,0),s);switch(e){case a.LEFT:case a.FORCE_LEFT:return this.isComplete?i:0;case a.RIGHT:case a.FORCE_RIGHT:return this.isComplete?i:s;default:return i}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(null==t||null==(e=t._beforeTailState)?void 0:e.masked)||(null==t?void 0:t._beforeTailState)}}pad(t){return new v}}S.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class B extends C{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=t=>t.search(e)>=0),super._update(t)}}o.MaskedRegExp=B;class b extends C{constructor(t){super({...b.DEFAULTS,...t,definitions:Object.assign({},S.DEFAULT_DEFINITIONS,null==t?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let s=!1,i=!1;for(let a=0;a<e.length;++a){if(this.blocks){const t=e.slice(a),s=Object.keys(this.blocks).filter((e=>0===t.indexOf(e)));s.sort(((t,e)=>e.length-t.length));const i=s[0];if(i){const{expose:t,repeat:e,...s}=p(this.blocks[i]),u={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:e,parent:this},n=null!=e?new o.RepeatBlock(u):d(u);n&&(this._blocks.push(n),t&&(this.exposeBlock=n),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let u=e[a],n=u in t;if(u===b.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===u||"}"===u){s=!s;continue}if("["===u||"]"===u){i=!i;continue}if(u===b.ESCAPE_CHAR){if(++a,u=e[a],!u)break;n=!1}const r=n?new S({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...p(t[u]),parent:this}):new x({char:u,eager:this.eager,isUnmasking:s});this._blocks.push(r)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t)return void this.reset();const{_blocks:e,...s}=t;this._blocks.forEach(((t,s)=>t.state=e[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new v;let s=null==(t=this._mapPosToBlock(this.displayValue.length))?void 0:t.index;if(null==s)return e;this._blocks[s].isFilled&&++s;for(let t=s;t<this._blocks.length;++t){const s=this._blocks[t]._appendEager();if(!s.inserted)break;e.aggregate(s)}return e}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._mapPosToBlock(this.displayValue.length),i=new v;if(!s)return i;for(let u,n=s.index;u=this._blocks[n];++n){var a;const s=u._appendChar(t,{...e,_beforeTailState:null==(a=e._beforeTailState)||null==(a=a._blocks)?void 0:a[n]});if(i.aggregate(s),s.consumed)break}return i}extractTail(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=new A;return t===e||this._forEachBlocksInRange(t,e,((t,e,i,a)=>{const u=t.extractTail(i,a);u.stop=this._findStopBefore(e),u.from=this._blockStartPos(e),u instanceof A&&(u.blockIndex=e),s.extend(u)})),s}extractInput(t,e,s){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),void 0===s&&(s={}),t===e)return"";let i="";return this._forEachBlocksInRange(t,e,((t,e,a,u)=>{i+=t.extractInput(a,u,s)})),i}_findStopBefore(t){let e;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=t))break;e=i}return e}_appendPlaceholder(t){const e=new v;if(this.lazy&&null==t)return e;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return e;const i=s.index,a=null!=t?t:this._blocks.length;return this._blocks.slice(i,a).forEach((s=>{var i;s.lazy&&null==t||e.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),e}_mapPosToBlock(t){let e="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=e.length;if(e+=i.displayValue,t<=e.length)return{index:s,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+e.displayValue.length),0)}_forEachBlocksInRange(t,e,s){void 0===e&&(e=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const t=this._mapPosToBlock(e),a=t&&i.index===t.index,u=i.offset,n=t&&a?t.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,u,n),t&&!a){for(let e=i.index+1;e<t.index;++e)s(this._blocks[e],e,0,this._blocks[e].displayValue.length);s(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s.aggregate(t.remove(i,a))})),s}nearestInputPos(t,e){if(void 0===e&&(e=a.NONE),!this._blocks.length)return 0;const s=new F(this,t);if(e===a.NONE)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(e===a.LEFT||e===a.FORCE_LEFT){if(e===a.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===t)return t;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),e===a.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=t)return s.pos;if(s.popState(),s.ok&&s.pos<=t)return s.pos;s.popState()}return s.ok?s.pos:e===a.FORCE_LEFT?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return e===a.RIGHT||e===a.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:e===a.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(t,a.LEFT)))):t}totalInputPositions(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);let s=0;return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s+=t.totalInputPositions(i,a)})),s}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map((t=>this._blocks[t])):[]}pad(t){const e=new v;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>e.aggregate(s.pad(t)))),e}}b.DEFAULTS={...C.DEFAULTS,lazy:!0,placeholderChar:"_"},b.STOP_CHAR="`",b.ESCAPE_CHAR="\\",b.InputDefinition=S,b.FixedDefinition=x,o.MaskedPattern=b;class D extends b{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...u}=t;this.to=e,this.from=s,this.maxLength=Math.max(String(e).length,i),this.autofix=a;const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<r.length&&r[h]===n[h];)++h;u.mask=r.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(u)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="",s="";const[,i,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(e="0".repeat(i.length)+a,s="9".repeat(i.length)+a),e=e.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[e,s]}doPrepareChar(t,e){let s;return void 0===e&&(e={}),[t,s]=super.doPrepareChar(t.replace(/\D/g,""),e),t||(s.skip=!this.isComplete),[t,s]}_appendCharRaw(t,e){if(void 0===e&&(e={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,u]=this.boundaries(this.value+t);return Number(u)<this.from?super._appendCharRaw(s[this.value.length],e):Number(a)>this.to?!e.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],e).aggregate(this._appendCharRaw(t,e)):super._appendCharRaw(i[this.value.length],e):super._appendCharRaw(t,e)}doValidate(t){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(e);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(t)}pad(t){const e=new v;if(this.value.length===this.maxLength)return e;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)e.aggregate(super._appendCharRaw("0",t));s.split("").forEach((t=>this._appendCharRaw(t)))}return e}}o.MaskedRange=D;class y extends b{static extractPatternOptions(t){const{mask:s,pattern:i,...a}=t;return{...a,mask:e(s)?s:i}}constructor(t){super(y.extractPatternOptions({...y.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:s,pattern:i,blocks:a,...u}={...y.DEFAULTS,...t},n=Object.assign({},y.GET_DEFAULT_BLOCKS());t.min&&(n.Y.from=t.min.getFullYear()),t.max&&(n.Y.to=t.max.getFullYear()),t.min&&t.max&&n.Y.from===n.Y.to&&(n.m.from=t.min.getMonth()+1,n.m.to=t.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=t.min.getDate(),n.d.to=t.max.getDate())),Object.assign(n,this.blocks,a),super._update({...u,mask:e(s)?s:i,blocks:n})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(y.extractPatternOptions(t))}}y.GET_DEFAULT_BLOCKS=()=>({d:{mask:D,from:1,to:31,maxLength:2},m:{mask:D,from:1,to:12,maxLength:2},Y:{mask:D,from:1900,to:9999}}),y.DEFAULTS={...b.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";return[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:(t,e)=>{const[s,i,a]=t.split(".").map(Number);return new Date(a,i-1,s)}},o.MaskedDate=y;class M extends C{constructor(t){super({...M.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...s}=p(t),i=d({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return e&&(this.exposeMask=i),i})):[])}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._applyDispatch(t,e);return this.currentMask&&s.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),s}_applyDispatch(t,e,s){void 0===t&&(t=""),void 0===e&&(e={}),void 0===s&&(s="");const i=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,a=this.rawInputValue,u=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:a,n=a.slice(u.length),r=this.currentMask,h=new v,o=null==r?void 0:r.state;return this.currentMask=this.doDispatch(t,{...e},s),this.currentMask&&(this.currentMask!==r?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),h.tailShift=this.currentMask.value.length-i.length),n&&(h.tailShift+=this.currentMask.append(n,{raw:!0,tail:!0}).tailShift)):o&&(this.currentMask.state=o)),h}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new v;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,s;return{...t,_beforeTailState:(null==(e=t._beforeTailState)?void 0:e.currentMaskRef)===this.currentMask&&(null==(s=t._beforeTailState)?void 0:s.currentMask)||t._beforeTailState}}doDispatch(t,e,s){return void 0===e&&(e={}),void 0===s&&(s=""),this.dispatch(t,this,e,s)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){void 0===e&&(e={});let[s,i]=super.doPrepare(t,e);if(this.currentMask){let t;[s,t]=super.doPrepare(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}doPrepareChar(t,e){void 0===e&&(e={});let[s,i]=super.doPrepareChar(t,e);if(this.currentMask){let t;[s,t]=super.doPrepareChar(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}reset(){var t;null==(t=this.currentMask)||t.reset(),this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask)return this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,void this._applyDispatch();let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isComplete)}get isFilled(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isFilled)}remove(t,e){const s=new v;return this.currentMask&&s.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),s}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:null==(t=this.currentMask)?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:s,currentMask:i,...a}=t;e&&this.compiledMasks.forEach(((t,s)=>t.state=e[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(t,e,s){return this.currentMask?this.currentMask.extractInput(t,e,s):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,s)=>{if(!t[s])return;const{mask:i,...a}=t[s];return r(e,a)&&e.maskEquals(i)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean(null==(e=this.currentMask)?void 0:e.typedValueEquals(t))}}M.DEFAULTS={...C.DEFAULTS,dispatch:(t,e,s,i)=>{if(!e.compiledMasks.length)return;const u=e.rawInputValue,n=e.compiledMasks.map(((n,r)=>{const h=e.currentMask===n,o=h?n.displayValue.length:n.nearestInputPos(n.displayValue.length,a.FORCE_LEFT);return n.rawInputValue!==u?(n.reset(),n.append(u,{raw:!0})):h||n.remove(o),n.append(t,e.currentMaskFlags(s)),n.appendTail(i),{index:r,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(o,n.nearestInputPos(n.displayValue.length,a.FORCE_LEFT)))}}));return n.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions)),e.compiledMasks[n[0].index]}},o.MaskedDynamic=M;class I extends b{constructor(t){super({...I.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...s}=t;if(e){const t=e.map((t=>t.length)),i=Math.min(...t),a=Math.max(...t)-i;s.mask="*".repeat(i),a&&(s.mask+="["+"*".repeat(a)+"]"),this.enum=e}super._update(s)}_appendCharRaw(t,e){void 0===e&&(e={});const s=Math.min(this.nearestInputPos(0,a.FORCE_RIGHT),this.value.length),i=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((t,s)=>{const a=i[0][s];s>=this.value.length||a===t.value||(t.reset(),t._appendChar(a,e))}));const t=super._appendCharRaw(i[0][this.value.length],e);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e)))),t}return new v({skip:!this.isComplete})}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new E("",t)}remove(t,e){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),t===e)return new v;const s=Math.min(super.nearestInputPos(0,a.FORCE_RIGHT),this.value.length);let i;for(i=t;i>=0;--i){if(this.enum.filter((t=>this.matchValue(t,this.value.slice(s,i),s))).length>1)break}const u=super.remove(i,e);return u.tailShift+=i-t,u}get isComplete(){return this.enum.indexOf(this.value)>=0}}I.DEFAULTS={...b.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},o.MaskedEnum=I;class V extends C{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}var T;o.MaskedFunction=V;class w extends C{constructor(t){super({...w.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+n(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(n).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(n(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){void 0===e&&(e={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(t,e){void 0===e&&(e=!1);let s=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,e&&(t+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(t){return void 0===t&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,s))}_appendCharRaw(t,e){void 0===e&&(e={});const s=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=t;const u=this.number;let n,r=!isNaN(u),h=!1;if(r){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(w.UNMASKED_RADIX,this.radix),h||(h=a===this._value&&!e.tail)):r=!1),r&&(r=Boolean(this._value.match(this._numberRegExp)))}r?n=new v({inserted:this._value.slice(a.length),rawInserted:h?"":t,skip:h}):(this._value=a,n=new v),this._value=this._insertThousandsSeparators(this._value);const o=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(o);return n.tailShift+=(l-i)*this.thousandsSeparator.length,n}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,e);if(s<=t)return s}return-1}_adjustRangeWithSeparators(t,e){const s=this._findSeparatorAround(t);s>=0&&(t=s);const i=this._findSeparatorAround(e);return i>=0&&(e=i+this.thousandsSeparator.length),[t,e]}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const s=this.value.slice(0,t),i=this.value.slice(e),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const u=this._separatorsCountFromSlice(s);return new v({tailShift:(u-a)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case a.NONE:case a.LEFT:case a.FORCE_LEFT:{const s=this._findSeparatorAround(t-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(t<i||this.value.length<=i||e===a.FORCE_LEFT)return s}break}case a.RIGHT:case a.FORCE_RIGHT:{const e=this._findSeparatorAround(t);if(e>=0)return e+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,s,i)=>e+i)),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,s){void 0===e&&(e={});const i=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===w.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,w.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(w.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||w.EMPTY_VALUES.includes(t)&&w.EMPTY_VALUES.includes(this.typedValue))&&!(0===t&&""===this.value)}}T=w,w.UNMASKED_RADIX=".",w.EMPTY_VALUES=[...C.EMPTY_VALUES,0],w.DEFAULTS={...C.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[T.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},o.MaskedNumber=w;const R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function P(t,e,s){void 0===e&&(e=R.MASKED),void 0===s&&(s=R.MASKED);const i=d(t);return t=>i.runIsolated((i=>(i[e]=t,i[s])))}function O(t,e,s,i){return P(e,s,i)(t)}o.PIPE_TYPE=R,o.createPipe=P,o.pipe=O;class L extends b{get repeatFrom(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?t:0}get repeatTo(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,s,i;const{repeat:a,...u}=p(t);this._blockOpts=Object.assign({},this._blockOpts,u);const n=d(this._blockOpts);this.repeat=null!=(e=null!=(s=null!=a?a:n.repeat)?s:this.repeat)?e:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:n},eager:n.eager,overwrite:n.overwrite,skipInvalid:n.skipInvalid,lazy:n.lazy,placeholderChar:n.placeholderChar,displayChar:n.displayChar})}_allocateBlock(t){return t<this._blocks.length?this._blocks[t]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(d(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(t,e){void 0===e&&(e={});const s=new v;for(let r,h,o=null!=(i=null==(a=this._mapPosToBlock(this.displayValue.length))?void 0:a.index)?i:Math.max(this._blocks.length-1,0);r=null!=(u=this._blocks[o])?u:h=!h&&this._allocateBlock(o);++o){var i,a,u,n;const l=r._appendChar(t,{...e,_beforeTailState:null==(n=e._beforeTailState)||null==(n=n._blocks)?void 0:n[o]});if(l.skip&&h){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(l),l.consumed)break}return s}_trimEmptyTail(t,e){var s,i;void 0===t&&(t=0);const a=Math.max((null==(s=this._mapPosToBlock(t))?void 0:s.index)||0,this.repeatFrom,0);let u;null!=e&&(u=null==(i=this._mapPosToBlock(e))?void 0:i.index),null==u&&(u=this._blocks.length-1);let n=0;for(let t=u;a<=t&&!this._blocks[t].unmaskedValue;--t,++n);n&&(this._blocks.splice(u-n+1,n),this.mask=this.mask.slice(n))}reset(){super.reset(),this._trimEmptyTail()}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._trimEmptyTail(t,e),s}totalInputPositions(t,e){return void 0===t&&(t=0),null==e&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}o.RepeatBlock=L;try{globalThis.IMask=o}catch{}t.ChangeDetails=v,t.ChunksTailDetails=A,t.DIRECTION=a,t.HTMLContenteditableMaskElement=m,t.HTMLInputMaskElement=k,t.HTMLMaskElement=g,t.InputMask=f,t.MaskElement=c,t.Masked=C,t.MaskedDate=y,t.MaskedDynamic=M,t.MaskedEnum=I,t.MaskedFunction=V,t.MaskedNumber=w,t.MaskedPattern=b,t.MaskedRange=D,t.MaskedRegExp=B,t.PIPE_TYPE=R,t.PatternFixedDefinition=x,t.PatternInputDefinition=S,t.RepeatBlock=L,t.createMask=d,t.createPipe=P,t.default=o,t.forceDirection=u,t.normalizeOpts=p,t.pipe=O,Object.defineProperty(t,"__esModule",{value:!0})}));(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["wm_common_variables"]=factory();else root["wm_common_variables"]=factory()})(window,(()=>(()=>{var __webpack_modules__={"./node_modules/@metrichor/jmespath/dist/jmespath.esm.js":
859
+ !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){$(a.target).is("input")||$(a.target).is("textarea")||$(a.target).is("select")||$(a.target).is("button")||$(a.target).is("option")?a.stopPropagation():a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).IMask={})}(this,(function(t){"use strict";function e(t){return"string"==typeof t||t instanceof String}function s(t){var e;return"object"==typeof t&&null!=t&&"Object"===(null==t||null==(e=t.constructor)?void 0:e.name)}function i(t,e){return Array.isArray(e)?i(t,((t,s)=>e.includes(s))):Object.entries(t).reduce(((t,s)=>{let[i,a]=s;return e(a,i)&&(t[i]=a),t}),{})}const a={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function u(t){switch(t){case a.LEFT:return a.FORCE_LEFT;case a.RIGHT:return a.FORCE_RIGHT;default:return t}}function n(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function r(t,e){if(e===t)return!0;const s=Array.isArray(e),i=Array.isArray(t);let a;if(s&&i){if(e.length!=t.length)return!1;for(a=0;a<e.length;a++)if(!r(e[a],t[a]))return!1;return!0}if(s!=i)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){const s=e instanceof Date,i=t instanceof Date;if(s&&i)return e.getTime()==t.getTime();if(s!=i)return!1;const u=e instanceof RegExp,n=t instanceof RegExp;if(u&&n)return e.toString()==t.toString();if(u!=n)return!1;const h=Object.keys(e);for(a=0;a<h.length;a++)if(!Object.prototype.hasOwnProperty.call(t,h[a]))return!1;for(a=0;a<h.length;a++)if(!r(t[h[a]],e[h[a]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}class h{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?a.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?a.LEFT:a.RIGHT}}function o(t,e){return new o.InputMask(t,e)}function l(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?o.MaskedRegExp:e(t)?o.MaskedPattern:t===Date?o.MaskedDate:t===Number?o.MaskedNumber:Array.isArray(t)||t===Array?o.MaskedDynamic:o.Masked&&t.prototype instanceof o.Masked?t:o.Masked&&t instanceof o.Masked?t.constructor:t instanceof Function?o.MaskedFunction:(console.warn("Mask not found for mask",t),o.Masked)}function p(t){if(!t)throw new Error("Options in not defined");if(o.Masked){if(t.prototype instanceof o.Masked)return{mask:t};const{mask:e,...a}=t instanceof o.Masked?{mask:t}:s(t)&&t.mask instanceof o.Masked?t:{};if(e){const t=e.mask;return{...i(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...a}}}return s(t)?{...t}:{mask:t}}function d(t){if(o.Masked&&t instanceof o.Masked)return t;const e=p(t),s=l(e.mask);if(!s)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}o.createMask=d;class c{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return null!=t?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return null!=t?t:this.value.length}select(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}}o.MaskElement=c;class g extends c{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,s;return null!=(t=null==(e=(s=this.input).getRootNode)?void 0:e.call(s))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){return this._handlers.redo&&(90===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)||89===t.keyCode&&t.ctrlKey)?(t.preventDefault(),this._handlers.redo(t)):this._handlers.undo&&90===t.keyCode&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),this._handlers.undo(t)):void(t.isComposing||this._handlers.selectionChange(t))}_onBeforeinput(t){return"historyUndo"===t.inputType&&this._handlers.undo?(t.preventDefault(),this._handlers.undo(t)):"historyRedo"===t.inputType&&this._handlers.redo?(t.preventDefault(),this._handlers.redo(t)):void 0}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}o.HTMLMaskElement=g;class k extends g{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}o.HTMLMaskElement=g;class m extends g{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),s=e&&e.anchorOffset,i=e&&e.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,t),s.setEnd(this.input.lastChild||this.input,e);const i=this.rootElement,a=i.getSelection&&i.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}o.HTMLContenteditableMaskElement=m;class _{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>_.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}_.MAX_LENGTH=100;class f{constructor(t,e){this.el=t instanceof c?t:t.isContentEditable&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName?new m(t):new k(t),this.masked=d(e),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new _,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var e;return null==t||(null==(e=this.masked)?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof o.Masked)&&this.masked.constructor===l(t))return void this.masked.updateOptions({mask:t});const e=t instanceof o.Masked?t:d({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,e){const s=this._listeners[t];s&&s.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue,s=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,u=this.unmaskedValue!==e||this.value!==s||this._rawInputValue!==i;this._unmaskedValue=e,this._value=s,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),"auto"===t?this.alignCursor():null!=t&&(this.cursorPos=t),u&&this._fireChangeEvents(),this._historyChanging||!u&&!this.history.isEmpty||this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...s}=t,i=!this.maskEquals(e),a=this.masked.optionsIsChanged(s);i&&(this.mask=e),a&&this.masked.updateOptions(s),(i||a)&&this.updateControl()}updateCursor(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,a.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const s=this._listeners[t].indexOf(e);return s>=0&&this._listeners[t].splice(s,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const e=new h({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,i=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,u=s===this.masked.rawInputValue?e.removeDirection:a.NONE;let n=this.masked.nearestInputPos(e.startChangePos+i,u);u!==a.NONE&&(n=this.masked.nearestInputPos(n,a.NONE)),this.updateControl(n),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}o.InputMask=f;class v{static normalize(t){return Array.isArray(t)?t:[t,new v]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}o.ChangeDetails=v;class E{constructor(t,e,s){void 0===t&&(t=""),void 0===e&&(e=0),this.value=t,this.from=e,this.stop=s}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||null!=t&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class C{constructor(t){this._value="",this._update({...C.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){void 0===e&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new E(this.extractInput(t,e),t)}appendTail(t){return e(t)&&(t=new E(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new v({inserted:t,rawInserted:t})):new v}_appendChar(t,e,s){void 0===e&&(e={});const i=this.state;let a;if([t,a]=this.doPrepareChar(t,e),t&&(a=a.aggregate(this._appendCharRaw(t,e)),!a.rawInserted&&"pad"===this.autofix)){const s=this.state;this.state=i;let u=this.pad(e);const n=this._appendCharRaw(t,e);u=u.aggregate(n),n.rawInserted||u.equals(a)?a=u:this.state=s}if(a.inserted){let t,u=!1!==this.doValidate(e);if(u&&null!=s){const e=this.state;if(!0===this.overwrite){t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.unshift(this.displayValue.length-a.tailShift)}let i=this.appendTail(s);if(u=i.rawInserted.length===s.toString().length,!(u&&i.inserted||"shift"!==this.overwrite)){this.state=e,t=s.state;for(let t=0;t<a.rawInserted.length;++t)s.shift();i=this.appendTail(s),u=i.rawInserted.length===s.toString().length}u&&i.inserted&&(this.state=e)}u||(a=new v,this.state=i,s&&t&&(s.state=t))}return a}_appendPlaceholder(){return new v}_appendEager(){return new v}append(t,s,i){if(!e(t))throw new Error("value should be string");const a=e(i)?new E(String(i)):i;let u;null!=s&&s.tail&&(s._beforeTailState=this.state),[t,u]=this.doPrepare(t,s);for(let e=0;e<t.length;++e){const i=this._appendChar(t[e],s,a);if(!i.rawInserted&&!this.doSkipInvalid(t[e],s,a))break;u.aggregate(i)}return(!0===this.eager||"append"===this.eager)&&null!=s&&s.input&&t&&u.aggregate(this._appendEager()),null!=a&&(u.tailShift+=this.appendTail(a).tailShift),u}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new v}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,s=this.value,i=t();return this.rawInputValue=e,this.value&&this.value!==s&&0===s.indexOf(this.value)&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,i}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,s=t(this);return this.state=e,delete this._isolated,s}doSkipInvalid(t,e,s){return Boolean(this.skipInvalid)}doPrepare(t,e){return void 0===e&&(e={}),v.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return void 0===e&&(e={}),v.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,s,i,n){void 0===s&&(s=""),void 0===i&&(i=a.NONE),void 0===n&&(n={input:!0});const r=t+e,h=this.extractTail(r),o=!0===this.eager||"remove"===this.eager;let l;o&&(i=u(i),l=this.extractInput(0,r,{raw:!0}));let p=t;const d=new v;if(i!==a.NONE&&(p=this.nearestInputPos(t,e>1&&0!==t&&!o?a.NONE:i),d.tailShift=p-t),d.aggregate(this.remove(p)),o&&i!==a.NONE&&l===this.rawInputValue)if(i===a.FORCE_LEFT){let t;for(;l===this.rawInputValue&&(t=this.displayValue.length);)d.aggregate(new v({tailShift:-1})).aggregate(this.remove(t-1))}else i===a.FORCE_RIGHT&&h.unshift();return d.aggregate(this.append(s,n,h))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!r(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||C.EMPTY_VALUES.includes(t)&&C.EMPTY_VALUES.includes(e)||!!this.format&&this.format(t,this)===this.format(this.typedValue,this)}pad(t){return new v}}C.DEFAULTS={skipInvalid:!0},C.EMPTY_VALUES=[void 0,null,""],o.Masked=C;class A{constructor(t,e){void 0===t&&(t=[]),void 0===e&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=e(t)?new E(String(t)):t;const s=this.chunks[this.chunks.length-1],i=s&&(s.stop===t.stop||null==t.stop)&&t.from===s.from+s.toString().length;if(t instanceof E)i?s.extend(t.toString()):this.chunks.push(t);else if(t instanceof A){if(null==t.stop){let e;for(;t.chunks.length&&null==t.chunks[0].stop;)e=t.chunks.shift(),e.from+=t.from,this.extend(e)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof o.MaskedPattern)){return new E(this.toString()).appendTo(t)}const e=new v;for(let s=0;s<this.chunks.length;++s){const i=this.chunks[s],a=t._mapPosToBlock(t.displayValue.length),u=i.stop;let n;if(null!=u&&(!a||a.index<=u)&&((i instanceof A||t._stops.indexOf(u)>=0)&&e.aggregate(t._appendPlaceholder(u)),n=i instanceof A&&t._blocks[u]),n){const s=n.appendTail(i);e.aggregate(s);const a=i.toString().slice(s.rawInserted.length);a&&e.aggregate(t.append(a,{tail:!0}))}else e.aggregate(t.append(i.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...s}=t;Object.assign(this,s),this.chunks=e.map((t=>{const e="chunks"in t?new A:new E;return e.state=t,e}))}unshift(t){if(!this.chunks.length||null!=t&&this.from>=t)return"";const e=null!=t?t-this.from:t;let s=0;for(;s<this.chunks.length;){const t=this.chunks[s],i=t.unshift(e);if(t.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],s=e.shift();if(e.toString()){if(!s)break;--t}else this.chunks.splice(t,1);if(s)return s}return""}}class F{constructor(t,e){this.masked=t,this._log=[];const{offset:s,index:i}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(e=this.block)?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,a.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,a.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,a.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,a.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,a.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,a.NONE),!0}))}}class x{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new v}nearestInputPos(t,e){void 0===e&&(e=a.NONE);const s=this._value.length;switch(e){case a.LEFT:case a.FORCE_LEFT:return 0;default:return s}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),void 0===s&&(s={}),s.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new v;const s=!0===this.eager||"append"===this.eager,i=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!s)&&!e.tail,a=new v({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(e.raw||e.input),a}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new v;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new E("")}appendTail(t){return e(t)&&(t=new E(String(t))),t.appendTo(this)}append(t,e,s){const i=this._appendChar(t[0],e);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class S{constructor(t){const{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:n,...r}=t;this.masked=d(r),Object.assign(this,{parent:e,isOptional:s,placeholderChar:i,displayChar:a,lazy:u,eager:n})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),0===t&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new v}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new v;const s=this.masked.state;let i=this.masked._appendChar(t,this.currentMaskFlags(e));return i.inserted&&!1===this.doValidate(e)&&(i=new v,this.masked.state=s),i.inserted||this.isOptional||this.lazy||e.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(t,e,s){return this.masked.append(t,this.currentMaskFlags(e),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new v:(this.isFilled=!0,new v({inserted:this.placeholderChar}))}_appendEager(){return new v}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.masked.extractInput(t,e,s)}nearestInputPos(t,e){void 0===e&&(e=a.NONE);const s=this.value.length,i=Math.min(Math.max(t,0),s);switch(e){case a.LEFT:case a.FORCE_LEFT:return this.isComplete?i:0;case a.RIGHT:case a.FORCE_RIGHT:return this.isComplete?i:s;default:return i}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(null==t||null==(e=t._beforeTailState)?void 0:e.masked)||(null==t?void 0:t._beforeTailState)}}pad(t){return new v}}S.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class B extends C{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=t=>t.search(e)>=0),super._update(t)}}o.MaskedRegExp=B;class b extends C{constructor(t){super({...b.DEFAULTS,...t,definitions:Object.assign({},S.DEFAULT_DEFINITIONS,null==t?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let s=!1,i=!1;for(let a=0;a<e.length;++a){if(this.blocks){const t=e.slice(a),s=Object.keys(this.blocks).filter((e=>0===t.indexOf(e)));s.sort(((t,e)=>e.length-t.length));const i=s[0];if(i){const{expose:t,repeat:e,...s}=p(this.blocks[i]),u={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...s,repeat:e,parent:this},n=null!=e?new o.RepeatBlock(u):d(u);n&&(this._blocks.push(n),t&&(this.exposeBlock=n),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let u=e[a],n=u in t;if(u===b.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===u||"}"===u){s=!s;continue}if("["===u||"]"===u){i=!i;continue}if(u===b.ESCAPE_CHAR){if(++a,u=e[a],!u)break;n=!1}const r=n?new S({isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...p(t[u]),parent:this}):new x({char:u,eager:this.eager,isUnmasking:s});this._blocks.push(r)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t)return void this.reset();const{_blocks:e,...s}=t;this._blocks.forEach(((t,s)=>t.state=e[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new v;let s=null==(t=this._mapPosToBlock(this.displayValue.length))?void 0:t.index;if(null==s)return e;this._blocks[s].isFilled&&++s;for(let t=s;t<this._blocks.length;++t){const s=this._blocks[t]._appendEager();if(!s.inserted)break;e.aggregate(s)}return e}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._mapPosToBlock(this.displayValue.length),i=new v;if(!s)return i;for(let u,n=s.index;u=this._blocks[n];++n){var a;const s=u._appendChar(t,{...e,_beforeTailState:null==(a=e._beforeTailState)||null==(a=a._blocks)?void 0:a[n]});if(i.aggregate(s),s.consumed)break}return i}extractTail(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=new A;return t===e||this._forEachBlocksInRange(t,e,((t,e,i,a)=>{const u=t.extractTail(i,a);u.stop=this._findStopBefore(e),u.from=this._blockStartPos(e),u instanceof A&&(u.blockIndex=e),s.extend(u)})),s}extractInput(t,e,s){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),void 0===s&&(s={}),t===e)return"";let i="";return this._forEachBlocksInRange(t,e,((t,e,a,u)=>{i+=t.extractInput(a,u,s)})),i}_findStopBefore(t){let e;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=t))break;e=i}return e}_appendPlaceholder(t){const e=new v;if(this.lazy&&null==t)return e;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return e;const i=s.index,a=null!=t?t:this._blocks.length;return this._blocks.slice(i,a).forEach((s=>{var i;s.lazy&&null==t||e.aggregate(s._appendPlaceholder(null==(i=s._blocks)?void 0:i.length))})),e}_mapPosToBlock(t){let e="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],a=e.length;if(e+=i.displayValue,t<=e.length)return{index:s,offset:t-a}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+e.displayValue.length),0)}_forEachBlocksInRange(t,e,s){void 0===e&&(e=this.displayValue.length);const i=this._mapPosToBlock(t);if(i){const t=this._mapPosToBlock(e),a=t&&i.index===t.index,u=i.offset,n=t&&a?t.offset:this._blocks[i.index].displayValue.length;if(s(this._blocks[i.index],i.index,u,n),t&&!a){for(let e=i.index+1;e<t.index;++e)s(this._blocks[e],e,0,this._blocks[e].displayValue.length);s(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s.aggregate(t.remove(i,a))})),s}nearestInputPos(t,e){if(void 0===e&&(e=a.NONE),!this._blocks.length)return 0;const s=new F(this,t);if(e===a.NONE)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.displayValue.length);if(e===a.LEFT||e===a.FORCE_LEFT){if(e===a.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===t)return t;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),e===a.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=t)return s.pos;if(s.popState(),s.ok&&s.pos<=t)return s.pos;s.popState()}return s.ok?s.pos:e===a.FORCE_LEFT?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return e===a.RIGHT||e===a.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:e===a.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(t,a.LEFT)))):t}totalInputPositions(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);let s=0;return this._forEachBlocksInRange(t,e,((t,e,i,a)=>{s+=t.totalInputPositions(i,a)})),s}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map((t=>this._blocks[t])):[]}pad(t){const e=new v;return this._forEachBlocksInRange(0,this.displayValue.length,(s=>e.aggregate(s.pad(t)))),e}}b.DEFAULTS={...C.DEFAULTS,lazy:!0,placeholderChar:"_"},b.STOP_CHAR="`",b.ESCAPE_CHAR="\\",b.InputDefinition=S,b.FixedDefinition=x,o.MaskedPattern=b;class D extends b{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:s=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...u}=t;this.to=e,this.from=s,this.maxLength=Math.max(String(e).length,i),this.autofix=a;const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0");let h=0;for(;h<r.length&&r[h]===n[h];)++h;u.mask=r.slice(0,h).replace(/0/g,"\\0")+"0".repeat(this.maxLength-h),super._update(u)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="",s="";const[,i,a]=t.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(e="0".repeat(i.length)+a,s="9".repeat(i.length)+a),e=e.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[e,s]}doPrepareChar(t,e){let s;return void 0===e&&(e={}),[t,s]=super.doPrepareChar(t.replace(/\D/g,""),e),t||(s.skip=!this.isComplete),[t,s]}_appendCharRaw(t,e){if(void 0===e&&(e={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const s=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,u]=this.boundaries(this.value+t);return Number(u)<this.from?super._appendCharRaw(s[this.value.length],e):Number(a)>this.to?!e.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],e).aggregate(this._appendCharRaw(t,e)):super._appendCharRaw(i[this.value.length],e):super._appendCharRaw(t,e)}doValidate(t){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(e);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(t)}pad(t){const e=new v;if(this.value.length===this.maxLength)return e;const s=this.value,i=this.maxLength-this.value.length;if(i){this.reset();for(let s=0;s<i;++s)e.aggregate(super._appendCharRaw("0",t));s.split("").forEach((t=>this._appendCharRaw(t)))}return e}}o.MaskedRange=D;class y extends b{static extractPatternOptions(t){const{mask:s,pattern:i,...a}=t;return{...a,mask:e(s)?s:i}}constructor(t){super(y.extractPatternOptions({...y.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:s,pattern:i,blocks:a,...u}={...y.DEFAULTS,...t},n=Object.assign({},y.GET_DEFAULT_BLOCKS());t.min&&(n.Y.from=t.min.getFullYear()),t.max&&(n.Y.to=t.max.getFullYear()),t.min&&t.max&&n.Y.from===n.Y.to&&(n.m.from=t.min.getMonth()+1,n.m.to=t.max.getMonth()+1,n.m.from===n.m.to&&(n.d.from=t.min.getDate(),n.d.to=t.max.getDate())),Object.assign(n,this.blocks,a),super._update({...u,mask:e(s)?s:i,blocks:n})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(y.extractPatternOptions(t))}}y.GET_DEFAULT_BLOCKS=()=>({d:{mask:D,from:1,to:31,maxLength:2},m:{mask:D,from:1,to:12,maxLength:2},Y:{mask:D,from:1900,to:9999}}),y.DEFAULTS={...b.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";return[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join(".")},parse:(t,e)=>{const[s,i,a]=t.split(".").map(Number);return new Date(a,i-1,s)}},o.MaskedDate=y;class M extends C{constructor(t){super({...M.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...s}=p(t),i=d({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return e&&(this.exposeMask=i),i})):[])}_appendCharRaw(t,e){void 0===e&&(e={});const s=this._applyDispatch(t,e);return this.currentMask&&s.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),s}_applyDispatch(t,e,s){void 0===t&&(t=""),void 0===e&&(e={}),void 0===s&&(s="");const i=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,a=this.rawInputValue,u=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:a,n=a.slice(u.length),r=this.currentMask,h=new v,o=null==r?void 0:r.state;return this.currentMask=this.doDispatch(t,{...e},s),this.currentMask&&(this.currentMask!==r?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),h.tailShift=this.currentMask.value.length-i.length),n&&(h.tailShift+=this.currentMask.append(n,{raw:!0,tail:!0}).tailShift)):o&&(this.currentMask.state=o)),h}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new v;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,s;return{...t,_beforeTailState:(null==(e=t._beforeTailState)?void 0:e.currentMaskRef)===this.currentMask&&(null==(s=t._beforeTailState)?void 0:s.currentMask)||t._beforeTailState}}doDispatch(t,e,s){return void 0===e&&(e={}),void 0===s&&(s=""),this.dispatch(t,this,e,s)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){void 0===e&&(e={});let[s,i]=super.doPrepare(t,e);if(this.currentMask){let t;[s,t]=super.doPrepare(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}doPrepareChar(t,e){void 0===e&&(e={});let[s,i]=super.doPrepareChar(t,e);if(this.currentMask){let t;[s,t]=super.doPrepareChar(s,this.currentMaskFlags(e)),i=i.aggregate(t)}return[s,i]}reset(){var t;null==(t=this.currentMask)||t.reset(),this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask)return this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,void this._applyDispatch();let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isComplete)}get isFilled(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isFilled)}remove(t,e){const s=new v;return this.currentMask&&s.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),s}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:null==(t=this.currentMask)?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:s,currentMask:i,...a}=t;e&&this.compiledMasks.forEach(((t,s)=>t.state=e[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=a}extractInput(t,e,s){return this.currentMask?this.currentMask.extractInput(t,e,s):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,s)=>{if(!t[s])return;const{mask:i,...a}=t[s];return r(e,a)&&e.maskEquals(i)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean(null==(e=this.currentMask)?void 0:e.typedValueEquals(t))}}M.DEFAULTS={...C.DEFAULTS,dispatch:(t,e,s,i)=>{if(!e.compiledMasks.length)return;const u=e.rawInputValue,n=e.compiledMasks.map(((n,r)=>{const h=e.currentMask===n,o=h?n.displayValue.length:n.nearestInputPos(n.displayValue.length,a.FORCE_LEFT);return n.rawInputValue!==u?(n.reset(),n.append(u,{raw:!0})):h||n.remove(o),n.append(t,e.currentMaskFlags(s)),n.appendTail(i),{index:r,weight:n.rawInputValue.length,totalInputPositions:n.totalInputPositions(0,Math.max(o,n.nearestInputPos(n.displayValue.length,a.FORCE_LEFT)))}}));return n.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions)),e.compiledMasks[n[0].index]}},o.MaskedDynamic=M;class I extends b{constructor(t){super({...I.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...s}=t;if(e){const t=e.map((t=>t.length)),i=Math.min(...t),a=Math.max(...t)-i;s.mask="*".repeat(i),a&&(s.mask+="["+"*".repeat(a)+"]"),this.enum=e}super._update(s)}_appendCharRaw(t,e){void 0===e&&(e={});const s=Math.min(this.nearestInputPos(0,a.FORCE_RIGHT),this.value.length),i=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,s)));if(i.length){1===i.length&&this._forEachBlocksInRange(0,this.value.length,((t,s)=>{const a=i[0][s];s>=this.value.length||a===t.value||(t.reset(),t._appendChar(a,e))}));const t=super._appendCharRaw(i[0][this.value.length],e);return 1===i.length&&i[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e)))),t}return new v({skip:!this.isComplete})}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new E("",t)}remove(t,e){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),t===e)return new v;const s=Math.min(super.nearestInputPos(0,a.FORCE_RIGHT),this.value.length);let i;for(i=t;i>=0;--i){if(this.enum.filter((t=>this.matchValue(t,this.value.slice(s,i),s))).length>1)break}const u=super.remove(i,e);return u.tailShift+=i-t,u}get isComplete(){return this.enum.indexOf(this.value)>=0}}I.DEFAULTS={...b.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},o.MaskedEnum=I;class V extends C{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}}var T;o.MaskedFunction=V;class w extends C{constructor(t){super({...w.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+n(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(n).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(n(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){void 0===e&&(e={});const[s,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!s&&(i.skip=!0),!s||this.allowPositive||this.value||"-"===s||i.aggregate(this._appendChar("-")),[s,i]}_separatorsCount(t,e){void 0===e&&(e=!1);let s=0;for(let i=0;i<t;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,e&&(t+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(t){return void 0===t&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,s){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,s))}_appendCharRaw(t,e){void 0===e&&(e={});const s=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=t;const u=this.number;let n,r=!isNaN(u),h=!1;if(r){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(w.UNMASKED_RADIX,this.radix),h||(h=a===this._value&&!e.tail)):r=!1),r&&(r=Boolean(this._value.match(this._numberRegExp)))}r?n=new v({inserted:this._value.slice(a.length),rawInserted:h?"":t,skip:h}):(this._value=a,n=new v),this._value=this._insertThousandsSeparators(this._value);const o=e.tail&&e._beforeTailState?e._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(o);return n.tailShift+=(l-i)*this.thousandsSeparator.length,n}_findSeparatorAround(t){if(this.thousandsSeparator){const e=t-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,e);if(s<=t)return s}return-1}_adjustRangeWithSeparators(t,e){const s=this._findSeparatorAround(t);s>=0&&(t=s);const i=this._findSeparatorAround(e);return i>=0&&(e=i+this.thousandsSeparator.length),[t,e]}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const s=this.value.slice(0,t),i=this.value.slice(e),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const u=this._separatorsCountFromSlice(s);return new v({tailShift:(u-a)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case a.NONE:case a.LEFT:case a.FORCE_LEFT:{const s=this._findSeparatorAround(t-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(t<i||this.value.length<=i||e===a.FORCE_LEFT)return s}break}case a.RIGHT:case a.FORCE_RIGHT:{const e=this._findSeparatorAround(t);if(e>=0)return e+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,s,i)=>e+i)),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,s){void 0===e&&(e={});const i=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===w.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,w.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(w.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||w.EMPTY_VALUES.includes(t)&&w.EMPTY_VALUES.includes(this.typedValue))&&!(0===t&&""===this.value)}}T=w,w.UNMASKED_RADIX=".",w.EMPTY_VALUES=[...C.EMPTY_VALUES,0],w.DEFAULTS={...C.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[T.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},o.MaskedNumber=w;const R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function P(t,e,s){void 0===e&&(e=R.MASKED),void 0===s&&(s=R.MASKED);const i=d(t);return t=>i.runIsolated((i=>(i[e]=t,i[s])))}function O(t,e,s,i){return P(e,s,i)(t)}o.PIPE_TYPE=R,o.createPipe=P,o.pipe=O;class L extends b{get repeatFrom(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?t:0}get repeatTo(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,s,i;const{repeat:a,...u}=p(t);this._blockOpts=Object.assign({},this._blockOpts,u);const n=d(this._blockOpts);this.repeat=null!=(e=null!=(s=null!=a?a:n.repeat)?s:this.repeat)?e:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(i=this._blocks)?void 0:i.length)||0,this.repeatFrom)),blocks:{m:n},eager:n.eager,overwrite:n.overwrite,skipInvalid:n.skipInvalid,lazy:n.lazy,placeholderChar:n.placeholderChar,displayChar:n.displayChar})}_allocateBlock(t){return t<this._blocks.length?this._blocks[t]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(d(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(t,e){void 0===e&&(e={});const s=new v;for(let r,h,o=null!=(i=null==(a=this._mapPosToBlock(this.displayValue.length))?void 0:a.index)?i:Math.max(this._blocks.length-1,0);r=null!=(u=this._blocks[o])?u:h=!h&&this._allocateBlock(o);++o){var i,a,u,n;const l=r._appendChar(t,{...e,_beforeTailState:null==(n=e._beforeTailState)||null==(n=n._blocks)?void 0:n[o]});if(l.skip&&h){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(l),l.consumed)break}return s}_trimEmptyTail(t,e){var s,i;void 0===t&&(t=0);const a=Math.max((null==(s=this._mapPosToBlock(t))?void 0:s.index)||0,this.repeatFrom,0);let u;null!=e&&(u=null==(i=this._mapPosToBlock(e))?void 0:i.index),null==u&&(u=this._blocks.length-1);let n=0;for(let t=u;a<=t&&!this._blocks[t].unmaskedValue;--t,++n);n&&(this._blocks.splice(u-n+1,n),this.mask=this.mask.slice(n))}reset(){super.reset(),this._trimEmptyTail()}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const s=super.remove(t,e);return this._trimEmptyTail(t,e),s}totalInputPositions(t,e){return void 0===t&&(t=0),null==e&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}}o.RepeatBlock=L;try{globalThis.IMask=o}catch{}t.ChangeDetails=v,t.ChunksTailDetails=A,t.DIRECTION=a,t.HTMLContenteditableMaskElement=m,t.HTMLInputMaskElement=k,t.HTMLMaskElement=g,t.InputMask=f,t.MaskElement=c,t.Masked=C,t.MaskedDate=y,t.MaskedDynamic=M,t.MaskedEnum=I,t.MaskedFunction=V,t.MaskedNumber=w,t.MaskedPattern=b,t.MaskedRange=D,t.MaskedRegExp=B,t.PIPE_TYPE=R,t.PatternFixedDefinition=x,t.PatternInputDefinition=S,t.RepeatBlock=L,t.createMask=d,t.createPipe=P,t.default=o,t.forceDirection=u,t.normalizeOpts=p,t.pipe=O,Object.defineProperty(t,"__esModule",{value:!0})}));(function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory();else if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")exports["wm_common_variables"]=factory();else root["wm_common_variables"]=factory()})(window,(()=>(()=>{var __webpack_modules__={"./node_modules/@metrichor/jmespath/dist/jmespath.esm.js":
860
860
  /*!***************************************************************!*\
861
861
  !*** ./node_modules/@metrichor/jmespath/dist/jmespath.esm.js ***!
862
862
  \***************************************************************/(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{TYPE_ANY:()=>TYPE_ANY,TYPE_ARRAY:()=>TYPE_ARRAY,TYPE_ARRAY_NUMBER:()=>TYPE_ARRAY_NUMBER,TYPE_ARRAY_STRING:()=>TYPE_ARRAY_STRING,TYPE_BOOLEAN:()=>TYPE_BOOLEAN,TYPE_EXPREF:()=>TYPE_EXPREF,TYPE_NULL:()=>TYPE_NULL,TYPE_NUMBER:()=>TYPE_NUMBER,TYPE_OBJECT:()=>TYPE_OBJECT,TYPE_STRING:()=>TYPE_STRING,TreeInterpreter:()=>TreeInterpreter,compile:()=>compile,default:()=>__WEBPACK_DEFAULT_EXPORT__,jmespath:()=>jmespath,registerFunction:()=>registerFunction,search:()=>search,tokenize:()=>tokenize});const isObject=obj=>obj!==null&&Object.prototype.toString.call(obj)==="[object Object]";const strictDeepEqual=(first,second)=>{if(first===second){return true}if(typeof first!==typeof second){return false}if(Array.isArray(first)&&Array.isArray(second)){if(first.length!==second.length){return false}for(let i=0;i<first.length;i+=1){if(!strictDeepEqual(first[i],second[i])){return false}}return true}if(isObject(first)&&isObject(second)){const firstEntries=Object.entries(first);const secondKeys=new Set(Object.keys(second));if(firstEntries.length!==secondKeys.size){return false}for(const[key,value]of firstEntries){if(!strictDeepEqual(value,second[key])){return false}secondKeys.delete(key)}return secondKeys.size===0}return false};const isFalse=obj=>{if(obj===""||obj===false||obj===null||obj===undefined){return true}if(Array.isArray(obj)&&obj.length===0){return true}if(isObject(obj)){for(const key in obj){if(obj.hasOwnProperty(key)){return false}}return true}return false};const isAlpha=ch=>ch>="a"&&ch<="z"||ch>="A"&&ch<="Z"||ch==="_";const isNum=ch=>ch>="0"&&ch<="9"||ch==="-";const isAlphaNum=ch=>ch>="a"&&ch<="z"||ch>="A"&&ch<="Z"||ch>="0"&&ch<="9"||ch==="_";var Token;(function(Token){Token["TOK_EOF"]="EOF";Token["TOK_UNQUOTEDIDENTIFIER"]="UnquotedIdentifier";Token["TOK_QUOTEDIDENTIFIER"]="QuotedIdentifier";Token["TOK_RBRACKET"]="Rbracket";Token["TOK_RPAREN"]="Rparen";Token["TOK_COMMA"]="Comma";Token["TOK_COLON"]="Colon";Token["TOK_RBRACE"]="Rbrace";Token["TOK_NUMBER"]="Number";Token["TOK_CURRENT"]="Current";Token["TOK_ROOT"]="Root";Token["TOK_EXPREF"]="Expref";Token["TOK_PIPE"]="Pipe";Token["TOK_OR"]="Or";Token["TOK_AND"]="And";Token["TOK_EQ"]="EQ";Token["TOK_GT"]="GT";Token["TOK_LT"]="LT";Token["TOK_GTE"]="GTE";Token["TOK_LTE"]="LTE";Token["TOK_NE"]="NE";Token["TOK_FLATTEN"]="Flatten";Token["TOK_STAR"]="Star";Token["TOK_FILTER"]="Filter";Token["TOK_DOT"]="Dot";Token["TOK_NOT"]="Not";Token["TOK_LBRACE"]="Lbrace";Token["TOK_LBRACKET"]="Lbracket";Token["TOK_LPAREN"]="Lparen";Token["TOK_LITERAL"]="Literal"})(Token||(Token={}));const basicTokens={"(":Token.TOK_LPAREN,")":Token.TOK_RPAREN,"*":Token.TOK_STAR,",":Token.TOK_COMMA,".":Token.TOK_DOT,":":Token.TOK_COLON,"@":Token.TOK_CURRENT,["$"]:Token.TOK_ROOT,"]":Token.TOK_RBRACKET,"{":Token.TOK_LBRACE,"}":Token.TOK_RBRACE};const operatorStartToken={"!":true,"<":true,"=":true,">":true};const skipChars={"\t":true,"\n":true,"\r":true," ":true};class StreamLexer{constructor(){this._current=0}tokenize(stream){const tokens=[];this._current=0;let start;let identifier;let token;while(this._current<stream.length){if(isAlpha(stream[this._current])){start=this._current;identifier=this.consumeUnquotedIdentifier(stream);tokens.push({start:start,type:Token.TOK_UNQUOTEDIDENTIFIER,value:identifier})}else if(basicTokens[stream[this._current]]!==undefined){tokens.push({start:this._current,type:basicTokens[stream[this._current]],value:stream[this._current]});this._current+=1}else if(isNum(stream[this._current])){token=this.consumeNumber(stream);tokens.push(token)}else if(stream[this._current]==="["){token=this.consumeLBracket(stream);tokens.push(token)}else if(stream[this._current]==='"'){start=this._current;identifier=this.consumeQuotedIdentifier(stream);tokens.push({start:start,type:Token.TOK_QUOTEDIDENTIFIER,value:identifier})}else if(stream[this._current]===`'`){start=this._current;identifier=this.consumeRawStringLiteral(stream);tokens.push({start:start,type:Token.TOK_LITERAL,value:identifier})}else if(stream[this._current]==="`"){start=this._current;const literal=this.consumeLiteral(stream);tokens.push({start:start,type:Token.TOK_LITERAL,value:literal})}else if(operatorStartToken[stream[this._current]]!==undefined){token=this.consumeOperator(stream);token&&tokens.push(token)}else if(skipChars[stream[this._current]]!==undefined){this._current+=1}else if(stream[this._current]==="&"){start=this._current;this._current+=1;if(stream[this._current]==="&"){this._current+=1;tokens.push({start:start,type:Token.TOK_AND,value:"&&"})}else{tokens.push({start:start,type:Token.TOK_EXPREF,value:"&"})}}else if(stream[this._current]==="|"){start=this._current;this._current+=1;if(stream[this._current]==="|"){this._current+=1;tokens.push({start:start,type:Token.TOK_OR,value:"||"})}else{tokens.push({start:start,type:Token.TOK_PIPE,value:"|"})}}else{const error=new Error(`Unknown character: ${stream[this._current]}`);error.name="LexerError";throw error}}return tokens}consumeUnquotedIdentifier(stream){const start=this._current;this._current+=1;while(this._current<stream.length&&isAlphaNum(stream[this._current])){this._current+=1}return stream.slice(start,this._current)}consumeQuotedIdentifier(stream){const start=this._current;this._current+=1;const maxLength=stream.length;while(stream[this._current]!=='"'&&this._current<maxLength){let current=this._current;if(stream[current]==="\\"&&(stream[current+1]==="\\"||stream[current+1]==='"')){current+=2}else{current+=1}this._current=current}this._current+=1;return JSON.parse(stream.slice(start,this._current))}consumeRawStringLiteral(stream){const start=this._current;this._current+=1;const maxLength=stream.length;while(stream[this._current]!==`'`&&this._current<maxLength){let current=this._current;if(stream[current]==="\\"&&(stream[current+1]==="\\"||stream[current+1]===`'`)){current+=2}else{current+=1}this._current=current}this._current+=1;const literal=stream.slice(start+1,this._current-1);return literal.replace(`\\'`,`'`)}consumeNumber(stream){const start=this._current;this._current+=1;const maxLength=stream.length;while(isNum(stream[this._current])&&this._current<maxLength){this._current+=1}const value=parseInt(stream.slice(start,this._current),10);return{start:start,value:value,type:Token.TOK_NUMBER}}consumeLBracket(stream){const start=this._current;this._current+=1;if(stream[this._current]==="?"){this._current+=1;return{start:start,type:Token.TOK_FILTER,value:"[?"}}if(stream[this._current]==="]"){this._current+=1;return{start:start,type:Token.TOK_FLATTEN,value:"[]"}}return{start:start,type:Token.TOK_LBRACKET,value:"["}}consumeOperator(stream){const start=this._current;const startingChar=stream[start];this._current+=1;if(startingChar==="!"){if(stream[this._current]==="="){this._current+=1;return{start:start,type:Token.TOK_NE,value:"!="}}return{start:start,type:Token.TOK_NOT,value:"!"}}if(startingChar==="<"){if(stream[this._current]==="="){this._current+=1;return{start:start,type:Token.TOK_LTE,value:"<="}}return{start:start,type:Token.TOK_LT,value:"<"}}if(startingChar===">"){if(stream[this._current]==="="){this._current+=1;return{start:start,type:Token.TOK_GTE,value:">="}}return{start:start,type:Token.TOK_GT,value:">"}}if(startingChar==="="&&stream[this._current]==="="){this._current+=1;return{start:start,type:Token.TOK_EQ,value:"=="}}}consumeLiteral(stream){this._current+=1;const start=this._current;const maxLength=stream.length;while(stream[this._current]!=="`"&&this._current<maxLength){let current=this._current;if(stream[current]==="\\"&&(stream[current+1]==="\\"||stream[current+1]==="`")){current+=2}else{current+=1}this._current=current}let literalString=stream.slice(start,this._current).trimLeft();literalString=literalString.replace("\\`","`");const literal=this.looksLikeJSON(literalString)?JSON.parse(literalString):JSON.parse(`"${literalString}"`);this._current+=1;return literal}looksLikeJSON(literalString){const startingChars='[{"';const jsonLiterals=["true","false","null"];const numberLooking="-0123456789";if(literalString===""){return false}if(startingChars.includes(literalString[0])){return true}if(jsonLiterals.includes(literalString)){return true}if(numberLooking.includes(literalString[0])){try{JSON.parse(literalString);return true}catch(ex){return false}}return false}}const Lexer=new StreamLexer;const bindingPower={[Token.TOK_EOF]:0,[Token.TOK_UNQUOTEDIDENTIFIER]:0,[Token.TOK_QUOTEDIDENTIFIER]:0,[Token.TOK_RBRACKET]:0,[Token.TOK_RPAREN]:0,[Token.TOK_COMMA]:0,[Token.TOK_RBRACE]:0,[Token.TOK_NUMBER]:0,[Token.TOK_CURRENT]:0,[Token.TOK_EXPREF]:0,[Token.TOK_ROOT]:0,[Token.TOK_PIPE]:1,[Token.TOK_OR]:2,[Token.TOK_AND]:3,[Token.TOK_EQ]:5,[Token.TOK_GT]:5,[Token.TOK_LT]:5,[Token.TOK_GTE]:5,[Token.TOK_LTE]:5,[Token.TOK_NE]:5,[Token.TOK_FLATTEN]:9,[Token.TOK_STAR]:20,[Token.TOK_FILTER]:21,[Token.TOK_DOT]:40,[Token.TOK_NOT]:45,[Token.TOK_LBRACE]:50,[Token.TOK_LBRACKET]:55,[Token.TOK_LPAREN]:60};class TokenParser{constructor(){this.index=0;this.tokens=[]}parse(expression){this.loadTokens(expression);this.index=0;const ast=this.expression(0);if(this.lookahead(0)!==Token.TOK_EOF){const token=this.lookaheadToken(0);this.errorToken(token,`Unexpected token type: ${token.type}, value: ${token.value}`)}return ast}loadTokens(expression){this.tokens=[...Lexer.tokenize(expression),{type:Token.TOK_EOF,value:"",start:expression.length}]}expression(rbp){const leftToken=this.lookaheadToken(0);this.advance();let left=this.nud(leftToken);let currentTokenType=this.lookahead(0);while(rbp<bindingPower[currentTokenType]){this.advance();left=this.led(currentTokenType,left);currentTokenType=this.lookahead(0)}return left}lookahead(offset){return this.tokens[this.index+offset].type}lookaheadToken(offset){return this.tokens[this.index+offset]}advance(){this.index+=1}nud(token){let left;let right;let expression;switch(token.type){case Token.TOK_LITERAL:return{type:"Literal",value:token.value};case Token.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:token.value};case Token.TOK_QUOTEDIDENTIFIER:const node={type:"Field",name:token.value};if(this.lookahead(0)===Token.TOK_LPAREN){throw new Error("Quoted identifier not allowed for function names.")}else{return node}case Token.TOK_NOT:right=this.expression(bindingPower.Not);return{type:"NotExpression",children:[right]};case Token.TOK_STAR:left={type:"Identity"};right=this.lookahead(0)===Token.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(bindingPower.Star);return{type:"ValueProjection",children:[left,right]};case Token.TOK_FILTER:return this.led(token.type,{type:"Identity"});case Token.TOK_LBRACE:return this.parseMultiselectHash();case Token.TOK_FLATTEN:left={type:Token.TOK_FLATTEN,children:[{type:"Identity"}]};right=this.parseProjectionRHS(bindingPower.Flatten);return{type:"Projection",children:[left,right]};case Token.TOK_LBRACKET:if(this.lookahead(0)===Token.TOK_NUMBER||this.lookahead(0)===Token.TOK_COLON){right=this.parseIndexExpression();return this.projectIfSlice({type:"Identity"},right)}if(this.lookahead(0)===Token.TOK_STAR&&this.lookahead(1)===Token.TOK_RBRACKET){this.advance();this.advance();right=this.parseProjectionRHS(bindingPower.Star);return{children:[{type:"Identity"},right],type:"Projection"}}return this.parseMultiselectList();case Token.TOK_CURRENT:return{type:Token.TOK_CURRENT};case Token.TOK_ROOT:return{type:Token.TOK_ROOT};case Token.TOK_EXPREF:expression=this.expression(bindingPower.Expref);return{type:"ExpressionReference",children:[expression]};case Token.TOK_LPAREN:const args=[];while(this.lookahead(0)!==Token.TOK_RPAREN){if(this.lookahead(0)===Token.TOK_CURRENT){expression={type:Token.TOK_CURRENT};this.advance()}else{expression=this.expression(0)}args.push(expression)}this.match(Token.TOK_RPAREN);return args[0];default:this.errorToken(token)}}led(tokenName,left){let right;switch(tokenName){case Token.TOK_DOT:const rbp=bindingPower.Dot;if(this.lookahead(0)!==Token.TOK_STAR){right=this.parseDotRHS(rbp);return{type:"Subexpression",children:[left,right]}}this.advance();right=this.parseProjectionRHS(rbp);return{type:"ValueProjection",children:[left,right]};case Token.TOK_PIPE:right=this.expression(bindingPower.Pipe);return{type:Token.TOK_PIPE,children:[left,right]};case Token.TOK_OR:right=this.expression(bindingPower.Or);return{type:"OrExpression",children:[left,right]};case Token.TOK_AND:right=this.expression(bindingPower.And);return{type:"AndExpression",children:[left,right]};case Token.TOK_LPAREN:const name=left.name;const args=[];let expression;while(this.lookahead(0)!==Token.TOK_RPAREN){if(this.lookahead(0)===Token.TOK_CURRENT){expression={type:Token.TOK_CURRENT};this.advance()}else{expression=this.expression(0)}if(this.lookahead(0)===Token.TOK_COMMA){this.match(Token.TOK_COMMA)}args.push(expression)}this.match(Token.TOK_RPAREN);const node={name:name,type:"Function",children:args};return node;case Token.TOK_FILTER:const condition=this.expression(0);this.match(Token.TOK_RBRACKET);right=this.lookahead(0)===Token.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(bindingPower.Filter);return{type:"FilterProjection",children:[left,right,condition]};case Token.TOK_FLATTEN:const leftNode={type:Token.TOK_FLATTEN,children:[left]};const rightNode=this.parseProjectionRHS(bindingPower.Flatten);return{type:"Projection",children:[leftNode,rightNode]};case Token.TOK_EQ:case Token.TOK_NE:case Token.TOK_GT:case Token.TOK_GTE:case Token.TOK_LT:case Token.TOK_LTE:return this.parseComparator(left,tokenName);case Token.TOK_LBRACKET:const token=this.lookaheadToken(0);if(token.type===Token.TOK_NUMBER||token.type===Token.TOK_COLON){right=this.parseIndexExpression();return this.projectIfSlice(left,right)}this.match(Token.TOK_STAR);this.match(Token.TOK_RBRACKET);right=this.parseProjectionRHS(bindingPower.Star);return{type:"Projection",children:[left,right]};default:return this.errorToken(this.lookaheadToken(0))}}match(tokenType){if(this.lookahead(0)===tokenType){this.advance();return}else{const token=this.lookaheadToken(0);this.errorToken(token,`Expected ${tokenType}, got: ${token.type}`)}}errorToken(token,message=""){const error=new Error(message||`Invalid token (${token.type}): "${token.value}"`);error.name="ParserError";throw error}parseIndexExpression(){if(this.lookahead(0)===Token.TOK_COLON||this.lookahead(1)===Token.TOK_COLON){return this.parseSliceExpression()}const node={type:"Index",value:this.lookaheadToken(0).value};this.advance();this.match(Token.TOK_RBRACKET);return node}projectIfSlice(left,right){const indexExpr={type:"IndexExpression",children:[left,right]};if(right.type==="Slice"){return{children:[indexExpr,this.parseProjectionRHS(bindingPower.Star)],type:"Projection"}}return indexExpr}parseSliceExpression(){const parts=[null,null,null];let index=0;let currentTokenType=this.lookahead(0);while(currentTokenType!==Token.TOK_RBRACKET&&index<3){if(currentTokenType===Token.TOK_COLON){index+=1;this.advance()}else if(currentTokenType===Token.TOK_NUMBER){parts[index]=this.lookaheadToken(0).value;this.advance()}else{const token=this.lookaheadToken(0);this.errorToken(token,`Syntax error, unexpected token: ${token.value}(${token.type})`)}currentTokenType=this.lookahead(0)}this.match(Token.TOK_RBRACKET);return{children:parts,type:"Slice"}}parseComparator(left,comparator){const right=this.expression(bindingPower[comparator]);return{type:"Comparator",name:comparator,children:[left,right]}}parseDotRHS(rbp){const lookahead=this.lookahead(0);const exprTokens=[Token.TOK_UNQUOTEDIDENTIFIER,Token.TOK_QUOTEDIDENTIFIER,Token.TOK_STAR];if(exprTokens.includes(lookahead)){return this.expression(rbp)}if(lookahead===Token.TOK_LBRACKET){this.match(Token.TOK_LBRACKET);return this.parseMultiselectList()}if(lookahead===Token.TOK_LBRACE){this.match(Token.TOK_LBRACE);return this.parseMultiselectHash()}const token=this.lookaheadToken(0);this.errorToken(token,`Syntax error, unexpected token: ${token.value}(${token.type})`)}parseProjectionRHS(rbp){if(bindingPower[this.lookahead(0)]<10){return{type:"Identity"}}if(this.lookahead(0)===Token.TOK_LBRACKET){return this.expression(rbp)}if(this.lookahead(0)===Token.TOK_FILTER){return this.expression(rbp)}if(this.lookahead(0)===Token.TOK_DOT){this.match(Token.TOK_DOT);return this.parseDotRHS(rbp)}const token=this.lookaheadToken(0);this.errorToken(token,`Syntax error, unexpected token: ${token.value}(${token.type})`)}parseMultiselectList(){const expressions=[];while(this.lookahead(0)!==Token.TOK_RBRACKET){const expression=this.expression(0);expressions.push(expression);if(this.lookahead(0)===Token.TOK_COMMA){this.match(Token.TOK_COMMA);if(this.lookahead(0)===Token.TOK_RBRACKET){throw new Error("Unexpected token Rbracket")}}}this.match(Token.TOK_RBRACKET);return{type:"MultiSelectList",children:expressions}}parseMultiselectHash(){const pairs=[];const identifierTypes=[Token.TOK_UNQUOTEDIDENTIFIER,Token.TOK_QUOTEDIDENTIFIER];let keyToken;let keyName;let value;for(;;){keyToken=this.lookaheadToken(0);if(!identifierTypes.includes(keyToken.type)){throw new Error(`Expecting an identifier token, got: ${keyToken.type}`)}keyName=keyToken.value;this.advance();this.match(Token.TOK_COLON);value=this.expression(0);pairs.push({value:value,type:"KeyValuePair",name:keyName});if(this.lookahead(0)===Token.TOK_COMMA){this.match(Token.TOK_COMMA)}else if(this.lookahead(0)===Token.TOK_RBRACE){this.match(Token.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:pairs}}}const Parser=new TokenParser;var InputArgument;(function(InputArgument){InputArgument[InputArgument["TYPE_NUMBER"]=0]="TYPE_NUMBER";InputArgument[InputArgument["TYPE_ANY"]=1]="TYPE_ANY";InputArgument[InputArgument["TYPE_STRING"]=2]="TYPE_STRING";InputArgument[InputArgument["TYPE_ARRAY"]=3]="TYPE_ARRAY";InputArgument[InputArgument["TYPE_OBJECT"]=4]="TYPE_OBJECT";InputArgument[InputArgument["TYPE_BOOLEAN"]=5]="TYPE_BOOLEAN";InputArgument[InputArgument["TYPE_EXPREF"]=6]="TYPE_EXPREF";InputArgument[InputArgument["TYPE_NULL"]=7]="TYPE_NULL";InputArgument[InputArgument["TYPE_ARRAY_NUMBER"]=8]="TYPE_ARRAY_NUMBER";InputArgument[InputArgument["TYPE_ARRAY_STRING"]=9]="TYPE_ARRAY_STRING"})(InputArgument||(InputArgument={}));class Runtime{constructor(interpreter){this.TYPE_NAME_TABLE={[InputArgument.TYPE_NUMBER]:"number",[InputArgument.TYPE_ANY]:"any",[InputArgument.TYPE_STRING]:"string",[InputArgument.TYPE_ARRAY]:"array",[InputArgument.TYPE_OBJECT]:"object",[InputArgument.TYPE_BOOLEAN]:"boolean",[InputArgument.TYPE_EXPREF]:"expression",[InputArgument.TYPE_NULL]:"null",[InputArgument.TYPE_ARRAY_NUMBER]:"Array<number>",[InputArgument.TYPE_ARRAY_STRING]:"Array<string>"};this.functionAbs=([inputValue])=>Math.abs(inputValue);this.functionAvg=([inputArray])=>{let sum=0;for(let i=0;i<inputArray.length;i+=1){sum+=inputArray[i]}return sum/inputArray.length};this.functionCeil=([inputValue])=>Math.ceil(inputValue);this.functionContains=resolvedArgs=>{const[searchable,searchValue]=resolvedArgs;return searchable.includes(searchValue)};this.functionEndsWith=resolvedArgs=>{const[searchStr,suffix]=resolvedArgs;return searchStr.includes(suffix,searchStr.length-suffix.length)};this.functionFloor=([inputValue])=>Math.floor(inputValue);this.functionJoin=resolvedArgs=>{const[joinChar,listJoin]=resolvedArgs;return listJoin.join(joinChar)};this.functionKeys=([inputObject])=>Object.keys(inputObject);this.functionLength=([inputValue])=>{if(!isObject(inputValue)){return inputValue.length}return Object.keys(inputValue).length};this.functionMap=resolvedArgs=>{if(!this._interpreter){return[]}const mapped=[];const interpreter=this._interpreter;const exprefNode=resolvedArgs[0];const elements=resolvedArgs[1];for(let i=0;i<elements.length;i+=1){mapped.push(interpreter.visit(exprefNode,elements[i]))}return mapped};this.functionMax=([inputValue])=>{if(!inputValue.length){return null}const typeName=this.getTypeName(inputValue[0]);if(typeName===InputArgument.TYPE_NUMBER){return Math.max(...inputValue)}const elements=inputValue;let maxElement=elements[0];for(let i=1;i<elements.length;i+=1){if(maxElement.localeCompare(elements[i])<0){maxElement=elements[i]}}return maxElement};this.functionMaxBy=resolvedArgs=>{const exprefNode=resolvedArgs[1];const resolvedArray=resolvedArgs[0];const keyFunction=this.createKeyFunction(exprefNode,[InputArgument.TYPE_NUMBER,InputArgument.TYPE_STRING]);let maxNumber=-Infinity;let maxRecord;let current;for(let i=0;i<resolvedArray.length;i+=1){current=keyFunction&&keyFunction(resolvedArray[i]);if(current!==undefined&&current>maxNumber){maxNumber=current;maxRecord=resolvedArray[i]}}return maxRecord};this.functionMerge=resolvedArgs=>{let merged={};for(let i=0;i<resolvedArgs.length;i+=1){const current=resolvedArgs[i];merged=Object.assign(merged,current)}return merged};this.functionMin=([inputValue])=>{if(!inputValue.length){return null}const typeName=this.getTypeName(inputValue[0]);if(typeName===InputArgument.TYPE_NUMBER){return Math.min(...inputValue)}const elements=inputValue;let minElement=elements[0];for(let i=1;i<elements.length;i+=1){if(elements[i].localeCompare(minElement)<0){minElement=elements[i]}}return minElement};this.functionMinBy=resolvedArgs=>{const exprefNode=resolvedArgs[1];const resolvedArray=resolvedArgs[0];const keyFunction=this.createKeyFunction(exprefNode,[InputArgument.TYPE_NUMBER,InputArgument.TYPE_STRING]);let minNumber=Infinity;let minRecord;let current;for(let i=0;i<resolvedArray.length;i+=1){current=keyFunction&&keyFunction(resolvedArray[i]);if(current!==undefined&&current<minNumber){minNumber=current;minRecord=resolvedArray[i]}}return minRecord};this.functionNotNull=resolvedArgs=>{for(let i=0;i<resolvedArgs.length;i+=1){if(this.getTypeName(resolvedArgs[i])!==InputArgument.TYPE_NULL){return resolvedArgs[i]}}return null};this.functionReverse=([inputValue])=>{const typeName=this.getTypeName(inputValue);if(typeName===InputArgument.TYPE_STRING){const originalStr=inputValue;let reversedStr="";for(let i=originalStr.length-1;i>=0;i-=1){reversedStr+=originalStr[i]}return reversedStr}const reversedArray=inputValue.slice(0);reversedArray.reverse();return reversedArray};this.functionSort=([inputValue])=>[...inputValue].sort();this.functionSortBy=resolvedArgs=>{if(!this._interpreter){return[]}const sortedArray=resolvedArgs[0].slice(0);if(sortedArray.length===0){return sortedArray}const interpreter=this._interpreter;const exprefNode=resolvedArgs[1];const requiredType=this.getTypeName(interpreter.visit(exprefNode,sortedArray[0]));if(requiredType!==undefined&&![InputArgument.TYPE_NUMBER,InputArgument.TYPE_STRING].includes(requiredType)){throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[requiredType]})`)}const decorated=[];for(let i=0;i<sortedArray.length;i+=1){decorated.push([i,sortedArray[i]])}decorated.sort(((a,b)=>{const exprA=interpreter.visit(exprefNode,a[1]);const exprB=interpreter.visit(exprefNode,b[1]);if(this.getTypeName(exprA)!==requiredType){throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[requiredType]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(exprA)]}`)}else if(this.getTypeName(exprB)!==requiredType){throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[requiredType]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(exprB)]}`)}if(exprA>exprB){return 1}return exprA<exprB?-1:a[0]-b[0]}));for(let j=0;j<decorated.length;j+=1){sortedArray[j]=decorated[j][1]}return sortedArray};this.functionStartsWith=([searchable,searchStr])=>searchable.startsWith(searchStr);this.functionSum=([inputValue])=>inputValue.reduce(((x,y)=>x+y),0);this.functionToArray=([inputValue])=>{if(this.getTypeName(inputValue)===InputArgument.TYPE_ARRAY){return inputValue}return[inputValue]};this.functionToNumber=([inputValue])=>{const typeName=this.getTypeName(inputValue);let convertedValue;if(typeName===InputArgument.TYPE_NUMBER){return inputValue}if(typeName===InputArgument.TYPE_STRING){convertedValue=+inputValue;if(!isNaN(convertedValue)){return convertedValue}}return null};this.functionToString=([inputValue])=>{if(this.getTypeName(inputValue)===InputArgument.TYPE_STRING){return inputValue}return JSON.stringify(inputValue)};this.functionType=([inputValue])=>{switch(this.getTypeName(inputValue)){case InputArgument.TYPE_NUMBER:return"number";case InputArgument.TYPE_STRING:return"string";case InputArgument.TYPE_ARRAY:return"array";case InputArgument.TYPE_OBJECT:return"object";case InputArgument.TYPE_BOOLEAN:return"boolean";case InputArgument.TYPE_EXPREF:return"expref";case InputArgument.TYPE_NULL:return"null";default:return}};this.functionValues=([inputObject])=>Object.values(inputObject);this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[InputArgument.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[InputArgument.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[InputArgument.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[InputArgument.TYPE_STRING,InputArgument.TYPE_ARRAY]},{types:[InputArgument.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[InputArgument.TYPE_STRING]},{types:[InputArgument.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[InputArgument.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[InputArgument.TYPE_STRING]},{types:[InputArgument.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[InputArgument.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[InputArgument.TYPE_STRING,InputArgument.TYPE_ARRAY,InputArgument.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[InputArgument.TYPE_EXPREF]},{types:[InputArgument.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[InputArgument.TYPE_ARRAY_NUMBER,InputArgument.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[InputArgument.TYPE_ARRAY]},{types:[InputArgument.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[InputArgument.TYPE_OBJECT],variadic:true}]},min:{_func:this.functionMin,_signature:[{types:[InputArgument.TYPE_ARRAY_NUMBER,InputArgument.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[InputArgument.TYPE_ARRAY]},{types:[InputArgument.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[InputArgument.TYPE_ANY],variadic:true}]},reverse:{_func:this.functionReverse,_signature:[{types:[InputArgument.TYPE_STRING,InputArgument.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[InputArgument.TYPE_ARRAY_STRING,InputArgument.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[InputArgument.TYPE_ARRAY]},{types:[InputArgument.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[InputArgument.TYPE_STRING]},{types:[InputArgument.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[InputArgument.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[InputArgument.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[InputArgument.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[InputArgument.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[InputArgument.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[InputArgument.TYPE_OBJECT]}]}};this._interpreter=interpreter}registerFunction(name,customFunction,signature){if(name in this.functionTable){throw new Error(`Function already defined: ${name}()`)}this.functionTable[name]={_func:customFunction.bind(this),_signature:signature}}callFunction(name,resolvedArgs){const functionEntry=this.functionTable[name];if(functionEntry===undefined){throw new Error(`Unknown function: ${name}()`)}this.validateArgs(name,resolvedArgs,functionEntry._signature);return functionEntry._func.call(this,resolvedArgs)}validateInputSignatures(name,signature){for(let i=0;i<signature.length;i+=1){if("variadic"in signature[i]&&i!==signature.length-1){throw new Error(`ArgumentError: ${name}() 'variadic' argument ${i+1} must occur last`)}}}validateArgs(name,args,signature){var _a,_b;let pluralized;this.validateInputSignatures(name,signature);const numberOfRequiredArgs=signature.filter((argSignature=>{var _a;return(_a=!argSignature.optional)!==null&&_a!==void 0?_a:false})).length;const lastArgIsVariadic=(_b=(_a=signature[signature.length-1])===null||_a===void 0?void 0:_a.variadic)!==null&&_b!==void 0?_b:false;const tooFewArgs=args.length<numberOfRequiredArgs;const tooManyArgs=args.length>signature.length;const tooFewModifier=tooFewArgs&&(!lastArgIsVariadic&&numberOfRequiredArgs>1||lastArgIsVariadic)?"at least ":"";if(lastArgIsVariadic&&tooFewArgs||!lastArgIsVariadic&&(tooFewArgs||tooManyArgs)){pluralized=signature.length>1;throw new Error(`ArgumentError: ${name}() takes ${tooFewModifier}${numberOfRequiredArgs} argument${pluralized&&"s"||""} but received ${args.length}`)}let currentSpec;let actualType;let typeMatched;for(let i=0;i<signature.length;i+=1){typeMatched=false;currentSpec=signature[i].types;actualType=this.getTypeName(args[i]);let j;for(j=0;j<currentSpec.length;j+=1){if(actualType!==undefined&&this.typeMatches(actualType,currentSpec[j],args[i])){typeMatched=true;break}}if(!typeMatched&&actualType!==undefined){const expected=currentSpec.map((typeIdentifier=>this.TYPE_NAME_TABLE[typeIdentifier])).join(" | ");throw new Error(`TypeError: ${name}() expected argument ${i+1} to be type (${expected}) but received type ${this.TYPE_NAME_TABLE[actualType]} instead.`)}}}typeMatches(actual,expected,argValue){if(expected===InputArgument.TYPE_ANY){return true}if(expected===InputArgument.TYPE_ARRAY_STRING||expected===InputArgument.TYPE_ARRAY_NUMBER||expected===InputArgument.TYPE_ARRAY){if(expected===InputArgument.TYPE_ARRAY){return actual===InputArgument.TYPE_ARRAY}if(actual===InputArgument.TYPE_ARRAY){let subtype;if(expected===InputArgument.TYPE_ARRAY_NUMBER){subtype=InputArgument.TYPE_NUMBER}else if(expected===InputArgument.TYPE_ARRAY_STRING){subtype=InputArgument.TYPE_STRING}for(let i=0;i<argValue.length;i+=1){const typeName=this.getTypeName(argValue[i]);if(typeName!==undefined&&subtype!==undefined&&!this.typeMatches(typeName,subtype,argValue[i])){return false}}return true}}else{return actual===expected}return false}getTypeName(obj){switch(Object.prototype.toString.call(obj)){case"[object String]":return InputArgument.TYPE_STRING;case"[object Number]":return InputArgument.TYPE_NUMBER;case"[object Array]":return InputArgument.TYPE_ARRAY;case"[object Boolean]":return InputArgument.TYPE_BOOLEAN;case"[object Null]":return InputArgument.TYPE_NULL;case"[object Object]":if(obj.jmespathType===Token.TOK_EXPREF){return InputArgument.TYPE_EXPREF}return InputArgument.TYPE_OBJECT;default:return}}createKeyFunction(exprefNode,allowedTypes){if(!this._interpreter){return}const interpreter=this._interpreter;const keyFunc=x=>{const current=interpreter.visit(exprefNode,x);if(!allowedTypes.includes(this.getTypeName(current))){const msg=`TypeError: expected one of (${allowedTypes.map((t=>this.TYPE_NAME_TABLE[t])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(current)]}`;throw new Error(msg)}return current};return keyFunc}}class TreeInterpreter$1{constructor(){this._rootValue=null;this.runtime=new Runtime(this)}search(node,value){this._rootValue=value;return this.visit(node,value)}visit(node,value){let matched;let current;let result;let first;let second;let field;let left;let right;let collected;let i;let base;switch(node.type){case"Field":if(value===null){return null}if(isObject(value)){field=value[node.name];if(field===undefined){return null}return field}return null;case"Subexpression":result=this.visit(node.children[0],value);for(i=1;i<node.children.length;i+=1){result=this.visit(node.children[1],result);if(result===null){return null}}return result;case"IndexExpression":left=this.visit(node.children[0],value);right=this.visit(node.children[1],left);return right;case"Index":if(!Array.isArray(value)){return null}let index=node.value;if(index<0){index=value.length+index}result=value[index];if(result===undefined){result=null}return result;case"Slice":if(!Array.isArray(value)){return null}const sliceParams=[...node.children];const computed=this.computeSliceParams(value.length,sliceParams);const[start,stop,step]=computed;result=[];if(step>0){for(i=start;i<stop;i+=step){result.push(value[i])}}else{for(i=start;i>stop;i+=step){result.push(value[i])}}return result;case"Projection":base=this.visit(node.children[0],value);if(!Array.isArray(base)){return null}collected=[];for(i=0;i<base.length;i+=1){current=this.visit(node.children[1],base[i]);if(current!==null){collected.push(current)}}return collected;case"ValueProjection":base=this.visit(node.children[0],value);if(!isObject(base)){return null}collected=[];const values=Object.values(base);for(i=0;i<values.length;i+=1){current=this.visit(node.children[1],values[i]);if(current!==null){collected.push(current)}}return collected;case"FilterProjection":base=this.visit(node.children[0],value);if(!Array.isArray(base)){return null}const filtered=[];const finalResults=[];for(i=0;i<base.length;i+=1){matched=this.visit(node.children[2],base[i]);if(!isFalse(matched)){filtered.push(base[i])}}for(let j=0;j<filtered.length;j+=1){current=this.visit(node.children[1],filtered[j]);if(current!==null){finalResults.push(current)}}return finalResults;case"Comparator":first=this.visit(node.children[0],value);second=this.visit(node.children[1],value);switch(node.name){case Token.TOK_EQ:result=strictDeepEqual(first,second);break;case Token.TOK_NE:result=!strictDeepEqual(first,second);break;case Token.TOK_GT:result=first>second;break;case Token.TOK_GTE:result=first>=second;break;case Token.TOK_LT:result=first<second;break;case Token.TOK_LTE:result=first<=second;break;default:throw new Error(`Unknown comparator: ${node.name}`)}return result;case Token.TOK_FLATTEN:const original=this.visit(node.children[0],value);if(!Array.isArray(original)){return null}let merged=[];for(i=0;i<original.length;i+=1){current=original[i];if(Array.isArray(current)){merged=[...merged,...current]}else{merged.push(current)}}return merged;case"Identity":return value;case"MultiSelectList":if(value===null){return null}collected=[];for(i=0;i<node.children.length;i+=1){collected.push(this.visit(node.children[i],value))}return collected;case"MultiSelectHash":if(value===null){return null}collected={};let child;for(i=0;i<node.children.length;i+=1){child=node.children[i];collected[child.name]=this.visit(child.value,value)}return collected;case"OrExpression":matched=this.visit(node.children[0],value);if(isFalse(matched)){matched=this.visit(node.children[1],value)}return matched;case"AndExpression":first=this.visit(node.children[0],value);if(isFalse(first)){return first}return this.visit(node.children[1],value);case"NotExpression":first=this.visit(node.children[0],value);return isFalse(first);case"Literal":return node.value;case Token.TOK_PIPE:left=this.visit(node.children[0],value);return this.visit(node.children[1],left);case Token.TOK_CURRENT:return value;case Token.TOK_ROOT:return this._rootValue;case"Function":const resolvedArgs=[];for(let j=0;j<node.children.length;j+=1){resolvedArgs.push(this.visit(node.children[j],value))}return this.runtime.callFunction(node.name,resolvedArgs);case"ExpressionReference":const refNode=node.children[0];refNode.jmespathType=Token.TOK_EXPREF;return refNode;default:throw new Error(`Unknown node type: ${node.type}`)}}computeSliceParams(arrayLength,sliceParams){let[start,stop,step]=sliceParams;if(step===null){step=1}else if(step===0){const error=new Error("Invalid slice, step cannot be 0");error.name="RuntimeError";throw error}const stepValueNegative=step<0?true:false;start=start===null?stepValueNegative?arrayLength-1:0:this.capSliceRange(arrayLength,start,step);stop=stop===null?stepValueNegative?-1:arrayLength:this.capSliceRange(arrayLength,stop,step);return[start,stop,step]}capSliceRange(arrayLength,actualValue,step){let nextActualValue=actualValue;if(nextActualValue<0){nextActualValue+=arrayLength;if(nextActualValue<0){nextActualValue=step<0?-1:0}}else if(nextActualValue>=arrayLength){nextActualValue=step<0?arrayLength-1:arrayLength}return nextActualValue}}const TreeInterpreterInstance=new TreeInterpreter$1;const TYPE_ANY=InputArgument.TYPE_ANY;const TYPE_ARRAY=InputArgument.TYPE_ARRAY;const TYPE_ARRAY_NUMBER=InputArgument.TYPE_ARRAY_NUMBER;const TYPE_ARRAY_STRING=InputArgument.TYPE_ARRAY_STRING;const TYPE_BOOLEAN=InputArgument.TYPE_BOOLEAN;const TYPE_EXPREF=InputArgument.TYPE_EXPREF;const TYPE_NULL=InputArgument.TYPE_NULL;const TYPE_NUMBER=InputArgument.TYPE_NUMBER;const TYPE_OBJECT=InputArgument.TYPE_OBJECT;const TYPE_STRING=InputArgument.TYPE_STRING;function compile(expression){const nodeTree=Parser.parse(expression);return nodeTree}function tokenize(expression){return Lexer.tokenize(expression)}const registerFunction=(functionName,customFunction,signature)=>{TreeInterpreterInstance.runtime.registerFunction(functionName,customFunction,signature)};function search(data,expression){const nodeTree=Parser.parse(expression);return TreeInterpreterInstance.search(nodeTree,data)}const TreeInterpreter=TreeInterpreterInstance;const jmespath={compile:compile,registerFunction:registerFunction,search:search,tokenize:tokenize,TreeInterpreter:TreeInterpreter,TYPE_ANY:TYPE_ANY,TYPE_ARRAY_NUMBER:TYPE_ARRAY_NUMBER,TYPE_ARRAY_STRING:TYPE_ARRAY_STRING,TYPE_ARRAY:TYPE_ARRAY,TYPE_BOOLEAN:TYPE_BOOLEAN,TYPE_EXPREF:TYPE_EXPREF,TYPE_NULL:TYPE_NULL,TYPE_NUMBER:TYPE_NUMBER,TYPE_OBJECT:TYPE_OBJECT,TYPE_STRING:TYPE_STRING};const __WEBPACK_DEFAULT_EXPORT__=jmespath},"./node_modules/he/he.js":